ERC-721
Overview
Max Total Supply
4,444 G&G
Holders
2,083
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 G&GLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
GeishasAndGardens
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/** * Geishas & Gardens * * Art: Elcin Arpacay * Development: Can Poyrazoglu * Lore Crafting & Community Growth: Sinan Sipahiler * Creative Strategist: Nilsu Ozturk * * 2023 Yokai Labs * */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract GeishasAndGardens is DefaultOperatorFilterer, ERC721Burnable, Ownable, ReentrancyGuard { // original maximum supply of G&G NFTs in the beginning uint public constant ORIGINAL_MAX_SUPPLY = 4444; /** amount of tokens to premint to team vault on deployment */ uint private constant VAULT_PREMINT_COUNT = 140; uint public constant MAX_MINT_PER_ACCOUNT = 2; // Merkle root of addresses that are whitelisted bytes32 private _whitelistMerkleRoot; string private constant BASE_CID = "bafybeigwoh4s6zlg56366kigaavmr6bcwsmhzrfrg55ck46frimmg2r4m4"; // current token ID to mint uint private _currentTokenId = 1; // mapping to keep track of each address' mint count, regardless of token transfers mapping(address => uint) private _mintedAmounts; // is public minting active? bool private _isPublicSaleInProgress = false; // is whitelist minting active? bool private _isPrivateSaleInProgress = false; // support for adding special tokens in the future, with their own base IPFS URLs struct Range { uint startIndex; uint length; string cid; } Range[] private _additionalRanges; error TokenNotFound(); error InvalidTokenRange(); error SaleNotInProgress(); constructor(bytes32 merkleRoot) ERC721("Geishas & Gardens", "G&G") { _whitelistMerkleRoot = merkleRoot; // mint predefined amount of tokens to team vault on deployment for (uint i = 0; i < VAULT_PREMINT_COUNT; i++) { _performMint(); } } /** start/stop the public sale. sets the private sale to false */ function setPublicSale(bool enabled) public onlyOwner { _isPrivateSaleInProgress = false; _isPublicSaleInProgress = enabled; } function isPublicSaleInProgress() public view returns (bool) { return _isPublicSaleInProgress; } /** start/stop the private sale. sets the public sale to false */ function setPrivateSale(bool enabled) public onlyOwner { _isPublicSaleInProgress = false; _isPrivateSaleInProgress = enabled; } function isPrivateSaleInProgress() public view returns (bool) { return _isPrivateSaleInProgress; } /** update the whitelisted addresses, if ever needed */ function setWhitelistMerkleRoot(bytes32 newRoot) public onlyOwner { _whitelistMerkleRoot = newRoot; } /** mints the specified amount of geishas from the public sale */ function mint(uint count) public nonReentrant { require(isPublicSaleInProgress(), "Public sale not in progress."); require(count == 2 || count == 1, "Invalid count"); require(_currentTokenId + count - 1 <= ORIGINAL_MAX_SUPPLY, "Not enough supply."); // do we exceed the allowed amount if we mint? uint allowedAmount = remainingMintableAmount(); require(count <= allowedAmount, "Not allowed to mint more than 2 per wallet."); for (uint i = 0; i < count; i++) { _performMint(); } _mintedAmounts[msg.sender] += count; } /** mints the specified amount of geishas from the private (whitelisted) sale */ function whitelistMint(uint count, bytes32[] calldata merkleProof) public nonReentrant { if(!isPrivateSaleInProgress()){ revert SaleNotInProgress(); } // get the leaf node in Merkle tree for the calling address bytes32 node = keccak256(abi.encodePacked(msg.sender)); // check if Merkle tree contains the proof for this address. require(MerkleProof.verify(merkleProof, _whitelistMerkleRoot, node), "Address not whitelisted."); // do we exceed the allowed amount if we mint? uint allowedAmount = remainingMintableAmount(); require(count > 0 && count <= allowedAmount, "Not allowed to mint more than 2 during presale."); for (uint i = 0; i < count; i++) { _performMint(); } _mintedAmounts[msg.sender] += count; } function remainingMintableAmount() public view returns (uint) { return MAX_MINT_PER_ACCOUNT - _mintedAmounts[msg.sender]; } function _performMint() private { _safeMint(msg.sender, _currentTokenId); _currentTokenId++; } /** returns total supply, taking into account additional 4444+ ranges that * might be added in the future */ function totalSupply() public view virtual returns (uint256) { if(_additionalRanges.length == 0){ return _currentTokenId - 1; }else{ uint runningTotal = _currentTokenId - 1; for (uint i = 0; i < _additionalRanges.length; i++) { Range memory r = _additionalRanges[i]; runningTotal += r.length; } return runningTotal; } } /** adds extended range tokens for upcoming perks, if any. this is for tokens 4444+ */ function addExtendedRange(uint startIndex, uint length, string memory cid) public onlyOwner { require(startIndex > ORIGINAL_MAX_SUPPLY, "Start index invalid"); require(length > 0, "Length invalid"); Range memory r; r.startIndex = startIndex; r.length = length; r.cid = cid; _additionalRanges.push(r); for (uint i = startIndex; i < startIndex + length; i++){ _safeMint(msg.sender, i); } } function metadataURI(string memory cid, uint tokenId) private pure returns (string memory) { string[5] memory metadataBuidler; metadataBuidler[0] = 'ipfs://'; metadataBuidler[1] = cid; metadataBuidler[2] = '/'; metadataBuidler[3] = Strings.toString(tokenId); metadataBuidler[4] = '.json'; string memory url = string(abi.encodePacked( metadataBuidler[0], metadataBuidler[1], metadataBuidler[2], metadataBuidler[3], metadataBuidler[4] )); return url; } /** returns range for tokens > 4444. after 4444 there is no concept of external/ * internal mapping so it just simply takes an id. */ function getExtendedRangeForId(uint id) private view returns (Range memory) { if(id <= ORIGINAL_MAX_SUPPLY) { revert InvalidTokenRange(); } for (uint i = 0; i < _additionalRanges.length; i++) { Range memory r = _additionalRanges[i]; if(r.startIndex <= id && id < r.startIndex + r.length){ // token belongs to this range return r; } } revert TokenNotFound(); } function tokenURI(uint256 tokenId) override public view returns (string memory) { if(tokenId <= ORIGINAL_MAX_SUPPLY){ if(tokenId >= _currentTokenId){ revert TokenNotFound(); } return metadataURI(BASE_CID, tokenId); }else{ Range memory r = getExtendedRangeForId(tokenId); return metadataURI(r.cid, tokenId); } } /* operator filter support */ function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } /* end operator filter support */ }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../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. * * By default, the owner account will be the one that deploys the contract. 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; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @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 { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing 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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _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 v4.6.0) (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ 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. * * _Available since v3.4._ */ 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. * * _Available since v3.4._ */ 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. * * _Available since v3.4._ */ 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. * * _Available since v3.4._ */ 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 addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "../../../utils/Context.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be burned (destroyed). */ abstract contract ERC721Burnable is Context, ERC721 { /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _burn(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @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; 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() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: invalid token ID"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner nor approved"); _safeTransfer(from, to, tokenId, data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./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); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @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 pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InvalidTokenRange","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"SaleNotInProgress","type":"error"},{"inputs":[],"name":"TokenNotFound","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_MINT_PER_ACCOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ORIGINAL_MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"startIndex","type":"uint256"},{"internalType":"uint256","name":"length","type":"uint256"},{"internalType":"string","name":"cid","type":"string"}],"name":"addExtendedRange","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPrivateSaleInProgress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicSaleInProgress","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"remainingMintableAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","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":"bool","name":"enabled","type":"bool"}],"name":"setPrivateSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"newRoot","type":"bytes32"}],"name":"setWhitelistMerkleRoot","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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"count","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"whitelistMint","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526001600955600b805461ffff191690553480156200002157600080fd5b5060405162002d7338038062002d738339810160408190526200004491620006e9565b60408051808201825260118152704765697368617320262047617264656e7360781b6020808301919091528251808401909352600383526247264760e81b9083015290733cc6cdda760b79bafa08df41ecfa224f810dceb660016daaeb6d7670e522a718067333cd4e3b15620001e35780156200013157604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200011257600080fd5b505af115801562000127573d6000803e3d6000fd5b50505050620001e3565b6001600160a01b03821615620001825760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401620000f7565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b158015620001c957600080fd5b505af1158015620001de573d6000803e3d6000fd5b505050505b50508151620001fa90600090602085019062000643565b5080516200021090600190602084019062000643565b5050506200022d620002276200026b60201b60201c565b6200026f565b6001600755600881905560005b608c81101562000263576200024e620002c1565b806200025a8162000719565b9150506200023a565b50506200083a565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620002d533600954620002ee60201b60201c565b60098054906000620002e78362000719565b9190505550565b620003108282604051806020016040528060008152506200031460201b60201c565b5050565b62000320838362000390565b6200032f6000848484620004d8565b6200038b5760405162461bcd60e51b8152602060048201526032602482015260008051602062002d5383398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084015b60405180910390fd5b505050565b6001600160a01b038216620003e85760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640162000382565b6000818152600260205260409020546001600160a01b0316156200044f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640162000382565b6001600160a01b03821660009081526003602052604081208054600192906200047a90849062000735565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000620004f9846001600160a01b03166200063460201b62000f821760201c565b156200062857604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906200053390339089908890889060040162000750565b6020604051808303816000875af192505050801562000571575060408051601f3d908101601f191682019092526200056e91810190620007cb565b60015b6200060d573d808015620005a2576040519150601f19603f3d011682016040523d82523d6000602084013e620005a7565b606091505b508051600003620006055760405162461bcd60e51b8152602060048201526032602482015260008051602062002d5383398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840162000382565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506200062c565b5060015b949350505050565b6001600160a01b03163b151590565b8280546200065190620007fe565b90600052602060002090601f016020900481019282620006755760008555620006c0565b82601f106200069057805160ff1916838001178555620006c0565b82800160010185558215620006c0579182015b82811115620006c0578251825591602001919060010190620006a3565b50620006ce929150620006d2565b5090565b5b80821115620006ce5760008155600101620006d3565b600060208284031215620006fc57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b6000600182016200072e576200072e62000703565b5060010190565b600082198211156200074b576200074b62000703565b500190565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b828110156200079f5785810182015185820160a00152810162000781565b82811115620007b257600060a084870101525b5050601f01601f19169190910160a00195945050505050565b600060208284031215620007de57600080fd5b81516001600160e01b031981168114620007f757600080fd5b9392505050565b600181811c908216806200081357607f821691505b6020821081036200083457634e487b7160e01b600052602260045260246000fd5b50919050565b612509806200084a6000396000f3fe608060405234801561001057600080fd5b50600436106101da5760003560e01c806370a0823111610104578063a22cb465116100a2578063c87b56dd11610071578063c87b56dd146103c0578063d2cab056146103d3578063e985e9c5146103e6578063f2fde38b1461042257600080fd5b8063a22cb46514610377578063b88d4fde1461038a578063bd32fb661461039d578063c380a138146103b057600080fd5b80638da5cb5b116100de5780638da5cb5b1461033857806395d89b4114610349578063993847d114610351578063a0712d681461036457600080fd5b806370a0823114610312578063715018a614610325578063753028a91461032d57600080fd5b806323b872dd1161017c57806342842e0e1161014b57806342842e0e146102c657806342966c68146102d95780635aca1bb6146102ec5780636352211e146102ff57600080fd5b806323b872dd146102835780632cbe37cc1461029657806339ab01b61461029e57806341f43434146102b157600080fd5b8063081812fc116101b8578063081812fc14610232578063095ea7b31461025d57806318160ddd1461027257806320259ff31461027a57600080fd5b806301ffc9a7146101df578063066453df1461020757806306fdde031461021d575b600080fd5b6101f26101ed366004611e77565b610435565b60405190151581526020015b60405180910390f35b61020f600281565b6040519081526020016101fe565b610225610487565b6040516101fe9190611eec565b610245610240366004611eff565b610519565b6040516001600160a01b0390911681526020016101fe565b61027061026b366004611f2f565b610540565b005b61020f610559565b61020f61115c81565b610270610291366004611f59565b61069b565b61020f6106c6565b6102706102ac366004612021565b6106e1565b6102456daaeb6d7670e522a718067333cd4e81565b6102706102d4366004611f59565b61087e565b6102706102e7366004611eff565b6108a3565b6102706102fa366004612093565b6108d6565b61024561030d366004611eff565b6108f2565b61020f6103203660046120b0565b610952565b6102706109d8565b600b5460ff166101f2565b6006546001600160a01b0316610245565b6102256109ec565b61027061035f366004612093565b6109fb565b610270610372366004611eff565b610a1d565b6102706103853660046120cb565b610c34565b610270610398366004612102565b610c48565b6102706103ab366004611eff565b610c6e565b600b54610100900460ff166101f2565b6102256103ce366004611eff565b610c7b565b6102706103e136600461217e565b610cf1565b6101f26103f43660046121fd565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102706104303660046120b0565b610f0c565b60006001600160e01b031982166380ac58cd60e01b148061046657506001600160e01b03198216635b5e139f60e01b145b8061048157506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461049690612230565b80601f01602080910402602001604051908101604052809291908181526020018280546104c290612230565b801561050f5780601f106104e45761010080835404028352916020019161050f565b820191906000526020600020905b8154815290600101906020018083116104f257829003601f168201915b5050505050905090565b600061052482610f91565b506000908152600460205260409020546001600160a01b031690565b8161054a81610ff0565b61055483836110a9565b505050565b600c546000908103610579576001600954610574919061227a565b905090565b6000600160095461058a919061227a565b905060005b600c54811015610695576000600c82815481106105ae576105ae612291565b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820180546105eb90612230565b80601f016020809104026020016040519081016040528092919081815260200182805461061790612230565b80156106645780601f1061063957610100808354040283529160200191610664565b820191906000526020600020905b81548152906001019060200180831161064757829003601f168201915b505050505081525050905080602001518361067f91906122a7565b925050808061068d906122bf565b91505061058f565b50919050565b826001600160a01b03811633146106b5576106b533610ff0565b6106c08484846111b9565b50505050565b336000908152600a602052604081205461057490600261227a565b6106e96111e9565b61115c83116107355760405162461bcd60e51b815260206004820152601360248201527214dd185c9d081a5b99195e081a5b9d985b1a59606a1b60448201526064015b60405180910390fd5b600082116107765760405162461bcd60e51b815260206004820152600e60248201526d13195b99dd1a081a5b9d985b1a5960921b604482015260640161072c565b61079a60405180606001604052806000815260200160008152602001606081525090565b838152602080820184815260408301848152600c805460018101825560009190915284517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7600390920291820190815592517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c8820155905180518594610844937fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c901920190611da1565b50859150505b61085484866122a7565b811015610877576108653382611243565b8061086f816122bf565b91505061084a565b5050505050565b826001600160a01b03811633146108985761089833610ff0565b6106c0848484611261565b6108ae335b8261127c565b6108ca5760405162461bcd60e51b815260040161072c906122d8565b6108d3816112fb565b50565b6108de6111e9565b600b805461ffff1916911515919091179055565b6000818152600260205260408120546001600160a01b0316806104815760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161072c565b60006001600160a01b0382166109bc5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840161072c565b506001600160a01b031660009081526003602052604090205490565b6109e06111e9565b6109ea6000611396565b565b60606001805461049690612230565b610a036111e9565b600b80549115156101000261ffff19909216919091179055565b600260075403610a6f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161072c565b6002600755600b5460ff16610ac65760405162461bcd60e51b815260206004820152601c60248201527f5075626c69632073616c65206e6f7420696e2070726f67726573732e00000000604482015260640161072c565b8060021480610ad55750806001145b610b115760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a590818dbdd5b9d609a1b604482015260640161072c565b61115c600182600954610b2491906122a7565b610b2e919061227a565b1115610b715760405162461bcd60e51b81526020600482015260126024820152712737ba1032b737bab3b41039bab838363c9760711b604482015260640161072c565b6000610b7b6106c6565b905080821115610be15760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420616c6c6f77656420746f206d696e74206d6f7265207468616e20322060448201526a3832b9103bb0b63632ba1760a91b606482015260840161072c565b60005b82811015610c0657610bf46113e8565b80610bfe816122bf565b915050610be4565b50336000908152600a602052604081208054849290610c269084906122a7565b909155505060016007555050565b81610c3e81610ff0565b610554838361140b565b836001600160a01b0381163314610c6257610c6233610ff0565b61087785858585611416565b610c766111e9565b600855565b606061115c8211610cca576009548210610ca857604051630cbdb7b360e41b815260040160405180910390fd5b6104816040518060600160405280603b8152602001612499603b913983611448565b6000610cd58361150b565b9050610ce5816040015184611448565b9392505050565b919050565b600260075403610d435760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161072c565b6002600755600b54610100900460ff16610d7057604051632212e8e760e01b815260040160405180910390fd5b6040516bffffffffffffffffffffffff193360601b166020820152600090603401604051602081830303815290604052805190602001209050610dea838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506008549150849050611690565b610e365760405162461bcd60e51b815260206004820152601860248201527f41646472657373206e6f742077686974656c69737465642e0000000000000000604482015260640161072c565b6000610e406106c6565b9050600085118015610e525750808511155b610eb65760405162461bcd60e51b815260206004820152602f60248201527f4e6f7420616c6c6f77656420746f206d696e74206d6f7265207468616e20322060448201526e323ab934b73390383932b9b0b6329760891b606482015260840161072c565b60005b85811015610edb57610ec96113e8565b80610ed3816122bf565b915050610eb9565b50336000908152600a602052604081208054879290610efb9084906122a7565b909155505060016007555050505050565b610f146111e9565b6001600160a01b038116610f795760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161072c565b6108d381611396565b6001600160a01b03163b151590565b6000818152600260205260409020546001600160a01b03166108d35760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161072c565b6daaeb6d7670e522a718067333cd4e3b156108d357604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561105d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110819190612326565b6108d357604051633b79c77360e21b81526001600160a01b038216600482015260240161072c565b60006110b4826108f2565b9050806001600160a01b0316836001600160a01b0316036111215760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161072c565b336001600160a01b038216148061113d575061113d81336103f4565b6111af5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000606482015260840161072c565b61055483836116a6565b6111c2336108a8565b6111de5760405162461bcd60e51b815260040161072c906122d8565b610554838383611714565b6006546001600160a01b031633146109ea5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072c565b61125d8282604051806020016040528060008152506118b0565b5050565b61055483838360405180602001604052806000815250610c48565b600080611288836108f2565b9050806001600160a01b0316846001600160a01b031614806112cf57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806112f35750836001600160a01b03166112e884610519565b6001600160a01b0316145b949350505050565b6000611306826108f2565b90506113136000836116a6565b6001600160a01b038116600090815260036020526040812080546001929061133c90849061227a565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6113f433600954611243565b60098054906000611404836122bf565b9190505550565b61125d3383836118e3565b611420338361127c565b61143c5760405162461bcd60e51b815260040161072c906122d8565b6106c0848484846119b1565b6060611452611e25565b6040805180820182526007815266697066733a2f2f60c81b602080830191909152908352828101869052815180830190925260018252602f60f81b9082015281600260200201526114a2836119e4565b606082019081526040805180820182526005815264173539b7b760d91b6020808301919091526080850182905284518186015184870151955194516000966114f296939592949093929101612343565b60408051808303601f1901815291905295945050505050565b61152f60405180606001604052806000815260200160008152602001606081525090565b61115c8211611551576040516328704ad560e01b815260040160405180910390fd5b60005b600c54811015611676576000600c828154811061157357611573612291565b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820180546115b090612230565b80601f01602080910402602001604051908101604052809291908181526020018280546115dc90612230565b80156116295780601f106115fe57610100808354040283529160200191611629565b820191906000526020600020905b81548152906001019060200180831161160c57829003601f168201915b50505050508152505090508381600001511115801561165757506020810151815161165491906122a7565b84105b15611663579392505050565b508061166e816122bf565b915050611554565b50604051630cbdb7b360e41b815260040160405180910390fd5b60008261169d8584611ae5565b14949350505050565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906116db826108f2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b826001600160a01b0316611727826108f2565b6001600160a01b03161461178b5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161072c565b6001600160a01b0382166117ed5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161072c565b6117f86000826116a6565b6001600160a01b038316600090815260036020526040812080546001929061182190849061227a565b90915550506001600160a01b038216600090815260036020526040812080546001929061184f9084906122a7565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6118ba8383611b32565b6118c76000848484611c74565b6105545760405162461bcd60e51b815260040161072c906123ae565b816001600160a01b0316836001600160a01b0316036119445760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161072c565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6119bc848484611714565b6119c884848484611c74565b6106c05760405162461bcd60e51b815260040161072c906123ae565b606081600003611a0b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611a355780611a1f816122bf565b9150611a2e9050600a83612416565b9150611a0f565b60008167ffffffffffffffff811115611a5057611a50611f95565b6040519080825280601f01601f191660200182016040528015611a7a576020820181803683370190505b5090505b84156112f357611a8f60018361227a565b9150611a9c600a8661242a565b611aa79060306122a7565b60f81b818381518110611abc57611abc612291565b60200101906001600160f81b031916908160001a905350611ade600a86612416565b9450611a7e565b600081815b8451811015611b2a57611b1682868381518110611b0957611b09612291565b6020026020010151611d75565b915080611b22816122bf565b915050611aea565b509392505050565b6001600160a01b038216611b885760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161072c565b6000818152600260205260409020546001600160a01b031615611bed5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161072c565b6001600160a01b0382166000908152600360205260408120805460019290611c169084906122a7565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b15611d6a57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611cb890339089908890889060040161243e565b6020604051808303816000875af1925050508015611cf3575060408051601f3d908101601f19168201909252611cf09181019061247b565b60015b611d50573d808015611d21576040519150601f19603f3d011682016040523d82523d6000602084013e611d26565b606091505b508051600003611d485760405162461bcd60e51b815260040161072c906123ae565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506112f3565b506001949350505050565b6000818310611d91576000828152602084905260409020610ce5565b5060009182526020526040902090565b828054611dad90612230565b90600052602060002090601f016020900481019282611dcf5760008555611e15565b82601f10611de857805160ff1916838001178555611e15565b82800160010185558215611e15579182015b82811115611e15578251825591602001919060010190611dfa565b50611e21929150611e4c565b5090565b6040518060a001604052806005905b6060815260200190600190039081611e345790505090565b5b80821115611e215760008155600101611e4d565b6001600160e01b0319811681146108d357600080fd5b600060208284031215611e8957600080fd5b8135610ce581611e61565b60005b83811015611eaf578181015183820152602001611e97565b838111156106c05750506000910152565b60008151808452611ed8816020860160208601611e94565b601f01601f19169290920160200192915050565b602081526000610ce56020830184611ec0565b600060208284031215611f1157600080fd5b5035919050565b80356001600160a01b0381168114610cec57600080fd5b60008060408385031215611f4257600080fd5b611f4b83611f18565b946020939093013593505050565b600080600060608486031215611f6e57600080fd5b611f7784611f18565b9250611f8560208501611f18565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115611fc657611fc6611f95565b604051601f8501601f19908116603f01168101908282118183101715611fee57611fee611f95565b8160405280935085815286868601111561200757600080fd5b858560208301376000602087830101525050509392505050565b60008060006060848603121561203657600080fd5b8335925060208401359150604084013567ffffffffffffffff81111561205b57600080fd5b8401601f8101861361206c57600080fd5b61207b86823560208401611fab565b9150509250925092565b80151581146108d357600080fd5b6000602082840312156120a557600080fd5b8135610ce581612085565b6000602082840312156120c257600080fd5b610ce582611f18565b600080604083850312156120de57600080fd5b6120e783611f18565b915060208301356120f781612085565b809150509250929050565b6000806000806080858703121561211857600080fd5b61212185611f18565b935061212f60208601611f18565b925060408501359150606085013567ffffffffffffffff81111561215257600080fd5b8501601f8101871361216357600080fd5b61217287823560208401611fab565b91505092959194509250565b60008060006040848603121561219357600080fd5b83359250602084013567ffffffffffffffff808211156121b257600080fd5b818601915086601f8301126121c657600080fd5b8135818111156121d557600080fd5b8760208260051b85010111156121ea57600080fd5b6020830194508093505050509250925092565b6000806040838503121561221057600080fd5b61221983611f18565b915061222760208401611f18565b90509250929050565b600181811c9082168061224457607f821691505b60208210810361069557634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561228c5761228c612264565b500390565b634e487b7160e01b600052603260045260246000fd5b600082198211156122ba576122ba612264565b500190565b6000600182016122d1576122d1612264565b5060010190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b60006020828403121561233857600080fd5b8151610ce581612085565b60008651612355818460208b01611e94565b865190830190612369818360208b01611e94565b865191019061237c818360208a01611e94565b855191019061238f818360208901611e94565b84519101906123a2818360208801611e94565b01979650505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b60008261242557612425612400565b500490565b60008261243957612439612400565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061247190830184611ec0565b9695505050505050565b60006020828403121561248d57600080fd5b8151610ce581611e6156fe6261667962656967776f683473367a6c6735363336366b69676161766d7236626377736d687a726672673535636b34366672696d6d673272346d34a26469706673582212200982d952d4f0fc9c808e930d358c32b92c7806036a5ca0791014846cbcbdcbe564736f6c634300080d00334552433732313a207472616e7366657220746f206e6f6e204552433732315265fbbcb7946dbd7325e8d4dc78280cb634a03d869f48b7e6b8d9e1d2f5e867157e
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c806370a0823111610104578063a22cb465116100a2578063c87b56dd11610071578063c87b56dd146103c0578063d2cab056146103d3578063e985e9c5146103e6578063f2fde38b1461042257600080fd5b8063a22cb46514610377578063b88d4fde1461038a578063bd32fb661461039d578063c380a138146103b057600080fd5b80638da5cb5b116100de5780638da5cb5b1461033857806395d89b4114610349578063993847d114610351578063a0712d681461036457600080fd5b806370a0823114610312578063715018a614610325578063753028a91461032d57600080fd5b806323b872dd1161017c57806342842e0e1161014b57806342842e0e146102c657806342966c68146102d95780635aca1bb6146102ec5780636352211e146102ff57600080fd5b806323b872dd146102835780632cbe37cc1461029657806339ab01b61461029e57806341f43434146102b157600080fd5b8063081812fc116101b8578063081812fc14610232578063095ea7b31461025d57806318160ddd1461027257806320259ff31461027a57600080fd5b806301ffc9a7146101df578063066453df1461020757806306fdde031461021d575b600080fd5b6101f26101ed366004611e77565b610435565b60405190151581526020015b60405180910390f35b61020f600281565b6040519081526020016101fe565b610225610487565b6040516101fe9190611eec565b610245610240366004611eff565b610519565b6040516001600160a01b0390911681526020016101fe565b61027061026b366004611f2f565b610540565b005b61020f610559565b61020f61115c81565b610270610291366004611f59565b61069b565b61020f6106c6565b6102706102ac366004612021565b6106e1565b6102456daaeb6d7670e522a718067333cd4e81565b6102706102d4366004611f59565b61087e565b6102706102e7366004611eff565b6108a3565b6102706102fa366004612093565b6108d6565b61024561030d366004611eff565b6108f2565b61020f6103203660046120b0565b610952565b6102706109d8565b600b5460ff166101f2565b6006546001600160a01b0316610245565b6102256109ec565b61027061035f366004612093565b6109fb565b610270610372366004611eff565b610a1d565b6102706103853660046120cb565b610c34565b610270610398366004612102565b610c48565b6102706103ab366004611eff565b610c6e565b600b54610100900460ff166101f2565b6102256103ce366004611eff565b610c7b565b6102706103e136600461217e565b610cf1565b6101f26103f43660046121fd565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102706104303660046120b0565b610f0c565b60006001600160e01b031982166380ac58cd60e01b148061046657506001600160e01b03198216635b5e139f60e01b145b8061048157506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000805461049690612230565b80601f01602080910402602001604051908101604052809291908181526020018280546104c290612230565b801561050f5780601f106104e45761010080835404028352916020019161050f565b820191906000526020600020905b8154815290600101906020018083116104f257829003601f168201915b5050505050905090565b600061052482610f91565b506000908152600460205260409020546001600160a01b031690565b8161054a81610ff0565b61055483836110a9565b505050565b600c546000908103610579576001600954610574919061227a565b905090565b6000600160095461058a919061227a565b905060005b600c54811015610695576000600c82815481106105ae576105ae612291565b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820180546105eb90612230565b80601f016020809104026020016040519081016040528092919081815260200182805461061790612230565b80156106645780601f1061063957610100808354040283529160200191610664565b820191906000526020600020905b81548152906001019060200180831161064757829003601f168201915b505050505081525050905080602001518361067f91906122a7565b925050808061068d906122bf565b91505061058f565b50919050565b826001600160a01b03811633146106b5576106b533610ff0565b6106c08484846111b9565b50505050565b336000908152600a602052604081205461057490600261227a565b6106e96111e9565b61115c83116107355760405162461bcd60e51b815260206004820152601360248201527214dd185c9d081a5b99195e081a5b9d985b1a59606a1b60448201526064015b60405180910390fd5b600082116107765760405162461bcd60e51b815260206004820152600e60248201526d13195b99dd1a081a5b9d985b1a5960921b604482015260640161072c565b61079a60405180606001604052806000815260200160008152602001606081525090565b838152602080820184815260408301848152600c805460018101825560009190915284517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c7600390920291820190815592517fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c8820155905180518594610844937fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c901920190611da1565b50859150505b61085484866122a7565b811015610877576108653382611243565b8061086f816122bf565b91505061084a565b5050505050565b826001600160a01b03811633146108985761089833610ff0565b6106c0848484611261565b6108ae335b8261127c565b6108ca5760405162461bcd60e51b815260040161072c906122d8565b6108d3816112fb565b50565b6108de6111e9565b600b805461ffff1916911515919091179055565b6000818152600260205260408120546001600160a01b0316806104815760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161072c565b60006001600160a01b0382166109bc5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840161072c565b506001600160a01b031660009081526003602052604090205490565b6109e06111e9565b6109ea6000611396565b565b60606001805461049690612230565b610a036111e9565b600b80549115156101000261ffff19909216919091179055565b600260075403610a6f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161072c565b6002600755600b5460ff16610ac65760405162461bcd60e51b815260206004820152601c60248201527f5075626c69632073616c65206e6f7420696e2070726f67726573732e00000000604482015260640161072c565b8060021480610ad55750806001145b610b115760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a590818dbdd5b9d609a1b604482015260640161072c565b61115c600182600954610b2491906122a7565b610b2e919061227a565b1115610b715760405162461bcd60e51b81526020600482015260126024820152712737ba1032b737bab3b41039bab838363c9760711b604482015260640161072c565b6000610b7b6106c6565b905080821115610be15760405162461bcd60e51b815260206004820152602b60248201527f4e6f7420616c6c6f77656420746f206d696e74206d6f7265207468616e20322060448201526a3832b9103bb0b63632ba1760a91b606482015260840161072c565b60005b82811015610c0657610bf46113e8565b80610bfe816122bf565b915050610be4565b50336000908152600a602052604081208054849290610c269084906122a7565b909155505060016007555050565b81610c3e81610ff0565b610554838361140b565b836001600160a01b0381163314610c6257610c6233610ff0565b61087785858585611416565b610c766111e9565b600855565b606061115c8211610cca576009548210610ca857604051630cbdb7b360e41b815260040160405180910390fd5b6104816040518060600160405280603b8152602001612499603b913983611448565b6000610cd58361150b565b9050610ce5816040015184611448565b9392505050565b919050565b600260075403610d435760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161072c565b6002600755600b54610100900460ff16610d7057604051632212e8e760e01b815260040160405180910390fd5b6040516bffffffffffffffffffffffff193360601b166020820152600090603401604051602081830303815290604052805190602001209050610dea838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506008549150849050611690565b610e365760405162461bcd60e51b815260206004820152601860248201527f41646472657373206e6f742077686974656c69737465642e0000000000000000604482015260640161072c565b6000610e406106c6565b9050600085118015610e525750808511155b610eb65760405162461bcd60e51b815260206004820152602f60248201527f4e6f7420616c6c6f77656420746f206d696e74206d6f7265207468616e20322060448201526e323ab934b73390383932b9b0b6329760891b606482015260840161072c565b60005b85811015610edb57610ec96113e8565b80610ed3816122bf565b915050610eb9565b50336000908152600a602052604081208054879290610efb9084906122a7565b909155505060016007555050505050565b610f146111e9565b6001600160a01b038116610f795760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161072c565b6108d381611396565b6001600160a01b03163b151590565b6000818152600260205260409020546001600160a01b03166108d35760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161072c565b6daaeb6d7670e522a718067333cd4e3b156108d357604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561105d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110819190612326565b6108d357604051633b79c77360e21b81526001600160a01b038216600482015260240161072c565b60006110b4826108f2565b9050806001600160a01b0316836001600160a01b0316036111215760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161072c565b336001600160a01b038216148061113d575061113d81336103f4565b6111af5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000606482015260840161072c565b61055483836116a6565b6111c2336108a8565b6111de5760405162461bcd60e51b815260040161072c906122d8565b610554838383611714565b6006546001600160a01b031633146109ea5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161072c565b61125d8282604051806020016040528060008152506118b0565b5050565b61055483838360405180602001604052806000815250610c48565b600080611288836108f2565b9050806001600160a01b0316846001600160a01b031614806112cf57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806112f35750836001600160a01b03166112e884610519565b6001600160a01b0316145b949350505050565b6000611306826108f2565b90506113136000836116a6565b6001600160a01b038116600090815260036020526040812080546001929061133c90849061227a565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6113f433600954611243565b60098054906000611404836122bf565b9190505550565b61125d3383836118e3565b611420338361127c565b61143c5760405162461bcd60e51b815260040161072c906122d8565b6106c0848484846119b1565b6060611452611e25565b6040805180820182526007815266697066733a2f2f60c81b602080830191909152908352828101869052815180830190925260018252602f60f81b9082015281600260200201526114a2836119e4565b606082019081526040805180820182526005815264173539b7b760d91b6020808301919091526080850182905284518186015184870151955194516000966114f296939592949093929101612343565b60408051808303601f1901815291905295945050505050565b61152f60405180606001604052806000815260200160008152602001606081525090565b61115c8211611551576040516328704ad560e01b815260040160405180910390fd5b60005b600c54811015611676576000600c828154811061157357611573612291565b906000526020600020906003020160405180606001604052908160008201548152602001600182015481526020016002820180546115b090612230565b80601f01602080910402602001604051908101604052809291908181526020018280546115dc90612230565b80156116295780601f106115fe57610100808354040283529160200191611629565b820191906000526020600020905b81548152906001019060200180831161160c57829003601f168201915b50505050508152505090508381600001511115801561165757506020810151815161165491906122a7565b84105b15611663579392505050565b508061166e816122bf565b915050611554565b50604051630cbdb7b360e41b815260040160405180910390fd5b60008261169d8584611ae5565b14949350505050565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906116db826108f2565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b826001600160a01b0316611727826108f2565b6001600160a01b03161461178b5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161072c565b6001600160a01b0382166117ed5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161072c565b6117f86000826116a6565b6001600160a01b038316600090815260036020526040812080546001929061182190849061227a565b90915550506001600160a01b038216600090815260036020526040812080546001929061184f9084906122a7565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6118ba8383611b32565b6118c76000848484611c74565b6105545760405162461bcd60e51b815260040161072c906123ae565b816001600160a01b0316836001600160a01b0316036119445760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161072c565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6119bc848484611714565b6119c884848484611c74565b6106c05760405162461bcd60e51b815260040161072c906123ae565b606081600003611a0b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611a355780611a1f816122bf565b9150611a2e9050600a83612416565b9150611a0f565b60008167ffffffffffffffff811115611a5057611a50611f95565b6040519080825280601f01601f191660200182016040528015611a7a576020820181803683370190505b5090505b84156112f357611a8f60018361227a565b9150611a9c600a8661242a565b611aa79060306122a7565b60f81b818381518110611abc57611abc612291565b60200101906001600160f81b031916908160001a905350611ade600a86612416565b9450611a7e565b600081815b8451811015611b2a57611b1682868381518110611b0957611b09612291565b6020026020010151611d75565b915080611b22816122bf565b915050611aea565b509392505050565b6001600160a01b038216611b885760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161072c565b6000818152600260205260409020546001600160a01b031615611bed5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161072c565b6001600160a01b0382166000908152600360205260408120805460019290611c169084906122a7565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b15611d6a57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611cb890339089908890889060040161243e565b6020604051808303816000875af1925050508015611cf3575060408051601f3d908101601f19168201909252611cf09181019061247b565b60015b611d50573d808015611d21576040519150601f19603f3d011682016040523d82523d6000602084013e611d26565b606091505b508051600003611d485760405162461bcd60e51b815260040161072c906123ae565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506112f3565b506001949350505050565b6000818310611d91576000828152602084905260409020610ce5565b5060009182526020526040902090565b828054611dad90612230565b90600052602060002090601f016020900481019282611dcf5760008555611e15565b82601f10611de857805160ff1916838001178555611e15565b82800160010185558215611e15579182015b82811115611e15578251825591602001919060010190611dfa565b50611e21929150611e4c565b5090565b6040518060a001604052806005905b6060815260200190600190039081611e345790505090565b5b80821115611e215760008155600101611e4d565b6001600160e01b0319811681146108d357600080fd5b600060208284031215611e8957600080fd5b8135610ce581611e61565b60005b83811015611eaf578181015183820152602001611e97565b838111156106c05750506000910152565b60008151808452611ed8816020860160208601611e94565b601f01601f19169290920160200192915050565b602081526000610ce56020830184611ec0565b600060208284031215611f1157600080fd5b5035919050565b80356001600160a01b0381168114610cec57600080fd5b60008060408385031215611f4257600080fd5b611f4b83611f18565b946020939093013593505050565b600080600060608486031215611f6e57600080fd5b611f7784611f18565b9250611f8560208501611f18565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115611fc657611fc6611f95565b604051601f8501601f19908116603f01168101908282118183101715611fee57611fee611f95565b8160405280935085815286868601111561200757600080fd5b858560208301376000602087830101525050509392505050565b60008060006060848603121561203657600080fd5b8335925060208401359150604084013567ffffffffffffffff81111561205b57600080fd5b8401601f8101861361206c57600080fd5b61207b86823560208401611fab565b9150509250925092565b80151581146108d357600080fd5b6000602082840312156120a557600080fd5b8135610ce581612085565b6000602082840312156120c257600080fd5b610ce582611f18565b600080604083850312156120de57600080fd5b6120e783611f18565b915060208301356120f781612085565b809150509250929050565b6000806000806080858703121561211857600080fd5b61212185611f18565b935061212f60208601611f18565b925060408501359150606085013567ffffffffffffffff81111561215257600080fd5b8501601f8101871361216357600080fd5b61217287823560208401611fab565b91505092959194509250565b60008060006040848603121561219357600080fd5b83359250602084013567ffffffffffffffff808211156121b257600080fd5b818601915086601f8301126121c657600080fd5b8135818111156121d557600080fd5b8760208260051b85010111156121ea57600080fd5b6020830194508093505050509250925092565b6000806040838503121561221057600080fd5b61221983611f18565b915061222760208401611f18565b90509250929050565b600181811c9082168061224457607f821691505b60208210810361069557634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008282101561228c5761228c612264565b500390565b634e487b7160e01b600052603260045260246000fd5b600082198211156122ba576122ba612264565b500190565b6000600182016122d1576122d1612264565b5060010190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b60006020828403121561233857600080fd5b8151610ce581612085565b60008651612355818460208b01611e94565b865190830190612369818360208b01611e94565b865191019061237c818360208a01611e94565b855191019061238f818360208901611e94565b84519101906123a2818360208801611e94565b01979650505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b60008261242557612425612400565b500490565b60008261243957612439612400565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061247190830184611ec0565b9695505050505050565b60006020828403121561248d57600080fd5b8151610ce581611e6156fe6261667962656967776f683473367a6c6735363336366b69676161766d7236626377736d687a726672673535636b34366672696d6d673272346d34a26469706673582212200982d952d4f0fc9c808e930d358c32b92c7806036a5ca0791014846cbcbdcbe564736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
fbbcb7946dbd7325e8d4dc78280cb634a03d869f48b7e6b8d9e1d2f5e867157e
-----Decoded View---------------
Arg [0] : merkleRoot (bytes32): 0xfbbcb7946dbd7325e8d4dc78280cb634a03d869f48b7e6b8d9e1d2f5e867157e
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : fbbcb7946dbd7325e8d4dc78280cb634a03d869f48b7e6b8d9e1d2f5e867157e
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.