Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
148 INSPC
Holders
148
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 INSPCLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ERC721AI
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 // Inspired Contracts v1.2.0 // Creator: Inspired Member, LLC pragma solidity ^0.8.9; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; contract ERC721AI is ERC721A, Pausable, Ownable, IERC2981 { // TYPES // Summary of mint information struct MintInto{ // The maximum amount of tokens that can be minted. uint256 maxSupply; // The number of tokens minted. uint256 minted; // The price to mint 1 token. uint256 price; // Indicates if minting is active. bool active; } // STATE VARIABLES // Maximum royalty that can be set (denominator) uint256 private constant ROYALTY_MAX=100; // The maximum amount of tokens that can be minted. uint256 private _maxSupply; // The price to mint a single token. uint256 private _price; // The royalty amount (numerator) uint8 private _royaltyAmount; // The royalty address address private _royaltyAddress; // The base uri for token metadata string private _baseUri; // Mapping of admin addresses mapping(address => bool) private _adminsMap; // List of addresses in admin map address[] private _adminsList; // Mapping of address to allowlist allocations (for mint) mapping(address => uint8) private _allows; // Merkleroot for bulk drops (for mintMerkle) bytes32 private _merkleRoot; // Counter used to 'reset' merkle claims across drops uint256 private _merkleCounter; // The maxiumum number of claims for each address in the merkle drop. uint8 private _merkleClaimLimit; // Mapping of address to merkle cliams, for a given merkle counter. mapping(uint256 => mapping(address => uint256)) private _merkleClaims; // EVENTS /** * @dev Emitted when `value` is received from `from`. */ event Receive(address from, uint256 value); // MODIFIERS /** * @dev Modifier that checks if value sent is enough for quantity minted. */ modifier paidEnough(uint8 quantity) { if(msg.value < quantity * _price){ revert("Insufficient value"); } _; } /** * @dev Modifier that checks if quantity is available to mint from the maxSupply. */ modifier hasSupply(uint256 quantity) { if( ERC721A._totalMinted() + quantity > _maxSupply) { revert("Insufficient supply"); } _; } /** * @dev Modifier that checks if sender is owner or has admin permission. */ modifier onlyOwnerAndAdmins() { if (!(_adminsMap[_msgSender()] || owner() == _msgSender())) { revert ("Owner and admins only"); } _; } // CONSTRUCTOR constructor(string memory name_, string memory symbol_, string memory baseUri_) ERC721A(name_, symbol_) Pausable() Ownable() { setBaseURI(baseUri_); setRoyalty(address(this), 10); // 10% } // EXTERNAL receive() external payable { emit Receive(msg.sender, msg.value); } /** * @dev Airdrops `quantity` tokens to `to`. * * Does not use allowlist or merkleclaim. */ function airdrop(address to, uint8 quantity) external hasSupply(quantity) onlyOwnerAndAdmins { _safeMint(to, quantity); } /** * @dev Mints `quantity` tokens to `msg.sender` from allowlist. * * Requires allows(msg.sender) >= quantity. */ function mint(uint8 quantity) external payable whenNotPaused hasSupply(quantity) paidEnough(quantity) { address minter = _msgSender(); if (_allows[minter] < quantity) { revert("Insufficient allows"); } _allows[minter] -= quantity; _safeMint(minter, quantity); } /** * @dev Mints `quantity` tokens to `msg.sender` from merkle drop. * * Requires claims(msg.sender) + `quantity` <= merkleClaimLimit() */ function mintMerkle( uint8 quantity, bytes32[] calldata merkleProof ) external payable whenNotPaused hasSupply(quantity) paidEnough(quantity) { address minter = _msgSender(); bytes32 leaf = keccak256(abi.encodePacked(minter)); if(!MerkleProof.verify(merkleProof, _merkleRoot, leaf)) { revert("Invalid merkle proof"); } uint256 claims = _merkleClaims[_merkleCounter][minter] + quantity; if (claims > _merkleClaimLimit) { revert("Insufficient allows."); } _merkleClaims[_merkleCounter][minter] = claims; _safeMint(minter, quantity); } /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) external { _burn(tokenId, true); } /** * @dev Sets the maximum supply of tokens that can be minted. */ function setMaxSupply(uint256 maxSupply) external onlyOwnerAndAdmins { if(_maxSupply < ERC721A._totalMinted()) { revert("Invalid max supply"); } _maxSupply = maxSupply; } /** * @dev Sets the price per token minted. */ function setPrice(uint256 price) external onlyOwnerAndAdmins { _price = price; } /** * @dev Sets allowlist for all `addrs` to `quantity` (for mint) */ function setAllows(address[] calldata addrs, uint8 quantity) external onlyOwnerAndAdmins { for(uint256 i = 0 ; i < addrs.length ; i++) { _allows[addrs[i]] = quantity; } } /** * @dev Updates the merkleroot (for mintMerkle). * * Does not reset claim counts. */ function setMerkleRoot(bytes32 merkleRoot_, uint8 claimLimit) external onlyOwnerAndAdmins { setMerkleRoot(merkleRoot_, claimLimit, false); } /** * @dev Updates the claim limit for merkleMint (number of tokens per address in drop) */ function setMerkleClaimLimit(uint8 claimLimit) external onlyOwnerAndAdmins { _merkleClaimLimit = claimLimit; } /** * @dev Disables mints (from allowlist and merkle proofs) */ function pause() external onlyOwnerAndAdmins { _pause(); } /** * @dev Enables mints (from allowlist and merkle proofs). */ function unpause() external onlyOwnerAndAdmins { _unpause(); } /** * @dev Add addr as admin account */ function addAdmin(address addr) external onlyOwner { if(!_adminsMap[addr]){ _adminsMap[addr] = true; _adminsList.push(addr); } } /** * @dev Removes addr as admin account */ function removeAdmin(address addr) external onlyOwner { if(_adminsMap[addr]) { delete _adminsMap[addr]; uint256 loc; for (uint256 i = 0; i < _adminsList.length; i++) { if (_adminsList[i] == addr) { loc = i; break; } } _adminsList[loc] = _adminsList[_adminsList.length - 1]; _adminsList.pop(); } } /** * @dev Transfers funds from the contract balance to `to`. */ function withdraw(address to, uint256 amount) external onlyOwner { if(amount > address(this).balance){ revert("Invalid withdraw amount"); } address payable receiver = payable(to); receiver.transfer(amount); } /** * @dev Transfers ERC20 funds from the contract balance to `to` */ function withdrawERC20(address to, address tokenAddress, uint256 amount) external onlyOwner { IERC20 tokenContract = IERC20(tokenAddress); if(amount > tokenContract.balanceOf(address(this))){ revert("Invalid withdraw amount"); } require(tokenContract.transfer(to, amount), "Transfer failed"); } // EXTERNAL VIEW /** * @dev Gets the base URI. */ function baseURI() external view returns (string memory) { return _baseURI(); } /** * @dev Gets detailed related to the mint sale. */ function info() external view returns (MintInto memory) { MintInto memory mintInfo = MintInto({ maxSupply: _maxSupply, minted: ERC721A._totalMinted(), price: _price, active: !paused() }); return mintInfo; } /** * @inheritdoc IERC2981 */ function royaltyInfo( uint256 /* _tokenId */, uint256 _salePrice ) external view virtual override returns (address, uint256) { uint256 royaltyAmount = (_salePrice * _royaltyAmount) / ROYALTY_MAX; return (_royaltyAddress, royaltyAmount); } /** * @dev Gets `addr` allow list allocations for mint. */ function allows(address addr) external view returns (uint8) { return _allows[addr]; } /** * @dev Gets the merkle root used for mintMerkle. */ function merkleRoot() external view returns (bytes32) { return _merkleRoot; } /** * @dev The maxiumum number of claims for each address in the merkle drop. */ function merkleClaimLimit() external view returns (uint8) { return _merkleClaimLimit; } /** * @dev Gets `addr` number of tokens claims in current merkle root. */ function merkleClaims(address addr) external view returns (uint256) { return _merkleClaims[_merkleCounter][addr]; } /** * Returns the total number of tokens minted by `addr`. */ function mints(address addr) external view returns (uint256) { return _numberMinted(addr); } /** * @dev Gets admins */ function admins() external view returns (address[] memory) { return _adminsList; } // PUBLIC /** * @dev Updates the merkleroot and claim limit (for mintMerkle). * * Use `resetClaims` = true to clear previous claims counts. */ function setMerkleRoot(bytes32 merkleRoot_, uint8 claimLimit, bool resetClaims) public onlyOwnerAndAdmins { _merkleRoot = merkleRoot_; _merkleClaimLimit = claimLimit; if(resetClaims) { _merkleCounter++; } } /** * @dev Sets the 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 setBaseURI(string memory uri) public onlyOwnerAndAdmins { _baseUri = uri; } /** * @dev Sets the royaly address and percentage for IERC2981 standard. * royaly % = feeNumerator / feeDenominator (100) */ function setRoyalty(address addr, uint8 royalty) public onlyOwnerAndAdmins { if (_royaltyAmount > ROYALTY_MAX) { revert ("Invalid royalty"); } _royaltyAddress = addr; _royaltyAmount = royalty; } // PUBLIC VIEW function supportsInterface(bytes4 interfaceId) public view override(ERC721A, IERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } // INTERNAL /** * @dev See {ERC721A-_baseURI}. */ function _baseURI() internal view override returns (string memory) { return _baseUri; } /** * @dev See {ERC721A-_startTokenId}. */ function _startTokenId() internal view virtual override returns (uint256) { return 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// 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 (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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 Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { 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 // ERC721A Contracts v4.2.2 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Reference type for token approval. struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _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 {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary 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 virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ 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, _toString(tokenId))) : ''; } /** * @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, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @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) public virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @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) public virtual override { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @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. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) public virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // 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 { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @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 memory _data ) public virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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 {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @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 for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, 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. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @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 { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // 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 { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * 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 _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 0x80 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 0x20 + 3 * 0x20 = 0x80. str := add(mload(0x40), 0x80) // Update the free memory pointer to allocate. mstore(0x40, str) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * 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(); /** * 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(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @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`, * 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, bytes calldata data ) external; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` 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); // ============================================================= // IERC721Metadata // ============================================================= /** * @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); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// 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 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 // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"baseUri_","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","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":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","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":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Receive","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":[{"internalType":"address","name":"addr","type":"address"}],"name":"addAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admins","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint8","name":"quantity","type":"uint8"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"allows","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"info","outputs":[{"components":[{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"uint256","name":"minted","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"}],"internalType":"struct ERC721AI.MintInto","name":"","type":"tuple"}],"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":"merkleClaimLimit","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"merkleClaims","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"quantity","type":"uint8"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8","name":"quantity","type":"uint8"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"mintMerkle","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"mints","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":"address","name":"addr","type":"address"}],"name":"removeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","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":"addrs","type":"address[]"},{"internalType":"uint8","name":"quantity","type":"uint8"}],"name":"setAllows","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":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"claimLimit","type":"uint8"}],"name":"setMerkleClaimLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"},{"internalType":"uint8","name":"claimLimit","type":"uint8"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"},{"internalType":"uint8","name":"claimLimit","type":"uint8"},{"internalType":"bool","name":"resetClaims","type":"bool"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint8","name":"royalty","type":"uint8"}],"name":"setRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b506040516200310138038062003101833981016040819052620000349162000405565b8251839083906200004d90600290602085019062000292565b5080516200006390600390602084019062000292565b50600160005550506008805460ff191690556200008033620000a1565b6200008b81620000fb565b6200009830600a62000195565b505050620004d3565b600880546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b336000908152600d602052604090205460ff16806200012a57506008546001600160a01b036101009091041633145b6200017c5760405162461bcd60e51b815260206004820152601560248201527f4f776e657220616e642061646d696e73206f6e6c79000000000000000000000060448201526064015b60405180910390fd5b80516200019190600c90602084019062000292565b5050565b336000908152600d602052604090205460ff1680620001c457506008546001600160a01b036101009091041633145b620002125760405162461bcd60e51b815260206004820152601560248201527f4f776e657220616e642061646d696e73206f6e6c790000000000000000000000604482015260640162000173565b600b54606460ff90911611156200025e5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420726f79616c747960881b604482015260640162000173565b600b80546001600160a81b0319166101006001600160a01b03949094169390930260ff19169290921760ff91909116179055565b828054620002a09062000496565b90600052602060002090601f016020900481019282620002c457600085556200030f565b82601f10620002df57805160ff19168380011785556200030f565b828001600101855582156200030f579182015b828111156200030f578251825591602001919060010190620002f2565b506200031d92915062000321565b5090565b5b808211156200031d576000815560010162000322565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200036057600080fd5b81516001600160401b03808211156200037d576200037d62000338565b604051601f8301601f19908116603f01168101908282118183101715620003a857620003a862000338565b81604052838152602092508683858801011115620003c557600080fd5b600091505b83821015620003e95785820183015181830184015290820190620003ca565b83821115620003fb5760008385830101525b9695505050505050565b6000806000606084860312156200041b57600080fd5b83516001600160401b03808211156200043357600080fd5b62000441878388016200034e565b945060208601519150808211156200045857600080fd5b62000466878388016200034e565b935060408601519150808211156200047d57600080fd5b506200048c868287016200034e565b9150509250925092565b600181811c90821680620004ab57607f821691505b60208210811415620004cd57634e487b7160e01b600052602260045260246000fd5b50919050565b612c1e80620004e36000396000f3fe6080604052600436106102765760003560e01c80636797fdda1161014f57806395d89b41116100c1578063c87b56dd1161007a578063c87b56dd1461080b578063c9a65ff01461082b578063e985e9c514610843578063ebed0eec1461088c578063f2fde38b146108ac578063f3fef3a3146108cc57600080fd5b806395d89b4114610754578063a22cb46514610769578063a5de361914610789578063b547af28146107ab578063b88d4fde146107cb578063b8a6fe3b146107eb57600080fd5b806370a082311161011357806370a0823114610683578063715018a6146106a35780638307e058146106b85780638456cb59146106fc5780638da5cb5b1461071157806391b7f5ed1461073457600080fd5b80636797fdda146105fb5780636c0360eb1461061b5780636ecd2306146106305780636f8b44b014610643578063704802751461066357600080fd5b80633d2d5b32116101e85780634d61097f116101ac5780634d61097f1461054357806354dcef221461056357806355f804b3146105835780635660f851146105a35780635c975abb146105c35780636352211e146105db57600080fd5b80633d2d5b32146104bb5780633f4ba83a146104ce57806342842e0e146104e357806342966c681461050357806344004cc11461052357600080fd5b806318160ddd1161023a57806318160ddd1461038b5780631d4f4629146103b257806323b872dd146103fd5780632a55205a1461041d5780632eb4a7ab1461045c578063370158ea1461047157600080fd5b806301ffc9a7146102ba57806306fdde03146102ef578063081812fc14610311578063095ea7b3146103495780631785f53c1461036b57600080fd5b366102b557604080513381523460208201527fd6717f327e0cb88b4a97a7f67a453e9258252c34937ccbdd86de7cb840e7def3910160405180910390a1005b600080fd5b3480156102c657600080fd5b506102da6102d5366004612467565b6108ec565b60405190151581526020015b60405180910390f35b3480156102fb57600080fd5b50610304610917565b6040516102e691906124dc565b34801561031d57600080fd5b5061033161032c3660046124ef565b6109a9565b6040516001600160a01b0390911681526020016102e6565b34801561035557600080fd5b50610369610364366004612524565b6109ed565b005b34801561037757600080fd5b5061036961038636600461254e565b610a8d565b34801561039757600080fd5b5060015460005403600019015b6040519081526020016102e6565b3480156103be57600080fd5b506103eb6103cd36600461254e565b6001600160a01b03166000908152600f602052604090205460ff1690565b60405160ff90911681526020016102e6565b34801561040957600080fd5b50610369610418366004612569565b610be7565b34801561042957600080fd5b5061043d6104383660046125a5565b610d70565b604080516001600160a01b0390931683526020830191909152016102e6565b34801561046857600080fd5b506010546103a4565b34801561047d57600080fd5b50610486610db2565b6040516102e6919081518152602080830151908201526040808301519082015260609182015115159181019190915260800190565b6103696104c936600461261d565b610e23565b3480156104da57600080fd5b5061036961104d565b3480156104ef57600080fd5b506103696104fe366004612569565b6110a1565b34801561050f57600080fd5b5061036961051e3660046124ef565b6110c1565b34801561052f57600080fd5b5061036961053e366004612569565b6110cc565b34801561054f57600080fd5b5061036961055e366004612670565b61125c565b34801561056f57600080fd5b5061036961057e3660046126a3565b6112f0565b34801561058f57600080fd5b5061036961059e36600461274a565b611350565b3480156105af57600080fd5b506103a46105be36600461254e565b6113b1565b3480156105cf57600080fd5b5060085460ff166102da565b3480156105e757600080fd5b506103316105f63660046124ef565b6113dc565b34801561060757600080fd5b50610369610616366004612793565b6113e7565b34801561062757600080fd5b5061030461143d565b61036961063e3660046126a3565b61144c565b34801561064f57600080fd5b5061036961065e3660046124ef565b611592565b34801561066f57600080fd5b5061036961067e36600461254e565b61162e565b34801561068f57600080fd5b506103a461069e36600461254e565b6116bc565b3480156106af57600080fd5b5061036961170b565b3480156106c457600080fd5b506103a46106d336600461254e565b60115460009081526013602090815260408083206001600160a01b039094168352929052205490565b34801561070857600080fd5b5061036961171d565b34801561071d57600080fd5b5060085461010090046001600160a01b0316610331565b34801561074057600080fd5b5061036961074f3660046124ef565b61176f565b34801561076057600080fd5b506103046117be565b34801561077557600080fd5b506103696107843660046127c4565b6117cd565b34801561079557600080fd5b5061079e611863565b6040516102e691906127fb565b3480156107b757600080fd5b506103696107c6366004612848565b6118c4565b3480156107d757600080fd5b506103696107e636600461289c565b611982565b3480156107f757600080fd5b50610369610806366004612670565b6119c6565b34801561081757600080fd5b506103046108263660046124ef565b611a8e565b34801561083757600080fd5b5060125460ff166103eb565b34801561084f57600080fd5b506102da61085e366004612918565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561089857600080fd5b506103696108a7366004612942565b611b13565b3480156108b857600080fd5b506103696108c736600461254e565b611b91565b3480156108d857600080fd5b506103696108e7366004612524565b611c07565b60006001600160e01b0319821663152a902d60e11b1480610911575061091182611c91565b92915050565b60606002805461092690612982565b80601f016020809104026020016040519081016040528092919081815260200182805461095290612982565b801561099f5780601f106109745761010080835404028352916020019161099f565b820191906000526020600020905b81548152906001019060200180831161098257829003601f168201915b5050505050905090565b60006109b482611cdf565b6109d1576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b60006109f8826113dc565b9050336001600160a01b03821614610a3157610a14813361085e565b610a31576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610a95611d14565b6001600160a01b0381166000908152600d602052604090205460ff1615610be4576001600160a01b0381166000908152600d60205260408120805460ff19169055805b600e54811015610b3457826001600160a01b0316600e8281548110610aff57610aff6129bd565b6000918252602090912001546001600160a01b03161415610b2257809150610b34565b80610b2c816129e9565b915050610ad8565b50600e8054610b4590600190612a04565b81548110610b5557610b556129bd565b600091825260209091200154600e80546001600160a01b039092169183908110610b8157610b816129bd565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600e805480610bc057610bc0612a1b565b600082815260209020810160001990810180546001600160a01b0319169055019055505b50565b6000610bf282611d74565b9050836001600160a01b0316816001600160a01b031614610c255760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054610c518187335b6001600160a01b039081169116811491141790565b610c7c57610c5f863361085e565b610c7c57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610ca357604051633a954ecd60e21b815260040160405180910390fd5b8015610cae57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040902055600160e11b8316610d395760018401600081815260046020526040902054610d37576000548114610d375760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b0316600080516020612bc983398151915260405160405180910390a4505050505050565b600b5460009081908190606490610d8a9060ff1686612a31565b610d949190612a50565b600b5461010090046001600160a01b031693509150505b9250929050565b610ddf60405180608001604052806000815260200160008152602001600081526020016000151581525090565b600060405180608001604052806009548152602001610e016000546000190190565b8152602001600a548152602001610e1a60085460ff1690565b15905292915050565b610e2b611ddd565b8260ff1660095481610e406000546000190190565b610e4a9190612a72565b1115610e715760405162461bcd60e51b8152600401610e6890612a8a565b60405180910390fd5b83600a548160ff16610e839190612a31565b341015610ec75760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742076616c756560701b6044820152606401610e68565b6000336040516bffffffffffffffffffffffff19606083901b166020820152909150600090603401604051602081830303815290604052805190602001209050610f48868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506010549150849050611e23565b610f8b5760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b21036b2b935b63290383937b7b360611b6044820152606401610e68565b60115460009081526013602090815260408083206001600160a01b0386168452909152812054610fbf9060ff8a1690612a72565b60125490915060ff1681111561100e5760405162461bcd60e51b815260206004820152601460248201527324b739bab33334b1b4b2b73a1030b63637bbb99760611b6044820152606401610e68565b60115460009081526013602090815260408083206001600160a01b038716845290915290208190556110438360ff8a16611e39565b5050505050505050565b336000908152600d602052604090205460ff168061107b57506008546001600160a01b036101009091041633145b6110975760405162461bcd60e51b8152600401610e6890612ab7565b61109f611e53565b565b6110bc83838360405180602001604052806000815250611982565b505050565b610be4816001611ea5565b6110d4611d14565b6040516370a0823160e01b815230600482015282906001600160a01b038216906370a082319060240160206040518083038186803b15801561111557600080fd5b505afa158015611129573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114d9190612ae6565b8211156111965760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081dda5d1a191c985dc8185b5bdd5b9d604a1b6044820152606401610e68565b60405163a9059cbb60e01b81526001600160a01b0385811660048301526024820184905282169063a9059cbb90604401602060405180830381600087803b1580156111e057600080fd5b505af11580156111f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112189190612aff565b6112565760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610e68565b50505050565b8060ff16600954816112716000546000190190565b61127b9190612a72565b11156112995760405162461bcd60e51b8152600401610e6890612a8a565b336000908152600d602052604090205460ff16806112c757506008546001600160a01b036101009091041633145b6112e35760405162461bcd60e51b8152600401610e6890612ab7565b6110bc838360ff16611e39565b336000908152600d602052604090205460ff168061131e57506008546001600160a01b036101009091041633145b61133a5760405162461bcd60e51b8152600401610e6890612ab7565b6012805460ff191660ff92909216919091179055565b336000908152600d602052604090205460ff168061137e57506008546001600160a01b036101009091041633145b61139a5760405162461bcd60e51b8152600401610e6890612ab7565b80516113ad90600c9060208401906123b8565b5050565b6001600160a01b0381166000908152600560205260408082205467ffffffffffffffff911c16610911565b600061091182611d74565b336000908152600d602052604090205460ff168061141557506008546001600160a01b036101009091041633145b6114315760405162461bcd60e51b8152600401610e6890612ab7565b6113ad82826000611b13565b6060611447611fd6565b905090565b611454611ddd565b8060ff16600954816114696000546000190190565b6114739190612a72565b11156114915760405162461bcd60e51b8152600401610e6890612a8a565b81600a548160ff166114a39190612a31565b3410156114e75760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742076616c756560701b6044820152606401610e68565b336000818152600f602052604090205460ff858116911610156115425760405162461bcd60e51b8152602060048201526013602482015272496e73756666696369656e7420616c6c6f777360681b6044820152606401610e68565b6001600160a01b0381166000908152600f60205260408120805486929061156d90849060ff16612b1c565b92506101000a81548160ff021916908360ff160217905550611256818560ff16611e39565b336000908152600d602052604090205460ff16806115c057506008546001600160a01b036101009091041633145b6115dc5760405162461bcd60e51b8152600401610e6890612ab7565b6000546000190160095410156116295760405162461bcd60e51b8152602060048201526012602482015271496e76616c6964206d617820737570706c7960701b6044820152606401610e68565b600955565b611636611d14565b6001600160a01b0381166000908152600d602052604090205460ff16610be4576001600160a01b03166000818152600d60205260408120805460ff19166001908117909155600e805491820181559091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b0319169091179055565b60006001600160a01b0382166116e5576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b611713611d14565b61109f6000611fe5565b336000908152600d602052604090205460ff168061174b57506008546001600160a01b036101009091041633145b6117675760405162461bcd60e51b8152600401610e6890612ab7565b61109f61203f565b336000908152600d602052604090205460ff168061179d57506008546001600160a01b036101009091041633145b6117b95760405162461bcd60e51b8152600401610e6890612ab7565b600a55565b60606003805461092690612982565b6001600160a01b0382163314156117f75760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6060600e80548060200260200160405190810160405280929190818152602001828054801561099f57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161189d575050505050905090565b336000908152600d602052604090205460ff16806118f257506008546001600160a01b036101009091041633145b61190e5760405162461bcd60e51b8152600401610e6890612ab7565b60005b828110156112565781600f6000868685818110611930576119306129bd565b9050602002016020810190611945919061254e565b6001600160a01b031681526020810191909152604001600020805460ff191660ff929092169190911790558061197a816129e9565b915050611911565b61198d848484610be7565b6001600160a01b0383163b15611256576119a98484848461207c565b611256576040516368d2bf6b60e11b815260040160405180910390fd5b336000908152600d602052604090205460ff16806119f457506008546001600160a01b036101009091041633145b611a105760405162461bcd60e51b8152600401610e6890612ab7565b600b54606460ff9091161115611a5a5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420726f79616c747960881b6044820152606401610e68565b600b80546001600160a81b0319166101006001600160a01b03949094169390930260ff19169290921760ff91909116179055565b6060611a9982611cdf565b611ab657604051630a14c4b560e41b815260040160405180910390fd5b6000611ac0611fd6565b9050805160001415611ae15760405180602001604052806000815250611b0c565b80611aeb84612174565b604051602001611afc929190612b3f565b6040516020818303038152906040525b9392505050565b336000908152600d602052604090205460ff1680611b4157506008546001600160a01b036101009091041633145b611b5d5760405162461bcd60e51b8152600401610e6890612ab7565b60108390556012805460ff191660ff841617905580156110bc5760118054906000611b87836129e9565b9190505550505050565b611b99611d14565b6001600160a01b038116611bfe5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e68565b610be481611fe5565b611c0f611d14565b47811115611c595760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081dda5d1a191c985dc8185b5bdd5b9d604a1b6044820152606401610e68565b60405182906001600160a01b0382169083156108fc029084906000818181858888f19350505050158015611256573d6000803e3d6000fd5b60006301ffc9a760e01b6001600160e01b031983161480611cc257506380ac58cd60e01b6001600160e01b03198316145b806109115750506001600160e01b031916635b5e139f60e01b1490565b600081600111158015611cf3575060005482105b8015610911575050600090815260046020526040902054600160e01b161590565b6008546001600160a01b0361010090910416331461109f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e68565b60008180600111611dc457600054811015611dc457600081815260046020526040902054600160e01b8116611dc2575b80611b0c575060001901600081815260046020526040902054611da4565b505b604051636f96cda160e11b815260040160405180910390fd5b60085460ff161561109f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610e68565b600082611e3085846121b6565b14949350505050565b6113ad828260405180602001604052806000815250612203565b611e5b612270565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000611eb083611d74565b905080600080611ece86600090815260066020526040902080549091565b915091508415611f0e57611ee3818433610c3c565b611f0e57611ef1833361085e565b611f0e57604051632ce44b5f60e11b815260040160405180910390fd5b8015611f1957600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040902055600160e11b8416611fa05760018601600081815260046020526040902054611f9e576000548114611f9e5760008181526004602052604090208590555b505b60405186906000906001600160a01b03861690600080516020612bc9833981519152908390a45050600180548101905550505050565b6060600c805461092690612982565b600880546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612047611ddd565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611e883390565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906120b1903390899088908890600401612b6e565b602060405180830381600087803b1580156120cb57600080fd5b505af19250505080156120fb575060408051601f3d908101601f191682019092526120f891810190612bab565b60015b612156573d808015612129576040519150601f19603f3d011682016040523d82523d6000602084013e61212e565b606091505b50805161214e576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b604080516080019081905280825b600183039250600a81066030018353600a90048061219f576121a4565b612182565b50819003601f19909101908152919050565b600081815b84518110156121fb576121e7828683815181106121da576121da6129bd565b60200260200101516122b9565b9150806121f3816129e9565b9150506121bb565b509392505050565b61220d83836122e5565b6001600160a01b0383163b156110bc576000548281035b612237600086838060010194508661207c565b612254576040516368d2bf6b60e11b815260040160405180910390fd5b81811061222457816000541461226957600080fd5b5050505050565b60085460ff1661109f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610e68565b60008183106122d5576000828152602084905260409020611b0c565b5060009182526020526040902090565b600054816123065760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b17831790558284019083908390600080516020612bc98339815191528180a4600183015b8181146123915780836000600080516020612bc9833981519152600080a460010161236b565b50816123af57604051622e076360e81b815260040160405180910390fd5b60005550505050565b8280546123c490612982565b90600052602060002090601f0160209004810192826123e6576000855561242c565b82601f106123ff57805160ff191683800117855561242c565b8280016001018555821561242c579182015b8281111561242c578251825591602001919060010190612411565b5061243892915061243c565b5090565b5b80821115612438576000815560010161243d565b6001600160e01b031981168114610be457600080fd5b60006020828403121561247957600080fd5b8135611b0c81612451565b60005b8381101561249f578181015183820152602001612487565b838111156112565750506000910152565b600081518084526124c8816020860160208601612484565b601f01601f19169290920160200192915050565b602081526000611b0c60208301846124b0565b60006020828403121561250157600080fd5b5035919050565b80356001600160a01b038116811461251f57600080fd5b919050565b6000806040838503121561253757600080fd5b61254083612508565b946020939093013593505050565b60006020828403121561256057600080fd5b611b0c82612508565b60008060006060848603121561257e57600080fd5b61258784612508565b925061259560208501612508565b9150604084013590509250925092565b600080604083850312156125b857600080fd5b50508035926020909101359150565b803560ff8116811461251f57600080fd5b60008083601f8401126125ea57600080fd5b50813567ffffffffffffffff81111561260257600080fd5b6020830191508360208260051b8501011115610dab57600080fd5b60008060006040848603121561263257600080fd5b61263b846125c7565b9250602084013567ffffffffffffffff81111561265757600080fd5b612663868287016125d8565b9497909650939450505050565b6000806040838503121561268357600080fd5b61268c83612508565b915061269a602084016125c7565b90509250929050565b6000602082840312156126b557600080fd5b611b0c826125c7565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156126ef576126ef6126be565b604051601f8501601f19908116603f01168101908282118183101715612717576127176126be565b8160405280935085815286868601111561273057600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561275c57600080fd5b813567ffffffffffffffff81111561277357600080fd5b8201601f8101841361278457600080fd5b61216c848235602084016126d4565b600080604083850312156127a657600080fd5b8235915061269a602084016125c7565b8015158114610be457600080fd5b600080604083850312156127d757600080fd5b6127e083612508565b915060208301356127f0816127b6565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561283c5783516001600160a01b031683529284019291840191600101612817565b50909695505050505050565b60008060006040848603121561285d57600080fd5b833567ffffffffffffffff81111561287457600080fd5b612880868287016125d8565b90945092506128939050602085016125c7565b90509250925092565b600080600080608085870312156128b257600080fd5b6128bb85612508565b93506128c960208601612508565b925060408501359150606085013567ffffffffffffffff8111156128ec57600080fd5b8501601f810187136128fd57600080fd5b61290c878235602084016126d4565b91505092959194509250565b6000806040838503121561292b57600080fd5b61293483612508565b915061269a60208401612508565b60008060006060848603121561295757600080fd5b83359250612967602085016125c7565b91506040840135612977816127b6565b809150509250925092565b600181811c9082168061299657607f821691505b602082108114156129b757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156129fd576129fd6129d3565b5060010190565b600082821015612a1657612a166129d3565b500390565b634e487b7160e01b600052603160045260246000fd5b6000816000190483118215151615612a4b57612a4b6129d3565b500290565b600082612a6d57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115612a8557612a856129d3565b500190565b602080825260139082015272496e73756666696369656e7420737570706c7960681b604082015260600190565b6020808252601590820152744f776e657220616e642061646d696e73206f6e6c7960581b604082015260600190565b600060208284031215612af857600080fd5b5051919050565b600060208284031215612b1157600080fd5b8151611b0c816127b6565b600060ff821660ff841680821015612b3657612b366129d3565b90039392505050565b60008351612b51818460208801612484565b835190830190612b65818360208801612484565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612ba1908301846124b0565b9695505050505050565b600060208284031215612bbd57600080fd5b8151611b0c8161245156feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122074137a3d1ccb8389e710a3c854a437ea01365ba572c66d074cd0f369510a55e864736f6c63430008090033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000013494e53504952454420434f2f43524541544f52000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005494e535043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003368747470733a2f2f6d6574612e696e7370697265642e636f6d2f636f63726561746f722f746f6b656e732f6d61696e6e65742f00000000000000000000000000
Deployed Bytecode
0x6080604052600436106102765760003560e01c80636797fdda1161014f57806395d89b41116100c1578063c87b56dd1161007a578063c87b56dd1461080b578063c9a65ff01461082b578063e985e9c514610843578063ebed0eec1461088c578063f2fde38b146108ac578063f3fef3a3146108cc57600080fd5b806395d89b4114610754578063a22cb46514610769578063a5de361914610789578063b547af28146107ab578063b88d4fde146107cb578063b8a6fe3b146107eb57600080fd5b806370a082311161011357806370a0823114610683578063715018a6146106a35780638307e058146106b85780638456cb59146106fc5780638da5cb5b1461071157806391b7f5ed1461073457600080fd5b80636797fdda146105fb5780636c0360eb1461061b5780636ecd2306146106305780636f8b44b014610643578063704802751461066357600080fd5b80633d2d5b32116101e85780634d61097f116101ac5780634d61097f1461054357806354dcef221461056357806355f804b3146105835780635660f851146105a35780635c975abb146105c35780636352211e146105db57600080fd5b80633d2d5b32146104bb5780633f4ba83a146104ce57806342842e0e146104e357806342966c681461050357806344004cc11461052357600080fd5b806318160ddd1161023a57806318160ddd1461038b5780631d4f4629146103b257806323b872dd146103fd5780632a55205a1461041d5780632eb4a7ab1461045c578063370158ea1461047157600080fd5b806301ffc9a7146102ba57806306fdde03146102ef578063081812fc14610311578063095ea7b3146103495780631785f53c1461036b57600080fd5b366102b557604080513381523460208201527fd6717f327e0cb88b4a97a7f67a453e9258252c34937ccbdd86de7cb840e7def3910160405180910390a1005b600080fd5b3480156102c657600080fd5b506102da6102d5366004612467565b6108ec565b60405190151581526020015b60405180910390f35b3480156102fb57600080fd5b50610304610917565b6040516102e691906124dc565b34801561031d57600080fd5b5061033161032c3660046124ef565b6109a9565b6040516001600160a01b0390911681526020016102e6565b34801561035557600080fd5b50610369610364366004612524565b6109ed565b005b34801561037757600080fd5b5061036961038636600461254e565b610a8d565b34801561039757600080fd5b5060015460005403600019015b6040519081526020016102e6565b3480156103be57600080fd5b506103eb6103cd36600461254e565b6001600160a01b03166000908152600f602052604090205460ff1690565b60405160ff90911681526020016102e6565b34801561040957600080fd5b50610369610418366004612569565b610be7565b34801561042957600080fd5b5061043d6104383660046125a5565b610d70565b604080516001600160a01b0390931683526020830191909152016102e6565b34801561046857600080fd5b506010546103a4565b34801561047d57600080fd5b50610486610db2565b6040516102e6919081518152602080830151908201526040808301519082015260609182015115159181019190915260800190565b6103696104c936600461261d565b610e23565b3480156104da57600080fd5b5061036961104d565b3480156104ef57600080fd5b506103696104fe366004612569565b6110a1565b34801561050f57600080fd5b5061036961051e3660046124ef565b6110c1565b34801561052f57600080fd5b5061036961053e366004612569565b6110cc565b34801561054f57600080fd5b5061036961055e366004612670565b61125c565b34801561056f57600080fd5b5061036961057e3660046126a3565b6112f0565b34801561058f57600080fd5b5061036961059e36600461274a565b611350565b3480156105af57600080fd5b506103a46105be36600461254e565b6113b1565b3480156105cf57600080fd5b5060085460ff166102da565b3480156105e757600080fd5b506103316105f63660046124ef565b6113dc565b34801561060757600080fd5b50610369610616366004612793565b6113e7565b34801561062757600080fd5b5061030461143d565b61036961063e3660046126a3565b61144c565b34801561064f57600080fd5b5061036961065e3660046124ef565b611592565b34801561066f57600080fd5b5061036961067e36600461254e565b61162e565b34801561068f57600080fd5b506103a461069e36600461254e565b6116bc565b3480156106af57600080fd5b5061036961170b565b3480156106c457600080fd5b506103a46106d336600461254e565b60115460009081526013602090815260408083206001600160a01b039094168352929052205490565b34801561070857600080fd5b5061036961171d565b34801561071d57600080fd5b5060085461010090046001600160a01b0316610331565b34801561074057600080fd5b5061036961074f3660046124ef565b61176f565b34801561076057600080fd5b506103046117be565b34801561077557600080fd5b506103696107843660046127c4565b6117cd565b34801561079557600080fd5b5061079e611863565b6040516102e691906127fb565b3480156107b757600080fd5b506103696107c6366004612848565b6118c4565b3480156107d757600080fd5b506103696107e636600461289c565b611982565b3480156107f757600080fd5b50610369610806366004612670565b6119c6565b34801561081757600080fd5b506103046108263660046124ef565b611a8e565b34801561083757600080fd5b5060125460ff166103eb565b34801561084f57600080fd5b506102da61085e366004612918565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561089857600080fd5b506103696108a7366004612942565b611b13565b3480156108b857600080fd5b506103696108c736600461254e565b611b91565b3480156108d857600080fd5b506103696108e7366004612524565b611c07565b60006001600160e01b0319821663152a902d60e11b1480610911575061091182611c91565b92915050565b60606002805461092690612982565b80601f016020809104026020016040519081016040528092919081815260200182805461095290612982565b801561099f5780601f106109745761010080835404028352916020019161099f565b820191906000526020600020905b81548152906001019060200180831161098257829003601f168201915b5050505050905090565b60006109b482611cdf565b6109d1576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b60006109f8826113dc565b9050336001600160a01b03821614610a3157610a14813361085e565b610a31576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b610a95611d14565b6001600160a01b0381166000908152600d602052604090205460ff1615610be4576001600160a01b0381166000908152600d60205260408120805460ff19169055805b600e54811015610b3457826001600160a01b0316600e8281548110610aff57610aff6129bd565b6000918252602090912001546001600160a01b03161415610b2257809150610b34565b80610b2c816129e9565b915050610ad8565b50600e8054610b4590600190612a04565b81548110610b5557610b556129bd565b600091825260209091200154600e80546001600160a01b039092169183908110610b8157610b816129bd565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600e805480610bc057610bc0612a1b565b600082815260209020810160001990810180546001600160a01b0319169055019055505b50565b6000610bf282611d74565b9050836001600160a01b0316816001600160a01b031614610c255760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054610c518187335b6001600160a01b039081169116811491141790565b610c7c57610c5f863361085e565b610c7c57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610ca357604051633a954ecd60e21b815260040160405180910390fd5b8015610cae57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040902055600160e11b8316610d395760018401600081815260046020526040902054610d37576000548114610d375760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b0316600080516020612bc983398151915260405160405180910390a4505050505050565b600b5460009081908190606490610d8a9060ff1686612a31565b610d949190612a50565b600b5461010090046001600160a01b031693509150505b9250929050565b610ddf60405180608001604052806000815260200160008152602001600081526020016000151581525090565b600060405180608001604052806009548152602001610e016000546000190190565b8152602001600a548152602001610e1a60085460ff1690565b15905292915050565b610e2b611ddd565b8260ff1660095481610e406000546000190190565b610e4a9190612a72565b1115610e715760405162461bcd60e51b8152600401610e6890612a8a565b60405180910390fd5b83600a548160ff16610e839190612a31565b341015610ec75760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742076616c756560701b6044820152606401610e68565b6000336040516bffffffffffffffffffffffff19606083901b166020820152909150600090603401604051602081830303815290604052805190602001209050610f48868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506010549150849050611e23565b610f8b5760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b21036b2b935b63290383937b7b360611b6044820152606401610e68565b60115460009081526013602090815260408083206001600160a01b0386168452909152812054610fbf9060ff8a1690612a72565b60125490915060ff1681111561100e5760405162461bcd60e51b815260206004820152601460248201527324b739bab33334b1b4b2b73a1030b63637bbb99760611b6044820152606401610e68565b60115460009081526013602090815260408083206001600160a01b038716845290915290208190556110438360ff8a16611e39565b5050505050505050565b336000908152600d602052604090205460ff168061107b57506008546001600160a01b036101009091041633145b6110975760405162461bcd60e51b8152600401610e6890612ab7565b61109f611e53565b565b6110bc83838360405180602001604052806000815250611982565b505050565b610be4816001611ea5565b6110d4611d14565b6040516370a0823160e01b815230600482015282906001600160a01b038216906370a082319060240160206040518083038186803b15801561111557600080fd5b505afa158015611129573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061114d9190612ae6565b8211156111965760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081dda5d1a191c985dc8185b5bdd5b9d604a1b6044820152606401610e68565b60405163a9059cbb60e01b81526001600160a01b0385811660048301526024820184905282169063a9059cbb90604401602060405180830381600087803b1580156111e057600080fd5b505af11580156111f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112189190612aff565b6112565760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610e68565b50505050565b8060ff16600954816112716000546000190190565b61127b9190612a72565b11156112995760405162461bcd60e51b8152600401610e6890612a8a565b336000908152600d602052604090205460ff16806112c757506008546001600160a01b036101009091041633145b6112e35760405162461bcd60e51b8152600401610e6890612ab7565b6110bc838360ff16611e39565b336000908152600d602052604090205460ff168061131e57506008546001600160a01b036101009091041633145b61133a5760405162461bcd60e51b8152600401610e6890612ab7565b6012805460ff191660ff92909216919091179055565b336000908152600d602052604090205460ff168061137e57506008546001600160a01b036101009091041633145b61139a5760405162461bcd60e51b8152600401610e6890612ab7565b80516113ad90600c9060208401906123b8565b5050565b6001600160a01b0381166000908152600560205260408082205467ffffffffffffffff911c16610911565b600061091182611d74565b336000908152600d602052604090205460ff168061141557506008546001600160a01b036101009091041633145b6114315760405162461bcd60e51b8152600401610e6890612ab7565b6113ad82826000611b13565b6060611447611fd6565b905090565b611454611ddd565b8060ff16600954816114696000546000190190565b6114739190612a72565b11156114915760405162461bcd60e51b8152600401610e6890612a8a565b81600a548160ff166114a39190612a31565b3410156114e75760405162461bcd60e51b8152602060048201526012602482015271496e73756666696369656e742076616c756560701b6044820152606401610e68565b336000818152600f602052604090205460ff858116911610156115425760405162461bcd60e51b8152602060048201526013602482015272496e73756666696369656e7420616c6c6f777360681b6044820152606401610e68565b6001600160a01b0381166000908152600f60205260408120805486929061156d90849060ff16612b1c565b92506101000a81548160ff021916908360ff160217905550611256818560ff16611e39565b336000908152600d602052604090205460ff16806115c057506008546001600160a01b036101009091041633145b6115dc5760405162461bcd60e51b8152600401610e6890612ab7565b6000546000190160095410156116295760405162461bcd60e51b8152602060048201526012602482015271496e76616c6964206d617820737570706c7960701b6044820152606401610e68565b600955565b611636611d14565b6001600160a01b0381166000908152600d602052604090205460ff16610be4576001600160a01b03166000818152600d60205260408120805460ff19166001908117909155600e805491820181559091527fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b0319169091179055565b60006001600160a01b0382166116e5576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b611713611d14565b61109f6000611fe5565b336000908152600d602052604090205460ff168061174b57506008546001600160a01b036101009091041633145b6117675760405162461bcd60e51b8152600401610e6890612ab7565b61109f61203f565b336000908152600d602052604090205460ff168061179d57506008546001600160a01b036101009091041633145b6117b95760405162461bcd60e51b8152600401610e6890612ab7565b600a55565b60606003805461092690612982565b6001600160a01b0382163314156117f75760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6060600e80548060200260200160405190810160405280929190818152602001828054801561099f57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161189d575050505050905090565b336000908152600d602052604090205460ff16806118f257506008546001600160a01b036101009091041633145b61190e5760405162461bcd60e51b8152600401610e6890612ab7565b60005b828110156112565781600f6000868685818110611930576119306129bd565b9050602002016020810190611945919061254e565b6001600160a01b031681526020810191909152604001600020805460ff191660ff929092169190911790558061197a816129e9565b915050611911565b61198d848484610be7565b6001600160a01b0383163b15611256576119a98484848461207c565b611256576040516368d2bf6b60e11b815260040160405180910390fd5b336000908152600d602052604090205460ff16806119f457506008546001600160a01b036101009091041633145b611a105760405162461bcd60e51b8152600401610e6890612ab7565b600b54606460ff9091161115611a5a5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c696420726f79616c747960881b6044820152606401610e68565b600b80546001600160a81b0319166101006001600160a01b03949094169390930260ff19169290921760ff91909116179055565b6060611a9982611cdf565b611ab657604051630a14c4b560e41b815260040160405180910390fd5b6000611ac0611fd6565b9050805160001415611ae15760405180602001604052806000815250611b0c565b80611aeb84612174565b604051602001611afc929190612b3f565b6040516020818303038152906040525b9392505050565b336000908152600d602052604090205460ff1680611b4157506008546001600160a01b036101009091041633145b611b5d5760405162461bcd60e51b8152600401610e6890612ab7565b60108390556012805460ff191660ff841617905580156110bc5760118054906000611b87836129e9565b9190505550505050565b611b99611d14565b6001600160a01b038116611bfe5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e68565b610be481611fe5565b611c0f611d14565b47811115611c595760405162461bcd60e51b8152602060048201526017602482015276125b9d985b1a59081dda5d1a191c985dc8185b5bdd5b9d604a1b6044820152606401610e68565b60405182906001600160a01b0382169083156108fc029084906000818181858888f19350505050158015611256573d6000803e3d6000fd5b60006301ffc9a760e01b6001600160e01b031983161480611cc257506380ac58cd60e01b6001600160e01b03198316145b806109115750506001600160e01b031916635b5e139f60e01b1490565b600081600111158015611cf3575060005482105b8015610911575050600090815260046020526040902054600160e01b161590565b6008546001600160a01b0361010090910416331461109f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e68565b60008180600111611dc457600054811015611dc457600081815260046020526040902054600160e01b8116611dc2575b80611b0c575060001901600081815260046020526040902054611da4565b505b604051636f96cda160e11b815260040160405180910390fd5b60085460ff161561109f5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610e68565b600082611e3085846121b6565b14949350505050565b6113ad828260405180602001604052806000815250612203565b611e5b612270565b6008805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000611eb083611d74565b905080600080611ece86600090815260066020526040902080549091565b915091508415611f0e57611ee3818433610c3c565b611f0e57611ef1833361085e565b611f0e57604051632ce44b5f60e11b815260040160405180910390fd5b8015611f1957600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040902055600160e11b8416611fa05760018601600081815260046020526040902054611f9e576000548114611f9e5760008181526004602052604090208590555b505b60405186906000906001600160a01b03861690600080516020612bc9833981519152908390a45050600180548101905550505050565b6060600c805461092690612982565b600880546001600160a01b03838116610100818102610100600160a81b031985161790945560405193909204169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612047611ddd565b6008805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611e883390565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906120b1903390899088908890600401612b6e565b602060405180830381600087803b1580156120cb57600080fd5b505af19250505080156120fb575060408051601f3d908101601f191682019092526120f891810190612bab565b60015b612156573d808015612129576040519150601f19603f3d011682016040523d82523d6000602084013e61212e565b606091505b50805161214e576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b604080516080019081905280825b600183039250600a81066030018353600a90048061219f576121a4565b612182565b50819003601f19909101908152919050565b600081815b84518110156121fb576121e7828683815181106121da576121da6129bd565b60200260200101516122b9565b9150806121f3816129e9565b9150506121bb565b509392505050565b61220d83836122e5565b6001600160a01b0383163b156110bc576000548281035b612237600086838060010194508661207c565b612254576040516368d2bf6b60e11b815260040160405180910390fd5b81811061222457816000541461226957600080fd5b5050505050565b60085460ff1661109f5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610e68565b60008183106122d5576000828152602084905260409020611b0c565b5060009182526020526040902090565b600054816123065760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b17831790558284019083908390600080516020612bc98339815191528180a4600183015b8181146123915780836000600080516020612bc9833981519152600080a460010161236b565b50816123af57604051622e076360e81b815260040160405180910390fd5b60005550505050565b8280546123c490612982565b90600052602060002090601f0160209004810192826123e6576000855561242c565b82601f106123ff57805160ff191683800117855561242c565b8280016001018555821561242c579182015b8281111561242c578251825591602001919060010190612411565b5061243892915061243c565b5090565b5b80821115612438576000815560010161243d565b6001600160e01b031981168114610be457600080fd5b60006020828403121561247957600080fd5b8135611b0c81612451565b60005b8381101561249f578181015183820152602001612487565b838111156112565750506000910152565b600081518084526124c8816020860160208601612484565b601f01601f19169290920160200192915050565b602081526000611b0c60208301846124b0565b60006020828403121561250157600080fd5b5035919050565b80356001600160a01b038116811461251f57600080fd5b919050565b6000806040838503121561253757600080fd5b61254083612508565b946020939093013593505050565b60006020828403121561256057600080fd5b611b0c82612508565b60008060006060848603121561257e57600080fd5b61258784612508565b925061259560208501612508565b9150604084013590509250925092565b600080604083850312156125b857600080fd5b50508035926020909101359150565b803560ff8116811461251f57600080fd5b60008083601f8401126125ea57600080fd5b50813567ffffffffffffffff81111561260257600080fd5b6020830191508360208260051b8501011115610dab57600080fd5b60008060006040848603121561263257600080fd5b61263b846125c7565b9250602084013567ffffffffffffffff81111561265757600080fd5b612663868287016125d8565b9497909650939450505050565b6000806040838503121561268357600080fd5b61268c83612508565b915061269a602084016125c7565b90509250929050565b6000602082840312156126b557600080fd5b611b0c826125c7565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff808411156126ef576126ef6126be565b604051601f8501601f19908116603f01168101908282118183101715612717576127176126be565b8160405280935085815286868601111561273057600080fd5b858560208301376000602087830101525050509392505050565b60006020828403121561275c57600080fd5b813567ffffffffffffffff81111561277357600080fd5b8201601f8101841361278457600080fd5b61216c848235602084016126d4565b600080604083850312156127a657600080fd5b8235915061269a602084016125c7565b8015158114610be457600080fd5b600080604083850312156127d757600080fd5b6127e083612508565b915060208301356127f0816127b6565b809150509250929050565b6020808252825182820181905260009190848201906040850190845b8181101561283c5783516001600160a01b031683529284019291840191600101612817565b50909695505050505050565b60008060006040848603121561285d57600080fd5b833567ffffffffffffffff81111561287457600080fd5b612880868287016125d8565b90945092506128939050602085016125c7565b90509250925092565b600080600080608085870312156128b257600080fd5b6128bb85612508565b93506128c960208601612508565b925060408501359150606085013567ffffffffffffffff8111156128ec57600080fd5b8501601f810187136128fd57600080fd5b61290c878235602084016126d4565b91505092959194509250565b6000806040838503121561292b57600080fd5b61293483612508565b915061269a60208401612508565b60008060006060848603121561295757600080fd5b83359250612967602085016125c7565b91506040840135612977816127b6565b809150509250925092565b600181811c9082168061299657607f821691505b602082108114156129b757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156129fd576129fd6129d3565b5060010190565b600082821015612a1657612a166129d3565b500390565b634e487b7160e01b600052603160045260246000fd5b6000816000190483118215151615612a4b57612a4b6129d3565b500290565b600082612a6d57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115612a8557612a856129d3565b500190565b602080825260139082015272496e73756666696369656e7420737570706c7960681b604082015260600190565b6020808252601590820152744f776e657220616e642061646d696e73206f6e6c7960581b604082015260600190565b600060208284031215612af857600080fd5b5051919050565b600060208284031215612b1157600080fd5b8151611b0c816127b6565b600060ff821660ff841680821015612b3657612b366129d3565b90039392505050565b60008351612b51818460208801612484565b835190830190612b65818360208801612484565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612ba1908301846124b0565b9695505050505050565b600060208284031215612bbd57600080fd5b8151611b0c8161245156feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122074137a3d1ccb8389e710a3c854a437ea01365ba572c66d074cd0f369510a55e864736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000013494e53504952454420434f2f43524541544f52000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005494e535043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003368747470733a2f2f6d6574612e696e7370697265642e636f6d2f636f63726561746f722f746f6b656e732f6d61696e6e65742f00000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): INSPIRED CO/CREATOR
Arg [1] : symbol_ (string): INSPC
Arg [2] : baseUri_ (string): https://meta.inspired.com/cocreator/tokens/mainnet/
-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000013
Arg [4] : 494e53504952454420434f2f43524541544f5200000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [6] : 494e535043000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000033
Arg [8] : 68747470733a2f2f6d6574612e696e7370697265642e636f6d2f636f63726561
Arg [9] : 746f722f746f6b656e732f6d61696e6e65742f00000000000000000000000000
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.