ERC-721
Overview
Max Total Supply
35 IMNFT
Holders
19
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 IMNFTLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
IconicNFT721a
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; contract IconicNFT721a is ERC721A, ReentrancyGuard, Ownable { uint16 public maxMintsPerAddress = 1; mapping(address => int16) public artPassMints; bool public artPassMintingActive = false; bool public allowListMintingActive = false; bool public mintingActive = false; bool public mintToEnabled = false; bool public burningActive = false; bool public claimsBurningEnabled = false; bytes32 public allowListMerkleRoot = ''; bytes32 public artPassMerkleRoot = ''; string public baseURI; bool public useEditionForURI = false; uint256 public mintPrice; address payable iconicAddress; address admin; address public secondaryAdmin; mapping(uint16 => uint16) public editionSupply; //how many available within that edition mapping(uint256 => uint16) public tokenToEdition; //token to edition mapping (uint16 => uint256) public seriesNumberToMintPrice; // series number to mint price mapping(uint256 => uint256) public tokenIdsToTokenHashes; mapping(uint256 => bool) public usedTokenHashes; mapping(uint256 => bool) public blindMints; constructor(string memory name_, string memory symbol_, string memory baseURI_, bytes32 artPassMerkleRoot_, bytes32 allowListMerkleRoot_, address iconicAddress_, uint256 mintPrice_, uint16 editionSupply_) ERC721A(name_, symbol_) Ownable(_msgSenderERC721A()) { require(_msgSenderERC721A() != iconicAddress_, "Error"); admin = _msgSenderERC721A(); baseURI = baseURI_; artPassMerkleRoot = artPassMerkleRoot_; allowListMerkleRoot = allowListMerkleRoot_; iconicAddress = payable(iconicAddress_); mintPrice = mintPrice_; uint16[] memory editions = new uint16[](1); uint16[] memory supplies = new uint16[](1); editions[0] = 1; supplies[0] = editionSupply_; setEditionSupply(editions, supplies); } function enableArtPassMinting() public requiresAdmin { artPassMintingActive = true; } function disableArtPassMinting() public requiresAdmin { artPassMintingActive = false; } function enableAllowListMinting() public requiresAdmin { allowListMintingActive = true; } function disableAllowListMinting() public requiresAdmin { allowListMintingActive = false; } function enableMinting() public requiresAdmin { mintingActive = true; } function disableMinting() public requiresAdmin { mintingActive = false; } function enableMintTo() public requiresAdmin { mintToEnabled = true; } function disableMintTo() public requiresAdmin { mintToEnabled = false; } function enableTokenBurning() public requiresAdmin { burningActive = true; } function disableTokenBurning() public requiresAdmin { burningActive = false; } function enableClaimsBurning() public requiresAdmin { claimsBurningEnabled = true; } function disableClaimsBurning() public requiresAdmin { claimsBurningEnabled = false; } function enableUseEditionForURI() public requiresAdmin { useEditionForURI = true; } function disableUseEditionForURI() public requiresAdmin { useEditionForURI = false; } function setBaseTokenURI(string memory baseURI_) public requiresAdmin { baseURI = baseURI_; } function setMintPrice(uint256 mintPrice_) public requiresAdmin { mintPrice = mintPrice_; } function setMaxMintsPerAddress(uint16 maxMintsPerAddress_) public requiresAdmin { maxMintsPerAddress = maxMintsPerAddress_; } function setArtPassMerkleRoot(bytes32 merkleRoot_) public requiresAdmin { artPassMerkleRoot = merkleRoot_; } function setAllowListMerkleRoot(bytes32 merkleRoot_) public requiresAdmin { allowListMerkleRoot = merkleRoot_; } function setAdditionalArtPassMints(address[] memory artPassHolders, int16[] memory extras) public requiresAdmin { //remember to zero out old addresses require(artPassHolders.length == extras.length, "incorrect list"); for(uint16 i = 0; i < artPassHolders.length; i++) { artPassMints[artPassHolders[i]] = extras[i]; } } function setEditionMintPrices(uint256[] memory mintPrices, uint16[] memory seriesNumbers) public requiresAdmin { require(mintPrices.length == seriesNumbers.length, "incorrect list"); for(uint16 i = 0; i < seriesNumbers.length; i++) { seriesNumberToMintPrice[seriesNumbers[i]] = mintPrices[i]; } } function setEditionSupply(uint16[] memory editions, uint16[] memory supplies) public requiresAdmin { require(editions.length == supplies.length, "incorrect list"); for(uint16 i = 0; i < editions.length; i++) { editionSupply[editions[i]] = supplies[i]; } } function getAvailableArtPassMintCount(address artPassHolder) public view returns (uint16) { int16 availableMints = 1 + artPassMints[artPassHolder]; return uint16(availableMints); } function artPassMint(bytes32[] calldata merkleProof, uint16 amount, uint16 editionIndex, uint256[] memory tokenHashes, bool isBlindMint) external payable nonReentrant() { require(artPassMintingActive, "Art Pass minting not enabled"); require(msg.value == getMintPrice(editionIndex) * amount, "Incorrect amount of ether sent"); require(amount > 0, "Must mint positive amount"); require(editionSupply[editionIndex] >= amount, "Mint exceeds collection size"); require(amount == tokenHashes.length, "Incorrect amount of token hashes sent"); require(_noDuplicateHashes(tokenHashes), "Duplicate token hash"); require(getAvailableArtPassMintCount(_msgSenderERC721A())>= amount, "Exceeds Art Pass holder mint limit"); require( MerkleProof.verify( merkleProof, artPassMerkleRoot, keccak256(abi.encodePacked(_msgSenderERC721A())) ), "Not an Art Pass holder" ); iconicAddress.transfer(msg.value); _mint(_msgSenderERC721A(), amount); _editionUpdate(amount, editionIndex); _genArtUpdate(amount, tokenHashes, isBlindMint); artPassMints[_msgSenderERC721A()] = artPassMints[_msgSenderERC721A()] - int16(amount); } function allowlistMint(bytes32[] calldata merkleProof, uint16 amount, uint16 editionIndex, uint256[] memory tokenHashes, bool isBlindMint) external payable nonReentrant() { require(allowListMintingActive, "Allow list minting not enabled"); require(msg.value == getMintPrice(editionIndex) * amount, "Incorrect amount of ether sent"); require(amount > 0, "Must mint positive amount"); require(editionSupply[editionIndex] >= amount, "Mint exceeds collection size"); require(amount == tokenHashes.length, "Incorrect amount of token hashes sent"); require(_noDuplicateHashes(tokenHashes), "Duplicate token hash"); uint64 mintCountBySender = _getAux(_msgSenderERC721A()) + amount; require(mintCountBySender <= maxMintsPerAddress, "Exceeds per address mint limit"); require( MerkleProof.verify( merkleProof, allowListMerkleRoot, keccak256(abi.encodePacked(_msgSenderERC721A())) ), "Address not in allowlist" ); iconicAddress.transfer(msg.value); _mint(_msgSenderERC721A(), amount); _editionUpdate(amount, editionIndex); _genArtUpdate(amount, tokenHashes, isBlindMint); _setAux(_msgSenderERC721A(), mintCountBySender); } function setSecondaryAdmin(address _secondaryAdmin) public requiresAdmin { secondaryAdmin = _secondaryAdmin; } // function mintTo(uint16 amount, uint16 editionIndex, address recipientAddress) external // requiresSecondaryAdmin // nonReentrant { // require(mintToEnabled, "MintTo not enabled"); // require(amount > 0, "Must mint positive amount"); // require(editionSupply[editionIndex] >= amount, "Mint exceeds collection size"); // _mint(recipientAddress, amount); // _editionUpdate(amount, editionIndex); // } function mint(uint16 amount, uint16 editionIndex, uint256[] memory tokenHashes, bool isBlindMint) external payable nonReentrant() { require(mintingActive, "Minting not enabled"); require(msg.value == getMintPrice(editionIndex) * amount, "Incorrect amount of ether sent"); require(amount > 0, "Must mint positive amount"); require(editionSupply[editionIndex] >= amount, "Mint exceeds collection size"); require(amount == tokenHashes.length, "Incorrect amount of token hashes sent"); require(_noDuplicateHashes(tokenHashes), "Duplicate token hash"); uint64 mintCountBySender = _getAux(_msgSenderERC721A()) + amount; require(mintCountBySender <= maxMintsPerAddress, "Exceeds per address mint limit"); iconicAddress.transfer(msg.value); _mint(_msgSenderERC721A(), amount); _editionUpdate(amount, editionIndex); _genArtUpdate(amount, tokenHashes, isBlindMint); _setAux(_msgSenderERC721A(), mintCountBySender); } function burn(uint256 tokenId) public { require(burningActive, "Token burning is not enabled"); _burn(tokenId, true); } function burnClaims(uint256[] calldata tokenIds) public payable nonReentrant(){ require(claimsBurningEnabled, "Claims burning is not enabled"); for(uint256 i = 0; i < tokenIds.length; i++) { uint256 tokenId = tokenIds[i]; _burn(tokenId, true); } iconicAddress.transfer(msg.value); } function getMintPrice(uint16 seriesNumber) public view returns (uint256) { if(seriesNumberToMintPrice[seriesNumber] == 0) { return mintPrice; } return seriesNumberToMintPrice[seriesNumber]; } function _editionUpdate(uint16 amount, uint16 editionIndex) internal { editionSupply[editionIndex] = editionSupply[editionIndex] - amount; //this function takes place post mint, so the tokenIds have already been incremented to match the amount for(uint tokenId=_nextTokenId() - amount; tokenId < _nextTokenId(); tokenId++) { tokenToEdition[tokenId] = editionIndex; } } function _noDuplicateHashes(uint256[] memory tokenHashes) internal view returns(bool) { for(uint8 idx=0; idx<tokenHashes.length; idx++) { uint256 tokenHash = tokenHashes[idx]; if(usedTokenHashes[tokenHash]) { return false; } } return true; } function _genArtUpdate(uint16 amount, uint256[] memory tokenHashes, bool isBlindMint) internal { //this function takes place post mint, so the tokenIds have already been incremented to match the amount uint8 tokenHashIndex = 0; for(uint tokenId=_nextTokenId() - amount; tokenId < _nextTokenId(); tokenId++) { uint256 tokenHash = tokenHashes[tokenHashIndex]; tokenIdsToTokenHashes[tokenId] = tokenHash; usedTokenHashes[tokenHash] = true; if(isBlindMint) { blindMints[tokenId] = isBlindMint; } tokenHashIndex++; } } function _startTokenId() internal pure override returns (uint256) { return 1; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "Token does not exist"); uint uriIndex = useEditionForURI ? tokenToEdition[tokenId] : tokenId; return string(abi.encodePacked(baseURI, Strings.toString(uriIndex))); } modifier requiresAdmin() { require(_msgSenderERC721A() == admin, "Not Authorized"); _; } modifier requiresSecondaryAdmin() { require(_msgSenderERC721A() == secondaryAdmin, "Not Authorized"); _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.20; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * 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. * OpenZeppelin's JavaScript library generates Merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** *@dev The multiproof provided is not valid. */ error MerkleProofInvalidMultiproof(); /** * @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} */ 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. */ 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} */ 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 simultaneously proven to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ 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} * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ 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 sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds 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 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } // 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 from 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) { if (proofPos != proofLen) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds 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 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } // 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 from 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) { if (proofPos != proofLen) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Sorts the pair (a, b) and hashes the result. */ function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } /** * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory. */ 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 v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; uint256 private _status; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); constructor() { _status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // 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 { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). 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 payable 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 { _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].value`. 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 payable 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 payable 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 payable 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. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. 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`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. 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 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // 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.3 // 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(); /** * 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 payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @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 payable; /** * @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 payable; /** * @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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
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"},{"internalType":"bytes32","name":"artPassMerkleRoot_","type":"bytes32"},{"internalType":"bytes32","name":"allowListMerkleRoot_","type":"bytes32"},{"internalType":"address","name":"iconicAddress_","type":"address"},{"internalType":"uint256","name":"mintPrice_","type":"uint256"},{"internalType":"uint16","name":"editionSupply_","type":"uint16"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","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":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"allowListMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowListMintingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"uint16","name":"amount","type":"uint16"},{"internalType":"uint16","name":"editionIndex","type":"uint16"},{"internalType":"uint256[]","name":"tokenHashes","type":"uint256[]"},{"internalType":"bool","name":"isBlindMint","type":"bool"}],"name":"allowlistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"artPassMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"},{"internalType":"uint16","name":"amount","type":"uint16"},{"internalType":"uint16","name":"editionIndex","type":"uint16"},{"internalType":"uint256[]","name":"tokenHashes","type":"uint256[]"},{"internalType":"bool","name":"isBlindMint","type":"bool"}],"name":"artPassMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"artPassMintingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"artPassMints","outputs":[{"internalType":"int16","name":"","type":"int16"}],"stateMutability":"view","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":"","type":"uint256"}],"name":"blindMints","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"burnClaims","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"burningActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimsBurningEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableAllowListMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableArtPassMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableClaimsBurning","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableMintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableTokenBurning","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"disableUseEditionForURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"editionSupply","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableAllowListMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableArtPassMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableClaimsBurning","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableMintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableTokenBurning","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableUseEditionForURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"artPassHolder","type":"address"}],"name":"getAvailableArtPassMintCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"seriesNumber","type":"uint16"}],"name":"getMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintsPerAddress","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"amount","type":"uint16"},{"internalType":"uint16","name":"editionIndex","type":"uint16"},{"internalType":"uint256[]","name":"tokenHashes","type":"uint256[]"},{"internalType":"bool","name":"isBlindMint","type":"bool"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintToEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","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":"payable","type":"function"},{"inputs":[],"name":"secondaryAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"seriesNumberToMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"artPassHolders","type":"address[]"},{"internalType":"int16[]","name":"extras","type":"int16[]"}],"name":"setAdditionalArtPassMints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"setAllowListMerkleRoot","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":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"setArtPassMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"mintPrices","type":"uint256[]"},{"internalType":"uint16[]","name":"seriesNumbers","type":"uint16[]"}],"name":"setEditionMintPrices","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"editions","type":"uint16[]"},{"internalType":"uint16[]","name":"supplies","type":"uint16[]"}],"name":"setEditionSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"maxMintsPerAddress_","type":"uint16"}],"name":"setMaxMintsPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintPrice_","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_secondaryAdmin","type":"address"}],"name":"setSecondaryAdmin","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":"","type":"uint256"}],"name":"tokenIdsToTokenHashes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenToEdition","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"useEditionForURI","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"usedTokenHashes","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040526009805461ffff60a01b1916600160a01b179055600b805465ffffffffffff191690556000600c819055600d55600f805460ff191690553480156200004857600080fd5b5060405162003f8838038062003f888339810160408190526200006b91620004a0565b33888860026200007c838262000604565b5060036200008b828262000604565b506001600055505060016008556001600160a01b038116620000c857604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b620000d3816200021a565b506001600160a01b0383163303620001165760405162461bcd60e51b815260206004820152600560248201526422b93937b960d91b6044820152606401620000bf565b601280546001600160a01b03191633179055600e62000136878262000604565b50600d859055600c849055601180546001600160a01b0319166001600160a01b0385161790556010829055604080516001808252818301909252600091602080830190803683375050604080516001808252818301909252929350600092915060208083019080368337019050509050600182600081518110620001be57620001be620006d0565b602002602001019061ffff16908161ffff16815250508281600081518110620001eb57620001eb620006d0565b61ffff909216602092830291909101909101526200020a82826200026c565b5050505050505050505062000716565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6012546001600160a01b0316336001600160a01b031614620002c25760405162461bcd60e51b815260206004820152600e60248201526d139bdd08105d5d1a1bdc9a5e995960921b6044820152606401620000bf565b8051825114620003065760405162461bcd60e51b815260206004820152600e60248201526d1a5b98dbdc9c9958dd081b1a5cdd60921b6044820152606401620000bf565b60005b82518161ffff161015620003a357818161ffff1681518110620003305762000330620006d0565b602002602001015160146000858461ffff1681518110620003555762000355620006d0565b602002602001015161ffff1661ffff16815260200190815260200160002060006101000a81548161ffff021916908361ffff16021790555080806200039a90620006e6565b91505062000309565b505050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112620003d057600080fd5b81516001600160401b0380821115620003ed57620003ed620003a8565b604051601f8301601f19908116603f01168101908282118183101715620004185762000418620003a8565b81604052838152602092508660208588010111156200043657600080fd5b600091505b838210156200045a57858201830151818301840152908201906200043b565b6000602085830101528094505050505092915050565b80516001600160a01b03811681146200048857600080fd5b919050565b805161ffff811681146200048857600080fd5b600080600080600080600080610100898b031215620004be57600080fd5b88516001600160401b0380821115620004d657600080fd5b620004e48c838d01620003be565b995060208b0151915080821115620004fb57600080fd5b620005098c838d01620003be565b985060408b01519150808211156200052057600080fd5b506200052f8b828c01620003be565b96505060608901519450608089015193506200054e60a08a0162000470565b925060c089015191506200056560e08a016200048d565b90509295985092959890939650565b600181811c908216806200058957607f821691505b602082108103620005aa57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620003a3576000816000526020600020601f850160051c81016020861015620005db5750805b601f850160051c820191505b81811015620005fc57828155600101620005e7565b505050505050565b81516001600160401b03811115620006205762000620620003a8565b620006388162000631845462000574565b84620005b0565b602080601f831160018114620006705760008415620006575750858301515b600019600386901b1c1916600185901b178555620005fc565b600085815260208120601f198616915b82811015620006a15788860151825594840194600190910190840162000680565b5085821015620006c05787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b600061ffff8083168181036200070c57634e487b7160e01b600052601160045260246000fd5b6001019392505050565b61386280620007266000396000f3fe6080604052600436106103e35760003560e01c806370a0823111610208578063bd486f1511610118578063e6c32c92116100ab578063ecfb36ad1161007a578063ecfb36ad14610b34578063f2fde38b14610b64578063f4a0a52814610b84578063f8362e2614610ba4578063fc42e28214610bb957600080fd5b8063e6c32c9214610aca578063e797ec1b14610adf578063e985e9c514610af4578063ea7a42e414610b1457600080fd5b8063da5ce9a8116100e7578063da5ce9a814610a55578063db40c44214610a82578063df33ac9c14610a97578063e551cbb614610ab757600080fd5b8063bd486f15146109dd578063c5681a9014610a00578063c761c72d14610a20578063c87b56dd14610a3557600080fd5b80639a14536c1161019b578063aa5ebe871161016a578063aa5ebe8714610959578063ae6a80d514610979578063b1acaacc1461099b578063b2ff9200146109b5578063b88d4fde146109ca57600080fd5b80639a14536c146108f65780639bb906e014610909578063a09271f51461091f578063a22cb4651461093957600080fd5b80638be06b56116101d75780638be06b56146108835780638da5cb5b146108a357806395d89b41146108c1578063979e8b72146108d657600080fd5b806370a0823114610824578063715018a6146108445780637e5cd5c11461085957806389190f221461086e57600080fd5b806331f9c91911610303578063539ea4f011610296578063602787ed11610265578063602787ed146107955780636352211e146107c65780636817c76c146107e657806368f12768146107fc5780636c0360eb1461080f57600080fd5b8063539ea4f01461071a57806358ec4a181461073b5780635bbdac291461074e5780635e0cb3a21461076457600080fd5b806342966c68116102d257806342966c681461065457806346e58f671461067457806353014998146106a757806353314b2c146106ea57600080fd5b806331f9c919146105ec578063338cff2b1461060c57806336ab76621461062157806342842e0e1461064157600080fd5b806318160ddd1161037b5780632919ac571161034a5780632919ac57146105825780632a2d8723146105975780632cc0d1ee146105b757806330176e13146105cc57600080fd5b806318160ddd146105105780631c7c25981461052d57806323b872dd1461054f5780632691ee8b1461056257600080fd5b8063081d955f116103b7578063081d955f1461048e578063095ea7b3146104c95780630a1dca0e146104dc578063170f580a146104fb57600080fd5b806267b63e146103e857806301ffc9a7146103ff57806306fdde0314610434578063081812fc14610456575b600080fd5b3480156103f457600080fd5b506103fd610bce565b005b34801561040b57600080fd5b5061041f61041a366004612be9565b610c19565b60405190151581526020015b60405180910390f35b34801561044057600080fd5b50610449610c6b565b60405161042b9190612c56565b34801561046257600080fd5b50610476610471366004612c69565b610cfd565b6040516001600160a01b03909116815260200161042b565b34801561049a57600080fd5b506104bb6104a9366004612c99565b60166020526000908152604090205481565b60405190815260200161042b565b6103fd6104d7366004612ccb565b610d41565b3480156104e857600080fd5b50600b5461041f90610100900460ff1681565b34801561050757600080fd5b506103fd610de1565b34801561051c57600080fd5b5060015460005403600019016104bb565b34801561053957600080fd5b50600b5461041f90640100000000900460ff1681565b6103fd61055d366004612cf5565b610e23565b34801561056e57600080fd5b506103fd61057d366004612d31565b610fb4565b34801561058e57600080fd5b506103fd611009565b3480156105a357600080fd5b506103fd6105b2366004612e34565b61104b565b3480156105c357600080fd5b506103fd611135565b3480156105d857600080fd5b506103fd6105e7366004612f4a565b611181565b3480156105f857600080fd5b50600b5461041f9062010000900460ff1681565b34801561061857600080fd5b506103fd6111c4565b34801561062d57600080fd5b506103fd61063c366004612c99565b611203565b6103fd61064f366004612cf5565b611258565b34801561066057600080fd5b506103fd61066f366004612c69565b611273565b34801561068057600080fd5b5061069461068f366004612d31565b6112db565b60405161ffff909116815260200161042b565b3480156106b357600080fd5b506106d76106c2366004612d31565b600a6020526000908152604090205460010b81565b60405160019190910b815260200161042b565b3480156106f657600080fd5b5061041f610705366004612c69565b60196020526000908152604090205460ff1681565b34801561072657600080fd5b50600b5461041f906301000000900460ff1681565b6103fd61074936600461304c565b61130c565b34801561075a57600080fd5b506104bb600d5481565b34801561077057600080fd5b5061069461077f366004612c99565b60146020526000908152604090205461ffff1681565b3480156107a157600080fd5b506106946107b0366004612c69565b60156020526000908152604090205461ffff1681565b3480156107d257600080fd5b506104766107e1366004612c69565b611649565b3480156107f257600080fd5b506104bb60105481565b6103fd61080a3660046130e8565b611654565b34801561081b57600080fd5b50610449611738565b34801561083057600080fd5b506104bb61083f366004612d31565b6117c6565b34801561085057600080fd5b506103fd611814565b34801561086557600080fd5b506103fd611828565b34801561087a57600080fd5b506103fd611869565b34801561088f57600080fd5b506103fd61089e36600461318f565b6118ad565b3480156108af57600080fd5b506009546001600160a01b0316610476565b3480156108cd57600080fd5b50610449611994565b3480156108e257600080fd5b506104bb6108f1366004612c99565b6119a3565b6103fd61090436600461304c565b6119dc565b34801561091557600080fd5b506104bb600c5481565b34801561092b57600080fd5b50600b5461041f9060ff1681565b34801561094557600080fd5b506103fd6109543660046131e8565b611caa565b34801561096557600080fd5b50601354610476906001600160a01b031681565b34801561098557600080fd5b5060095461069490600160a01b900461ffff1681565b3480156109a757600080fd5b50600f5461041f9060ff1681565b3480156109c157600080fd5b506103fd611d16565b6103fd6109d836600461321b565b611d59565b3480156109e957600080fd5b50600b5461041f9065010000000000900460ff1681565b348015610a0c57600080fd5b506103fd610a1b366004613296565b611da3565b348015610a2c57600080fd5b506103fd611e74565b348015610a4157600080fd5b50610449610a50366004612c69565b611ebe565b348015610a6157600080fd5b506104bb610a70366004612c69565b60176020526000908152604090205481565b348015610a8e57600080fd5b506103fd611f68565b348015610aa357600080fd5b506103fd610ab2366004612c69565b611fb0565b6103fd610ac53660046132cc565b611fe8565b348015610ad657600080fd5b506103fd612208565b348015610aeb57600080fd5b506103fd61224c565b348015610b0057600080fd5b5061041f610b0f36600461333a565b612292565b348015610b2057600080fd5b506103fd610b2f366004612c69565b6122c0565b348015610b4057600080fd5b5061041f610b4f366004612c69565b60186020526000908152604090205460ff1681565b348015610b7057600080fd5b506103fd610b7f366004612d31565b6122f8565b348015610b9057600080fd5b506103fd610b9f366004612c69565b612333565b348015610bb057600080fd5b506103fd61236b565b348015610bc557600080fd5b506103fd6123ab565b6012546001600160a01b0316336001600160a01b031614610c0a5760405162461bcd60e51b8152600401610c0190613364565b60405180910390fd5b600f805460ff19166001179055565b60006301ffc9a760e01b6001600160e01b031983161480610c4a57506380ac58cd60e01b6001600160e01b03198316145b80610c655750635b5e139f60e01b6001600160e01b03198316145b92915050565b606060028054610c7a9061338c565b80601f0160208091040260200160405190810160405280929190818152602001828054610ca69061338c565b8015610cf35780601f10610cc857610100808354040283529160200191610cf3565b820191906000526020600020905b815481529060010190602001808311610cd657829003601f168201915b5050505050905090565b6000610d08826123ea565b610d25576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610d4c82611649565b9050336001600160a01b03821614610d8557610d688133612292565b610d85576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6012546001600160a01b0316336001600160a01b031614610e145760405162461bcd60e51b8152600401610c0190613364565b600b805463ff00000019169055565b6000610e2e8261241f565b9050836001600160a01b0316816001600160a01b031614610e615760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054610e8d8187335b6001600160a01b039081169116811491141790565b610eb857610e9b8633612292565b610eb857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610edf57604051633a954ecd60e21b815260040160405180910390fd5b8015610eea57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610f7c57600184016000818152600460205260408120549003610f7a576000548114610f7a5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b031660008051602061380d83398151915260405160405180910390a45b505050505050565b6012546001600160a01b0316336001600160a01b031614610fe75760405162461bcd60e51b8152600401610c0190613364565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6012546001600160a01b0316336001600160a01b03161461103c5760405162461bcd60e51b8152600401610c0190613364565b600b805460ff19166001179055565b6012546001600160a01b0316336001600160a01b03161461107e5760405162461bcd60e51b8152600401610c0190613364565b805182511461109f5760405162461bcd60e51b8152600401610c01906133c6565b60005b82518161ffff16101561113057818161ffff16815181106110c5576110c56133ee565b6020026020010151600a6000858461ffff16815181106110e7576110e76133ee565b6020908102919091018101516001600160a01b03168252810191909152604001600020805461ffff191661ffff92909216919091179055806111288161341a565b9150506110a2565b505050565b6012546001600160a01b0316336001600160a01b0316146111685760405162461bcd60e51b8152600401610c0190613364565b600b805465ff0000000000191665010000000000179055565b6012546001600160a01b0316336001600160a01b0316146111b45760405162461bcd60e51b8152600401610c0190613364565b600e6111c08282613483565b5050565b6012546001600160a01b0316336001600160a01b0316146111f75760405162461bcd60e51b8152600401610c0190613364565b600f805460ff19169055565b6012546001600160a01b0316336001600160a01b0316146112365760405162461bcd60e51b8152600401610c0190613364565b6009805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b61113083838360405180602001604052806000815250611d59565b600b54640100000000900460ff166112cd5760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e206275726e696e67206973206e6f7420656e61626c6564000000006044820152606401610c01565b6112d881600161248e565b50565b6001600160a01b0381166000908152600a6020526040812054819061130590600190810b90613542565b9392505050565b6113146125c6565b600b54610100900460ff1661136b5760405162461bcd60e51b815260206004820152601e60248201527f416c6c6f77206c697374206d696e74696e67206e6f7420656e61626c656400006044820152606401610c01565b8361ffff16611379846119a3565b6113839190613565565b34146113a15760405162461bcd60e51b8152600401610c019061357c565b60008461ffff16116113c55760405162461bcd60e51b8152600401610c01906135b3565b61ffff838116600090815260146020526040902054818616911610156113fd5760405162461bcd60e51b8152600401610c01906135ea565b81518461ffff16146114215760405162461bcd60e51b8152600401610c0190613621565b61142a826125f0565b6114465760405162461bcd60e51b8152600401610c0190613666565b600061ffff8516611470335b6001600160a01b031660009081526005602052604090205460c01c90565b61147a9190613694565b600954909150600160a01b900461ffff166001600160401b03821611156114e35760405162461bcd60e51b815260206004820152601e60248201527f45786365656473207065722061646472657373206d696e74206c696d697400006044820152606401610c01565b61156387878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600c5491503390505b604051602001611548919060609190911b6bffffffffffffffffffffffff1916815260140190565b60405160208183030381529060405280519060200120612664565b6115af5760405162461bcd60e51b815260206004820152601860248201527f41646472657373206e6f7420696e20616c6c6f776c69737400000000000000006044820152606401610c01565b6011546040516001600160a01b03909116903480156108fc02916000818181858888f193505050501580156115e8573d6000803e3d6000fd5b506115f8335b8661ffff1661267a565b6116028585612754565b61160d8584846127dc565b61163e335b6001600160a01b0316600090815260056020526040902080546001600160c01b031660c084901b179055565b50610fac6001600855565b6000610c658261241f565b61165c6125c6565b600b5465010000000000900460ff166116b75760405162461bcd60e51b815260206004820152601d60248201527f436c61696d73206275726e696e67206973206e6f7420656e61626c65640000006044820152606401610c01565b60005b818110156116f35760008383838181106116d6576116d66133ee565b9050602002013590506116ea81600161248e565b506001016116ba565b506011546040516001600160a01b03909116903480156108fc02916000818181858888f1935050505015801561172d573d6000803e3d6000fd5b506111c06001600855565b600e80546117459061338c565b80601f01602080910402602001604051908101604052809291908181526020018280546117719061338c565b80156117be5780601f10611793576101008083540402835291602001916117be565b820191906000526020600020905b8154815290600101906020018083116117a157829003601f168201915b505050505081565b60006001600160a01b0382166117ef576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b61181c61288f565b61182660006128bc565b565b6012546001600160a01b0316336001600160a01b03161461185b5760405162461bcd60e51b8152600401610c0190613364565b600b805462ff000019169055565b6012546001600160a01b0316336001600160a01b03161461189c5760405162461bcd60e51b8152600401610c0190613364565b600b805461ff001916610100179055565b6012546001600160a01b0316336001600160a01b0316146118e05760405162461bcd60e51b8152600401610c0190613364565b80518251146119015760405162461bcd60e51b8152600401610c01906133c6565b60005b82518161ffff16101561113057818161ffff1681518110611927576119276133ee565b602002602001015160146000858461ffff1681518110611949576119496133ee565b602002602001015161ffff1661ffff16815260200190815260200160002060006101000a81548161ffff021916908361ffff160217905550808061198c9061341a565b915050611904565b606060038054610c7a9061338c565b61ffff811660009081526016602052604081205481036119c557505060105490565b5061ffff1660009081526016602052604090205490565b6119e46125c6565b600b5460ff16611a365760405162461bcd60e51b815260206004820152601c60248201527f4172742050617373206d696e74696e67206e6f7420656e61626c6564000000006044820152606401610c01565b8361ffff16611a44846119a3565b611a4e9190613565565b3414611a6c5760405162461bcd60e51b8152600401610c019061357c565b60008461ffff1611611a905760405162461bcd60e51b8152600401610c01906135b3565b61ffff83811660009081526014602052604090205481861691161015611ac85760405162461bcd60e51b8152600401610c01906135ea565b81518461ffff1614611aec5760405162461bcd60e51b8152600401610c0190613621565b611af5826125f0565b611b115760405162461bcd60e51b8152600401610c0190613666565b61ffff8416611b1f336112db565b61ffff161015611b7c5760405162461bcd60e51b815260206004820152602260248201527f4578636565647320417274205061737320686f6c646572206d696e74206c696d6044820152611a5d60f21b6064820152608401610c01565b611bbd86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600d549150339050611520565b611c025760405162461bcd60e51b81526020600482015260166024820152752737ba1030b71020b93a102830b9b9903437b63232b960511b6044820152606401610c01565b6011546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611c3b573d6000803e3d6000fd5b50611c4a338561ffff1661267a565b611c548484612754565b611c5f8483836127dc565b336000908152600a6020526040902054611c7d90859060010b6136bb565b336000908152600a60205260409020805461ffff191661ffff929092169190911790556001600855610fac565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6012546001600160a01b0316336001600160a01b031614611d495760405162461bcd60e51b8152600401610c0190613364565b600b805464ff0000000019169055565b611d64848484610e23565b6001600160a01b0383163b15611d9d57611d808484848461290e565b611d9d576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6012546001600160a01b0316336001600160a01b031614611dd65760405162461bcd60e51b8152600401610c0190613364565b8051825114611df75760405162461bcd60e51b8152600401610c01906133c6565b60005b81518161ffff16101561113057828161ffff1681518110611e1d57611e1d6133ee565b602002602001015160166000848461ffff1681518110611e3f57611e3f6133ee565b602002602001015161ffff1661ffff168152602001908152602001600020819055508080611e6c9061341a565b915050611dfa565b6012546001600160a01b0316336001600160a01b031614611ea75760405162461bcd60e51b8152600401610c0190613364565b600b805464ff000000001916640100000000179055565b6060611ec9826123ea565b611f0c5760405162461bcd60e51b8152602060048201526014602482015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b6044820152606401610c01565b600f5460009060ff16611f1f5782611f33565b60008381526015602052604090205461ffff165b9050600e611f40826129fa565b604051602001611f519291906136de565b604051602081830303815290604052915050919050565b6012546001600160a01b0316336001600160a01b031614611f9b5760405162461bcd60e51b8152600401610c0190613364565b600b805463ff00000019166301000000179055565b6012546001600160a01b0316336001600160a01b031614611fe35760405162461bcd60e51b8152600401610c0190613364565b600d55565b611ff06125c6565b600b5462010000900460ff1661203e5760405162461bcd60e51b8152602060048201526013602482015272135a5b9d1a5b99c81b9bdd08195b98589b1959606a1b6044820152606401610c01565b8361ffff1661204c846119a3565b6120569190613565565b34146120745760405162461bcd60e51b8152600401610c019061357c565b60008461ffff16116120985760405162461bcd60e51b8152600401610c01906135b3565b61ffff838116600090815260146020526040902054818616911610156120d05760405162461bcd60e51b8152600401610c01906135ea565b81518461ffff16146120f45760405162461bcd60e51b8152600401610c0190613621565b6120fd826125f0565b6121195760405162461bcd60e51b8152600401610c0190613666565b600061ffff851661212933611452565b6121339190613694565b600954909150600160a01b900461ffff166001600160401b038216111561219c5760405162461bcd60e51b815260206004820152601e60248201527f45786365656473207065722061646472657373206d696e74206c696d697400006044820152606401610c01565b6011546040516001600160a01b03909116903480156108fc02916000818181858888f193505050501580156121d5573d6000803e3d6000fd5b506121df336115ee565b6121e98585612754565b6121f48584846127dc565b6121fd33611612565b50611d9d6001600855565b6012546001600160a01b0316336001600160a01b03161461223b5760405162461bcd60e51b8152600401610c0190613364565b600b805465ff000000000019169055565b6012546001600160a01b0316336001600160a01b03161461227f5760405162461bcd60e51b8152600401610c0190613364565b600b805462ff0000191662010000179055565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6012546001600160a01b0316336001600160a01b0316146122f35760405162461bcd60e51b8152600401610c0190613364565b600c55565b61230061288f565b6001600160a01b03811661232a57604051631e4fbdf760e01b815260006004820152602401610c01565b6112d8816128bc565b6012546001600160a01b0316336001600160a01b0316146123665760405162461bcd60e51b8152600401610c0190613364565b601055565b6012546001600160a01b0316336001600160a01b03161461239e5760405162461bcd60e51b8152600401610c0190613364565b600b805461ff0019169055565b6012546001600160a01b0316336001600160a01b0316146123de5760405162461bcd60e51b8152600401610c0190613364565b600b805460ff19169055565b6000816001111580156123fe575060005482105b8015610c65575050600090815260046020526040902054600160e01b161590565b60008180600111612475576000548110156124755760008181526004602052604081205490600160e01b82169003612473575b80600003611305575060001901600081815260046020526040902054612452565b505b604051636f96cda160e11b815260040160405180910390fd5b60006124998361241f565b9050806000806124b786600090815260066020526040902080549091565b9150915084156124f7576124cc818433610e78565b6124f7576124da8333612292565b6124f757604051632ce44b5f60e11b815260040160405180910390fd5b801561250257600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040812091909155600160e11b851690036125905760018601600081815260046020526040812054900361258e57600054811461258e5760008181526004602052604090208590555b505b60405186906000906001600160a01b0386169060008051602061380d833981519152908390a45050600180548101905550505050565b6002600854036125e957604051633ee5aeb560e01b815260040160405180910390fd5b6002600855565b6000805b82518160ff16101561265b576000838260ff1681518110612617576126176133ee565b6020908102919091018101516000818152601890925260409091205490915060ff1615612648575060009392505050565b508061265381613765565b9150506125f4565b50600192915050565b6000826126718584612a8c565b14949350505050565b600080549082900361269f5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b1783179055828401908390839060008051602061380d8339815191528180a4600183015b81811461272a578083600060008051602061380d833981519152600080a4600101612704565b508160000361274b57604051622e076360e81b815260040160405180910390fd5b60005550505050565b61ffff80821660009081526014602052604090205461277591849116613784565b61ffff8281166000908152601460205260408120805461ffff1916938316939093179092558154908416906127aa919061379f565b90505b600054811015611130576000818152601560205260409020805461ffff191661ffff84161790556001016127ad565b6000808461ffff166127ed60005490565b6127f7919061379f565b90505b600054811015612888576000848360ff168151811061281b5761281b6133ee565b6020908102919091018101516000848152601783526040808220839055828252601890935291909120805460ff1916600117905590508315612872576000828152601960205260409020805460ff19168515151790555b8261287c81613765565b935050506001016127fa565b5050505050565b6009546001600160a01b031633146118265760405163118cdaa760e01b8152336004820152602401610c01565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906129439033908990889088906004016137b2565b6020604051808303816000875af192505050801561297e575060408051601f3d908101601f1916820190925261297b918101906137ef565b60015b6129dc573d8080156129ac576040519150601f19603f3d011682016040523d82523d6000602084013e6129b1565b606091505b5080516000036129d4576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60606000612a0783612acf565b60010190506000816001600160401b03811115612a2657612a26612d4c565b6040519080825280601f01601f191660200182016040528015612a50576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612a5a57509392505050565b600081815b8451811015612ac757612abd82868381518110612ab057612ab06133ee565b6020026020010151612ba7565b9150600101612a91565b509392505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612b0e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612b3a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612b5857662386f26fc10000830492506010015b6305f5e1008310612b70576305f5e100830492506008015b6127108310612b8457612710830492506004015b60648310612b96576064830492506002015b600a8310610c655760010192915050565b6000818310612bc3576000828152602084905260409020611305565b5060009182526020526040902090565b6001600160e01b0319811681146112d857600080fd5b600060208284031215612bfb57600080fd5b813561130581612bd3565b60005b83811015612c21578181015183820152602001612c09565b50506000910152565b60008151808452612c42816020860160208601612c06565b601f01601f19169290920160200192915050565b6020815260006113056020830184612c2a565b600060208284031215612c7b57600080fd5b5035919050565b803561ffff81168114612c9457600080fd5b919050565b600060208284031215612cab57600080fd5b61130582612c82565b80356001600160a01b0381168114612c9457600080fd5b60008060408385031215612cde57600080fd5b612ce783612cb4565b946020939093013593505050565b600080600060608486031215612d0a57600080fd5b612d1384612cb4565b9250612d2160208501612cb4565b9150604084013590509250925092565b600060208284031215612d4357600080fd5b61130582612cb4565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612d8a57612d8a612d4c565b604052919050565b60006001600160401b03821115612dab57612dab612d4c565b5060051b60200190565b600082601f830112612dc657600080fd5b81356020612ddb612dd683612d92565b612d62565b8083825260208201915060208460051b870101935086841115612dfd57600080fd5b602086015b84811015612e295780358060010b8114612e1c5760008081fd5b8352918301918301612e02565b509695505050505050565b60008060408385031215612e4757600080fd5b82356001600160401b0380821115612e5e57600080fd5b818501915085601f830112612e7257600080fd5b81356020612e82612dd683612d92565b82815260059290921b84018101918181019089841115612ea157600080fd5b948201945b83861015612ec657612eb786612cb4565b82529482019490820190612ea6565b96505086013592505080821115612edc57600080fd5b50612ee985828601612db5565b9150509250929050565b60006001600160401b03831115612f0c57612f0c612d4c565b612f1f601f8401601f1916602001612d62565b9050828152838383011115612f3357600080fd5b828260208301376000602084830101529392505050565b600060208284031215612f5c57600080fd5b81356001600160401b03811115612f7257600080fd5b8201601f81018413612f8357600080fd5b6129f284823560208401612ef3565b60008083601f840112612fa457600080fd5b5081356001600160401b03811115612fbb57600080fd5b6020830191508360208260051b8501011115612fd657600080fd5b9250929050565b600082601f830112612fee57600080fd5b81356020612ffe612dd683612d92565b8083825260208201915060208460051b87010193508684111561302057600080fd5b602086015b84811015612e295780358352918301918301613025565b80358015158114612c9457600080fd5b60008060008060008060a0878903121561306557600080fd5b86356001600160401b038082111561307c57600080fd5b6130888a838b01612f92565b909850965086915061309c60208a01612c82565b95506130aa60408a01612c82565b945060608901359150808211156130c057600080fd5b506130cd89828a01612fdd565b9250506130dc6080880161303c565b90509295509295509295565b600080602083850312156130fb57600080fd5b82356001600160401b0381111561311157600080fd5b61311d85828601612f92565b90969095509350505050565b600082601f83011261313a57600080fd5b8135602061314a612dd683612d92565b8083825260208201915060208460051b87010193508684111561316c57600080fd5b602086015b84811015612e295761318281612c82565b8352918301918301613171565b600080604083850312156131a257600080fd5b82356001600160401b03808211156131b957600080fd5b6131c586838701613129565b935060208501359150808211156131db57600080fd5b50612ee985828601613129565b600080604083850312156131fb57600080fd5b61320483612cb4565b91506132126020840161303c565b90509250929050565b6000806000806080858703121561323157600080fd5b61323a85612cb4565b935061324860208601612cb4565b92506040850135915060608501356001600160401b0381111561326a57600080fd5b8501601f8101871361327b57600080fd5b61328a87823560208401612ef3565b91505092959194509250565b600080604083850312156132a957600080fd5b82356001600160401b03808211156132c057600080fd5b6131c586838701612fdd565b600080600080608085870312156132e257600080fd5b6132eb85612c82565b93506132f960208601612c82565b925060408501356001600160401b0381111561331457600080fd5b61332087828801612fdd565b92505061332f6060860161303c565b905092959194509250565b6000806040838503121561334d57600080fd5b61335683612cb4565b915061321260208401612cb4565b6020808252600e908201526d139bdd08105d5d1a1bdc9a5e995960921b604082015260600190565b600181811c908216806133a057607f821691505b6020821081036133c057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600e908201526d1a5b98dbdc9c9958dd081b1a5cdd60921b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600061ffff80831681810361343157613431613404565b6001019392505050565b601f821115611130576000816000526020600020601f850160051c810160208610156134645750805b601f850160051c820191505b81811015610fac57828155600101613470565b81516001600160401b0381111561349c5761349c612d4c565b6134b0816134aa845461338c565b8461343b565b602080601f8311600181146134e557600084156134cd5750858301515b600019600386901b1c1916600185901b178555610fac565b600085815260208120601f198616915b82811015613514578886015182559484019460019091019084016134f5565b50858210156135325787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600181810b9083900b01617fff8113617fff1982121715610c6557610c65613404565b8082028115828204841417610c6557610c65613404565b6020808252601e908201527f496e636f727265637420616d6f756e74206f662065746865722073656e740000604082015260600190565b60208082526019908201527f4d757374206d696e7420706f73697469766520616d6f756e7400000000000000604082015260600190565b6020808252601c908201527f4d696e74206578636565647320636f6c6c656374696f6e2073697a6500000000604082015260600190565b60208082526025908201527f496e636f727265637420616d6f756e74206f6620746f6b656e20686173686573604082015264081cd95b9d60da1b606082015260800190565b602080825260149082015273088eae0d8d2c6c2e8ca40e8ded6cadc40d0c2e6d60631b604082015260600190565b6001600160401b038181168382160190808211156136b4576136b4613404565b5092915050565b600182810b9082900b03617fff198112617fff82131715610c6557610c65613404565b60008084546136ec8161338c565b60018281168015613704576001811461371957613748565b60ff1984168752821515830287019450613748565b8860005260208060002060005b8581101561373f5781548a820152908401908201613726565b50505082870194505b50505050835161375c818360208801612c06565b01949350505050565b600060ff821660ff810361377b5761377b613404565b60010192915050565b61ffff8281168282160390808211156136b4576136b4613404565b81810381811115610c6557610c65613404565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906137e590830184612c2a565b9695505050505050565b60006020828403121561380157600080fd5b815161130581612bd356feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122043860c0b2446e81816905a1bdf175974bf15b7e57d478fff4f7901abdd3262ba64736f6c634300081800330000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001800ae9334407b944dfe482b7a9a7ba5c982610a06b09fed2c25cca6e764a46b8f90ae9334407b944dfe482b7a9a7ba5c982610a06b09fed2c25cca6e764a46b8f9000000000000000000000000a48832b6b1d9bf9d69a5c75dab1bd23b176015f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000000949636f6e69634e465400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005494d4e46540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006697066733a2f0000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103e35760003560e01c806370a0823111610208578063bd486f1511610118578063e6c32c92116100ab578063ecfb36ad1161007a578063ecfb36ad14610b34578063f2fde38b14610b64578063f4a0a52814610b84578063f8362e2614610ba4578063fc42e28214610bb957600080fd5b8063e6c32c9214610aca578063e797ec1b14610adf578063e985e9c514610af4578063ea7a42e414610b1457600080fd5b8063da5ce9a8116100e7578063da5ce9a814610a55578063db40c44214610a82578063df33ac9c14610a97578063e551cbb614610ab757600080fd5b8063bd486f15146109dd578063c5681a9014610a00578063c761c72d14610a20578063c87b56dd14610a3557600080fd5b80639a14536c1161019b578063aa5ebe871161016a578063aa5ebe8714610959578063ae6a80d514610979578063b1acaacc1461099b578063b2ff9200146109b5578063b88d4fde146109ca57600080fd5b80639a14536c146108f65780639bb906e014610909578063a09271f51461091f578063a22cb4651461093957600080fd5b80638be06b56116101d75780638be06b56146108835780638da5cb5b146108a357806395d89b41146108c1578063979e8b72146108d657600080fd5b806370a0823114610824578063715018a6146108445780637e5cd5c11461085957806389190f221461086e57600080fd5b806331f9c91911610303578063539ea4f011610296578063602787ed11610265578063602787ed146107955780636352211e146107c65780636817c76c146107e657806368f12768146107fc5780636c0360eb1461080f57600080fd5b8063539ea4f01461071a57806358ec4a181461073b5780635bbdac291461074e5780635e0cb3a21461076457600080fd5b806342966c68116102d257806342966c681461065457806346e58f671461067457806353014998146106a757806353314b2c146106ea57600080fd5b806331f9c919146105ec578063338cff2b1461060c57806336ab76621461062157806342842e0e1461064157600080fd5b806318160ddd1161037b5780632919ac571161034a5780632919ac57146105825780632a2d8723146105975780632cc0d1ee146105b757806330176e13146105cc57600080fd5b806318160ddd146105105780631c7c25981461052d57806323b872dd1461054f5780632691ee8b1461056257600080fd5b8063081d955f116103b7578063081d955f1461048e578063095ea7b3146104c95780630a1dca0e146104dc578063170f580a146104fb57600080fd5b806267b63e146103e857806301ffc9a7146103ff57806306fdde0314610434578063081812fc14610456575b600080fd5b3480156103f457600080fd5b506103fd610bce565b005b34801561040b57600080fd5b5061041f61041a366004612be9565b610c19565b60405190151581526020015b60405180910390f35b34801561044057600080fd5b50610449610c6b565b60405161042b9190612c56565b34801561046257600080fd5b50610476610471366004612c69565b610cfd565b6040516001600160a01b03909116815260200161042b565b34801561049a57600080fd5b506104bb6104a9366004612c99565b60166020526000908152604090205481565b60405190815260200161042b565b6103fd6104d7366004612ccb565b610d41565b3480156104e857600080fd5b50600b5461041f90610100900460ff1681565b34801561050757600080fd5b506103fd610de1565b34801561051c57600080fd5b5060015460005403600019016104bb565b34801561053957600080fd5b50600b5461041f90640100000000900460ff1681565b6103fd61055d366004612cf5565b610e23565b34801561056e57600080fd5b506103fd61057d366004612d31565b610fb4565b34801561058e57600080fd5b506103fd611009565b3480156105a357600080fd5b506103fd6105b2366004612e34565b61104b565b3480156105c357600080fd5b506103fd611135565b3480156105d857600080fd5b506103fd6105e7366004612f4a565b611181565b3480156105f857600080fd5b50600b5461041f9062010000900460ff1681565b34801561061857600080fd5b506103fd6111c4565b34801561062d57600080fd5b506103fd61063c366004612c99565b611203565b6103fd61064f366004612cf5565b611258565b34801561066057600080fd5b506103fd61066f366004612c69565b611273565b34801561068057600080fd5b5061069461068f366004612d31565b6112db565b60405161ffff909116815260200161042b565b3480156106b357600080fd5b506106d76106c2366004612d31565b600a6020526000908152604090205460010b81565b60405160019190910b815260200161042b565b3480156106f657600080fd5b5061041f610705366004612c69565b60196020526000908152604090205460ff1681565b34801561072657600080fd5b50600b5461041f906301000000900460ff1681565b6103fd61074936600461304c565b61130c565b34801561075a57600080fd5b506104bb600d5481565b34801561077057600080fd5b5061069461077f366004612c99565b60146020526000908152604090205461ffff1681565b3480156107a157600080fd5b506106946107b0366004612c69565b60156020526000908152604090205461ffff1681565b3480156107d257600080fd5b506104766107e1366004612c69565b611649565b3480156107f257600080fd5b506104bb60105481565b6103fd61080a3660046130e8565b611654565b34801561081b57600080fd5b50610449611738565b34801561083057600080fd5b506104bb61083f366004612d31565b6117c6565b34801561085057600080fd5b506103fd611814565b34801561086557600080fd5b506103fd611828565b34801561087a57600080fd5b506103fd611869565b34801561088f57600080fd5b506103fd61089e36600461318f565b6118ad565b3480156108af57600080fd5b506009546001600160a01b0316610476565b3480156108cd57600080fd5b50610449611994565b3480156108e257600080fd5b506104bb6108f1366004612c99565b6119a3565b6103fd61090436600461304c565b6119dc565b34801561091557600080fd5b506104bb600c5481565b34801561092b57600080fd5b50600b5461041f9060ff1681565b34801561094557600080fd5b506103fd6109543660046131e8565b611caa565b34801561096557600080fd5b50601354610476906001600160a01b031681565b34801561098557600080fd5b5060095461069490600160a01b900461ffff1681565b3480156109a757600080fd5b50600f5461041f9060ff1681565b3480156109c157600080fd5b506103fd611d16565b6103fd6109d836600461321b565b611d59565b3480156109e957600080fd5b50600b5461041f9065010000000000900460ff1681565b348015610a0c57600080fd5b506103fd610a1b366004613296565b611da3565b348015610a2c57600080fd5b506103fd611e74565b348015610a4157600080fd5b50610449610a50366004612c69565b611ebe565b348015610a6157600080fd5b506104bb610a70366004612c69565b60176020526000908152604090205481565b348015610a8e57600080fd5b506103fd611f68565b348015610aa357600080fd5b506103fd610ab2366004612c69565b611fb0565b6103fd610ac53660046132cc565b611fe8565b348015610ad657600080fd5b506103fd612208565b348015610aeb57600080fd5b506103fd61224c565b348015610b0057600080fd5b5061041f610b0f36600461333a565b612292565b348015610b2057600080fd5b506103fd610b2f366004612c69565b6122c0565b348015610b4057600080fd5b5061041f610b4f366004612c69565b60186020526000908152604090205460ff1681565b348015610b7057600080fd5b506103fd610b7f366004612d31565b6122f8565b348015610b9057600080fd5b506103fd610b9f366004612c69565b612333565b348015610bb057600080fd5b506103fd61236b565b348015610bc557600080fd5b506103fd6123ab565b6012546001600160a01b0316336001600160a01b031614610c0a5760405162461bcd60e51b8152600401610c0190613364565b60405180910390fd5b600f805460ff19166001179055565b60006301ffc9a760e01b6001600160e01b031983161480610c4a57506380ac58cd60e01b6001600160e01b03198316145b80610c655750635b5e139f60e01b6001600160e01b03198316145b92915050565b606060028054610c7a9061338c565b80601f0160208091040260200160405190810160405280929190818152602001828054610ca69061338c565b8015610cf35780601f10610cc857610100808354040283529160200191610cf3565b820191906000526020600020905b815481529060010190602001808311610cd657829003601f168201915b5050505050905090565b6000610d08826123ea565b610d25576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610d4c82611649565b9050336001600160a01b03821614610d8557610d688133612292565b610d85576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6012546001600160a01b0316336001600160a01b031614610e145760405162461bcd60e51b8152600401610c0190613364565b600b805463ff00000019169055565b6000610e2e8261241f565b9050836001600160a01b0316816001600160a01b031614610e615760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054610e8d8187335b6001600160a01b039081169116811491141790565b610eb857610e9b8633612292565b610eb857604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b038516610edf57604051633a954ecd60e21b815260040160405180910390fd5b8015610eea57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610f7c57600184016000818152600460205260408120549003610f7a576000548114610f7a5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b031660008051602061380d83398151915260405160405180910390a45b505050505050565b6012546001600160a01b0316336001600160a01b031614610fe75760405162461bcd60e51b8152600401610c0190613364565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6012546001600160a01b0316336001600160a01b03161461103c5760405162461bcd60e51b8152600401610c0190613364565b600b805460ff19166001179055565b6012546001600160a01b0316336001600160a01b03161461107e5760405162461bcd60e51b8152600401610c0190613364565b805182511461109f5760405162461bcd60e51b8152600401610c01906133c6565b60005b82518161ffff16101561113057818161ffff16815181106110c5576110c56133ee565b6020026020010151600a6000858461ffff16815181106110e7576110e76133ee565b6020908102919091018101516001600160a01b03168252810191909152604001600020805461ffff191661ffff92909216919091179055806111288161341a565b9150506110a2565b505050565b6012546001600160a01b0316336001600160a01b0316146111685760405162461bcd60e51b8152600401610c0190613364565b600b805465ff0000000000191665010000000000179055565b6012546001600160a01b0316336001600160a01b0316146111b45760405162461bcd60e51b8152600401610c0190613364565b600e6111c08282613483565b5050565b6012546001600160a01b0316336001600160a01b0316146111f75760405162461bcd60e51b8152600401610c0190613364565b600f805460ff19169055565b6012546001600160a01b0316336001600160a01b0316146112365760405162461bcd60e51b8152600401610c0190613364565b6009805461ffff909216600160a01b0261ffff60a01b19909216919091179055565b61113083838360405180602001604052806000815250611d59565b600b54640100000000900460ff166112cd5760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e206275726e696e67206973206e6f7420656e61626c6564000000006044820152606401610c01565b6112d881600161248e565b50565b6001600160a01b0381166000908152600a6020526040812054819061130590600190810b90613542565b9392505050565b6113146125c6565b600b54610100900460ff1661136b5760405162461bcd60e51b815260206004820152601e60248201527f416c6c6f77206c697374206d696e74696e67206e6f7420656e61626c656400006044820152606401610c01565b8361ffff16611379846119a3565b6113839190613565565b34146113a15760405162461bcd60e51b8152600401610c019061357c565b60008461ffff16116113c55760405162461bcd60e51b8152600401610c01906135b3565b61ffff838116600090815260146020526040902054818616911610156113fd5760405162461bcd60e51b8152600401610c01906135ea565b81518461ffff16146114215760405162461bcd60e51b8152600401610c0190613621565b61142a826125f0565b6114465760405162461bcd60e51b8152600401610c0190613666565b600061ffff8516611470335b6001600160a01b031660009081526005602052604090205460c01c90565b61147a9190613694565b600954909150600160a01b900461ffff166001600160401b03821611156114e35760405162461bcd60e51b815260206004820152601e60248201527f45786365656473207065722061646472657373206d696e74206c696d697400006044820152606401610c01565b61156387878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600c5491503390505b604051602001611548919060609190911b6bffffffffffffffffffffffff1916815260140190565b60405160208183030381529060405280519060200120612664565b6115af5760405162461bcd60e51b815260206004820152601860248201527f41646472657373206e6f7420696e20616c6c6f776c69737400000000000000006044820152606401610c01565b6011546040516001600160a01b03909116903480156108fc02916000818181858888f193505050501580156115e8573d6000803e3d6000fd5b506115f8335b8661ffff1661267a565b6116028585612754565b61160d8584846127dc565b61163e335b6001600160a01b0316600090815260056020526040902080546001600160c01b031660c084901b179055565b50610fac6001600855565b6000610c658261241f565b61165c6125c6565b600b5465010000000000900460ff166116b75760405162461bcd60e51b815260206004820152601d60248201527f436c61696d73206275726e696e67206973206e6f7420656e61626c65640000006044820152606401610c01565b60005b818110156116f35760008383838181106116d6576116d66133ee565b9050602002013590506116ea81600161248e565b506001016116ba565b506011546040516001600160a01b03909116903480156108fc02916000818181858888f1935050505015801561172d573d6000803e3d6000fd5b506111c06001600855565b600e80546117459061338c565b80601f01602080910402602001604051908101604052809291908181526020018280546117719061338c565b80156117be5780601f10611793576101008083540402835291602001916117be565b820191906000526020600020905b8154815290600101906020018083116117a157829003601f168201915b505050505081565b60006001600160a01b0382166117ef576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b61181c61288f565b61182660006128bc565b565b6012546001600160a01b0316336001600160a01b03161461185b5760405162461bcd60e51b8152600401610c0190613364565b600b805462ff000019169055565b6012546001600160a01b0316336001600160a01b03161461189c5760405162461bcd60e51b8152600401610c0190613364565b600b805461ff001916610100179055565b6012546001600160a01b0316336001600160a01b0316146118e05760405162461bcd60e51b8152600401610c0190613364565b80518251146119015760405162461bcd60e51b8152600401610c01906133c6565b60005b82518161ffff16101561113057818161ffff1681518110611927576119276133ee565b602002602001015160146000858461ffff1681518110611949576119496133ee565b602002602001015161ffff1661ffff16815260200190815260200160002060006101000a81548161ffff021916908361ffff160217905550808061198c9061341a565b915050611904565b606060038054610c7a9061338c565b61ffff811660009081526016602052604081205481036119c557505060105490565b5061ffff1660009081526016602052604090205490565b6119e46125c6565b600b5460ff16611a365760405162461bcd60e51b815260206004820152601c60248201527f4172742050617373206d696e74696e67206e6f7420656e61626c6564000000006044820152606401610c01565b8361ffff16611a44846119a3565b611a4e9190613565565b3414611a6c5760405162461bcd60e51b8152600401610c019061357c565b60008461ffff1611611a905760405162461bcd60e51b8152600401610c01906135b3565b61ffff83811660009081526014602052604090205481861691161015611ac85760405162461bcd60e51b8152600401610c01906135ea565b81518461ffff1614611aec5760405162461bcd60e51b8152600401610c0190613621565b611af5826125f0565b611b115760405162461bcd60e51b8152600401610c0190613666565b61ffff8416611b1f336112db565b61ffff161015611b7c5760405162461bcd60e51b815260206004820152602260248201527f4578636565647320417274205061737320686f6c646572206d696e74206c696d6044820152611a5d60f21b6064820152608401610c01565b611bbd86868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600d549150339050611520565b611c025760405162461bcd60e51b81526020600482015260166024820152752737ba1030b71020b93a102830b9b9903437b63232b960511b6044820152606401610c01565b6011546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611c3b573d6000803e3d6000fd5b50611c4a338561ffff1661267a565b611c548484612754565b611c5f8483836127dc565b336000908152600a6020526040902054611c7d90859060010b6136bb565b336000908152600a60205260409020805461ffff191661ffff929092169190911790556001600855610fac565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6012546001600160a01b0316336001600160a01b031614611d495760405162461bcd60e51b8152600401610c0190613364565b600b805464ff0000000019169055565b611d64848484610e23565b6001600160a01b0383163b15611d9d57611d808484848461290e565b611d9d576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6012546001600160a01b0316336001600160a01b031614611dd65760405162461bcd60e51b8152600401610c0190613364565b8051825114611df75760405162461bcd60e51b8152600401610c01906133c6565b60005b81518161ffff16101561113057828161ffff1681518110611e1d57611e1d6133ee565b602002602001015160166000848461ffff1681518110611e3f57611e3f6133ee565b602002602001015161ffff1661ffff168152602001908152602001600020819055508080611e6c9061341a565b915050611dfa565b6012546001600160a01b0316336001600160a01b031614611ea75760405162461bcd60e51b8152600401610c0190613364565b600b805464ff000000001916640100000000179055565b6060611ec9826123ea565b611f0c5760405162461bcd60e51b8152602060048201526014602482015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b6044820152606401610c01565b600f5460009060ff16611f1f5782611f33565b60008381526015602052604090205461ffff165b9050600e611f40826129fa565b604051602001611f519291906136de565b604051602081830303815290604052915050919050565b6012546001600160a01b0316336001600160a01b031614611f9b5760405162461bcd60e51b8152600401610c0190613364565b600b805463ff00000019166301000000179055565b6012546001600160a01b0316336001600160a01b031614611fe35760405162461bcd60e51b8152600401610c0190613364565b600d55565b611ff06125c6565b600b5462010000900460ff1661203e5760405162461bcd60e51b8152602060048201526013602482015272135a5b9d1a5b99c81b9bdd08195b98589b1959606a1b6044820152606401610c01565b8361ffff1661204c846119a3565b6120569190613565565b34146120745760405162461bcd60e51b8152600401610c019061357c565b60008461ffff16116120985760405162461bcd60e51b8152600401610c01906135b3565b61ffff838116600090815260146020526040902054818616911610156120d05760405162461bcd60e51b8152600401610c01906135ea565b81518461ffff16146120f45760405162461bcd60e51b8152600401610c0190613621565b6120fd826125f0565b6121195760405162461bcd60e51b8152600401610c0190613666565b600061ffff851661212933611452565b6121339190613694565b600954909150600160a01b900461ffff166001600160401b038216111561219c5760405162461bcd60e51b815260206004820152601e60248201527f45786365656473207065722061646472657373206d696e74206c696d697400006044820152606401610c01565b6011546040516001600160a01b03909116903480156108fc02916000818181858888f193505050501580156121d5573d6000803e3d6000fd5b506121df336115ee565b6121e98585612754565b6121f48584846127dc565b6121fd33611612565b50611d9d6001600855565b6012546001600160a01b0316336001600160a01b03161461223b5760405162461bcd60e51b8152600401610c0190613364565b600b805465ff000000000019169055565b6012546001600160a01b0316336001600160a01b03161461227f5760405162461bcd60e51b8152600401610c0190613364565b600b805462ff0000191662010000179055565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6012546001600160a01b0316336001600160a01b0316146122f35760405162461bcd60e51b8152600401610c0190613364565b600c55565b61230061288f565b6001600160a01b03811661232a57604051631e4fbdf760e01b815260006004820152602401610c01565b6112d8816128bc565b6012546001600160a01b0316336001600160a01b0316146123665760405162461bcd60e51b8152600401610c0190613364565b601055565b6012546001600160a01b0316336001600160a01b03161461239e5760405162461bcd60e51b8152600401610c0190613364565b600b805461ff0019169055565b6012546001600160a01b0316336001600160a01b0316146123de5760405162461bcd60e51b8152600401610c0190613364565b600b805460ff19169055565b6000816001111580156123fe575060005482105b8015610c65575050600090815260046020526040902054600160e01b161590565b60008180600111612475576000548110156124755760008181526004602052604081205490600160e01b82169003612473575b80600003611305575060001901600081815260046020526040902054612452565b505b604051636f96cda160e11b815260040160405180910390fd5b60006124998361241f565b9050806000806124b786600090815260066020526040902080549091565b9150915084156124f7576124cc818433610e78565b6124f7576124da8333612292565b6124f757604051632ce44b5f60e11b815260040160405180910390fd5b801561250257600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040812091909155600160e11b851690036125905760018601600081815260046020526040812054900361258e57600054811461258e5760008181526004602052604090208590555b505b60405186906000906001600160a01b0386169060008051602061380d833981519152908390a45050600180548101905550505050565b6002600854036125e957604051633ee5aeb560e01b815260040160405180910390fd5b6002600855565b6000805b82518160ff16101561265b576000838260ff1681518110612617576126176133ee565b6020908102919091018101516000818152601890925260409091205490915060ff1615612648575060009392505050565b508061265381613765565b9150506125f4565b50600192915050565b6000826126718584612a8c565b14949350505050565b600080549082900361269f5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b1783179055828401908390839060008051602061380d8339815191528180a4600183015b81811461272a578083600060008051602061380d833981519152600080a4600101612704565b508160000361274b57604051622e076360e81b815260040160405180910390fd5b60005550505050565b61ffff80821660009081526014602052604090205461277591849116613784565b61ffff8281166000908152601460205260408120805461ffff1916938316939093179092558154908416906127aa919061379f565b90505b600054811015611130576000818152601560205260409020805461ffff191661ffff84161790556001016127ad565b6000808461ffff166127ed60005490565b6127f7919061379f565b90505b600054811015612888576000848360ff168151811061281b5761281b6133ee565b6020908102919091018101516000848152601783526040808220839055828252601890935291909120805460ff1916600117905590508315612872576000828152601960205260409020805460ff19168515151790555b8261287c81613765565b935050506001016127fa565b5050505050565b6009546001600160a01b031633146118265760405163118cdaa760e01b8152336004820152602401610c01565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906129439033908990889088906004016137b2565b6020604051808303816000875af192505050801561297e575060408051601f3d908101601f1916820190925261297b918101906137ef565b60015b6129dc573d8080156129ac576040519150601f19603f3d011682016040523d82523d6000602084013e6129b1565b606091505b5080516000036129d4576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b60606000612a0783612acf565b60010190506000816001600160401b03811115612a2657612a26612d4c565b6040519080825280601f01601f191660200182016040528015612a50576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612a5a57509392505050565b600081815b8451811015612ac757612abd82868381518110612ab057612ab06133ee565b6020026020010151612ba7565b9150600101612a91565b509392505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612b0e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612b3a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612b5857662386f26fc10000830492506010015b6305f5e1008310612b70576305f5e100830492506008015b6127108310612b8457612710830492506004015b60648310612b96576064830492506002015b600a8310610c655760010192915050565b6000818310612bc3576000828152602084905260409020611305565b5060009182526020526040902090565b6001600160e01b0319811681146112d857600080fd5b600060208284031215612bfb57600080fd5b813561130581612bd3565b60005b83811015612c21578181015183820152602001612c09565b50506000910152565b60008151808452612c42816020860160208601612c06565b601f01601f19169290920160200192915050565b6020815260006113056020830184612c2a565b600060208284031215612c7b57600080fd5b5035919050565b803561ffff81168114612c9457600080fd5b919050565b600060208284031215612cab57600080fd5b61130582612c82565b80356001600160a01b0381168114612c9457600080fd5b60008060408385031215612cde57600080fd5b612ce783612cb4565b946020939093013593505050565b600080600060608486031215612d0a57600080fd5b612d1384612cb4565b9250612d2160208501612cb4565b9150604084013590509250925092565b600060208284031215612d4357600080fd5b61130582612cb4565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612d8a57612d8a612d4c565b604052919050565b60006001600160401b03821115612dab57612dab612d4c565b5060051b60200190565b600082601f830112612dc657600080fd5b81356020612ddb612dd683612d92565b612d62565b8083825260208201915060208460051b870101935086841115612dfd57600080fd5b602086015b84811015612e295780358060010b8114612e1c5760008081fd5b8352918301918301612e02565b509695505050505050565b60008060408385031215612e4757600080fd5b82356001600160401b0380821115612e5e57600080fd5b818501915085601f830112612e7257600080fd5b81356020612e82612dd683612d92565b82815260059290921b84018101918181019089841115612ea157600080fd5b948201945b83861015612ec657612eb786612cb4565b82529482019490820190612ea6565b96505086013592505080821115612edc57600080fd5b50612ee985828601612db5565b9150509250929050565b60006001600160401b03831115612f0c57612f0c612d4c565b612f1f601f8401601f1916602001612d62565b9050828152838383011115612f3357600080fd5b828260208301376000602084830101529392505050565b600060208284031215612f5c57600080fd5b81356001600160401b03811115612f7257600080fd5b8201601f81018413612f8357600080fd5b6129f284823560208401612ef3565b60008083601f840112612fa457600080fd5b5081356001600160401b03811115612fbb57600080fd5b6020830191508360208260051b8501011115612fd657600080fd5b9250929050565b600082601f830112612fee57600080fd5b81356020612ffe612dd683612d92565b8083825260208201915060208460051b87010193508684111561302057600080fd5b602086015b84811015612e295780358352918301918301613025565b80358015158114612c9457600080fd5b60008060008060008060a0878903121561306557600080fd5b86356001600160401b038082111561307c57600080fd5b6130888a838b01612f92565b909850965086915061309c60208a01612c82565b95506130aa60408a01612c82565b945060608901359150808211156130c057600080fd5b506130cd89828a01612fdd565b9250506130dc6080880161303c565b90509295509295509295565b600080602083850312156130fb57600080fd5b82356001600160401b0381111561311157600080fd5b61311d85828601612f92565b90969095509350505050565b600082601f83011261313a57600080fd5b8135602061314a612dd683612d92565b8083825260208201915060208460051b87010193508684111561316c57600080fd5b602086015b84811015612e295761318281612c82565b8352918301918301613171565b600080604083850312156131a257600080fd5b82356001600160401b03808211156131b957600080fd5b6131c586838701613129565b935060208501359150808211156131db57600080fd5b50612ee985828601613129565b600080604083850312156131fb57600080fd5b61320483612cb4565b91506132126020840161303c565b90509250929050565b6000806000806080858703121561323157600080fd5b61323a85612cb4565b935061324860208601612cb4565b92506040850135915060608501356001600160401b0381111561326a57600080fd5b8501601f8101871361327b57600080fd5b61328a87823560208401612ef3565b91505092959194509250565b600080604083850312156132a957600080fd5b82356001600160401b03808211156132c057600080fd5b6131c586838701612fdd565b600080600080608085870312156132e257600080fd5b6132eb85612c82565b93506132f960208601612c82565b925060408501356001600160401b0381111561331457600080fd5b61332087828801612fdd565b92505061332f6060860161303c565b905092959194509250565b6000806040838503121561334d57600080fd5b61335683612cb4565b915061321260208401612cb4565b6020808252600e908201526d139bdd08105d5d1a1bdc9a5e995960921b604082015260600190565b600181811c908216806133a057607f821691505b6020821081036133c057634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600e908201526d1a5b98dbdc9c9958dd081b1a5cdd60921b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600061ffff80831681810361343157613431613404565b6001019392505050565b601f821115611130576000816000526020600020601f850160051c810160208610156134645750805b601f850160051c820191505b81811015610fac57828155600101613470565b81516001600160401b0381111561349c5761349c612d4c565b6134b0816134aa845461338c565b8461343b565b602080601f8311600181146134e557600084156134cd5750858301515b600019600386901b1c1916600185901b178555610fac565b600085815260208120601f198616915b82811015613514578886015182559484019460019091019084016134f5565b50858210156135325787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600181810b9083900b01617fff8113617fff1982121715610c6557610c65613404565b8082028115828204841417610c6557610c65613404565b6020808252601e908201527f496e636f727265637420616d6f756e74206f662065746865722073656e740000604082015260600190565b60208082526019908201527f4d757374206d696e7420706f73697469766520616d6f756e7400000000000000604082015260600190565b6020808252601c908201527f4d696e74206578636565647320636f6c6c656374696f6e2073697a6500000000604082015260600190565b60208082526025908201527f496e636f727265637420616d6f756e74206f6620746f6b656e20686173686573604082015264081cd95b9d60da1b606082015260800190565b602080825260149082015273088eae0d8d2c6c2e8ca40e8ded6cadc40d0c2e6d60631b604082015260600190565b6001600160401b038181168382160190808211156136b4576136b4613404565b5092915050565b600182810b9082900b03617fff198112617fff82131715610c6557610c65613404565b60008084546136ec8161338c565b60018281168015613704576001811461371957613748565b60ff1984168752821515830287019450613748565b8860005260208060002060005b8581101561373f5781548a820152908401908201613726565b50505082870194505b50505050835161375c818360208801612c06565b01949350505050565b600060ff821660ff810361377b5761377b613404565b60010192915050565b61ffff8281168282160390808211156136b4576136b4613404565b81810381811115610c6557610c65613404565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906137e590830184612c2a565b9695505050505050565b60006020828403121561380157600080fd5b815161130581612bd356feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa264697066735822122043860c0b2446e81816905a1bdf175974bf15b7e57d478fff4f7901abdd3262ba64736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001800ae9334407b944dfe482b7a9a7ba5c982610a06b09fed2c25cca6e764a46b8f90ae9334407b944dfe482b7a9a7ba5c982610a06b09fed2c25cca6e764a46b8f9000000000000000000000000a48832b6b1d9bf9d69a5c75dab1bd23b176015f600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000096000000000000000000000000000000000000000000000000000000000000000949636f6e69634e465400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005494d4e46540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006697066733a2f0000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name_ (string): IconicNFT
Arg [1] : symbol_ (string): IMNFT
Arg [2] : baseURI_ (string): ipfs:/
Arg [3] : artPassMerkleRoot_ (bytes32): 0x0ae9334407b944dfe482b7a9a7ba5c982610a06b09fed2c25cca6e764a46b8f9
Arg [4] : allowListMerkleRoot_ (bytes32): 0x0ae9334407b944dfe482b7a9a7ba5c982610a06b09fed2c25cca6e764a46b8f9
Arg [5] : iconicAddress_ (address): 0xA48832B6b1d9Bf9D69A5c75DaB1Bd23B176015f6
Arg [6] : mintPrice_ (uint256): 0
Arg [7] : editionSupply_ (uint16): 150
-----Encoded View---------------
14 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000180
Arg [3] : 0ae9334407b944dfe482b7a9a7ba5c982610a06b09fed2c25cca6e764a46b8f9
Arg [4] : 0ae9334407b944dfe482b7a9a7ba5c982610a06b09fed2c25cca6e764a46b8f9
Arg [5] : 000000000000000000000000a48832b6b1d9bf9d69a5c75dab1bd23b176015f6
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000096
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [9] : 49636f6e69634e46540000000000000000000000000000000000000000000000
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [11] : 494d4e4654000000000000000000000000000000000000000000000000000000
Arg [12] : 0000000000000000000000000000000000000000000000000000000000000006
Arg [13] : 697066733a2f0000000000000000000000000000000000000000000000000000
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.