Source Code
Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 87 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Set Approval For... | 59011174 | 30 days ago | IN | 0 S | 0.00146998 | ||||
| Set Approval For... | 58813710 | 32 days ago | IN | 0 S | 0.00245075 | ||||
| Set Approval For... | 57698872 | 45 days ago | IN | 0 S | 0.00245075 | ||||
| Safe Transfer Fr... | 56590241 | 59 days ago | IN | 0 S | 0.0018801 | ||||
| Set Approval For... | 56478048 | 60 days ago | IN | 0 S | 0.00233405 | ||||
| Set Approval For... | 56258821 | 63 days ago | IN | 0 S | 0.00275366 | ||||
| Set Approval For... | 55044965 | 74 days ago | IN | 0 S | 0.00275366 | ||||
| Set Approval For... | 52455417 | 88 days ago | IN | 0 S | 0.00269582 | ||||
| Set Approval For... | 52274992 | 89 days ago | IN | 0 S | 0.00269582 | ||||
| Safe Transfer Fr... | 51813006 | 93 days ago | IN | 0 S | 0.00215699 | ||||
| Set Approval For... | 51812995 | 93 days ago | IN | 0 S | 0.00269582 | ||||
| Safe Transfer Fr... | 51238981 | 98 days ago | IN | 0 S | 0.00201972 | ||||
| Set Approval For... | 51238965 | 98 days ago | IN | 0 S | 0.00269582 | ||||
| Safe Transfer Fr... | 51221015 | 98 days ago | IN | 0 S | 0.00314451 | ||||
| Set Approval For... | 51220992 | 98 days ago | IN | 0 S | 0.00269582 | ||||
| Set Approval For... | 50869766 | 101 days ago | IN | 0 S | 0.00269582 | ||||
| Set Approval For... | 50672216 | 103 days ago | IN | 0 S | 0.00249976 | ||||
| Approve | 50518200 | 104 days ago | IN | 0 S | 0.00125614 | ||||
| Set Approval For... | 50003002 | 107 days ago | IN | 0 S | 0.00233405 | ||||
| Safe Transfer Fr... | 49952289 | 108 days ago | IN | 0 S | 0.0019609 | ||||
| Set Approval For... | 49952284 | 108 days ago | IN | 0 S | 0.00249976 | ||||
| Safe Transfer Fr... | 49951978 | 108 days ago | IN | 0 S | 0.0019609 | ||||
| Set Approval For... | 49951973 | 108 days ago | IN | 0 S | 0.00245075 | ||||
| Safe Transfer Fr... | 49951839 | 108 days ago | IN | 0 S | 0.0019609 | ||||
| Set Approval For... | 49951832 | 108 days ago | IN | 0 S | 0.00245075 |
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers.
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | ||||
|---|---|---|---|---|---|---|---|
| 57698955 | 45 days ago | 0 S | |||||
| 57698955 | 45 days ago | 0 S | |||||
| 57698955 | 45 days ago | 0 S | |||||
| 57698955 | 45 days ago | 0 S | |||||
| 57698885 | 45 days ago | 0 S | |||||
| 57698885 | 45 days ago | 0 S | |||||
| 57698885 | 45 days ago | 0 S | |||||
| 57698885 | 45 days ago | 0 S | |||||
| 57348834 | 50 days ago | 0 S | |||||
| 57348834 | 50 days ago | 0 S | |||||
| 57348834 | 50 days ago | 0 S | |||||
| 57348834 | 50 days ago | 0 S | |||||
| 56478057 | 60 days ago | 0 S | |||||
| 56478057 | 60 days ago | 0 S | |||||
| 56478057 | 60 days ago | 0 S | |||||
| 56478057 | 60 days ago | 0 S | |||||
| 56258853 | 63 days ago | 0 S | |||||
| 56258853 | 63 days ago | 0 S | |||||
| 55044973 | 74 days ago | 0 S | |||||
| 55044973 | 74 days ago | 0 S | |||||
| 55044973 | 74 days ago | 0 S | |||||
| 55044973 | 74 days ago | 0 S | |||||
| 54121773 | 79 days ago | 0 S | |||||
| 54121773 | 79 days ago | 0 S | |||||
| 54121773 | 79 days ago | 0 S |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
MEMECupCards
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
No with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.24;
import { ERC1155 } from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import { ERC1155Burnable } from "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
contract MEMECupCards is ERC1155, ERC1155Burnable, Ownable, ReentrancyGuard {
/// @notice Project URI
string public projectURI;
// Errors
error NoRecipientsProvided();
error MintingToZeroAddress();
constructor(string memory _projectURI)
ERC1155(_projectURI)
Ownable(_msgSender())
{}
/// @notice Mint Rights token for Project
/// @param _recipients Address to receive token
/// @param _cardId Card ID
function distributeCards(address[] calldata _recipients, uint256 _cardId) external nonReentrant onlyOwner {
if(_recipients.length < 1) { revert NoRecipientsProvided(); }
unchecked {
for (uint256 i = 0; i < _recipients.length; i++) {
if(_recipients[i] == address(0)) { revert MintingToZeroAddress(); }
_mint(_recipients[i], _cardId, 1, "");
}
}
}
/// @notice Modified standard URI function
/// @param newURI New URI
function updateURI(string calldata newURI) external onlyOwner {
_setURI(newURI);
}
/// @notice Modified standard URI function, returns one set of data for owner and another for rights token
function uri(uint256 _id) public view override returns (string memory) {
return super.uri(_id);
}
/// @notice Owner token holder can withdraw funds
function withdraw() external payable nonReentrant onlyOwner {
payable(_msgSender()).transfer(address(this).balance);
}
/// @dev Register my contract on Sonic FeeM
function registerMe() external {
(bool _success,) = address(0xDC2B0D2Dd2b7759D97D50db4eabDC36973110830).call(
abi.encodeWithSignature("selfRegister(uint256)", 111)
);
require(_success, "FeeM registration failed");
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard ERC20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @dev Standard ERC721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @dev Standard ERC1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens.
*/
interface IERC1155Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
* @param tokenId Identifier number of a token.
*/
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC1155InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC1155InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param owner Address of the current owner of a token.
*/
error ERC1155MissingApprovalForAll(address operator, address owner);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC1155InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC1155InvalidOperator(address operator);
/**
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
* Used in batch transfers.
* @param idsLength Length of the array of token identifiers
* @param valuesLength Length of the array of token amounts
*/
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/ERC1155.sol)
pragma solidity ^0.8.20;
import {IERC1155} from "./IERC1155.sol";
import {IERC1155Receiver} from "./IERC1155Receiver.sol";
import {IERC1155MetadataURI} from "./extensions/IERC1155MetadataURI.sol";
import {Context} from "../../utils/Context.sol";
import {IERC165, ERC165} from "../../utils/introspection/ERC165.sol";
import {Arrays} from "../../utils/Arrays.sol";
import {IERC1155Errors} from "../../interfaces/draft-IERC6093.sol";
/**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*/
abstract contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI, IERC1155Errors {
using Arrays for uint256[];
using Arrays for address[];
mapping(uint256 id => mapping(address account => uint256)) private _balances;
mapping(address account => mapping(address operator => bool)) private _operatorApprovals;
// Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
string private _uri;
/**
* @dev See {_setURI}.
*/
constructor(string memory uri_) {
_setURI(uri_);
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC1155).interfaceId ||
interfaceId == type(IERC1155MetadataURI).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC1155MetadataURI-uri}.
*
* This implementation returns the same URI for *all* token types. It relies
* on the token type ID substitution mechanism
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
*
* Clients calling this function must replace the `\{id\}` substring with the
* actual token type ID.
*/
function uri(uint256 /* id */) public view virtual returns (string memory) {
return _uri;
}
/**
* @dev See {IERC1155-balanceOf}.
*/
function balanceOf(address account, uint256 id) public view virtual returns (uint256) {
return _balances[id][account];
}
/**
* @dev See {IERC1155-balanceOfBatch}.
*
* Requirements:
*
* - `accounts` and `ids` must have the same length.
*/
function balanceOfBatch(
address[] memory accounts,
uint256[] memory ids
) public view virtual returns (uint256[] memory) {
if (accounts.length != ids.length) {
revert ERC1155InvalidArrayLength(ids.length, accounts.length);
}
uint256[] memory batchBalances = new uint256[](accounts.length);
for (uint256 i = 0; i < accounts.length; ++i) {
batchBalances[i] = balanceOf(accounts.unsafeMemoryAccess(i), ids.unsafeMemoryAccess(i));
}
return batchBalances;
}
/**
* @dev See {IERC1155-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC1155-isApprovedForAll}.
*/
function isApprovedForAll(address account, address operator) public view virtual returns (bool) {
return _operatorApprovals[account][operator];
}
/**
* @dev See {IERC1155-safeTransferFrom}.
*/
function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) public virtual {
address sender = _msgSender();
if (from != sender && !isApprovedForAll(from, sender)) {
revert ERC1155MissingApprovalForAll(sender, from);
}
_safeTransferFrom(from, to, id, value, data);
}
/**
* @dev See {IERC1155-safeBatchTransferFrom}.
*/
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory values,
bytes memory data
) public virtual {
address sender = _msgSender();
if (from != sender && !isApprovedForAll(from, sender)) {
revert ERC1155MissingApprovalForAll(sender, from);
}
_safeBatchTransferFrom(from, to, ids, values, data);
}
/**
* @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. Will mint (or burn) if `from`
* (or `to`) is the zero address.
*
* Emits a {TransferSingle} event if the arrays contain one element, and {TransferBatch} otherwise.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement either {IERC1155Receiver-onERC1155Received}
* or {IERC1155Receiver-onERC1155BatchReceived} and return the acceptance magic value.
* - `ids` and `values` must have the same length.
*
* NOTE: The ERC-1155 acceptance check is not performed in this function. See {_updateWithAcceptanceCheck} instead.
*/
function _update(address from, address to, uint256[] memory ids, uint256[] memory values) internal virtual {
if (ids.length != values.length) {
revert ERC1155InvalidArrayLength(ids.length, values.length);
}
address operator = _msgSender();
for (uint256 i = 0; i < ids.length; ++i) {
uint256 id = ids.unsafeMemoryAccess(i);
uint256 value = values.unsafeMemoryAccess(i);
if (from != address(0)) {
uint256 fromBalance = _balances[id][from];
if (fromBalance < value) {
revert ERC1155InsufficientBalance(from, fromBalance, value, id);
}
unchecked {
// Overflow not possible: value <= fromBalance
_balances[id][from] = fromBalance - value;
}
}
if (to != address(0)) {
_balances[id][to] += value;
}
}
if (ids.length == 1) {
uint256 id = ids.unsafeMemoryAccess(0);
uint256 value = values.unsafeMemoryAccess(0);
emit TransferSingle(operator, from, to, id, value);
} else {
emit TransferBatch(operator, from, to, ids, values);
}
}
/**
* @dev Version of {_update} that performs the token acceptance check by calling
* {IERC1155Receiver-onERC1155Received} or {IERC1155Receiver-onERC1155BatchReceived} on the receiver address if it
* contains code (eg. is a smart contract at the moment of execution).
*
* IMPORTANT: Overriding this function is discouraged because it poses a reentrancy risk from the receiver. So any
* update to the contract state after this function would break the check-effect-interaction pattern. Consider
* overriding {_update} instead.
*/
function _updateWithAcceptanceCheck(
address from,
address to,
uint256[] memory ids,
uint256[] memory values,
bytes memory data
) internal virtual {
_update(from, to, ids, values);
if (to != address(0)) {
address operator = _msgSender();
if (ids.length == 1) {
uint256 id = ids.unsafeMemoryAccess(0);
uint256 value = values.unsafeMemoryAccess(0);
_doSafeTransferAcceptanceCheck(operator, from, to, id, value, data);
} else {
_doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, values, data);
}
}
}
/**
* @dev Transfers a `value` tokens of token type `id` from `from` to `to`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `from` must have a balance of tokens of type `id` of at least `value` amount.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function _safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes memory data) internal {
if (to == address(0)) {
revert ERC1155InvalidReceiver(address(0));
}
if (from == address(0)) {
revert ERC1155InvalidSender(address(0));
}
(uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
_updateWithAcceptanceCheck(from, to, ids, values, data);
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
* - `ids` and `values` must have the same length.
*/
function _safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory values,
bytes memory data
) internal {
if (to == address(0)) {
revert ERC1155InvalidReceiver(address(0));
}
if (from == address(0)) {
revert ERC1155InvalidSender(address(0));
}
_updateWithAcceptanceCheck(from, to, ids, values, data);
}
/**
* @dev Sets a new URI for all token types, by relying on the token type ID
* substitution mechanism
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
*
* By this mechanism, any occurrence of the `\{id\}` substring in either the
* URI or any of the values in the JSON file at said URI will be replaced by
* clients with the token type ID.
*
* For example, the `https://token-cdn-domain/\{id\}.json` URI would be
* interpreted by clients as
* `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
* for token type ID 0x4cce0.
*
* See {uri}.
*
* Because these URIs cannot be meaningfully represented by the {URI} event,
* this function emits no events.
*/
function _setURI(string memory newuri) internal virtual {
_uri = newuri;
}
/**
* @dev Creates a `value` amount of tokens of type `id`, and assigns them to `to`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function _mint(address to, uint256 id, uint256 value, bytes memory data) internal {
if (to == address(0)) {
revert ERC1155InvalidReceiver(address(0));
}
(uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
_updateWithAcceptanceCheck(address(0), to, ids, values, data);
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - `ids` and `values` must have the same length.
* - `to` cannot be the zero address.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function _mintBatch(address to, uint256[] memory ids, uint256[] memory values, bytes memory data) internal {
if (to == address(0)) {
revert ERC1155InvalidReceiver(address(0));
}
_updateWithAcceptanceCheck(address(0), to, ids, values, data);
}
/**
* @dev Destroys a `value` amount of tokens of type `id` from `from`
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `from` must have at least `value` amount of tokens of type `id`.
*/
function _burn(address from, uint256 id, uint256 value) internal {
if (from == address(0)) {
revert ERC1155InvalidSender(address(0));
}
(uint256[] memory ids, uint256[] memory values) = _asSingletonArrays(id, value);
_updateWithAcceptanceCheck(from, address(0), ids, values, "");
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `from` must have at least `value` amount of tokens of type `id`.
* - `ids` and `values` must have the same length.
*/
function _burnBatch(address from, uint256[] memory ids, uint256[] memory values) internal {
if (from == address(0)) {
revert ERC1155InvalidSender(address(0));
}
_updateWithAcceptanceCheck(from, address(0), ids, values, "");
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits an {ApprovalForAll} event.
*
* Requirements:
*
* - `operator` cannot be the zero address.
*/
function _setApprovalForAll(address owner, address operator, bool approved) internal virtual {
if (operator == address(0)) {
revert ERC1155InvalidOperator(address(0));
}
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Performs an acceptance check by calling {IERC1155-onERC1155Received} on the `to` address
* if it contains code at the moment of execution.
*/
function _doSafeTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256 id,
uint256 value,
bytes memory data
) private {
if (to.code.length > 0) {
try IERC1155Receiver(to).onERC1155Received(operator, from, id, value, data) returns (bytes4 response) {
if (response != IERC1155Receiver.onERC1155Received.selector) {
// Tokens rejected
revert ERC1155InvalidReceiver(to);
}
} catch (bytes memory reason) {
if (reason.length == 0) {
// non-ERC1155Receiver implementer
revert ERC1155InvalidReceiver(to);
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
}
/**
* @dev Performs a batch acceptance check by calling {IERC1155-onERC1155BatchReceived} on the `to` address
* if it contains code at the moment of execution.
*/
function _doSafeBatchTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory values,
bytes memory data
) private {
if (to.code.length > 0) {
try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, values, data) returns (
bytes4 response
) {
if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
// Tokens rejected
revert ERC1155InvalidReceiver(to);
}
} catch (bytes memory reason) {
if (reason.length == 0) {
// non-ERC1155Receiver implementer
revert ERC1155InvalidReceiver(to);
} else {
/// @solidity memory-safe-assembly
assembly {
revert(add(32, reason), mload(reason))
}
}
}
}
}
/**
* @dev Creates an array in memory with only one value for each of the elements provided.
*/
function _asSingletonArrays(
uint256 element1,
uint256 element2
) private pure returns (uint256[] memory array1, uint256[] memory array2) {
/// @solidity memory-safe-assembly
assembly {
// Load the free memory pointer
array1 := mload(0x40)
// Set array length to 1
mstore(array1, 1)
// Store the single element at the next word after the length (where content starts)
mstore(add(array1, 0x20), element1)
// Repeat for next array locating it right after the first array
array2 := add(array1, 0x40)
mstore(array2, 1)
mstore(add(array2, 0x20), element2)
// Update the free memory pointer by pointing after the second array
mstore(0x40, add(array2, 0x40))
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/ERC1155Burnable.sol)
pragma solidity ^0.8.20;
import {ERC1155} from "../ERC1155.sol";
/**
* @dev Extension of {ERC1155} that allows token holders to destroy both their
* own tokens and those that they have been approved to use.
*/
abstract contract ERC1155Burnable is ERC1155 {
function burn(address account, uint256 id, uint256 value) public virtual {
if (account != _msgSender() && !isApprovedForAll(account, _msgSender())) {
revert ERC1155MissingApprovalForAll(_msgSender(), account);
}
_burn(account, id, value);
}
function burnBatch(address account, uint256[] memory ids, uint256[] memory values) public virtual {
if (account != _msgSender() && !isApprovedForAll(account, _msgSender())) {
revert ERC1155MissingApprovalForAll(_msgSender(), account);
}
_burnBatch(account, ids, values);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol)
pragma solidity ^0.8.20;
import {IERC1155} from "../IERC1155.sol";
/**
* @dev Interface of the optional ERC1155MetadataExtension interface, as defined
* in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
*/
interface IERC1155MetadataURI is IERC1155 {
/**
* @dev Returns the URI for token type `id`.
*
* If the `\{id\}` substring is present in the URI, it must be replaced by
* clients with the actual token type ID.
*/
function uri(uint256 id) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (token/ERC1155/IERC1155.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC1155 compliant contract, as defined in the
* https://eips.ethereum.org/EIPS/eip-1155[EIP].
*/
interface IERC1155 is IERC165 {
/**
* @dev Emitted when `value` amount of tokens of type `id` are transferred from `from` to `to` by `operator`.
*/
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
/**
* @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
* transfers.
*/
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
/**
* @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
* `approved`.
*/
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
/**
* @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
*
* If an {URI} event was emitted for `id`, the standard
* https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
* returned by {IERC1155MetadataURI-uri}.
*/
event URI(string value, uint256 indexed id);
/**
* @dev Returns the value of tokens of token type `id` owned by `account`.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function balanceOf(address account, uint256 id) external view returns (uint256);
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
*
* Requirements:
*
* - `accounts` and `ids` must have the same length.
*/
function balanceOfBatch(
address[] calldata accounts,
uint256[] calldata ids
) external view returns (uint256[] memory);
/**
* @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
*
* Emits an {ApprovalForAll} event.
*
* Requirements:
*
* - `operator` cannot be the caller.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address account, address operator) external view returns (bool);
/**
* @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`.
*
* WARNING: This function can potentially allow a reentrancy attack when transferring tokens
* to an untrusted contract, when invoking {onERC1155Received} on the receiver.
* Ensure to follow the checks-effects-interactions pattern and consider employing
* reentrancy guards when interacting with untrusted contracts.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
* - `from` must have a balance of tokens of type `id` of at least `value` amount.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external;
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
*
* WARNING: This function can potentially allow a reentrancy attack when transferring tokens
* to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver.
* Ensure to follow the checks-effects-interactions pattern and consider employing
* reentrancy guards when interacting with untrusted contracts.
*
* Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments.
*
* Requirements:
*
* - `ids` and `values` must have the same length.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol)
pragma solidity ^0.8.20;
import {IERC165} from "../../utils/introspection/IERC165.sol";
/**
* @dev Interface that must be implemented by smart contracts in order to receive
* ERC-1155 token transfers.
*/
interface IERC1155Receiver is IERC165 {
/**
* @dev Handles the receipt of a single ERC1155 token type. This function is
* called at the end of a `safeTransferFrom` after the balance has been updated.
*
* NOTE: To accept the transfer, this must return
* `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
* (i.e. 0xf23a6e61, or its own function selector).
*
* @param operator The address which initiated the transfer (i.e. msg.sender)
* @param from The address which previously owned the token
* @param id The ID of the token being transferred
* @param value The amount of tokens being transferred
* @param data Additional data with no specified format
* @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
*/
function onERC1155Received(
address operator,
address from,
uint256 id,
uint256 value,
bytes calldata data
) external returns (bytes4);
/**
* @dev Handles the receipt of a multiple ERC1155 token types. This function
* is called at the end of a `safeBatchTransferFrom` after the balances have
* been updated.
*
* NOTE: To accept the transfer(s), this must return
* `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
* (i.e. 0xbc197c81, or its own function selector).
*
* @param operator The address which initiated the batch transfer (i.e. msg.sender)
* @param from The address which previously owned the token
* @param ids An array containing ids of each token being transferred (order and length must match values array)
* @param values An array containing amounts of each token being transferred (order and length must match ids array)
* @param data Additional data with no specified format
* @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
*/
function onERC1155BatchReceived(
address operator,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Arrays.sol)
pragma solidity ^0.8.20;
import {StorageSlot} from "./StorageSlot.sol";
import {Math} from "./math/Math.sol";
/**
* @dev Collection of functions related to array types.
*/
library Arrays {
using StorageSlot for bytes32;
/**
* @dev Searches a sorted `array` and returns the first index that contains
* a value greater or equal to `element`. If no such index exists (i.e. all
* values in the array are strictly less than `element`), the array length is
* returned. Time complexity O(log n).
*
* `array` is expected to be sorted in ascending order, and to contain no
* repeated elements.
*/
function findUpperBound(uint256[] storage array, uint256 element) internal view returns (uint256) {
uint256 low = 0;
uint256 high = array.length;
if (high == 0) {
return 0;
}
while (low < high) {
uint256 mid = Math.average(low, high);
// Note that mid will always be strictly less than high (i.e. it will be a valid array index)
// because Math.average rounds towards zero (it does integer division with truncation).
if (unsafeAccess(array, mid).value > element) {
high = mid;
} else {
low = mid + 1;
}
}
// At this point `low` is the exclusive upper bound. We will return the inclusive upper bound.
if (low > 0 && unsafeAccess(array, low - 1).value == element) {
return low - 1;
} else {
return low;
}
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeAccess(address[] storage arr, uint256 pos) internal pure returns (StorageSlot.AddressSlot storage) {
bytes32 slot;
// We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
// following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.
/// @solidity memory-safe-assembly
assembly {
mstore(0, arr.slot)
slot := add(keccak256(0, 0x20), pos)
}
return slot.getAddressSlot();
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeAccess(bytes32[] storage arr, uint256 pos) internal pure returns (StorageSlot.Bytes32Slot storage) {
bytes32 slot;
// We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
// following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.
/// @solidity memory-safe-assembly
assembly {
mstore(0, arr.slot)
slot := add(keccak256(0, 0x20), pos)
}
return slot.getBytes32Slot();
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeAccess(uint256[] storage arr, uint256 pos) internal pure returns (StorageSlot.Uint256Slot storage) {
bytes32 slot;
// We use assembly to calculate the storage slot of the element at index `pos` of the dynamic array `arr`
// following https://docs.soliditylang.org/en/v0.8.20/internals/layout_in_storage.html#mappings-and-dynamic-arrays.
/// @solidity memory-safe-assembly
assembly {
mstore(0, arr.slot)
slot := add(keccak256(0, 0x20), pos)
}
return slot.getUint256Slot();
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeMemoryAccess(uint256[] memory arr, uint256 pos) internal pure returns (uint256 res) {
assembly {
res := mload(add(add(arr, 0x20), mul(pos, 0x20)))
}
}
/**
* @dev Access an array in an "unsafe" way. Skips solidity "index-out-of-range" check.
*
* WARNING: Only use if you are certain `pos` is lower than the array length.
*/
function unsafeMemoryAccess(address[] memory arr, uint256 pos) internal pure returns (address res) {
assembly {
res := mload(add(add(arr, 0x20), mul(pos, 0x20)))
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)
pragma solidity ^0.8.20;
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Muldiv operation overflow.
*/
error MathOverflowedMulDiv();
enum Rounding {
Floor, // Toward negative infinity
Ceil, // Toward positive infinity
Trunc, // Toward zero
Expand // Away from zero
}
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow.
return (a & b) + (a ^ b) / 2;
}
/**
* @dev Returns the ceiling of the division of two numbers.
*
* This differs from standard division with `/` in that it rounds towards infinity instead
* of rounding towards zero.
*/
function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
if (b == 0) {
// Guarantee the same behavior as in a regular Solidity division.
return a / b;
}
// (a + b - 1) / b can overflow on addition, so we distribute.
return a == 0 ? 0 : (a - 1) / b + 1;
}
/**
* @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
* denominator == 0.
* @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
* Uniswap Labs also under MIT license.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
unchecked {
// 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
// use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
// variables such that product = prod1 * 2^256 + prod0.
uint256 prod0 = x * y; // Least significant 256 bits of the product
uint256 prod1; // Most significant 256 bits of the product
assembly {
let mm := mulmod(x, y, not(0))
prod1 := sub(sub(mm, prod0), lt(mm, prod0))
}
// Handle non-overflow cases, 256 by 256 division.
if (prod1 == 0) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
if (denominator <= prod1) {
revert MathOverflowedMulDiv();
}
///////////////////////////////////////////////
// 512 by 256 division.
///////////////////////////////////////////////
// Make division exact by subtracting the remainder from [prod1 prod0].
uint256 remainder;
assembly {
// Compute remainder using mulmod.
remainder := mulmod(x, y, denominator)
// Subtract 256 bit number from 512 bit number.
prod1 := sub(prod1, gt(remainder, prod0))
prod0 := sub(prod0, remainder)
}
// Factor powers of two out of denominator and compute largest power of two divisor of denominator.
// Always >= 1. See https://cs.stackexchange.com/q/138556/92363.
uint256 twos = denominator & (0 - denominator);
assembly {
// Divide denominator by twos.
denominator := div(denominator, twos)
// Divide [prod1 prod0] by twos.
prod0 := div(prod0, twos)
// Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
twos := add(div(sub(0, twos), twos), 1)
}
// Shift in bits from prod1 into prod0.
prod0 |= prod1 * twos;
// Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
// that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
// four bits. That is, denominator * inv = 1 mod 2^4.
uint256 inverse = (3 * denominator) ^ 2;
// Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
// works in modular arithmetic, doubling the correct bits in each step.
inverse *= 2 - denominator * inverse; // inverse mod 2^8
inverse *= 2 - denominator * inverse; // inverse mod 2^16
inverse *= 2 - denominator * inverse; // inverse mod 2^32
inverse *= 2 - denominator * inverse; // inverse mod 2^64
inverse *= 2 - denominator * inverse; // inverse mod 2^128
inverse *= 2 - denominator * inverse; // inverse mod 2^256
// Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
// This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
// less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
// is no longer required.
result = prod0 * inverse;
return result;
}
}
/**
* @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
*/
function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
uint256 result = mulDiv(x, y, denominator);
if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
result += 1;
}
return result;
}
/**
* @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
* towards zero.
*
* Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
*/
function sqrt(uint256 a) internal pure returns (uint256) {
if (a == 0) {
return 0;
}
// For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
//
// We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
// `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 1);
// At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
// since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
// every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
// into the expected uint128 result.
unchecked {
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
result = (result + a / result) >> 1;
return min(result, a / result);
}
}
/**
* @notice Calculates sqrt(a), following the selected rounding direction.
*/
function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = sqrt(a);
return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10 of a positive value rounded towards zero.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10 ** 64) {
value /= 10 ** 64;
result += 64;
}
if (value >= 10 ** 32) {
value /= 10 ** 32;
result += 32;
}
if (value >= 10 ** 16) {
value /= 10 ** 16;
result += 16;
}
if (value >= 10 ** 8) {
value /= 10 ** 8;
result += 8;
}
if (value >= 10 ** 4) {
value /= 10 ** 4;
result += 4;
}
if (value >= 10 ** 2) {
value /= 10 ** 2;
result += 2;
}
if (value >= 10 ** 1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256 of a positive value rounded towards zero.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 256, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
}
}
/**
* @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
*/
function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
return uint8(rounding) % 2 == 1;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant NOT_ENTERED = 1;
uint256 private constant ENTERED = 2;
uint256 private _status;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
constructor() {
_status = NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be NOT_ENTERED
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)
// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.
pragma solidity ^0.8.20;
/**
* @dev Library for reading and writing primitive types to specific storage slots.
*
* Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts.
* This library helps with reading and writing to such slots without the need for inline assembly.
*
* The functions in this library return Slot structs that contain a `value` member that can be used to read or write.
*
* Example usage to set ERC1967 implementation slot:
* ```solidity
* contract ERC1967 {
* bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc;
*
* function _getImplementation() internal view returns (address) {
* return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value;
* }
*
* function _setImplementation(address newImplementation) internal {
* require(newImplementation.code.length > 0);
* StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation;
* }
* }
* ```
*/
library StorageSlot {
struct AddressSlot {
address value;
}
struct BooleanSlot {
bool value;
}
struct Bytes32Slot {
bytes32 value;
}
struct Uint256Slot {
uint256 value;
}
struct StringSlot {
string value;
}
struct BytesSlot {
bytes value;
}
/**
* @dev Returns an `AddressSlot` with member `value` located at `slot`.
*/
function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BooleanSlot` with member `value` located at `slot`.
*/
function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Bytes32Slot` with member `value` located at `slot`.
*/
function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `Uint256Slot` with member `value` located at `slot`.
*/
function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` with member `value` located at `slot`.
*/
function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `StringSlot` representation of the string storage pointer `store`.
*/
function getStringSlot(string storage store) internal pure returns (StringSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
/**
* @dev Returns an `BytesSlot` with member `value` located at `slot`.
*/
function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := slot
}
}
/**
* @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`.
*/
function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) {
/// @solidity memory-safe-assembly
assembly {
r.slot := store.slot
}
}
}{
"evmVersion": "paris",
"optimizer": {
"enabled": false,
"runs": 200
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string","name":"_projectURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ERC1155InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC1155InvalidApprover","type":"error"},{"inputs":[{"internalType":"uint256","name":"idsLength","type":"uint256"},{"internalType":"uint256","name":"valuesLength","type":"uint256"}],"name":"ERC1155InvalidArrayLength","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"ERC1155InvalidOperator","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC1155InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC1155InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC1155MissingApprovalForAll","type":"error"},{"inputs":[],"name":"MintingToZeroAddress","type":"error"},{"inputs":[],"name":"NoRecipientsProvided","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_recipients","type":"address[]"},{"internalType":"uint256","name":"_cardId","type":"uint256"}],"name":"distributeCards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registerMe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newURI","type":"string"}],"name":"updateURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b506040516200383338038062003833833981810160405281019062000037919062000366565b62000047620000f060201b60201c565b816200005981620000f860201b60201c565b50600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603620000cf5760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401620000c69190620003fc565b60405180910390fd5b620000e0816200010d60201b60201c565b506001600481905550506200074b565b600033905090565b806002908162000109919062000664565b5050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200023c82620001f1565b810181811067ffffffffffffffff821117156200025e576200025d62000202565b5b80604052505050565b600062000273620001d3565b905062000281828262000231565b919050565b600067ffffffffffffffff821115620002a457620002a362000202565b5b620002af82620001f1565b9050602081019050919050565b60005b83811015620002dc578082015181840152602081019050620002bf565b60008484015250505050565b6000620002ff620002f98462000286565b62000267565b9050828152602081018484840111156200031e576200031d620001ec565b5b6200032b848285620002bc565b509392505050565b600082601f8301126200034b576200034a620001e7565b5b81516200035d848260208601620002e8565b91505092915050565b6000602082840312156200037f576200037e620001dd565b5b600082015167ffffffffffffffff811115620003a0576200039f620001e2565b5b620003ae8482850162000333565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620003e482620003b7565b9050919050565b620003f681620003d7565b82525050565b6000602082019050620004136000830184620003eb565b92915050565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806200046c57607f821691505b60208210810362000482576200048162000424565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302620004ec7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82620004ad565b620004f88683620004ad565b95508019841693508086168417925050509392505050565b6000819050919050565b6000819050919050565b6000620005456200053f620005398462000510565b6200051a565b62000510565b9050919050565b6000819050919050565b620005618362000524565b6200057962000570826200054c565b848454620004ba565b825550505050565b600090565b6200059062000581565b6200059d81848462000556565b505050565b5b81811015620005c557620005b960008262000586565b600181019050620005a3565b5050565b601f8211156200061457620005de8162000488565b620005e9846200049d565b81016020851015620005f9578190505b6200061162000608856200049d565b830182620005a2565b50505b505050565b600082821c905092915050565b6000620006396000198460080262000619565b1980831691505092915050565b600062000654838362000626565b9150826002028217905092915050565b6200066f8262000419565b67ffffffffffffffff8111156200068b576200068a62000202565b5b62000697825462000453565b620006a4828285620005c9565b600060209050601f831160018114620006dc5760008415620006c7578287015190505b620006d3858262000646565b86555062000743565b601f198416620006ec8662000488565b60005b828110156200071657848901518255600182019150602085019450602081019050620006ef565b8683101562000736578489015162000732601f89168262000626565b8355505b6001600288020188555050505b505050505050565b6130d8806200075b6000396000f3fe6080604052600436106101085760003560e01c80638da5cb5b11610095578063c30f4a5a11610064578063c30f4a5a14610333578063e985e9c51461035c578063f242432a14610399578063f2fde38b146103c2578063f5298aca146103eb57610108565b80638da5cb5b1461029f5780639a198d61146102ca578063a22cb465146102e1578063b25820c81461030a57610108565b80633ccfd60b116100dc5780633ccfd60b146101ed5780634e1273f4146101f75780636b20c454146102345780636e6fb49f1461025d578063715018a61461028857610108565b8062fdd58e1461010d57806301ffc9a71461014a5780630e89341c146101875780632eb2c2d6146101c4575b600080fd5b34801561011957600080fd5b50610134600480360381019061012f9190611f28565b610414565b6040516101419190611f77565b60405180910390f35b34801561015657600080fd5b50610171600480360381019061016c9190611fea565b61046e565b60405161017e9190612032565b60405180910390f35b34801561019357600080fd5b506101ae60048036038101906101a9919061204d565b610550565b6040516101bb919061210a565b60405180910390f35b3480156101d057600080fd5b506101eb60048036038101906101e69190612329565b610562565b005b6101f561060a565b005b34801561020357600080fd5b5061021e600480360381019061021991906124bb565b610672565b60405161022b91906125f1565b60405180910390f35b34801561024057600080fd5b5061025b60048036038101906102569190612613565b61077b565b005b34801561026957600080fd5b50610272610827565b60405161027f919061210a565b60405180910390f35b34801561029457600080fd5b5061029d6108b5565b005b3480156102ab57600080fd5b506102b46108c9565b6040516102c191906126ad565b60405180910390f35b3480156102d657600080fd5b506102df6108f3565b005b3480156102ed57600080fd5b50610308600480360381019061030391906126f4565b610a45565b005b34801561031657600080fd5b50610331600480360381019061032c919061278f565b610a5b565b005b34801561033f57600080fd5b5061035a60048036038101906103559190612845565b610ba2565b005b34801561036857600080fd5b50610383600480360381019061037e9190612892565b610bfb565b6040516103909190612032565b60405180910390f35b3480156103a557600080fd5b506103c060048036038101906103bb91906128d2565b610c8f565b005b3480156103ce57600080fd5b506103e960048036038101906103e49190612969565b610d37565b005b3480156103f757600080fd5b50610412600480360381019061040d9190612996565b610dbd565b005b600080600083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061053957507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610549575061054882610e69565b5b9050919050565b606061055b82610ed3565b9050919050565b600061056c610f67565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156105b157506105af8682610bfb565b155b156105f55780866040517fe237d9220000000000000000000000000000000000000000000000000000000081526004016105ec9291906129e9565b60405180910390fd5b6106028686868686610f6f565b505050505050565b610612611067565b61061a6110ad565b610622610f67565b73ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610667573d6000803e3d6000fd5b50610670611134565b565b606081518351146106be57815183516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016106b5929190612a12565b60405180910390fd5b6000835167ffffffffffffffff8111156106db576106da612131565b5b6040519080825280602002602001820160405280156107095781602001602082028036833780820191505090505b50905060005b84518110156107705761074661072e828761113e90919063ffffffff16565b610741838761115290919063ffffffff16565b610414565b82828151811061075957610758612a3b565b5b60200260200101818152505080600101905061070f565b508091505092915050565b610783610f67565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156107cc57506107ca836107c5610f67565b610bfb565b155b15610817576107d9610f67565b836040517fe237d92200000000000000000000000000000000000000000000000000000000815260040161080e9291906129e9565b60405180910390fd5b610822838383611166565b505050565b6005805461083490612a99565b80601f016020809104026020016040519081016040528092919081815260200182805461086090612a99565b80156108ad5780601f10610882576101008083540402835291602001916108ad565b820191906000526020600020905b81548152906001019060200180831161089057829003601f168201915b505050505081565b6108bd6110ad565b6108c760006111fa565b565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073dc2b0d2dd2b7759d97d50db4eabdc3697311083073ffffffffffffffffffffffffffffffffffffffff16606f6040516024016109329190612b1c565b6040516020818303038152906040527f1e60fd14000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516109bc9190612b7e565b6000604051808303816000865af19150503d80600081146109f9576040519150601f19603f3d011682016040523d82523d6000602084013e6109fe565b606091505b5050905080610a42576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3990612be1565b60405180910390fd5b50565b610a57610a50610f67565b83836112c0565b5050565b610a63611067565b610a6b6110ad565b6001838390501015610aa9576040517feb3b4a3700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b83839050811015610b9457600073ffffffffffffffffffffffffffffffffffffffff16848483818110610ae257610ae1612a3b565b5b9050602002016020810190610af79190612969565b73ffffffffffffffffffffffffffffffffffffffff1603610b44576040517f3443033100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b87848483818110610b5a57610b59612a3b565b5b9050602002016020810190610b6f9190612969565b83600160405180602001604052806000815250611430565b8080600101915050610aac565b50610b9d611134565b505050565b610baa6110ad565b610bf782828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506114c9565b5050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000610c99610f67565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614158015610cde5750610cdc8682610bfb565b155b15610d225780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610d199291906129e9565b60405180910390fd5b610d2f86868686866114dc565b505050505050565b610d3f6110ad565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610db15760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610da891906126ad565b60405180910390fd5b610dba816111fa565b50565b610dc5610f67565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015610e0e5750610e0c83610e07610f67565b610bfb565b155b15610e5957610e1b610f67565b836040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610e509291906129e9565b60405180910390fd5b610e648383836115e7565b505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b606060028054610ee290612a99565b80601f0160208091040260200160405190810160405280929190818152602001828054610f0e90612a99565b8015610f5b5780601f10610f3057610100808354040283529160200191610f5b565b820191906000526020600020905b815481529060010190602001808311610f3e57829003601f168201915b50505050509050919050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610fe15760006040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610fd891906126ad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036110535760006040517f01a8351400000000000000000000000000000000000000000000000000000000815260040161104a91906126ad565b60405180910390fd5b611060858585858561168e565b5050505050565b6002600454036110a3576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600481905550565b6110b5610f67565b73ffffffffffffffffffffffffffffffffffffffff166110d36108c9565b73ffffffffffffffffffffffffffffffffffffffff1614611132576110f6610f67565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161112991906126ad565b60405180910390fd5b565b6001600481905550565b600060208202602084010151905092915050565b600060208202602084010151905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036111d85760006040517f01a835140000000000000000000000000000000000000000000000000000000081526004016111cf91906126ad565b60405180910390fd5b6111f583600084846040518060200160405280600081525061168e565b505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036113325760006040517fced3e10000000000000000000000000000000000000000000000000000000000815260040161132991906126ad565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516114239190612032565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036114a25760006040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161149991906126ad565b60405180910390fd5b6000806114af8585611740565b915091506114c160008784848761168e565b505050505050565b80600290816114d89190612da3565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361154e5760006040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161154591906126ad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036115c05760006040517f01a835140000000000000000000000000000000000000000000000000000000081526004016115b791906126ad565b60405180910390fd5b6000806115cd8585611740565b915091506115de878784848761168e565b50505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036116595760006040517f01a8351400000000000000000000000000000000000000000000000000000000815260040161165091906126ad565b60405180910390fd5b6000806116668484611740565b9150915061168785600084846040518060200160405280600081525061168e565b5050505050565b61169a85858585611770565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146117395760006116d8610f67565b905060018451036117285760006116f960008661115290919063ffffffff16565b9050600061171160008661115290919063ffffffff16565b9050611721838989858589611b18565b5050611737565b611736818787878787611ccc565b5b505b5050505050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b80518251146117ba57815181516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016117b1929190612a12565b60405180910390fd5b60006117c4610f67565b905060005b83518110156119d35760006117e7828661115290919063ffffffff16565b905060006117fe838661115290919063ffffffff16565b9050600073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161461192b57600080600084815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156118d357888183856040517f03dee4c50000000000000000000000000000000000000000000000000000000081526004016118ca9493929190612e75565b60405180910390fd5b81810360008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16146119c6578060008084815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546119be9190612ee9565b925050819055505b50508060010190506117c9565b506001835103611a925760006119f360008561115290919063ffffffff16565b90506000611a0b60008561115290919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051611a83929190612a12565b60405180910390a45050611b11565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611b08929190612f1d565b60405180910390a45b5050505050565b60008473ffffffffffffffffffffffffffffffffffffffff163b1115611cc4578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401611b79959493929190612f9e565b6020604051808303816000875af1925050508015611bb557506040513d601f19601f82011682018060405250810190611bb2919061300d565b60015b611c39573d8060008114611be5576040519150601f19603f3d011682016040523d82523d6000602084013e611bea565b606091505b506000815103611c3157846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611c2891906126ad565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611cc257846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611cb991906126ad565b60405180910390fd5b505b505050505050565b60008473ffffffffffffffffffffffffffffffffffffffff163b1115611e78578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b8152600401611d2d95949392919061303a565b6020604051808303816000875af1925050508015611d6957506040513d601f19601f82011682018060405250810190611d66919061300d565b60015b611ded573d8060008114611d99576040519150601f19603f3d011682016040523d82523d6000602084013e611d9e565b606091505b506000815103611de557846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611ddc91906126ad565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611e7657846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611e6d91906126ad565b60405180910390fd5b505b505050505050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611ebf82611e94565b9050919050565b611ecf81611eb4565b8114611eda57600080fd5b50565b600081359050611eec81611ec6565b92915050565b6000819050919050565b611f0581611ef2565b8114611f1057600080fd5b50565b600081359050611f2281611efc565b92915050565b60008060408385031215611f3f57611f3e611e8a565b5b6000611f4d85828601611edd565b9250506020611f5e85828601611f13565b9150509250929050565b611f7181611ef2565b82525050565b6000602082019050611f8c6000830184611f68565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611fc781611f92565b8114611fd257600080fd5b50565b600081359050611fe481611fbe565b92915050565b60006020828403121561200057611fff611e8a565b5b600061200e84828501611fd5565b91505092915050565b60008115159050919050565b61202c81612017565b82525050565b60006020820190506120476000830184612023565b92915050565b60006020828403121561206357612062611e8a565b5b600061207184828501611f13565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156120b4578082015181840152602081019050612099565b60008484015250505050565b6000601f19601f8301169050919050565b60006120dc8261207a565b6120e68185612085565b93506120f6818560208601612096565b6120ff816120c0565b840191505092915050565b6000602082019050818103600083015261212481846120d1565b905092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612169826120c0565b810181811067ffffffffffffffff8211171561218857612187612131565b5b80604052505050565b600061219b611e80565b90506121a78282612160565b919050565b600067ffffffffffffffff8211156121c7576121c6612131565b5b602082029050602081019050919050565b600080fd5b60006121f06121eb846121ac565b612191565b90508083825260208201905060208402830185811115612213576122126121d8565b5b835b8181101561223c57806122288882611f13565b845260208401935050602081019050612215565b5050509392505050565b600082601f83011261225b5761225a61212c565b5b813561226b8482602086016121dd565b91505092915050565b600080fd5b600067ffffffffffffffff82111561229457612293612131565b5b61229d826120c0565b9050602081019050919050565b82818337600083830152505050565b60006122cc6122c784612279565b612191565b9050828152602081018484840111156122e8576122e7612274565b5b6122f38482856122aa565b509392505050565b600082601f8301126123105761230f61212c565b5b81356123208482602086016122b9565b91505092915050565b600080600080600060a0868803121561234557612344611e8a565b5b600061235388828901611edd565b955050602061236488828901611edd565b945050604086013567ffffffffffffffff81111561238557612384611e8f565b5b61239188828901612246565b935050606086013567ffffffffffffffff8111156123b2576123b1611e8f565b5b6123be88828901612246565b925050608086013567ffffffffffffffff8111156123df576123de611e8f565b5b6123eb888289016122fb565b9150509295509295909350565b600067ffffffffffffffff82111561241357612412612131565b5b602082029050602081019050919050565b6000612437612432846123f8565b612191565b9050808382526020820190506020840283018581111561245a576124596121d8565b5b835b81811015612483578061246f8882611edd565b84526020840193505060208101905061245c565b5050509392505050565b600082601f8301126124a2576124a161212c565b5b81356124b2848260208601612424565b91505092915050565b600080604083850312156124d2576124d1611e8a565b5b600083013567ffffffffffffffff8111156124f0576124ef611e8f565b5b6124fc8582860161248d565b925050602083013567ffffffffffffffff81111561251d5761251c611e8f565b5b61252985828601612246565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61256881611ef2565b82525050565b600061257a838361255f565b60208301905092915050565b6000602082019050919050565b600061259e82612533565b6125a8818561253e565b93506125b38361254f565b8060005b838110156125e45781516125cb888261256e565b97506125d683612586565b9250506001810190506125b7565b5085935050505092915050565b6000602082019050818103600083015261260b8184612593565b905092915050565b60008060006060848603121561262c5761262b611e8a565b5b600061263a86828701611edd565b935050602084013567ffffffffffffffff81111561265b5761265a611e8f565b5b61266786828701612246565b925050604084013567ffffffffffffffff81111561268857612687611e8f565b5b61269486828701612246565b9150509250925092565b6126a781611eb4565b82525050565b60006020820190506126c2600083018461269e565b92915050565b6126d181612017565b81146126dc57600080fd5b50565b6000813590506126ee816126c8565b92915050565b6000806040838503121561270b5761270a611e8a565b5b600061271985828601611edd565b925050602061272a858286016126df565b9150509250929050565b600080fd5b60008083601f84011261274f5761274e61212c565b5b8235905067ffffffffffffffff81111561276c5761276b612734565b5b602083019150836020820283011115612788576127876121d8565b5b9250929050565b6000806000604084860312156127a8576127a7611e8a565b5b600084013567ffffffffffffffff8111156127c6576127c5611e8f565b5b6127d286828701612739565b935093505060206127e586828701611f13565b9150509250925092565b60008083601f8401126128055761280461212c565b5b8235905067ffffffffffffffff81111561282257612821612734565b5b60208301915083600182028301111561283e5761283d6121d8565b5b9250929050565b6000806020838503121561285c5761285b611e8a565b5b600083013567ffffffffffffffff81111561287a57612879611e8f565b5b612886858286016127ef565b92509250509250929050565b600080604083850312156128a9576128a8611e8a565b5b60006128b785828601611edd565b92505060206128c885828601611edd565b9150509250929050565b600080600080600060a086880312156128ee576128ed611e8a565b5b60006128fc88828901611edd565b955050602061290d88828901611edd565b945050604061291e88828901611f13565b935050606061292f88828901611f13565b925050608086013567ffffffffffffffff8111156129505761294f611e8f565b5b61295c888289016122fb565b9150509295509295909350565b60006020828403121561297f5761297e611e8a565b5b600061298d84828501611edd565b91505092915050565b6000806000606084860312156129af576129ae611e8a565b5b60006129bd86828701611edd565b93505060206129ce86828701611f13565b92505060406129df86828701611f13565b9150509250925092565b60006040820190506129fe600083018561269e565b612a0b602083018461269e565b9392505050565b6000604082019050612a276000830185611f68565b612a346020830184611f68565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612ab157607f821691505b602082108103612ac457612ac3612a6a565b5b50919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000612b06612b01612afc84612aca565b612ae1565b612ad4565b9050919050565b612b1681612aeb565b82525050565b6000602082019050612b316000830184612b0d565b92915050565b600081519050919050565b600081905092915050565b6000612b5882612b37565b612b628185612b42565b9350612b72818560208601612096565b80840191505092915050565b6000612b8a8284612b4d565b915081905092915050565b7f4665654d20726567697374726174696f6e206661696c65640000000000000000600082015250565b6000612bcb601883612085565b9150612bd682612b95565b602082019050919050565b60006020820190508181036000830152612bfa81612bbe565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302612c637fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612c26565b612c6d8683612c26565b95508019841693508086168417925050509392505050565b6000612ca0612c9b612c9684611ef2565b612ae1565b611ef2565b9050919050565b6000819050919050565b612cba83612c85565b612cce612cc682612ca7565b848454612c33565b825550505050565b600090565b612ce3612cd6565b612cee818484612cb1565b505050565b5b81811015612d1257612d07600082612cdb565b600181019050612cf4565b5050565b601f821115612d5757612d2881612c01565b612d3184612c16565b81016020851015612d40578190505b612d54612d4c85612c16565b830182612cf3565b50505b505050565b600082821c905092915050565b6000612d7a60001984600802612d5c565b1980831691505092915050565b6000612d938383612d69565b9150826002028217905092915050565b612dac8261207a565b67ffffffffffffffff811115612dc557612dc4612131565b5b612dcf8254612a99565b612dda828285612d16565b600060209050601f831160018114612e0d5760008415612dfb578287015190505b612e058582612d87565b865550612e6d565b601f198416612e1b86612c01565b60005b82811015612e4357848901518255600182019150602085019450602081019050612e1e565b86831015612e605784890151612e5c601f891682612d69565b8355505b6001600288020188555050505b505050505050565b6000608082019050612e8a600083018761269e565b612e976020830186611f68565b612ea46040830185611f68565b612eb16060830184611f68565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612ef482611ef2565b9150612eff83611ef2565b9250828201905080821115612f1757612f16612eba565b5b92915050565b60006040820190508181036000830152612f378185612593565b90508181036020830152612f4b8184612593565b90509392505050565b600082825260208201905092915050565b6000612f7082612b37565b612f7a8185612f54565b9350612f8a818560208601612096565b612f93816120c0565b840191505092915050565b600060a082019050612fb3600083018861269e565b612fc0602083018761269e565b612fcd6040830186611f68565b612fda6060830185611f68565b8181036080830152612fec8184612f65565b90509695505050505050565b60008151905061300781611fbe565b92915050565b60006020828403121561302357613022611e8a565b5b600061303184828501612ff8565b91505092915050565b600060a08201905061304f600083018861269e565b61305c602083018761269e565b818103604083015261306e8186612593565b905081810360608301526130828185612593565b905081810360808301526130968184612f65565b9050969550505050505056fea264697066735822122088156723c3b9fd5e66788b48a1a10d409943ef87ed6af30ee433c09195d4853264736f6c634300081800330000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002a68747470733a2f2f7275676769657370697a7a612e636f6d2f6d656d656375702f7b69647d2e6a736f6e00000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106101085760003560e01c80638da5cb5b11610095578063c30f4a5a11610064578063c30f4a5a14610333578063e985e9c51461035c578063f242432a14610399578063f2fde38b146103c2578063f5298aca146103eb57610108565b80638da5cb5b1461029f5780639a198d61146102ca578063a22cb465146102e1578063b25820c81461030a57610108565b80633ccfd60b116100dc5780633ccfd60b146101ed5780634e1273f4146101f75780636b20c454146102345780636e6fb49f1461025d578063715018a61461028857610108565b8062fdd58e1461010d57806301ffc9a71461014a5780630e89341c146101875780632eb2c2d6146101c4575b600080fd5b34801561011957600080fd5b50610134600480360381019061012f9190611f28565b610414565b6040516101419190611f77565b60405180910390f35b34801561015657600080fd5b50610171600480360381019061016c9190611fea565b61046e565b60405161017e9190612032565b60405180910390f35b34801561019357600080fd5b506101ae60048036038101906101a9919061204d565b610550565b6040516101bb919061210a565b60405180910390f35b3480156101d057600080fd5b506101eb60048036038101906101e69190612329565b610562565b005b6101f561060a565b005b34801561020357600080fd5b5061021e600480360381019061021991906124bb565b610672565b60405161022b91906125f1565b60405180910390f35b34801561024057600080fd5b5061025b60048036038101906102569190612613565b61077b565b005b34801561026957600080fd5b50610272610827565b60405161027f919061210a565b60405180910390f35b34801561029457600080fd5b5061029d6108b5565b005b3480156102ab57600080fd5b506102b46108c9565b6040516102c191906126ad565b60405180910390f35b3480156102d657600080fd5b506102df6108f3565b005b3480156102ed57600080fd5b50610308600480360381019061030391906126f4565b610a45565b005b34801561031657600080fd5b50610331600480360381019061032c919061278f565b610a5b565b005b34801561033f57600080fd5b5061035a60048036038101906103559190612845565b610ba2565b005b34801561036857600080fd5b50610383600480360381019061037e9190612892565b610bfb565b6040516103909190612032565b60405180910390f35b3480156103a557600080fd5b506103c060048036038101906103bb91906128d2565b610c8f565b005b3480156103ce57600080fd5b506103e960048036038101906103e49190612969565b610d37565b005b3480156103f757600080fd5b50610412600480360381019061040d9190612996565b610dbd565b005b600080600083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60007fd9b67a26000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061053957507f0e89341c000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b80610549575061054882610e69565b5b9050919050565b606061055b82610ed3565b9050919050565b600061056c610f67565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141580156105b157506105af8682610bfb565b155b156105f55780866040517fe237d9220000000000000000000000000000000000000000000000000000000081526004016105ec9291906129e9565b60405180910390fd5b6106028686868686610f6f565b505050505050565b610612611067565b61061a6110ad565b610622610f67565b73ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015610667573d6000803e3d6000fd5b50610670611134565b565b606081518351146106be57815183516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016106b5929190612a12565b60405180910390fd5b6000835167ffffffffffffffff8111156106db576106da612131565b5b6040519080825280602002602001820160405280156107095781602001602082028036833780820191505090505b50905060005b84518110156107705761074661072e828761113e90919063ffffffff16565b610741838761115290919063ffffffff16565b610414565b82828151811061075957610758612a3b565b5b60200260200101818152505080600101905061070f565b508091505092915050565b610783610f67565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156107cc57506107ca836107c5610f67565b610bfb565b155b15610817576107d9610f67565b836040517fe237d92200000000000000000000000000000000000000000000000000000000815260040161080e9291906129e9565b60405180910390fd5b610822838383611166565b505050565b6005805461083490612a99565b80601f016020809104026020016040519081016040528092919081815260200182805461086090612a99565b80156108ad5780601f10610882576101008083540402835291602001916108ad565b820191906000526020600020905b81548152906001019060200180831161089057829003601f168201915b505050505081565b6108bd6110ad565b6108c760006111fa565b565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600073dc2b0d2dd2b7759d97d50db4eabdc3697311083073ffffffffffffffffffffffffffffffffffffffff16606f6040516024016109329190612b1c565b6040516020818303038152906040527f1e60fd14000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516109bc9190612b7e565b6000604051808303816000865af19150503d80600081146109f9576040519150601f19603f3d011682016040523d82523d6000602084013e6109fe565b606091505b5050905080610a42576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3990612be1565b60405180910390fd5b50565b610a57610a50610f67565b83836112c0565b5050565b610a63611067565b610a6b6110ad565b6001838390501015610aa9576040517feb3b4a3700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b83839050811015610b9457600073ffffffffffffffffffffffffffffffffffffffff16848483818110610ae257610ae1612a3b565b5b9050602002016020810190610af79190612969565b73ffffffffffffffffffffffffffffffffffffffff1603610b44576040517f3443033100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610b87848483818110610b5a57610b59612a3b565b5b9050602002016020810190610b6f9190612969565b83600160405180602001604052806000815250611430565b8080600101915050610aac565b50610b9d611134565b505050565b610baa6110ad565b610bf782828080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050506114c9565b5050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b6000610c99610f67565b90508073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614158015610cde5750610cdc8682610bfb565b155b15610d225780866040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610d199291906129e9565b60405180910390fd5b610d2f86868686866114dc565b505050505050565b610d3f6110ad565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610db15760006040517f1e4fbdf7000000000000000000000000000000000000000000000000000000008152600401610da891906126ad565b60405180910390fd5b610dba816111fa565b50565b610dc5610f67565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015610e0e5750610e0c83610e07610f67565b610bfb565b155b15610e5957610e1b610f67565b836040517fe237d922000000000000000000000000000000000000000000000000000000008152600401610e509291906129e9565b60405180910390fd5b610e648383836115e7565b505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b606060028054610ee290612a99565b80601f0160208091040260200160405190810160405280929190818152602001828054610f0e90612a99565b8015610f5b5780601f10610f3057610100808354040283529160200191610f5b565b820191906000526020600020905b815481529060010190602001808311610f3e57829003601f168201915b50505050509050919050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610fe15760006040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401610fd891906126ad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036110535760006040517f01a8351400000000000000000000000000000000000000000000000000000000815260040161104a91906126ad565b60405180910390fd5b611060858585858561168e565b5050505050565b6002600454036110a3576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600481905550565b6110b5610f67565b73ffffffffffffffffffffffffffffffffffffffff166110d36108c9565b73ffffffffffffffffffffffffffffffffffffffff1614611132576110f6610f67565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161112991906126ad565b60405180910390fd5b565b6001600481905550565b600060208202602084010151905092915050565b600060208202602084010151905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036111d85760006040517f01a835140000000000000000000000000000000000000000000000000000000081526004016111cf91906126ad565b60405180910390fd5b6111f583600084846040518060200160405280600081525061168e565b505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036113325760006040517fced3e10000000000000000000000000000000000000000000000000000000000815260040161132991906126ad565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516114239190612032565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16036114a25760006040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161149991906126ad565b60405180910390fd5b6000806114af8585611740565b915091506114c160008784848761168e565b505050505050565b80600290816114d89190612da3565b5050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff160361154e5760006040517f57f447ce00000000000000000000000000000000000000000000000000000000815260040161154591906126ad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036115c05760006040517f01a835140000000000000000000000000000000000000000000000000000000081526004016115b791906126ad565b60405180910390fd5b6000806115cd8585611740565b915091506115de878784848761168e565b50505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036116595760006040517f01a8351400000000000000000000000000000000000000000000000000000000815260040161165091906126ad565b60405180910390fd5b6000806116668484611740565b9150915061168785600084846040518060200160405280600081525061168e565b5050505050565b61169a85858585611770565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16146117395760006116d8610f67565b905060018451036117285760006116f960008661115290919063ffffffff16565b9050600061171160008661115290919063ffffffff16565b9050611721838989858589611b18565b5050611737565b611736818787878787611ccc565b5b505b5050505050565b60608060405191506001825283602083015260408201905060018152826020820152604081016040529250929050565b80518251146117ba57815181516040517f5b0599910000000000000000000000000000000000000000000000000000000081526004016117b1929190612a12565b60405180910390fd5b60006117c4610f67565b905060005b83518110156119d35760006117e7828661115290919063ffffffff16565b905060006117fe838661115290919063ffffffff16565b9050600073ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff161461192b57600080600084815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156118d357888183856040517f03dee4c50000000000000000000000000000000000000000000000000000000081526004016118ca9493929190612e75565b60405180910390fd5b81810360008085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b600073ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff16146119c6578060008084815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546119be9190612ee9565b925050819055505b50508060010190506117c9565b506001835103611a925760006119f360008561115290919063ffffffff16565b90506000611a0b60008561115290919063ffffffff16565b90508573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628585604051611a83929190612a12565b60405180910390a45050611b11565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051611b08929190612f1d565b60405180910390a45b5050505050565b60008473ffffffffffffffffffffffffffffffffffffffff163b1115611cc4578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401611b79959493929190612f9e565b6020604051808303816000875af1925050508015611bb557506040513d601f19601f82011682018060405250810190611bb2919061300d565b60015b611c39573d8060008114611be5576040519150601f19603f3d011682016040523d82523d6000602084013e611bea565b606091505b506000815103611c3157846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611c2891906126ad565b60405180910390fd5b805181602001fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611cc257846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611cb991906126ad565b60405180910390fd5b505b505050505050565b60008473ffffffffffffffffffffffffffffffffffffffff163b1115611e78578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b8152600401611d2d95949392919061303a565b6020604051808303816000875af1925050508015611d6957506040513d601f19601f82011682018060405250810190611d66919061300d565b60015b611ded573d8060008114611d99576040519150601f19603f3d011682016040523d82523d6000602084013e611d9e565b606091505b506000815103611de557846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611ddc91906126ad565b60405180910390fd5b805181602001fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614611e7657846040517f57f447ce000000000000000000000000000000000000000000000000000000008152600401611e6d91906126ad565b60405180910390fd5b505b505050505050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611ebf82611e94565b9050919050565b611ecf81611eb4565b8114611eda57600080fd5b50565b600081359050611eec81611ec6565b92915050565b6000819050919050565b611f0581611ef2565b8114611f1057600080fd5b50565b600081359050611f2281611efc565b92915050565b60008060408385031215611f3f57611f3e611e8a565b5b6000611f4d85828601611edd565b9250506020611f5e85828601611f13565b9150509250929050565b611f7181611ef2565b82525050565b6000602082019050611f8c6000830184611f68565b92915050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b611fc781611f92565b8114611fd257600080fd5b50565b600081359050611fe481611fbe565b92915050565b60006020828403121561200057611fff611e8a565b5b600061200e84828501611fd5565b91505092915050565b60008115159050919050565b61202c81612017565b82525050565b60006020820190506120476000830184612023565b92915050565b60006020828403121561206357612062611e8a565b5b600061207184828501611f13565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156120b4578082015181840152602081019050612099565b60008484015250505050565b6000601f19601f8301169050919050565b60006120dc8261207a565b6120e68185612085565b93506120f6818560208601612096565b6120ff816120c0565b840191505092915050565b6000602082019050818103600083015261212481846120d1565b905092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612169826120c0565b810181811067ffffffffffffffff8211171561218857612187612131565b5b80604052505050565b600061219b611e80565b90506121a78282612160565b919050565b600067ffffffffffffffff8211156121c7576121c6612131565b5b602082029050602081019050919050565b600080fd5b60006121f06121eb846121ac565b612191565b90508083825260208201905060208402830185811115612213576122126121d8565b5b835b8181101561223c57806122288882611f13565b845260208401935050602081019050612215565b5050509392505050565b600082601f83011261225b5761225a61212c565b5b813561226b8482602086016121dd565b91505092915050565b600080fd5b600067ffffffffffffffff82111561229457612293612131565b5b61229d826120c0565b9050602081019050919050565b82818337600083830152505050565b60006122cc6122c784612279565b612191565b9050828152602081018484840111156122e8576122e7612274565b5b6122f38482856122aa565b509392505050565b600082601f8301126123105761230f61212c565b5b81356123208482602086016122b9565b91505092915050565b600080600080600060a0868803121561234557612344611e8a565b5b600061235388828901611edd565b955050602061236488828901611edd565b945050604086013567ffffffffffffffff81111561238557612384611e8f565b5b61239188828901612246565b935050606086013567ffffffffffffffff8111156123b2576123b1611e8f565b5b6123be88828901612246565b925050608086013567ffffffffffffffff8111156123df576123de611e8f565b5b6123eb888289016122fb565b9150509295509295909350565b600067ffffffffffffffff82111561241357612412612131565b5b602082029050602081019050919050565b6000612437612432846123f8565b612191565b9050808382526020820190506020840283018581111561245a576124596121d8565b5b835b81811015612483578061246f8882611edd565b84526020840193505060208101905061245c565b5050509392505050565b600082601f8301126124a2576124a161212c565b5b81356124b2848260208601612424565b91505092915050565b600080604083850312156124d2576124d1611e8a565b5b600083013567ffffffffffffffff8111156124f0576124ef611e8f565b5b6124fc8582860161248d565b925050602083013567ffffffffffffffff81111561251d5761251c611e8f565b5b61252985828601612246565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61256881611ef2565b82525050565b600061257a838361255f565b60208301905092915050565b6000602082019050919050565b600061259e82612533565b6125a8818561253e565b93506125b38361254f565b8060005b838110156125e45781516125cb888261256e565b97506125d683612586565b9250506001810190506125b7565b5085935050505092915050565b6000602082019050818103600083015261260b8184612593565b905092915050565b60008060006060848603121561262c5761262b611e8a565b5b600061263a86828701611edd565b935050602084013567ffffffffffffffff81111561265b5761265a611e8f565b5b61266786828701612246565b925050604084013567ffffffffffffffff81111561268857612687611e8f565b5b61269486828701612246565b9150509250925092565b6126a781611eb4565b82525050565b60006020820190506126c2600083018461269e565b92915050565b6126d181612017565b81146126dc57600080fd5b50565b6000813590506126ee816126c8565b92915050565b6000806040838503121561270b5761270a611e8a565b5b600061271985828601611edd565b925050602061272a858286016126df565b9150509250929050565b600080fd5b60008083601f84011261274f5761274e61212c565b5b8235905067ffffffffffffffff81111561276c5761276b612734565b5b602083019150836020820283011115612788576127876121d8565b5b9250929050565b6000806000604084860312156127a8576127a7611e8a565b5b600084013567ffffffffffffffff8111156127c6576127c5611e8f565b5b6127d286828701612739565b935093505060206127e586828701611f13565b9150509250925092565b60008083601f8401126128055761280461212c565b5b8235905067ffffffffffffffff81111561282257612821612734565b5b60208301915083600182028301111561283e5761283d6121d8565b5b9250929050565b6000806020838503121561285c5761285b611e8a565b5b600083013567ffffffffffffffff81111561287a57612879611e8f565b5b612886858286016127ef565b92509250509250929050565b600080604083850312156128a9576128a8611e8a565b5b60006128b785828601611edd565b92505060206128c885828601611edd565b9150509250929050565b600080600080600060a086880312156128ee576128ed611e8a565b5b60006128fc88828901611edd565b955050602061290d88828901611edd565b945050604061291e88828901611f13565b935050606061292f88828901611f13565b925050608086013567ffffffffffffffff8111156129505761294f611e8f565b5b61295c888289016122fb565b9150509295509295909350565b60006020828403121561297f5761297e611e8a565b5b600061298d84828501611edd565b91505092915050565b6000806000606084860312156129af576129ae611e8a565b5b60006129bd86828701611edd565b93505060206129ce86828701611f13565b92505060406129df86828701611f13565b9150509250925092565b60006040820190506129fe600083018561269e565b612a0b602083018461269e565b9392505050565b6000604082019050612a276000830185611f68565b612a346020830184611f68565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b60006002820490506001821680612ab157607f821691505b602082108103612ac457612ac3612a6a565b5b50919050565b6000819050919050565b600060ff82169050919050565b6000819050919050565b6000612b06612b01612afc84612aca565b612ae1565b612ad4565b9050919050565b612b1681612aeb565b82525050565b6000602082019050612b316000830184612b0d565b92915050565b600081519050919050565b600081905092915050565b6000612b5882612b37565b612b628185612b42565b9350612b72818560208601612096565b80840191505092915050565b6000612b8a8284612b4d565b915081905092915050565b7f4665654d20726567697374726174696f6e206661696c65640000000000000000600082015250565b6000612bcb601883612085565b9150612bd682612b95565b602082019050919050565b60006020820190508181036000830152612bfa81612bbe565b9050919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b600060088302612c637fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612c26565b612c6d8683612c26565b95508019841693508086168417925050509392505050565b6000612ca0612c9b612c9684611ef2565b612ae1565b611ef2565b9050919050565b6000819050919050565b612cba83612c85565b612cce612cc682612ca7565b848454612c33565b825550505050565b600090565b612ce3612cd6565b612cee818484612cb1565b505050565b5b81811015612d1257612d07600082612cdb565b600181019050612cf4565b5050565b601f821115612d5757612d2881612c01565b612d3184612c16565b81016020851015612d40578190505b612d54612d4c85612c16565b830182612cf3565b50505b505050565b600082821c905092915050565b6000612d7a60001984600802612d5c565b1980831691505092915050565b6000612d938383612d69565b9150826002028217905092915050565b612dac8261207a565b67ffffffffffffffff811115612dc557612dc4612131565b5b612dcf8254612a99565b612dda828285612d16565b600060209050601f831160018114612e0d5760008415612dfb578287015190505b612e058582612d87565b865550612e6d565b601f198416612e1b86612c01565b60005b82811015612e4357848901518255600182019150602085019450602081019050612e1e565b86831015612e605784890151612e5c601f891682612d69565b8355505b6001600288020188555050505b505050505050565b6000608082019050612e8a600083018761269e565b612e976020830186611f68565b612ea46040830185611f68565b612eb16060830184611f68565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612ef482611ef2565b9150612eff83611ef2565b9250828201905080821115612f1757612f16612eba565b5b92915050565b60006040820190508181036000830152612f378185612593565b90508181036020830152612f4b8184612593565b90509392505050565b600082825260208201905092915050565b6000612f7082612b37565b612f7a8185612f54565b9350612f8a818560208601612096565b612f93816120c0565b840191505092915050565b600060a082019050612fb3600083018861269e565b612fc0602083018761269e565b612fcd6040830186611f68565b612fda6060830185611f68565b8181036080830152612fec8184612f65565b90509695505050505050565b60008151905061300781611fbe565b92915050565b60006020828403121561302357613022611e8a565b5b600061303184828501612ff8565b91505092915050565b600060a08201905061304f600083018861269e565b61305c602083018761269e565b818103604083015261306e8186612593565b905081810360608301526130828185612593565b905081810360808301526130968184612f65565b9050969550505050505056fea264697066735822122088156723c3b9fd5e66788b48a1a10d409943ef87ed6af30ee433c09195d4853264736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002a68747470733a2f2f7275676769657370697a7a612e636f6d2f6d656d656375702f7b69647d2e6a736f6e00000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _projectURI (string): https://ruggiespizza.com/memecup/{id}.json
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 000000000000000000000000000000000000000000000000000000000000002a
Arg [2] : 68747470733a2f2f7275676769657370697a7a612e636f6d2f6d656d65637570
Arg [3] : 2f7b69647d2e6a736f6e00000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in S
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.