Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
1,681 CF
Holders
80
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
10 CFLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
CreatureFantasy
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ERC721AQueryable.sol"; import "./ERC721ABurnable.sol"; /* * ___ __ * )_ _ _ ) \ X / o _)_ ( _ (_ ` _ _ _ _ _)_ ( _ o _ _ * (__ ) ) (_( \/ \/ ( (_ ) ) .__) (_) ) ) ) )_) (_ ) ) ( ) ) (_( * (_ _) * Unveil SOMETHING Adventurous * Phase 1: The Echo of Poseidon - Introduce Creature Fantasy NFT Collection * --------------------------------------------- * | We end with SOMETHING when AI meets anything * | Website: https://endwithsomething.xyz/ * | Twitter: https://twitter.com/EndWithSth * | Opensea: https://opensea.io/collection/creaturefantasy */ contract CreatureFantasy is Ownable, Pausable, ERC721AQueryable, ERC721ABurnable, ERC2981 { enum Status { INITIAL, PREMINTING, MINTING, REDEEMING, ENDED } uint256 public constant mintingPrice = 5 * 10**15; uint256 public constant mintingPriceByWhitelist = 10**15; uint256 public constant mintingCapPerAddress = 10; uint256 public constant maxSupply = 6000; uint256 public constant durationOfPreminting = 7200; // 2 hours uint256 public constant durationOfMinting = 172800; // 48 hours uint256 public constant durationOfRedeeming = 604800; // 1 week /// @dev durationOfPreminting + durationOfMinting + durationOfRedeeming uint256 public constant durationTotal = 784800; /// @notice track redeemption process uint256 public redeemedIndex; /// @notice record the timestamp from which preminting starts uint256 public startedAt; /// @notice record the timestamp from which redeeming starts uint256 public redeemingStartedAt; bytes32 public immutable airdropMerkleRoot; bytes32 public immutable whitelistMerkleRoot; string public baseURI; mapping(bytes32 => uint256) public airdropVerifiedAt; mapping(bytes32 => uint256) public whitelistVerifiedAt; /// @notice reserve for STH holders to redeem uint256 private constant _reservedSupply = 1000; mapping(address => uint256) private _addressToMinted; mapping(uint256 => address) private _tokenStakedIn; constructor( bytes32 airdropMerkleRoot_, bytes32 whitelistMerkleRoot_, uint96 defaultRoyalty ) ERC721A("Creature Fantasy", "CF") { airdropMerkleRoot = airdropMerkleRoot_; whitelistMerkleRoot = whitelistMerkleRoot_; _setDefaultRoyalty(msg.sender, defaultRoyalty); // Why preminting 1000 tokens ? // 0-999 are special editions reserved for all STH holders. // Holding 1 STH is eligible to claim 1 CF for free. _safeMint(address(this), reservedSupply()); } modifier validateMinting(uint256 price, uint256 amount) { require(msg.sender == tx.origin, "EOA only"); require(amount > 0, "amount = 0"); require(_totalMinted() + amount <= maxSupply, "exceed maxSupply"); require(msg.value >= price * amount, "insufficient payment"); _; } /** * @notice Public sale */ function mint(uint256 amount) external payable whenNotPaused validateMinting(mintingPrice, amount) { require(getCurrentStatus() == Status.MINTING, "expect MINTING status"); uint256 amountUpdated = _addressToMinted[msg.sender] + amount; require( amountUpdated <= mintingCapPerAddress, "exceed mintingCapPerAddress" ); _addressToMinted[msg.sender] = amountUpdated; _safeMint(msg.sender, amount); if (_totalMinted() == maxSupply) { redeemingStartedAt = block.timestamp; } } /** * @notice Users in the whitelist could mint with privileged price */ function mintByWhitelist( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external payable whenNotPaused validateMinting(mintingPriceByWhitelist, amount) { require( getCurrentStatus() == Status.PREMINTING, "expect PREMINTING status" ); bytes32 leaf = _leaf(msg.sender, maxAmount); require( _verify(whitelistMerkleRoot, leaf, proof), "bad whitelist merkle proof" ); require(whitelistVerifiedAt[leaf] == 0, "whitelist proof used"); require(amount <= maxAmount, "exceed maxAmount granted by the proof"); whitelistVerifiedAt[leaf] = block.timestamp; _safeMint(msg.sender, amount); } /** * @notice Eligible STH holders per the snapshot could redeem 1:1 CF */ function redeem( uint256 amount, uint256 maxAmount, bytes32[] calldata proof ) external whenNotPaused { require( getCurrentStatus() == Status.REDEEMING, "expect REDEEMING status" ); bytes32 leaf = _leaf(msg.sender, maxAmount); require( _verify(airdropMerkleRoot, leaf, proof), "bad airdrop merkle proof" ); require(airdropVerifiedAt[leaf] == 0, "airdrop proof used"); require(amount <= maxAmount, "exceed maxAmount granted by the proof"); airdropVerifiedAt[leaf] = block.timestamp; _redeem(amount); } function stakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { for (uint256 i = 0; i < tokenIds.length; i += 1) { uint256 currId = tokenIds[i]; address currOwner = ownerOf(currId); require(currOwner == user, "not token owner"); require( isApprovedForAll(currOwner, msg.sender) || getApproved(currId) == msg.sender, "not approved" ); require( _tokenStakedIn[currId] == address(0), "some token specified has been staked" ); _tokenStakedIn[currId] = msg.sender; } } function unstakeFor(address user, uint256[] memory tokenIds) external whenNotPaused { for (uint256 i = 0; i < tokenIds.length; i += 1) { uint256 currId = tokenIds[i]; address currOwner = ownerOf(currId); require(currOwner == user, "not token owner"); require( _tokenStakedIn[currId] == msg.sender, "not staked or not custodian" ); _tokenStakedIn[currId] = address(0); } } function withdraw() external onlyOwner { uint256 balance = address(this).balance; if (balance > 0) { payable(msg.sender).transfer(balance); } } function enableMinting() external onlyOwner { require(startedAt == 0, "minting enabled already"); startedAt = block.timestamp; } function pause() external onlyOwner { _pause(); } function setBaseURI(string memory newBaseURI) external onlyOwner { baseURI = newBaseURI; } function getCurrentStatus() public view returns (Status) { if (startedAt == 0) { return Status.INITIAL; } // if sold out if (redeemingStartedAt > 0) { if (block.timestamp - redeemingStartedAt < durationOfRedeeming) { return Status.REDEEMING; } else { return Status.ENDED; } } uint256 dist = block.timestamp - startedAt; if (dist >= durationTotal) { return Status.ENDED; } if (dist < durationOfPreminting) { return Status.PREMINTING; } else if (dist < durationOfPreminting + durationOfMinting) { return Status.MINTING; } return Status.REDEEMING; } function totalMinted() external view returns (uint256) { return _totalMinted(); } function getTotalMintedByUser(address user) external view returns (uint256) { return _addressToMinted[user]; } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, ERC2981) returns (bool) { return super.supportsInterface(interfaceId); } function _redeem(uint256 amount) internal { require(amount > 0, "amount = 0"); uint256 tillIndex = redeemedIndex + amount - 1; require(tillIndex < reservedSupply(), "exceed reservedSupply"); _batchTransferUnchecked( address(this), msg.sender, redeemedIndex, tillIndex ); redeemedIndex = tillIndex + 1; } function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal view override { // Skip checks on minting to reduce gas cost if (from == address(0)) { return; } (to); for (uint256 i = 0; i < quantity; i += 1) { require( _tokenStakedIn[startTokenId + i] == address(0), "can't transfer staked token" ); } } function _baseURI() internal view override returns (string memory) { return baseURI; } function reservedSupply() public pure virtual returns (uint256) { return _reservedSupply; } function _leaf(address account, uint256 amount) internal pure returns (bytes32) { return keccak256(abi.encodePacked(account, amount)); } function _verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) internal pure returns (bool) { return MerkleProof.verify(proof, root, leaf); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { 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 v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `tokenId` must be already minted. * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees 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 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++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = _efficientHash(computedHash, proofElement); } else { // Hash(current element of the proof + current computed hash) computedHash = _efficientHash(proofElement, computedHash); } } return computedHash; } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import "./interfaces/IERC721AQueryable.sol"; import "./ERC721A.sol"; /** * @title ERC721A Queryable * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * - `addr` = `address(0)` * - `startTimestamp` = `0` * - `burned` = `false` * * If the `tokenId` is burned: * - `addr` = `<Address of owner before token was burned>` * - `startTimestamp` = `<Timestamp when token was burned>` * - `burned = `true` * * Otherwise: * - `addr` = `<Address of owner>` * - `startTimestamp` = `<Timestamp of start of ownership>` * - `burned = `false` */ function explicitOwnershipOf(uint256 tokenId) public view override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _currentIndex) { return ownership; } ownership = _ownerships[tokenId]; if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[]( tokenIdsLength ); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start` < `stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _currentIndex; // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, _currentIndex)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for ( uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i ) { ownership = _ownerships[i]; if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(totalSupply) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K pfp collections should be fine). */ function tokensOfOwner(address owner) external view override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for ( uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i ) { ownership = _ownerships[i]; if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import "./interfaces/IERC721ABurnable.sol"; import "./ERC721A.sol"; /** * @title ERC721A Burnable Token * @dev ERC721A Token that can be irreversibly burned (destroyed). */ abstract contract ERC721ABurnable is ERC721A, IERC721ABurnable { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual override { _burn(tokenId, true); } }
// 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.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// 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 // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import "./IERC721A.sol"; /** * @dev Interface of an ERC721AQueryable compliant contract. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * - `addr` = `address(0)` * - `startTimestamp` = `0` * - `burned` = `false` * * If the `tokenId` is burned: * - `addr` = `<Address of owner before token was burned>` * - `startTimestamp` = `<Timestamp when token was burned>` * - `burned = `true` * * Otherwise: * - `addr` = `<Address of owner>` * - `startTimestamp` = `<Timestamp of start of ownership>` * - `burned = `false` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start` < `stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(totalSupply) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K pfp collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import "./interfaces/IERC721A.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721A { using Address for address; using Strings for uint256; // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See _ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // 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; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * To change the starting tokenId, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Burned tokens are calculated here, use _totalMinted() if you want to count just minted tokens. */ function totalSupply() public view override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex - _startTokenId() times unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to _startTokenId() unchecked { return _currentIndex - _startTokenId(); } } /** * @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 override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberMinted); } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return uint256(_addressData[owner].numberBurned); } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return _addressData[owner].aux; } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { _addressData[owner].aux = aux; } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return _ownershipOf(tokenId).addr; } /** * @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) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); 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 overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner) if (!isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSender()) revert ApproveToCaller(); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_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 { _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 { _transfer(from, to, tokenId); if (to.isContract()) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && !_ownerships[tokenId].burned; } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ""); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (to.isContract()) { do { emit Transfer(address(0), to, updatedIndex); if ( !_checkContractOnERC721Received( address(0), to, updatedIndex++, _data ) ) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex < end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint(address to, uint256 quantity) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) private { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = to; currSlot.startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } function _batchTransferUnchecked( address from, address to, uint256 fromTokenId, uint256 toTokenId ) internal { TokenOwnership memory prevOwnership = _ownershipOf(fromTokenId); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); for (uint256 tid = fromTokenId; tid < toTokenId + 1; tid += 1) { TokenOwnership storage currSlot = _ownerships[tid]; if (currSlot.addr == from) { currSlot.addr = address(0); } else if (currSlot.addr != address(0)) { revert TransferFromIncorrectOwner(); } } TokenOwnership storage fromSlot = _ownerships[fromTokenId]; fromSlot.addr = to; fromSlot.startTimestamp = uint64(block.timestamp); uint64 amount = uint64(toTokenId - fromTokenId + 1); _addressData[from].balance -= amount; _addressData[to].balance += amount; uint256 nextTokenId = toTokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { TokenOwnership memory prevOwnership = _ownershipOf(tokenId); address from = prevOwnership.addr; if (approvalCheck) { bool isApprovedOrOwner = (_msgSender() == from || isApprovedForAll(from, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, from); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { AddressData storage addressData = _addressData[from]; addressData.balance -= 1; addressData.numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. TokenOwnership storage currSlot = _ownerships[tokenId]; currSlot.addr = from; currSlot.startTimestamp = uint64(block.timestamp); currSlot.burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; TokenOwnership storage nextSlot = _ownerships[nextTokenId]; if (nextSlot.addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId != _currentIndex) { nextSlot.addr = from; nextSlot.startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target 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 _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try IERC721Receiver(to).onERC721Received( _msgSender(), from, tokenId, _data ) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * 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, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; /** * @dev Interface of an ERC721A compliant contract. */ interface IERC721A is IERC721, IERC721Metadata { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * The caller cannot approve to the current owner. */ error ApprovalToCurrentOwner(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; // For miscellaneous variable(s) pertaining to the address // (e.g. number of whitelist mint slots used). // If there are multiple variables, please pack them into a uint64. uint64 aux; } /** * @dev Returns the total amount of tokens stored by the contract. * * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens. */ function totalSupply() external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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 be 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 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.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 (last updated v4.5.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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @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); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v3.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import "./IERC721A.sol"; /** * @dev Interface of an ERC721ABurnable compliant contract. */ interface IERC721ABurnable is IERC721A { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) external; }
{ "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":"airdropMerkleRoot_","type":"bytes32"},{"internalType":"bytes32","name":"whitelistMerkleRoot_","type":"bytes32"},{"internalType":"uint96","name":"defaultRoyalty","type":"uint96"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"airdropMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"airdropVerifiedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","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":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"durationOfMinting","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"durationOfPreminting","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"durationOfRedeeming","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"durationTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentStatus","outputs":[{"internalType":"enum CreatureFantasy.Status","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getTotalMintedByUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintByWhitelist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintingCapPerAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintingPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintingPriceByWhitelist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"maxAmount","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemedIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redeemingStartedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"reservedSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"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":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"stakeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"address","name":"user","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"unstakeFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"whitelistVerifiedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b50604051620040c0380380620040c08339810160408190526200003491620006bf565b6040518060400160405280601081526020016f43726561747572652046616e7461737960801b8152506040518060400160405280600281526020016121a360f11b815250620000926200008c620000ff60201b60201c565b62000103565b6000805460ff60a01b191690558151620000b490600390602085019062000619565b508051620000ca90600490602084019062000619565b5060006001555050608083905260a0829052620000e8338262000153565b620000f6306103e862000258565b50505062000819565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6127106001600160601b0382161115620001c75760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b60648201526084015b60405180910390fd5b6001600160a01b0382166200021f5760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620001be565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600955565b6200027a8282604051806020016040528060008152506200027e60201b60201c565b5050565b6001546001600160a01b038416620002a857604051622e076360e81b815260040160405180910390fd5b82620002c75760405163b562e8dd60e01b815260040160405180910390fd5b620002d6600085838662000452565b6001600160a01b038416600081815260066020908152604080832080546001600160801b031981166001600160401b038083168b018116918217680100000000000000006001600160401b031990941690921783900481168b0181169092021790915585845260058352922080546001600160e01b0319168417600160a01b4290941693909302929092179091558291828601916200037f919062000509811b62001fe617901c565b15620003fe575b60405182906001600160a01b03881690600090600080516020620040a0833981519152908290a46001820191620003c39060009088908762000518565b620003e1576040516368d2bf6b60e11b815260040160405180910390fd5b80821062000386578260015414620003f857600080fd5b62000433565b5b6040516001830192906001600160a01b03881690600090600080516020620040a0833981519152908290a4808210620003ff575b506001556200044c60008583866001600160e01b038516565b50505050565b6001600160a01b03841662000467576200044c565b60005b818110156200050257600060128162000484848762000707565b81526020810191909152604001600020546001600160a01b031614620004ed5760405162461bcd60e51b815260206004820152601b60248201527f63616e2774207472616e73666572207374616b656420746f6b656e00000000006044820152606401620001be565b620004fa60018262000707565b90506200046a565b5050505050565b6001600160a01b03163b151590565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906200054f9033908990889088906004016200072e565b602060405180830381600087803b1580156200056a57600080fd5b505af19250505080156200059d575060408051601f3d908101601f191682019092526200059a91810190620007a9565b60015b620005fc573d808015620005ce576040519150601f19603f3d011682016040523d82523d6000602084013e620005d3565b606091505b508051620005f4576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b8280546200062790620007dc565b90600052602060002090601f0160209004810192826200064b576000855562000696565b82601f106200066657805160ff191683800117855562000696565b8280016001018555821562000696579182015b828111156200069657825182559160200191906001019062000679565b50620006a4929150620006a8565b5090565b5b80821115620006a45760008155600101620006a9565b600080600060608486031215620006d557600080fd5b83516020850151604086015191945092506001600160601b0381168114620006fc57600080fd5b809150509250925092565b600082198211156200072957634e487b7160e01b600052601160045260246000fd5b500190565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b828110156200077d5785810182015185820160a0015281016200075f565b828111156200079057600060a084870101525b5050601f01601f19169190910160a00195945050505050565b600060208284031215620007bc57600080fd5b81516001600160e01b031981168114620007d557600080fd5b9392505050565b600181811c90821680620007f157607f821691505b602082108114156200081357634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a0516138536200084d6000396000818161084a0152610e270152600081816107e90152611c3701526138536000f3fe60806040526004361061031a5760003560e01c806370a08231116101ab578063a7794042116100f7578063c87b56dd11610095578063e797ec1b1161006f578063e797ec1b14610955578063e985e9c51461096a578063f21f537d1461098a578063f2fde38b146109a057600080fd5b8063c87b56dd1461090a578063d5abeb011461092a578063d6729c171461094057600080fd5b8063b88d4fde116100d1578063b88d4fde14610882578063b97bff1a146108a2578063c23dc68f146108c2578063c7719e78146108ef57600080fd5b8063a77940421461080b578063aa98e0c614610838578063b07b76641461086c57600080fd5b806395d89b4111610164578063a22cb4651161013e578063a22cb46514610780578063a2309ff8146107a0578063a3dd2619146107b5578063a5ce30d2146107d757600080fd5b806395d89b411461073857806399a2557a1461074d578063a0712d681461076d57600080fd5b806370a0823114610683578063715018a6146106a357806381fb12f3146106b85780638456cb59146106d85780638462151c146106ed5780638da5cb5b1461071a57600080fd5b806342966c681161026a5780635c975abb11610223578063672a6b94116101fd578063672a6b941461061457806367bb18bd1461062a5780636c0360eb146106575780636d2dcec91461066c57600080fd5b80635c975abb1461059f578063616271b2146105be5780636352211e146105f457600080fd5b806342966c68146104ea57806342e216941461050a57806344d19d2b1461051d5780635372a8871461053257806355f804b3146105525780635bbb21771461057257600080fd5b806318160ddd116102d75780632fe06267116102b15780632fe062671461048357806335db70b51461049a5780633ccfd60b146104b557806342842e0e146104ca57600080fd5b806318160ddd1461040b57806323b872dd146104245780632a55205a1461044457600080fd5b806301ffc9a71461031f57806306fdde0314610354578063081812fc14610376578063095ea7b3146103ae5780630a191822146103d057806310d4eba0146103f5575b600080fd5b34801561032b57600080fd5b5061033f61033a366004612f5b565b6109c0565b60405190151581526020015b60405180910390f35b34801561036057600080fd5b506103696109d1565b60405161034b9190612fd0565b34801561038257600080fd5b50610396610391366004612fe3565b610a63565b6040516001600160a01b03909116815260200161034b565b3480156103ba57600080fd5b506103ce6103c9366004613018565b610aa7565b005b3480156103dc57600080fd5b506103e762093a8081565b60405190815260200161034b565b34801561040157600080fd5b506103e7600b5481565b34801561041757600080fd5b50600254600154036103e7565b34801561043057600080fd5b506103ce61043f366004613042565b610b2e565b34801561045057600080fd5b5061046461045f36600461307e565b610b39565b604080516001600160a01b03909316835260208301919091520161034b565b34801561048f57600080fd5b506103e76202a30081565b3480156104a657600080fd5b506103e76611c37937e0800081565b3480156104c157600080fd5b506103ce610be5565b3480156104d657600080fd5b506103ce6104e5366004613042565b610c51565b3480156104f657600080fd5b506103ce610505366004612fe3565b610c6c565b6103ce6105183660046130a0565b610c77565b34801561052957600080fd5b506103e86103e7565b34801561053e57600080fd5b506103ce61054d3660046131e7565b610f63565b34801561055e57600080fd5b506103ce61056d36600461328b565b6110ac565b34801561057e57600080fd5b5061059261058d3660046132d3565b6110e9565b60405161034b9190613307565b3480156105ab57600080fd5b50600054600160a01b900460ff1661033f565b3480156105ca57600080fd5b506103e76105d9366004613371565b6001600160a01b031660009081526011602052604090205490565b34801561060057600080fd5b5061039661060f366004612fe3565b6111af565b34801561062057600080fd5b506103e7600d5481565b34801561063657600080fd5b506103e7610645366004612fe3565b60106020526000908152604090205481565b34801561066357600080fd5b506103696111c1565b34801561067857600080fd5b506103e7620bf9a081565b34801561068f57600080fd5b506103e761069e366004613371565b61124f565b3480156106af57600080fd5b506103ce61129d565b3480156106c457600080fd5b506103ce6106d33660046131e7565b6112d3565b3480156106e457600080fd5b506103ce611489565b3480156106f957600080fd5b5061070d610708366004613371565b6114bb565b60405161034b919061338c565b34801561072657600080fd5b506000546001600160a01b0316610396565b34801561074457600080fd5b50610369611608565b34801561075957600080fd5b5061070d6107683660046133c4565b611617565b6103ce61077b366004612fe3565b6117d1565b34801561078c57600080fd5b506103ce61079b3660046133f7565b611a0d565b3480156107ac57600080fd5b506103e7611aa3565b3480156107c157600080fd5b506107ca611ab3565b60405161034b9190613449565b3480156107e357600080fd5b506103e77f000000000000000000000000000000000000000000000000000000000000000081565b34801561081757600080fd5b506103e7610826366004612fe3565b600f6020526000908152604090205481565b34801561084457600080fd5b506103e77f000000000000000000000000000000000000000000000000000000000000000081565b34801561087857600080fd5b506103e7611c2081565b34801561088e57600080fd5b506103ce61089d366004613471565b611b4e565b3480156108ae57600080fd5b506103ce6108bd3660046130a0565b611b92565b3480156108ce57600080fd5b506108e26108dd366004612fe3565b611d6e565b60405161034b91906134ec565b3480156108fb57600080fd5b506103e766038d7ea4c6800081565b34801561091657600080fd5b50610369610925366004612fe3565b611e1c565b34801561093657600080fd5b506103e761177081565b34801561094c57600080fd5b506103e7600a81565b34801561096157600080fd5b506103ce611ea0565b34801561097657600080fd5b5061033f610985366004613521565b611f20565b34801561099657600080fd5b506103e7600c5481565b3480156109ac57600080fd5b506103ce6109bb366004613371565b611f4e565b60006109cb82611ff5565b92915050565b6060600380546109e090613554565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0c90613554565b8015610a595780601f10610a2e57610100808354040283529160200191610a59565b820191906000526020600020905b815481529060010190602001808311610a3c57829003601f168201915b5050505050905090565b6000610a6e8261201a565b610a8b576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610ab2826111af565b9050806001600160a01b0316836001600160a01b03161415610ae75760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610b1e57610b018133611f20565b610b1e576040516367d9dca160e11b815260040160405180910390fd5b610b29838383612046565b505050565b610b298383836120a2565b6000828152600a602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610bae5750604080518082019091526009546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610bcd906001600160601b0316876135a5565b610bd791906135da565b915196919550909350505050565b6000546001600160a01b03163314610c185760405162461bcd60e51b8152600401610c0f906135ee565b60405180910390fd5b478015610c4e57604051339082156108fc029083906000818181858888f19350505050158015610c4c573d6000803e3d6000fd5b505b50565b610b2983838360405180602001604052806000815250611b4e565b610c4e816001612288565b600054600160a01b900460ff1615610ca15760405162461bcd60e51b8152600401610c0f90613623565b66038d7ea4c6800084333214610ce45760405162461bcd60e51b8152602060048201526008602482015267454f41206f6e6c7960c01b6044820152606401610c0f565b60008111610d045760405162461bcd60e51b8152600401610c0f9061364d565b61177081610d1160015490565b610d1b9190613671565b1115610d5c5760405162461bcd60e51b815260206004820152601060248201526f657863656564206d6178537570706c7960801b6044820152606401610c0f565b610d6681836135a5565b341015610dac5760405162461bcd60e51b81526020600482015260146024820152731a5b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606401610c0f565b6001610db6611ab3565b6004811115610dc757610dc7613433565b14610e145760405162461bcd60e51b815260206004820152601860248201527f657870656374205052454d494e54494e472073746174757300000000000000006044820152606401610c0f565b6000610e20338761244a565b9050610e807f00000000000000000000000000000000000000000000000000000000000000008287878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061249192505050565b610ecc5760405162461bcd60e51b815260206004820152601a60248201527f6261642077686974656c697374206d65726b6c652070726f6f660000000000006044820152606401610c0f565b60008181526010602052604090205415610f1f5760405162461bcd60e51b81526020600482015260146024820152731dda1a5d195b1a5cdd081c1c9bdbd9881d5cd95960621b6044820152606401610c0f565b85871115610f3f5760405162461bcd60e51b8152600401610c0f90613689565b6000818152601060205260409020429055610f5a33886124a6565b50505050505050565b600054600160a01b900460ff1615610f8d5760405162461bcd60e51b8152600401610c0f90613623565b60005b8151811015610b29576000828281518110610fad57610fad6136ce565b602002602001015190506000610fc2826111af565b9050846001600160a01b0316816001600160a01b0316146110175760405162461bcd60e51b815260206004820152600f60248201526e3737ba103a37b5b2b71037bbb732b960891b6044820152606401610c0f565b6000828152601260205260409020546001600160a01b0316331461107d5760405162461bcd60e51b815260206004820152601b60248201527f6e6f74207374616b6564206f72206e6f7420637573746f6469616e00000000006044820152606401610c0f565b50600090815260126020526040902080546001600160a01b03191690556110a5600182613671565b9050610f90565b6000546001600160a01b031633146110d65760405162461bcd60e51b8152600401610c0f906135ee565b8051610c4c90600e906020840190612eac565b80516060906000816001600160401b0381111561110857611108613122565b60405190808252806020026020018201604052801561115357816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816111265790505b50905060005b8281146111a757611182858281518110611175576111756136ce565b6020026020010151611d6e565b828281518110611194576111946136ce565b6020908102919091010152600101611159565b509392505050565b60006111ba826124c0565b5192915050565b600e80546111ce90613554565b80601f01602080910402602001604051908101604052809291908181526020018280546111fa90613554565b80156112475780601f1061121c57610100808354040283529160200191611247565b820191906000526020600020905b81548152906001019060200180831161122a57829003601f168201915b505050505081565b60006001600160a01b038216611278576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6000546001600160a01b031633146112c75760405162461bcd60e51b8152600401610c0f906135ee565b6112d160006125da565b565b600054600160a01b900460ff16156112fd5760405162461bcd60e51b8152600401610c0f90613623565b60005b8151811015610b2957600082828151811061131d5761131d6136ce565b602002602001015190506000611332826111af565b9050846001600160a01b0316816001600160a01b0316146113875760405162461bcd60e51b815260206004820152600f60248201526e3737ba103a37b5b2b71037bbb732b960891b6044820152606401610c0f565b6113918133611f20565b806113ac5750336113a183610a63565b6001600160a01b0316145b6113e75760405162461bcd60e51b815260206004820152600c60248201526b1b9bdd08185c1c1c9bdd995960a21b6044820152606401610c0f565b6000828152601260205260409020546001600160a01b0316156114585760405162461bcd60e51b8152602060048201526024808201527f736f6d6520746f6b656e2073706563696669656420686173206265656e207374604482015263185ad95960e21b6064820152608401610c0f565b50600090815260126020526040902080546001600160a01b03191633179055611482600182613671565b9050611300565b6000546001600160a01b031633146114b35760405162461bcd60e51b8152600401610c0f906135ee565b6112d161262a565b606060008060006114cb8561124f565b90506000816001600160401b038111156114e7576114e7613122565b604051908082528060200260200182016040528015611510578160200160208202803683370190505b509050611536604080516060810182526000808252602082018190529181019190915290565b60005b8386146115fc57600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff1615801592820192909252925061159f576115f4565b81516001600160a01b0316156115b457815194505b876001600160a01b0316856001600160a01b031614156115f457808387806001019850815181106115e7576115e76136ce565b6020026020010181815250505b600101611539565b50909695505050505050565b6060600480546109e090613554565b606081831061163957604051631960ccad60e11b815260040160405180910390fd5b6001546000908084111561164b578093505b60006116568761124f565b905084861015611675578585038181101561166f578091505b50611679565b5060005b6000816001600160401b0381111561169357611693613122565b6040519080825280602002602001820160405280156116bc578160200160208202803683370190505b509050816116cf5793506117ca92505050565b60006116da88611d6e565b9050600081604001516116eb575080515b885b8881141580156116fd5750848714155b156117be57600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16158015928201929092529350611761576117b6565b82516001600160a01b03161561177657825191505b8a6001600160a01b0316826001600160a01b031614156117b657808488806001019950815181106117a9576117a96136ce565b6020026020010181815250505b6001016116ed565b50505092835250909150505b9392505050565b600054600160a01b900460ff16156117fb5760405162461bcd60e51b8152600401610c0f90613623565b6611c37937e080008133321461183e5760405162461bcd60e51b8152602060048201526008602482015267454f41206f6e6c7960c01b6044820152606401610c0f565b6000811161185e5760405162461bcd60e51b8152600401610c0f9061364d565b6117708161186b60015490565b6118759190613671565b11156118b65760405162461bcd60e51b815260206004820152601060248201526f657863656564206d6178537570706c7960801b6044820152606401610c0f565b6118c081836135a5565b3410156119065760405162461bcd60e51b81526020600482015260146024820152731a5b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606401610c0f565b6002611910611ab3565b600481111561192157611921613433565b146119665760405162461bcd60e51b8152602060048201526015602482015274657870656374204d494e54494e472073746174757360581b6044820152606401610c0f565b33600090815260116020526040812054611981908590613671565b9050600a8111156119d45760405162461bcd60e51b815260206004820152601b60248201527f657863656564206d696e74696e674361705065724164647265737300000000006044820152606401610c0f565b3360008181526011602052604090208290556119f090856124a6565b6117706119fc60015490565b1415611a075742600d555b50505050565b6001600160a01b038216331415611a375760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000611aae60015490565b905090565b6000600c5460001415611ac65750600090565b600d5415611af25762093a80600d5442611ae091906136e4565b1015611aec5750600390565b50600490565b6000600c5442611b0291906136e4565b9050620bf9a08110611b1657600491505090565b611c20811015611b2857600191505090565b611b376202a300611c20613671565b811015611b4657600291505090565b600391505090565b611b598484846120a2565b6001600160a01b0383163b15611a0757611b75848484846126ac565b611a07576040516368d2bf6b60e11b815260040160405180910390fd5b600054600160a01b900460ff1615611bbc5760405162461bcd60e51b8152600401610c0f90613623565b6003611bc6611ab3565b6004811115611bd757611bd7613433565b14611c245760405162461bcd60e51b815260206004820152601760248201527f6578706563742052454445454d494e47207374617475730000000000000000006044820152606401610c0f565b6000611c30338561244a565b9050611c907f00000000000000000000000000000000000000000000000000000000000000008285858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061249192505050565b611cdc5760405162461bcd60e51b815260206004820152601860248201527f6261642061697264726f70206d65726b6c652070726f6f6600000000000000006044820152606401610c0f565b6000818152600f602052604090205415611d2d5760405162461bcd60e51b8152602060048201526012602482015271185a5c991c9bdc081c1c9bdbd9881d5cd95960721b6044820152606401610c0f565b83851115611d4d5760405162461bcd60e51b8152600401610c0f90613689565b6000818152600f60205260409020429055611d67856127a3565b5050505050565b6040805160608082018352600080835260208084018290528385018290528451928301855281835282018190529281018390529091506001548310611db35792915050565b50600082815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161580159282019290925290611e135792915050565b6117ca836124c0565b6060611e278261201a565b611e4457604051630a14c4b560e41b815260040160405180910390fd5b6000611e4e61284a565b9050805160001415611e6f57604051806020016040528060008152506117ca565b80611e7984612859565b604051602001611e8a9291906136fb565b6040516020818303038152906040529392505050565b6000546001600160a01b03163314611eca5760405162461bcd60e51b8152600401610c0f906135ee565b600c5415611f1a5760405162461bcd60e51b815260206004820152601760248201527f6d696e74696e6720656e61626c656420616c72656164790000000000000000006044820152606401610c0f565b42600c55565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b6000546001600160a01b03163314611f785760405162461bcd60e51b8152600401610c0f906135ee565b6001600160a01b038116611fdd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c0f565b610c4e816125da565b6001600160a01b03163b151590565b60006001600160e01b0319821663152a902d60e11b14806109cb57506109cb82612956565b6000600154821080156109cb575050600090815260056020526040902054600160e01b900460ff161590565b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006120ad826124c0565b9050836001600160a01b031681600001516001600160a01b0316146120e45760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061210257506121028533611f20565b8061211d57503361211284610a63565b6001600160a01b0316145b90508061213d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661216457604051633a954ecd60e21b815260040160405180910390fd5b61217185858560016129a6565b61217d60008487612046565b6001600160a01b038581166000908152600660209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661225157600154821461225157805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03166000805160206137fe83398151915260405160405180910390a4611d67565b6000612293836124c0565b805190915082156122f9576000336001600160a01b03831614806122bc57506122bc8233611f20565b806122d75750336122cc86610a63565b6001600160a01b0316145b9050806122f757604051632ce44b5f60e11b815260040160405180910390fd5b505b6123078160008660016129a6565b61231360008583612046565b6001600160a01b0380821660008181526006602090815260408083208054600160801b6000196001600160401b0380841691909101811667ffffffffffffffff198416811783900482166001908101831690930277ffffffffffffffff0000000000000000ffffffffffffffff19909416179290921783558b86526005909452828520805460ff60e01b1942909316600160a01b026001600160e01b03199091169097179690961716600160e01b17855591890180845292208054919490911661241157600154821461241157805460208701516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b038416906000805160206137fe833981519152908390a450506002805460010190555050565b6040516bffffffffffffffffffffffff19606084901b1660208201526034810182905260009060540160405160208183030381529060405280519060200120905092915050565b600061249e828585612a4c565b949350505050565b610c4c828260405180602001604052806000815250612a62565b6040805160608101825260008082526020820181905291810191909152816001548110156125c157600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906125bf5780516001600160a01b031615612556579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff16151592810192909252156125ba579392505050565b612556565b505b604051636f96cda160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff16156126545760405162461bcd60e51b8152600401610c0f90613623565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861268f3390565b6040516001600160a01b03909116815260200160405180910390a1565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906126e190339089908890889060040161372a565b602060405180830381600087803b1580156126fb57600080fd5b505af192505050801561272b575060408051601f3d908101601f1916820190925261272891810190613767565b60015b612786573d808015612759576040519150601f19603f3d011682016040523d82523d6000602084013e61275e565b606091505b50805161277e576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b600081116127c35760405162461bcd60e51b8152600401610c0f9061364d565b6000600182600b546127d59190613671565b6127df91906136e4565b90506103e8811061282a5760405162461bcd60e51b8152602060048201526015602482015274657863656564207265736572766564537570706c7960581b6044820152606401610c0f565b6128383033600b5484612c0e565b612843816001613671565b600b555050565b6060600e80546109e090613554565b60608161287d5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156128a7578061289181613784565b91506128a09050600a836135da565b9150612881565b6000816001600160401b038111156128c1576128c1613122565b6040519080825280601f01601f1916602001820160405280156128eb576020820181803683370190505b5090505b841561249e576129006001836136e4565b915061290d600a8661379f565b612918906030613671565b60f81b81838151811061292d5761292d6136ce565b60200101906001600160f81b031916908160001a90535061294f600a866135da565b94506128ef565b60006001600160e01b031982166380ac58cd60e01b148061298757506001600160e01b03198216635b5e139f60e01b145b806109cb57506301ffc9a760e01b6001600160e01b03198316146109cb565b6001600160a01b0384166129b957611a07565b60005b81811015611d675760006012816129d38487613671565b81526020810191909152604001600020546001600160a01b031614612a3a5760405162461bcd60e51b815260206004820152601b60248201527f63616e2774207472616e73666572207374616b656420746f6b656e00000000006044820152606401610c0f565b612a45600182613671565b90506129bc565b600082612a598584612e40565b14949350505050565b6001546001600160a01b038416612a8b57604051622e076360e81b815260040160405180910390fd5b82612aa95760405163b562e8dd60e01b815260040160405180910390fd5b612ab660008583866129a6565b6001600160a01b038416600081815260066020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168b0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168b01811690920217909155858452600590925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501903b15612bcc575b60405182906001600160a01b038816906000906000805160206137fe833981519152908290a4612b9560008784806001019550876126ac565b612bb2576040516368d2bf6b60e11b815260040160405180910390fd5b808210612b5c578260015414612bc757600080fd5b612bff565b5b6040516001830192906001600160a01b038816906000906000805160206137fe833981519152908290a4808210612bcd575b50600155611a07600085838684565b6000612c19836124c0565b9050846001600160a01b031681600001516001600160a01b031614612c505760405162a1148160e81b815260040160405180910390fd5b825b612c5d836001613671565b811015612cd557600081815260056020526040902080546001600160a01b0388811691161415612c9a5780546001600160a01b0319168155612cc2565b80546001600160a01b031615612cc25760405162a1148160e81b815260040160405180910390fd5b50612cce600182613671565b9050612c52565b50600083815260056020526040812080546001600160401b034216600160a01b026001600160e01b03199091166001600160a01b0388161717815590612d1b85856136e4565b612d26906001613671565b6001600160a01b038816600090815260066020526040812080549293508392909190612d5c9084906001600160401b03166137b3565b82546101009290920a6001600160401b038181021990931691831602179091556001600160a01b038816600090815260066020526040812080548594509092612da7918591166137db565b92506101000a8154816001600160401b0302191690836001600160401b031602179055506000846001612dda9190613671565b60008181526005602052604090208054919250906001600160a01b0316612e35576001548214612e3557805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038b16171781555b505050505050505050565b600081815b84518110156111a7576000858281518110612e6257612e626136ce565b60200260200101519050808311612e885760008381526020829052604090209250612e99565b600081815260208490526040902092505b5080612ea481613784565b915050612e45565b828054612eb890613554565b90600052602060002090601f016020900481019282612eda5760008555612f20565b82601f10612ef357805160ff1916838001178555612f20565b82800160010185558215612f20579182015b82811115612f20578251825591602001919060010190612f05565b50612f2c929150612f30565b5090565b5b80821115612f2c5760008155600101612f31565b6001600160e01b031981168114610c4e57600080fd5b600060208284031215612f6d57600080fd5b81356117ca81612f45565b60005b83811015612f93578181015183820152602001612f7b565b83811115611a075750506000910152565b60008151808452612fbc816020860160208601612f78565b601f01601f19169290920160200192915050565b6020815260006117ca6020830184612fa4565b600060208284031215612ff557600080fd5b5035919050565b80356001600160a01b038116811461301357600080fd5b919050565b6000806040838503121561302b57600080fd5b61303483612ffc565b946020939093013593505050565b60008060006060848603121561305757600080fd5b61306084612ffc565b925061306e60208501612ffc565b9150604084013590509250925092565b6000806040838503121561309157600080fd5b50508035926020909101359150565b600080600080606085870312156130b657600080fd5b843593506020850135925060408501356001600160401b03808211156130db57600080fd5b818701915087601f8301126130ef57600080fd5b8135818111156130fe57600080fd5b8860208260051b850101111561311357600080fd5b95989497505060200194505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561316057613160613122565b604052919050565b600082601f83011261317957600080fd5b813560206001600160401b0382111561319457613194613122565b8160051b6131a3828201613138565b92835284810182019282810190878511156131bd57600080fd5b83870192505b848310156131dc578235825291830191908301906131c3565b979650505050505050565b600080604083850312156131fa57600080fd5b61320383612ffc565b915060208301356001600160401b0381111561321e57600080fd5b61322a85828601613168565b9150509250929050565b60006001600160401b0383111561324d5761324d613122565b613260601f8401601f1916602001613138565b905082815283838301111561327457600080fd5b828260208301376000602084830101529392505050565b60006020828403121561329d57600080fd5b81356001600160401b038111156132b357600080fd5b8201601f810184136132c457600080fd5b61249e84823560208401613234565b6000602082840312156132e557600080fd5b81356001600160401b038111156132fb57600080fd5b61249e84828501613168565b6020808252825182820181905260009190848201906040850190845b818110156115fc5761335e83855180516001600160a01b031682526020808201516001600160401b0316908301526040908101511515910152565b9284019260609290920191600101613323565b60006020828403121561338357600080fd5b6117ca82612ffc565b6020808252825182820181905260009190848201906040850190845b818110156115fc578351835292840192918401916001016133a8565b6000806000606084860312156133d957600080fd5b6133e284612ffc565b95602085013595506040909401359392505050565b6000806040838503121561340a57600080fd5b61341383612ffc565b91506020830135801515811461342857600080fd5b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016005831061346b57634e487b7160e01b600052602160045260246000fd5b91905290565b6000806000806080858703121561348757600080fd5b61349085612ffc565b935061349e60208601612ffc565b92506040850135915060608501356001600160401b038111156134c057600080fd5b8501601f810187136134d157600080fd5b6134e087823560208401613234565b91505092959194509250565b81516001600160a01b031681526020808301516001600160401b031690820152604080830151151590820152606081016109cb565b6000806040838503121561353457600080fd5b61353d83612ffc565b915061354b60208401612ffc565b90509250929050565b600181811c9082168061356857607f821691505b6020821081141561358957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156135bf576135bf61358f565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826135e9576135e96135c4565b500490565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252600a90820152690616d6f756e74203d20360b41b604082015260600190565b600082198211156136845761368461358f565b500190565b60208082526025908201527f657863656564206d6178416d6f756e74206772616e7465642062792074686520604082015264383937b7b360d91b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000828210156136f6576136f661358f565b500390565b6000835161370d818460208801612f78565b835190830190613721818360208801612f78565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061375d90830184612fa4565b9695505050505050565b60006020828403121561377957600080fd5b81516117ca81612f45565b60006000198214156137985761379861358f565b5060010190565b6000826137ae576137ae6135c4565b500690565b60006001600160401b03838116908316818110156137d3576137d361358f565b039392505050565b60006001600160401b038083168185168083038211156137215761372161358f56feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212200ffd23a86050a931f9b8d20fb79431167b9ffd19f024757ae9eb50a95cda47a764736f6c63430008090033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efe1b64955cbeb244b3451f93e378937c2a761baccc791598e8b6af63cf4e1c4b2019668d84de0e28a7898f02f503946778254c18a95469b7ac248dc2a0f5b8ab100000000000000000000000000000000000000000000000000000000000001f4
Deployed Bytecode
0x60806040526004361061031a5760003560e01c806370a08231116101ab578063a7794042116100f7578063c87b56dd11610095578063e797ec1b1161006f578063e797ec1b14610955578063e985e9c51461096a578063f21f537d1461098a578063f2fde38b146109a057600080fd5b8063c87b56dd1461090a578063d5abeb011461092a578063d6729c171461094057600080fd5b8063b88d4fde116100d1578063b88d4fde14610882578063b97bff1a146108a2578063c23dc68f146108c2578063c7719e78146108ef57600080fd5b8063a77940421461080b578063aa98e0c614610838578063b07b76641461086c57600080fd5b806395d89b4111610164578063a22cb4651161013e578063a22cb46514610780578063a2309ff8146107a0578063a3dd2619146107b5578063a5ce30d2146107d757600080fd5b806395d89b411461073857806399a2557a1461074d578063a0712d681461076d57600080fd5b806370a0823114610683578063715018a6146106a357806381fb12f3146106b85780638456cb59146106d85780638462151c146106ed5780638da5cb5b1461071a57600080fd5b806342966c681161026a5780635c975abb11610223578063672a6b94116101fd578063672a6b941461061457806367bb18bd1461062a5780636c0360eb146106575780636d2dcec91461066c57600080fd5b80635c975abb1461059f578063616271b2146105be5780636352211e146105f457600080fd5b806342966c68146104ea57806342e216941461050a57806344d19d2b1461051d5780635372a8871461053257806355f804b3146105525780635bbb21771461057257600080fd5b806318160ddd116102d75780632fe06267116102b15780632fe062671461048357806335db70b51461049a5780633ccfd60b146104b557806342842e0e146104ca57600080fd5b806318160ddd1461040b57806323b872dd146104245780632a55205a1461044457600080fd5b806301ffc9a71461031f57806306fdde0314610354578063081812fc14610376578063095ea7b3146103ae5780630a191822146103d057806310d4eba0146103f5575b600080fd5b34801561032b57600080fd5b5061033f61033a366004612f5b565b6109c0565b60405190151581526020015b60405180910390f35b34801561036057600080fd5b506103696109d1565b60405161034b9190612fd0565b34801561038257600080fd5b50610396610391366004612fe3565b610a63565b6040516001600160a01b03909116815260200161034b565b3480156103ba57600080fd5b506103ce6103c9366004613018565b610aa7565b005b3480156103dc57600080fd5b506103e762093a8081565b60405190815260200161034b565b34801561040157600080fd5b506103e7600b5481565b34801561041757600080fd5b50600254600154036103e7565b34801561043057600080fd5b506103ce61043f366004613042565b610b2e565b34801561045057600080fd5b5061046461045f36600461307e565b610b39565b604080516001600160a01b03909316835260208301919091520161034b565b34801561048f57600080fd5b506103e76202a30081565b3480156104a657600080fd5b506103e76611c37937e0800081565b3480156104c157600080fd5b506103ce610be5565b3480156104d657600080fd5b506103ce6104e5366004613042565b610c51565b3480156104f657600080fd5b506103ce610505366004612fe3565b610c6c565b6103ce6105183660046130a0565b610c77565b34801561052957600080fd5b506103e86103e7565b34801561053e57600080fd5b506103ce61054d3660046131e7565b610f63565b34801561055e57600080fd5b506103ce61056d36600461328b565b6110ac565b34801561057e57600080fd5b5061059261058d3660046132d3565b6110e9565b60405161034b9190613307565b3480156105ab57600080fd5b50600054600160a01b900460ff1661033f565b3480156105ca57600080fd5b506103e76105d9366004613371565b6001600160a01b031660009081526011602052604090205490565b34801561060057600080fd5b5061039661060f366004612fe3565b6111af565b34801561062057600080fd5b506103e7600d5481565b34801561063657600080fd5b506103e7610645366004612fe3565b60106020526000908152604090205481565b34801561066357600080fd5b506103696111c1565b34801561067857600080fd5b506103e7620bf9a081565b34801561068f57600080fd5b506103e761069e366004613371565b61124f565b3480156106af57600080fd5b506103ce61129d565b3480156106c457600080fd5b506103ce6106d33660046131e7565b6112d3565b3480156106e457600080fd5b506103ce611489565b3480156106f957600080fd5b5061070d610708366004613371565b6114bb565b60405161034b919061338c565b34801561072657600080fd5b506000546001600160a01b0316610396565b34801561074457600080fd5b50610369611608565b34801561075957600080fd5b5061070d6107683660046133c4565b611617565b6103ce61077b366004612fe3565b6117d1565b34801561078c57600080fd5b506103ce61079b3660046133f7565b611a0d565b3480156107ac57600080fd5b506103e7611aa3565b3480156107c157600080fd5b506107ca611ab3565b60405161034b9190613449565b3480156107e357600080fd5b506103e77fe1b64955cbeb244b3451f93e378937c2a761baccc791598e8b6af63cf4e1c4b281565b34801561081757600080fd5b506103e7610826366004612fe3565b600f6020526000908152604090205481565b34801561084457600080fd5b506103e77f019668d84de0e28a7898f02f503946778254c18a95469b7ac248dc2a0f5b8ab181565b34801561087857600080fd5b506103e7611c2081565b34801561088e57600080fd5b506103ce61089d366004613471565b611b4e565b3480156108ae57600080fd5b506103ce6108bd3660046130a0565b611b92565b3480156108ce57600080fd5b506108e26108dd366004612fe3565b611d6e565b60405161034b91906134ec565b3480156108fb57600080fd5b506103e766038d7ea4c6800081565b34801561091657600080fd5b50610369610925366004612fe3565b611e1c565b34801561093657600080fd5b506103e761177081565b34801561094c57600080fd5b506103e7600a81565b34801561096157600080fd5b506103ce611ea0565b34801561097657600080fd5b5061033f610985366004613521565b611f20565b34801561099657600080fd5b506103e7600c5481565b3480156109ac57600080fd5b506103ce6109bb366004613371565b611f4e565b60006109cb82611ff5565b92915050565b6060600380546109e090613554565b80601f0160208091040260200160405190810160405280929190818152602001828054610a0c90613554565b8015610a595780601f10610a2e57610100808354040283529160200191610a59565b820191906000526020600020905b815481529060010190602001808311610a3c57829003601f168201915b5050505050905090565b6000610a6e8261201a565b610a8b576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b6000610ab2826111af565b9050806001600160a01b0316836001600160a01b03161415610ae75760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610b1e57610b018133611f20565b610b1e576040516367d9dca160e11b815260040160405180910390fd5b610b29838383612046565b505050565b610b298383836120a2565b6000828152600a602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610bae5750604080518082019091526009546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090610bcd906001600160601b0316876135a5565b610bd791906135da565b915196919550909350505050565b6000546001600160a01b03163314610c185760405162461bcd60e51b8152600401610c0f906135ee565b60405180910390fd5b478015610c4e57604051339082156108fc029083906000818181858888f19350505050158015610c4c573d6000803e3d6000fd5b505b50565b610b2983838360405180602001604052806000815250611b4e565b610c4e816001612288565b600054600160a01b900460ff1615610ca15760405162461bcd60e51b8152600401610c0f90613623565b66038d7ea4c6800084333214610ce45760405162461bcd60e51b8152602060048201526008602482015267454f41206f6e6c7960c01b6044820152606401610c0f565b60008111610d045760405162461bcd60e51b8152600401610c0f9061364d565b61177081610d1160015490565b610d1b9190613671565b1115610d5c5760405162461bcd60e51b815260206004820152601060248201526f657863656564206d6178537570706c7960801b6044820152606401610c0f565b610d6681836135a5565b341015610dac5760405162461bcd60e51b81526020600482015260146024820152731a5b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606401610c0f565b6001610db6611ab3565b6004811115610dc757610dc7613433565b14610e145760405162461bcd60e51b815260206004820152601860248201527f657870656374205052454d494e54494e472073746174757300000000000000006044820152606401610c0f565b6000610e20338761244a565b9050610e807f019668d84de0e28a7898f02f503946778254c18a95469b7ac248dc2a0f5b8ab18287878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061249192505050565b610ecc5760405162461bcd60e51b815260206004820152601a60248201527f6261642077686974656c697374206d65726b6c652070726f6f660000000000006044820152606401610c0f565b60008181526010602052604090205415610f1f5760405162461bcd60e51b81526020600482015260146024820152731dda1a5d195b1a5cdd081c1c9bdbd9881d5cd95960621b6044820152606401610c0f565b85871115610f3f5760405162461bcd60e51b8152600401610c0f90613689565b6000818152601060205260409020429055610f5a33886124a6565b50505050505050565b600054600160a01b900460ff1615610f8d5760405162461bcd60e51b8152600401610c0f90613623565b60005b8151811015610b29576000828281518110610fad57610fad6136ce565b602002602001015190506000610fc2826111af565b9050846001600160a01b0316816001600160a01b0316146110175760405162461bcd60e51b815260206004820152600f60248201526e3737ba103a37b5b2b71037bbb732b960891b6044820152606401610c0f565b6000828152601260205260409020546001600160a01b0316331461107d5760405162461bcd60e51b815260206004820152601b60248201527f6e6f74207374616b6564206f72206e6f7420637573746f6469616e00000000006044820152606401610c0f565b50600090815260126020526040902080546001600160a01b03191690556110a5600182613671565b9050610f90565b6000546001600160a01b031633146110d65760405162461bcd60e51b8152600401610c0f906135ee565b8051610c4c90600e906020840190612eac565b80516060906000816001600160401b0381111561110857611108613122565b60405190808252806020026020018201604052801561115357816020015b60408051606081018252600080825260208083018290529282015282526000199092019101816111265790505b50905060005b8281146111a757611182858281518110611175576111756136ce565b6020026020010151611d6e565b828281518110611194576111946136ce565b6020908102919091010152600101611159565b509392505050565b60006111ba826124c0565b5192915050565b600e80546111ce90613554565b80601f01602080910402602001604051908101604052809291908181526020018280546111fa90613554565b80156112475780601f1061121c57610100808354040283529160200191611247565b820191906000526020600020905b81548152906001019060200180831161122a57829003601f168201915b505050505081565b60006001600160a01b038216611278576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6000546001600160a01b031633146112c75760405162461bcd60e51b8152600401610c0f906135ee565b6112d160006125da565b565b600054600160a01b900460ff16156112fd5760405162461bcd60e51b8152600401610c0f90613623565b60005b8151811015610b2957600082828151811061131d5761131d6136ce565b602002602001015190506000611332826111af565b9050846001600160a01b0316816001600160a01b0316146113875760405162461bcd60e51b815260206004820152600f60248201526e3737ba103a37b5b2b71037bbb732b960891b6044820152606401610c0f565b6113918133611f20565b806113ac5750336113a183610a63565b6001600160a01b0316145b6113e75760405162461bcd60e51b815260206004820152600c60248201526b1b9bdd08185c1c1c9bdd995960a21b6044820152606401610c0f565b6000828152601260205260409020546001600160a01b0316156114585760405162461bcd60e51b8152602060048201526024808201527f736f6d6520746f6b656e2073706563696669656420686173206265656e207374604482015263185ad95960e21b6064820152608401610c0f565b50600090815260126020526040902080546001600160a01b03191633179055611482600182613671565b9050611300565b6000546001600160a01b031633146114b35760405162461bcd60e51b8152600401610c0f906135ee565b6112d161262a565b606060008060006114cb8561124f565b90506000816001600160401b038111156114e7576114e7613122565b604051908082528060200260200182016040528015611510578160200160208202803683370190505b509050611536604080516060810182526000808252602082018190529181019190915290565b60005b8386146115fc57600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff1615801592820192909252925061159f576115f4565b81516001600160a01b0316156115b457815194505b876001600160a01b0316856001600160a01b031614156115f457808387806001019850815181106115e7576115e76136ce565b6020026020010181815250505b600101611539565b50909695505050505050565b6060600480546109e090613554565b606081831061163957604051631960ccad60e11b815260040160405180910390fd5b6001546000908084111561164b578093505b60006116568761124f565b905084861015611675578585038181101561166f578091505b50611679565b5060005b6000816001600160401b0381111561169357611693613122565b6040519080825280602002602001820160405280156116bc578160200160208202803683370190505b509050816116cf5793506117ca92505050565b60006116da88611d6e565b9050600081604001516116eb575080515b885b8881141580156116fd5750848714155b156117be57600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16158015928201929092529350611761576117b6565b82516001600160a01b03161561177657825191505b8a6001600160a01b0316826001600160a01b031614156117b657808488806001019950815181106117a9576117a96136ce565b6020026020010181815250505b6001016116ed565b50505092835250909150505b9392505050565b600054600160a01b900460ff16156117fb5760405162461bcd60e51b8152600401610c0f90613623565b6611c37937e080008133321461183e5760405162461bcd60e51b8152602060048201526008602482015267454f41206f6e6c7960c01b6044820152606401610c0f565b6000811161185e5760405162461bcd60e51b8152600401610c0f9061364d565b6117708161186b60015490565b6118759190613671565b11156118b65760405162461bcd60e51b815260206004820152601060248201526f657863656564206d6178537570706c7960801b6044820152606401610c0f565b6118c081836135a5565b3410156119065760405162461bcd60e51b81526020600482015260146024820152731a5b9cdd59999a58da595b9d081c185e5b595b9d60621b6044820152606401610c0f565b6002611910611ab3565b600481111561192157611921613433565b146119665760405162461bcd60e51b8152602060048201526015602482015274657870656374204d494e54494e472073746174757360581b6044820152606401610c0f565b33600090815260116020526040812054611981908590613671565b9050600a8111156119d45760405162461bcd60e51b815260206004820152601b60248201527f657863656564206d696e74696e674361705065724164647265737300000000006044820152606401610c0f565b3360008181526011602052604090208290556119f090856124a6565b6117706119fc60015490565b1415611a075742600d555b50505050565b6001600160a01b038216331415611a375760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6000611aae60015490565b905090565b6000600c5460001415611ac65750600090565b600d5415611af25762093a80600d5442611ae091906136e4565b1015611aec5750600390565b50600490565b6000600c5442611b0291906136e4565b9050620bf9a08110611b1657600491505090565b611c20811015611b2857600191505090565b611b376202a300611c20613671565b811015611b4657600291505090565b600391505090565b611b598484846120a2565b6001600160a01b0383163b15611a0757611b75848484846126ac565b611a07576040516368d2bf6b60e11b815260040160405180910390fd5b600054600160a01b900460ff1615611bbc5760405162461bcd60e51b8152600401610c0f90613623565b6003611bc6611ab3565b6004811115611bd757611bd7613433565b14611c245760405162461bcd60e51b815260206004820152601760248201527f6578706563742052454445454d494e47207374617475730000000000000000006044820152606401610c0f565b6000611c30338561244a565b9050611c907fe1b64955cbeb244b3451f93e378937c2a761baccc791598e8b6af63cf4e1c4b28285858080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061249192505050565b611cdc5760405162461bcd60e51b815260206004820152601860248201527f6261642061697264726f70206d65726b6c652070726f6f6600000000000000006044820152606401610c0f565b6000818152600f602052604090205415611d2d5760405162461bcd60e51b8152602060048201526012602482015271185a5c991c9bdc081c1c9bdbd9881d5cd95960721b6044820152606401610c0f565b83851115611d4d5760405162461bcd60e51b8152600401610c0f90613689565b6000818152600f60205260409020429055611d67856127a3565b5050505050565b6040805160608082018352600080835260208084018290528385018290528451928301855281835282018190529281018390529091506001548310611db35792915050565b50600082815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161580159282019290925290611e135792915050565b6117ca836124c0565b6060611e278261201a565b611e4457604051630a14c4b560e41b815260040160405180910390fd5b6000611e4e61284a565b9050805160001415611e6f57604051806020016040528060008152506117ca565b80611e7984612859565b604051602001611e8a9291906136fb565b6040516020818303038152906040529392505050565b6000546001600160a01b03163314611eca5760405162461bcd60e51b8152600401610c0f906135ee565b600c5415611f1a5760405162461bcd60e51b815260206004820152601760248201527f6d696e74696e6720656e61626c656420616c72656164790000000000000000006044820152606401610c0f565b42600c55565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b6000546001600160a01b03163314611f785760405162461bcd60e51b8152600401610c0f906135ee565b6001600160a01b038116611fdd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c0f565b610c4e816125da565b6001600160a01b03163b151590565b60006001600160e01b0319821663152a902d60e11b14806109cb57506109cb82612956565b6000600154821080156109cb575050600090815260056020526040902054600160e01b900460ff161590565b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006120ad826124c0565b9050836001600160a01b031681600001516001600160a01b0316146120e45760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061210257506121028533611f20565b8061211d57503361211284610a63565b6001600160a01b0316145b90508061213d57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03841661216457604051633a954ecd60e21b815260040160405180910390fd5b61217185858560016129a6565b61217d60008487612046565b6001600160a01b038581166000908152600660209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080546001600160e01b031916909417600160a01b4290921691909102178355870180845292208054919390911661225157600154821461225157805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038a16171781555b50505082846001600160a01b0316866001600160a01b03166000805160206137fe83398151915260405160405180910390a4611d67565b6000612293836124c0565b805190915082156122f9576000336001600160a01b03831614806122bc57506122bc8233611f20565b806122d75750336122cc86610a63565b6001600160a01b0316145b9050806122f757604051632ce44b5f60e11b815260040160405180910390fd5b505b6123078160008660016129a6565b61231360008583612046565b6001600160a01b0380821660008181526006602090815260408083208054600160801b6000196001600160401b0380841691909101811667ffffffffffffffff198416811783900482166001908101831690930277ffffffffffffffff0000000000000000ffffffffffffffff19909416179290921783558b86526005909452828520805460ff60e01b1942909316600160a01b026001600160e01b03199091169097179690961716600160e01b17855591890180845292208054919490911661241157600154821461241157805460208701516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038716171781555b5050604051869250600091506001600160a01b038416906000805160206137fe833981519152908390a450506002805460010190555050565b6040516bffffffffffffffffffffffff19606084901b1660208201526034810182905260009060540160405160208183030381529060405280519060200120905092915050565b600061249e828585612a4c565b949350505050565b610c4c828260405180602001604052806000815250612a62565b6040805160608101825260008082526020820181905291810191909152816001548110156125c157600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff161515918101829052906125bf5780516001600160a01b031615612556579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff16151592810192909252156125ba579392505050565b612556565b505b604051636f96cda160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600054600160a01b900460ff16156126545760405162461bcd60e51b8152600401610c0f90613623565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861268f3390565b6040516001600160a01b03909116815260200160405180910390a1565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906126e190339089908890889060040161372a565b602060405180830381600087803b1580156126fb57600080fd5b505af192505050801561272b575060408051601f3d908101601f1916820190925261272891810190613767565b60015b612786573d808015612759576040519150601f19603f3d011682016040523d82523d6000602084013e61275e565b606091505b50805161277e576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b600081116127c35760405162461bcd60e51b8152600401610c0f9061364d565b6000600182600b546127d59190613671565b6127df91906136e4565b90506103e8811061282a5760405162461bcd60e51b8152602060048201526015602482015274657863656564207265736572766564537570706c7960581b6044820152606401610c0f565b6128383033600b5484612c0e565b612843816001613671565b600b555050565b6060600e80546109e090613554565b60608161287d5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156128a7578061289181613784565b91506128a09050600a836135da565b9150612881565b6000816001600160401b038111156128c1576128c1613122565b6040519080825280601f01601f1916602001820160405280156128eb576020820181803683370190505b5090505b841561249e576129006001836136e4565b915061290d600a8661379f565b612918906030613671565b60f81b81838151811061292d5761292d6136ce565b60200101906001600160f81b031916908160001a90535061294f600a866135da565b94506128ef565b60006001600160e01b031982166380ac58cd60e01b148061298757506001600160e01b03198216635b5e139f60e01b145b806109cb57506301ffc9a760e01b6001600160e01b03198316146109cb565b6001600160a01b0384166129b957611a07565b60005b81811015611d675760006012816129d38487613671565b81526020810191909152604001600020546001600160a01b031614612a3a5760405162461bcd60e51b815260206004820152601b60248201527f63616e2774207472616e73666572207374616b656420746f6b656e00000000006044820152606401610c0f565b612a45600182613671565b90506129bc565b600082612a598584612e40565b14949350505050565b6001546001600160a01b038416612a8b57604051622e076360e81b815260040160405180910390fd5b82612aa95760405163b562e8dd60e01b815260040160405180910390fd5b612ab660008583866129a6565b6001600160a01b038416600081815260066020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168b0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168b01811690920217909155858452600590925290912080546001600160e01b0319168317600160a01b42909316929092029190911790558190818501903b15612bcc575b60405182906001600160a01b038816906000906000805160206137fe833981519152908290a4612b9560008784806001019550876126ac565b612bb2576040516368d2bf6b60e11b815260040160405180910390fd5b808210612b5c578260015414612bc757600080fd5b612bff565b5b6040516001830192906001600160a01b038816906000906000805160206137fe833981519152908290a4808210612bcd575b50600155611a07600085838684565b6000612c19836124c0565b9050846001600160a01b031681600001516001600160a01b031614612c505760405162a1148160e81b815260040160405180910390fd5b825b612c5d836001613671565b811015612cd557600081815260056020526040902080546001600160a01b0388811691161415612c9a5780546001600160a01b0319168155612cc2565b80546001600160a01b031615612cc25760405162a1148160e81b815260040160405180910390fd5b50612cce600182613671565b9050612c52565b50600083815260056020526040812080546001600160401b034216600160a01b026001600160e01b03199091166001600160a01b0388161717815590612d1b85856136e4565b612d26906001613671565b6001600160a01b038816600090815260066020526040812080549293508392909190612d5c9084906001600160401b03166137b3565b82546101009290920a6001600160401b038181021990931691831602179091556001600160a01b038816600090815260066020526040812080548594509092612da7918591166137db565b92506101000a8154816001600160401b0302191690836001600160401b031602179055506000846001612dda9190613671565b60008181526005602052604090208054919250906001600160a01b0316612e35576001548214612e3557805460208601516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b038b16171781555b505050505050505050565b600081815b84518110156111a7576000858281518110612e6257612e626136ce565b60200260200101519050808311612e885760008381526020829052604090209250612e99565b600081815260208490526040902092505b5080612ea481613784565b915050612e45565b828054612eb890613554565b90600052602060002090601f016020900481019282612eda5760008555612f20565b82601f10612ef357805160ff1916838001178555612f20565b82800160010185558215612f20579182015b82811115612f20578251825591602001919060010190612f05565b50612f2c929150612f30565b5090565b5b80821115612f2c5760008155600101612f31565b6001600160e01b031981168114610c4e57600080fd5b600060208284031215612f6d57600080fd5b81356117ca81612f45565b60005b83811015612f93578181015183820152602001612f7b565b83811115611a075750506000910152565b60008151808452612fbc816020860160208601612f78565b601f01601f19169290920160200192915050565b6020815260006117ca6020830184612fa4565b600060208284031215612ff557600080fd5b5035919050565b80356001600160a01b038116811461301357600080fd5b919050565b6000806040838503121561302b57600080fd5b61303483612ffc565b946020939093013593505050565b60008060006060848603121561305757600080fd5b61306084612ffc565b925061306e60208501612ffc565b9150604084013590509250925092565b6000806040838503121561309157600080fd5b50508035926020909101359150565b600080600080606085870312156130b657600080fd5b843593506020850135925060408501356001600160401b03808211156130db57600080fd5b818701915087601f8301126130ef57600080fd5b8135818111156130fe57600080fd5b8860208260051b850101111561311357600080fd5b95989497505060200194505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561316057613160613122565b604052919050565b600082601f83011261317957600080fd5b813560206001600160401b0382111561319457613194613122565b8160051b6131a3828201613138565b92835284810182019282810190878511156131bd57600080fd5b83870192505b848310156131dc578235825291830191908301906131c3565b979650505050505050565b600080604083850312156131fa57600080fd5b61320383612ffc565b915060208301356001600160401b0381111561321e57600080fd5b61322a85828601613168565b9150509250929050565b60006001600160401b0383111561324d5761324d613122565b613260601f8401601f1916602001613138565b905082815283838301111561327457600080fd5b828260208301376000602084830101529392505050565b60006020828403121561329d57600080fd5b81356001600160401b038111156132b357600080fd5b8201601f810184136132c457600080fd5b61249e84823560208401613234565b6000602082840312156132e557600080fd5b81356001600160401b038111156132fb57600080fd5b61249e84828501613168565b6020808252825182820181905260009190848201906040850190845b818110156115fc5761335e83855180516001600160a01b031682526020808201516001600160401b0316908301526040908101511515910152565b9284019260609290920191600101613323565b60006020828403121561338357600080fd5b6117ca82612ffc565b6020808252825182820181905260009190848201906040850190845b818110156115fc578351835292840192918401916001016133a8565b6000806000606084860312156133d957600080fd5b6133e284612ffc565b95602085013595506040909401359392505050565b6000806040838503121561340a57600080fd5b61341383612ffc565b91506020830135801515811461342857600080fd5b809150509250929050565b634e487b7160e01b600052602160045260246000fd5b602081016005831061346b57634e487b7160e01b600052602160045260246000fd5b91905290565b6000806000806080858703121561348757600080fd5b61349085612ffc565b935061349e60208601612ffc565b92506040850135915060608501356001600160401b038111156134c057600080fd5b8501601f810187136134d157600080fd5b6134e087823560208401613234565b91505092959194509250565b81516001600160a01b031681526020808301516001600160401b031690820152604080830151151590820152606081016109cb565b6000806040838503121561353457600080fd5b61353d83612ffc565b915061354b60208401612ffc565b90509250929050565b600181811c9082168061356857607f821691505b6020821081141561358957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156135bf576135bf61358f565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826135e9576135e96135c4565b500490565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b6020808252600a90820152690616d6f756e74203d20360b41b604082015260600190565b600082198211156136845761368461358f565b500190565b60208082526025908201527f657863656564206d6178416d6f756e74206772616e7465642062792074686520604082015264383937b7b360d91b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b6000828210156136f6576136f661358f565b500390565b6000835161370d818460208801612f78565b835190830190613721818360208801612f78565b01949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061375d90830184612fa4565b9695505050505050565b60006020828403121561377957600080fd5b81516117ca81612f45565b60006000198214156137985761379861358f565b5060010190565b6000826137ae576137ae6135c4565b500690565b60006001600160401b03838116908316818110156137d3576137d361358f565b039392505050565b60006001600160401b038083168185168083038211156137215761372161358f56feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212200ffd23a86050a931f9b8d20fb79431167b9ffd19f024757ae9eb50a95cda47a764736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
e1b64955cbeb244b3451f93e378937c2a761baccc791598e8b6af63cf4e1c4b2019668d84de0e28a7898f02f503946778254c18a95469b7ac248dc2a0f5b8ab100000000000000000000000000000000000000000000000000000000000001f4
-----Decoded View---------------
Arg [0] : airdropMerkleRoot_ (bytes32): 0xe1b64955cbeb244b3451f93e378937c2a761baccc791598e8b6af63cf4e1c4b2
Arg [1] : whitelistMerkleRoot_ (bytes32): 0x019668d84de0e28a7898f02f503946778254c18a95469b7ac248dc2a0f5b8ab1
Arg [2] : defaultRoyalty (uint96): 500
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : e1b64955cbeb244b3451f93e378937c2a761baccc791598e8b6af63cf4e1c4b2
Arg [1] : 019668d84de0e28a7898f02f503946778254c18a95469b7ac248dc2a0f5b8ab1
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001f4
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.