ERC-721
Overview
Max Total Supply
16,999 $DANKS
Holders
2,077
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 $DANKSLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Danks
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.19; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; /** * @title A partial interface taken from the IDelegationRegistry by delegate.cash (CC0-1.0 Creative Commons license). */ interface IDelegationRegistry { function checkDelegateForContract(address delegate, address vault, address contract_) external returns (bool); } contract Danks is ERC721AQueryable, ERC2981, DefaultOperatorFilterer, Ownable { // Address constants. address private constant _DANKS_TEAM_ADDRESS = 0x0Fc518De2FFc1305BDd5d8beee0137EB924e69A2; address private constant _DANKS_DEPLOYER_ADDRESS = 0x118c5485b6b76cbc20e722C381B4F671f4c2e1ea; address private constant _WL_SNAPSHOT_CONTRACT_ADDRESS = 0xf7D134224A66C6A4DDeb7dEe714A280b99044805; address private constant _DELEGATION_REGISTRY_ADDRESS = 0x00000000000076A84feF008CDAbe6409d2FE638B; // Minting constants. uint256 public constant MAX_SUPPLY = 16999; uint256 public constant MAX_PUBLIC_MINT_AMOUNT = 25; // Core variables. string public baseUri; uint256 public price; bool public isMintEventActive; uint256 public mintEventStartTime; string public provenance; bytes32 public wlMerkleRoot; mapping(address => bool) public wlUsed; // Events. event PublicMint(address indexed owner, uint256 amount); event WlMint(address indexed owner, address indexed vault, uint256 amount); // Constructor. constructor( string memory _baseUri, bytes32 _wlMerkleRoot, uint256 _mintEventStartTime ) ERC721A("DANKS", "$DANKS") { setMintEventActive(false); setPrice(0.0069 ether); setBaseUri(_baseUri); setWlMerkleRoot(_wlMerkleRoot); setMintEventStartTime(_mintEventStartTime); setDefaultRoyalty(_DANKS_TEAM_ADDRESS, 500); } // OVERRIDES // Start token ID. function _startTokenId() internal view virtual override(ERC721A) returns (uint256) { return 1; } // Base URI. function _baseURI() internal view virtual override(ERC721A) returns (string memory) { return baseUri; } // OpenSea royalties. function setApprovalForAll(address operator, bool approved) public override(IERC721A, ERC721A) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public payable override(IERC721A, ERC721A) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom(address from, address to, uint256 tokenId) public payable override(IERC721A, ERC721A) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public payable override(IERC721A, ERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public payable override(IERC721A, ERC721A) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } function supportsInterface(bytes4 interfaceId) public view virtual override(IERC721A, ERC721A, ERC2981) returns (bool){ return ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId); } // PUBLIC FUNCTIONS. /** * @notice Public mint. * @param mintAmount the number of tokens to claim */ function publicMint(uint256 mintAmount) public payable { require(msg.sender == tx.origin, "Contract minting is not allowed"); require(isMintEventActive, "Mint event is not active"); require(block.timestamp >= mintEventStartTime, "Mint event has not started yet"); require(mintAmount <= MAX_PUBLIC_MINT_AMOUNT, "Mint would exceed max amount per mint"); require((_totalMinted() + mintAmount) <= MAX_SUPPLY, "Mint would exceed max supply"); require(msg.value >= (mintAmount * price), "ETH value sent is not correct"); _safeMint(msg.sender, mintAmount, ""); emit PublicMint(msg.sender, mintAmount); } /** * @notice WL mint. * @param vault if using delegate.cash (for contract or entire vault) - the address that held the tokens in the snapshot, if not using delegation - 0x000..000 or msg.sender. * @param mintAmount the number of tokens to claim * @param merkleProof the Merkle proof for this claimer */ function wlMint(address vault, uint mintAmount, bytes32[] calldata merkleProof) public payable { require(isMintEventActive, "Mint event is not active"); require(block.timestamp >= mintEventStartTime, "Mint event has not started yet"); require((_totalMinted() + mintAmount) <= MAX_SUPPLY, "Mint would exceed max supply"); address claimer = msg.sender; if (vault != address(0) && vault != msg.sender) { require( IDelegationRegistry(_DELEGATION_REGISTRY_ADDRESS).checkDelegateForContract(msg.sender, vault, _WL_SNAPSHOT_CONTRACT_ADDRESS), "Claimer is not allowed to act on behalf of the vault" ); claimer = vault; } bytes32 merkleLeaf = keccak256(abi.encodePacked(claimer, mintAmount)); require(MerkleProof.verify(merkleProof, wlMerkleRoot, merkleLeaf), "Invalid WL merkle proof"); require(!wlUsed[claimer], "WL mint allocation is already used"); wlUsed[claimer] = true; _safeMint(msg.sender, mintAmount, ""); emit WlMint(msg.sender, vault, mintAmount); } // OWNER FUNCTIONS. // Withdraw. function withdraw() public onlyOwner { uint256 balanceBps = address(this).balance / 10000; payable(_DANKS_TEAM_ADDRESS).transfer(balanceBps * 7000); payable(_DANKS_DEPLOYER_ADDRESS).transfer(balanceBps * 3000); } // Set price. function setPrice(uint256 _price) public onlyOwner { price = _price; } // Set base URI. function setBaseUri(string memory _uri) public onlyOwner { baseUri = _uri; } // Set mint event status. function setMintEventActive(bool _isActive) public onlyOwner { isMintEventActive = _isActive; } // Sent mint event start time. function setMintEventStartTime(uint256 _time) public onlyOwner { mintEventStartTime = _time; } // Set WL merkle tree root. function setWlMerkleRoot(bytes32 _wlMerkleRoot) public onlyOwner { wlMerkleRoot = _wlMerkleRoot; } // Set provenance. function setProvenance(string memory _provenance) public onlyOwner { provenance = _provenance; } // Set royalties info. function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner { _setDefaultRoyalty(receiver, feeNumerator); } function deleteDefaultRoyalty() public onlyOwner { _deleteDefaultRoyalty(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. 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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo( uint256 tokenId, uint256 salePrice ) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @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 Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be 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. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and 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). * * _Available since v4.7._ */ 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 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value 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) { 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. * * _Available since v4.7._ */ 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 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value 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) { unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // ERC721A Contracts 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; import './IERC721AQueryable.sol'; import '../ERC721A.sol'; /** * @title ERC721AQueryable. * * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable { /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) { TokenOwnership memory ownership; if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) { return ownership; } ownership = _ownershipAt(tokenId); if (ownership.burned) { return ownership; } return _ownershipOf(tokenId); } /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] calldata tokenIds) external view virtual override returns (TokenOwnership[] memory) { unchecked { uint256 tokenIdsLength = tokenIds.length; TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength); for (uint256 i; i != tokenIdsLength; ++i) { ownerships[i] = explicitOwnershipOf(tokenIds[i]); } return ownerships; } } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); uint256 tokenIdsIdx; uint256 stopLimit = _nextTokenId(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (start < stop) { uint256 rangeLength = stop - start; if (rangeLength < tokenIdsMaxLength) { tokenIdsMaxLength = rangeLength; } } else { tokenIdsMaxLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // We need to call `explicitOwnershipOf(start)`, // because the slot at `start` may not be initialized. TokenOwnership memory ownership = explicitOwnershipOf(start); address currOwnershipAddr; // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`. // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range. if (!ownership.burned) { currOwnershipAddr = ownership.addr; } for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; address currOwnershipAddr; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); TokenOwnership memory ownership; for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) { ownership = _ownershipAt(i); if (ownership.burned) { continue; } if (ownership.addr != address(0)) { currOwnershipAddr = ownership.addr; } if (currOwnershipAddr == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721AQueryable. */ interface IERC721AQueryable is IERC721A { /** * Invalid query range (`start` >= `stop`). */ error InvalidQueryRange(); /** * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting. * * If the `tokenId` is out of bounds: * * - `addr = address(0)` * - `startTimestamp = 0` * - `burned = false` * - `extraData = 0` * * If the `tokenId` is burned: * * - `addr = <Address of owner before token was burned>` * - `startTimestamp = <Timestamp when token was burned>` * - `burned = true` * - `extraData = <Extra data when token was burned>` * * Otherwise: * * - `addr = <Address of owner>` * - `startTimestamp = <Timestamp of start of ownership>` * - `burned = false` * - `extraData = <Extra data at start of ownership>` */ function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory); /** * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order. * See {ERC721AQueryable-explicitOwnershipOf} */ function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory); /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory); }
// 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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. * @dev Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { /// @dev The constructor that is called when the contract is being deployed. constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { /** * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns * true if supplied registrant address is not registered. */ function isOperatorAllowed(address registrant, address operator) external view returns (bool); /** * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner. */ function register(address registrant) external; /** * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes. */ function registerAndSubscribe(address registrant, address subscription) external; /** * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another * address without subscribing. */ function registerAndCopyEntries(address registrant, address registrantToCopy) external; /** * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner. * Note that this does not remove any filtered addresses or codeHashes. * Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes. */ function unregister(address addr) external; /** * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered. */ function updateOperator(address registrant, address operator, bool filtered) external; /** * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates. */ function updateOperators(address registrant, address[] calldata operators, bool filtered) external; /** * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered. */ function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; /** * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates. */ function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; /** * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous * subscription if present. * Note that accounts with subscriptions may go on to subscribe to other accounts - in this case, * subscriptions will not be forwarded. Instead the former subscription's existing entries will still be * used. */ function subscribe(address registrant, address registrantToSubscribe) external; /** * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes. */ function unsubscribe(address registrant, bool copyExistingEntries) external; /** * @notice Get the subscription address of a given registrant, if any. */ function subscriptionOf(address addr) external returns (address registrant); /** * @notice Get the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscribers(address registrant) external returns (address[] memory); /** * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscriberAt(address registrant, uint256 index) external returns (address); /** * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr. */ function copyEntriesOf(address registrant, address registrantToCopy) external; /** * @notice Returns true if operator is filtered by a given address or its subscription. */ function isOperatorFiltered(address registrant, address operator) external returns (bool); /** * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription. */ function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); /** * @notice Returns true if a codeHash is filtered by a given address or its subscription. */ function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); /** * @notice Returns a list of filtered operators for a given address or its subscription. */ function filteredOperators(address addr) external returns (address[] memory); /** * @notice Returns the set of filtered codeHashes for a given address or its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashes(address addr) external returns (bytes32[] memory); /** * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredOperatorAt(address registrant, uint256 index) external returns (address); /** * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); /** * @notice Returns true if an address has registered */ function isRegistered(address addr) external returns (bool); /** * @dev Convenience method to compute the code hash of an arbitrary contract */ function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E; address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. * Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract OperatorFilterer { /// @dev Emitted when an operator is not allowed. error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS); /// @dev The constructor that is called when the contract is being deployed. constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } /** * @dev A helper function to check if an operator is allowed. */ modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } /** * @dev A helper function to check if an operator approval is allowed. */ modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } /** * @dev A helper function to check if an operator is allowed. */ function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { // under normal circumstances, this function will revert rather than return false, but inheriting contracts // may specify their own OperatorFilterRegistry implementations, which may behave differently if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_baseUri","type":"string"},{"internalType":"bytes32","name":"_wlMerkleRoot","type":"bytes32"},{"internalType":"uint256","name":"_mintEventStartTime","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PublicMint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"vault","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WlMint","type":"event"},{"inputs":[],"name":"MAX_PUBLIC_MINT_AMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","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":[],"name":"deleteDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":"isMintEventActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintEventStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenance","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"mintAmount","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"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":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isActive","type":"bool"}],"name":"setMintEventActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_time","type":"uint256"}],"name":"setMintEventStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_provenance","type":"string"}],"name":"setProvenance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_wlMerkleRoot","type":"bytes32"}],"name":"setWlMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"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":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wlMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"vault","type":"address"},{"internalType":"uint256","name":"mintAmount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"wlMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"wlUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162005e5938038062005e598339818101604052810190620000379190620009a9565b733cc6cdda760b79bafa08df41ecfa224f810dceb660016040518060400160405280600581526020017f44414e4b530000000000000000000000000000000000000000000000000000008152506040518060400160405280600681526020017f2444414e4b5300000000000000000000000000000000000000000000000000008152508160029081620000cb919062000c65565b508060039081620000dd919062000c65565b50620000ee6200039b60201b60201c565b600081905550505060006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115620002eb578015620001b1576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff16637d3e3dbe30846040518363ffffffff1660e01b81526004016200017792919062000d91565b600060405180830381600087803b1580156200019257600080fd5b505af1158015620001a7573d6000803e3d6000fd5b50505050620002ea565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16146200026b576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663a0af290330846040518363ffffffff1660e01b81526004016200023192919062000d91565b600060405180830381600087803b1580156200024c57600080fd5b505af115801562000261573d6000803e3d6000fd5b50505050620002e9565b6daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff16634420e486306040518263ffffffff1660e01b8152600401620002b4919062000dbe565b600060405180830381600087803b158015620002cf57600080fd5b505af1158015620002e4573d6000803e3d6000fd5b505050505b5b5b50506200030d62000301620003a460201b60201c565b620003ac60201b60201c565b6200031f60006200047260201b60201c565b620003376618838370f340006200049f60201b60201c565b6200034883620004b960201b60201c565b6200035982620004de60201b60201c565b6200036a81620004f860201b60201c565b62000392730fc518de2ffc1305bdd5d8beee0137eb924e69a26101f46200051260201b60201c565b50505062000f68565b60006001905090565b600033905090565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b620004826200053860201b60201c565b80600d60006101000a81548160ff02191690831515021790555050565b620004af6200053860201b60201c565b80600c8190555050565b620004c96200053860201b60201c565b80600b9081620004da919062000c65565b5050565b620004ee6200053860201b60201c565b8060108190555050565b620005086200053860201b60201c565b80600e8190555050565b620005226200053860201b60201c565b620005348282620005c960201b60201c565b5050565b62000548620003a460201b60201c565b73ffffffffffffffffffffffffffffffffffffffff166200056e6200076c60201b60201c565b73ffffffffffffffffffffffffffffffffffffffff1614620005c7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620005be9062000e3c565b60405180910390fd5b565b620005d96200079660201b60201c565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156200063a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006319062000ed4565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603620006ac576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620006a39062000f46565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600860008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000612710905090565b6000604051905090565b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6200080982620007be565b810181811067ffffffffffffffff821117156200082b576200082a620007cf565b5b80604052505050565b600062000840620007a0565b90506200084e8282620007fe565b919050565b600067ffffffffffffffff821115620008715762000870620007cf565b5b6200087c82620007be565b9050602081019050919050565b60005b83811015620008a95780820151818401526020810190506200088c565b60008484015250505050565b6000620008cc620008c68462000853565b62000834565b905082815260208101848484011115620008eb57620008ea620007b9565b5b620008f884828562000889565b509392505050565b600082601f830112620009185762000917620007b4565b5b81516200092a848260208601620008b5565b91505092915050565b6000819050919050565b620009488162000933565b81146200095457600080fd5b50565b60008151905062000968816200093d565b92915050565b6000819050919050565b62000983816200096e565b81146200098f57600080fd5b50565b600081519050620009a38162000978565b92915050565b600080600060608486031215620009c557620009c4620007aa565b5b600084015167ffffffffffffffff811115620009e657620009e5620007af565b5b620009f48682870162000900565b935050602062000a078682870162000957565b925050604062000a1a8682870162000992565b9150509250925092565b600081519050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168062000a7757607f821691505b60208210810362000a8d5762000a8c62000a2f565b5b50919050565b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b60006008830262000af77fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8262000ab8565b62000b03868362000ab8565b95508019841693508086168417925050509392505050565b6000819050919050565b600062000b4662000b4062000b3a846200096e565b62000b1b565b6200096e565b9050919050565b6000819050919050565b62000b628362000b25565b62000b7a62000b718262000b4d565b84845462000ac5565b825550505050565b600090565b62000b9162000b82565b62000b9e81848462000b57565b505050565b5b8181101562000bc65762000bba60008262000b87565b60018101905062000ba4565b5050565b601f82111562000c155762000bdf8162000a93565b62000bea8462000aa8565b8101602085101562000bfa578190505b62000c1262000c098562000aa8565b83018262000ba3565b50505b505050565b600082821c905092915050565b600062000c3a6000198460080262000c1a565b1980831691505092915050565b600062000c55838362000c27565b9150826002028217905092915050565b62000c708262000a24565b67ffffffffffffffff81111562000c8c5762000c8b620007cf565b5b62000c98825462000a5e565b62000ca582828562000bca565b600060209050601f83116001811462000cdd576000841562000cc8578287015190505b62000cd4858262000c47565b86555062000d44565b601f19841662000ced8662000a93565b60005b8281101562000d175784890151825560018201915060208501945060208101905062000cf0565b8683101562000d37578489015162000d33601f89168262000c27565b8355505b6001600288020188555050505b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000d798262000d4c565b9050919050565b62000d8b8162000d6c565b82525050565b600060408201905062000da8600083018562000d80565b62000db7602083018462000d80565b9392505050565b600060208201905062000dd5600083018462000d80565b92915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600062000e2460208362000ddb565b915062000e318262000dec565b602082019050919050565b6000602082019050818103600083015262000e578162000e15565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b600062000ebc602a8362000ddb565b915062000ec98262000e5e565b604082019050919050565b6000602082019050818103600083015262000eef8162000ead565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b600062000f2e60198362000ddb565b915062000f3b8262000ef6565b602082019050919050565b6000602082019050818103600083015262000f618162000f1f565b9050919050565b614ee18062000f786000396000f3fe60806040526004361061025c5760003560e01c806370a0823111610144578063a035b1fe116100b6578063b88d4fde1161007a578063b88d4fde146108a6578063c23dc68f146108c2578063c87b56dd146108ff578063e985e9c51461093c578063f2fde38b14610979578063ffe630b5146109a25761025c565b8063a035b1fe146107e7578063a0bcfc7f14610812578063a22cb4651461083b578063aa1b103f14610864578063aefd1bc31461087b5761025c565b80638d427735116101085780638d427735146106d75780638da5cb5b1461070057806391b7f5ed1461072b57806395d89b411461075457806399a2557a1461077f5780639abc8320146107bc5761025c565b806370a08231146105f2578063715018a61461062f5780638462151c1461064657806389dd772e146106835780638ac1e161146106ae5761025c565b8063290dfa62116101dd57806341335c6c116101a157806341335c6c146104c957806341f434341461050657806342842e0e1461053157806354c06aee1461054d5780635bbb2177146105785780636352211e146105b55761025c565b8063290dfa62146104025780632a55205a1461042d5780632db115441461046b57806332cb6b0c146104875780633ccfd60b146104b25761025c565b80630dc4957d116102245780630dc4957d1461034b5780630f7309e81461037457806311564c511461039f57806318160ddd146103bb57806323b872dd146103e65761025c565b806301ffc9a71461026157806304634d8d1461029e57806306fdde03146102c7578063081812fc146102f2578063095ea7b31461032f575b600080fd5b34801561026d57600080fd5b50610288600480360381019061028391906134af565b6109cb565b60405161029591906134f7565b60405180910390f35b3480156102aa57600080fd5b506102c560048036038101906102c091906135b4565b6109ed565b005b3480156102d357600080fd5b506102dc610a03565b6040516102e99190613684565b60405180910390f35b3480156102fe57600080fd5b50610319600480360381019061031491906136dc565b610a95565b6040516103269190613718565b60405180910390f35b61034960048036038101906103449190613733565b610b14565b005b34801561035757600080fd5b50610372600480360381019061036d919061379f565b610b2d565b005b34801561038057600080fd5b50610389610b52565b6040516103969190613684565b60405180910390f35b6103b960048036038101906103b49190613831565b610be0565b005b3480156103c757600080fd5b506103d0611049565b6040516103dd91906138b4565b60405180910390f35b61040060048036038101906103fb91906138cf565b611060565b005b34801561040e57600080fd5b506104176110af565b60405161042491906138b4565b60405180910390f35b34801561043957600080fd5b50610454600480360381019061044f9190613922565b6110b5565b604051610462929190613962565b60405180910390f35b610485600480360381019061048091906136dc565b61129f565b005b34801561049357600080fd5b5061049c6114f7565b6040516104a991906138b4565b60405180910390f35b3480156104be57600080fd5b506104c76114fd565b005b3480156104d557600080fd5b506104f060048036038101906104eb919061398b565b6115ea565b6040516104fd91906134f7565b60405180910390f35b34801561051257600080fd5b5061051b61160a565b6040516105289190613a17565b60405180910390f35b61054b600480360381019061054691906138cf565b61161c565b005b34801561055957600080fd5b5061056261166b565b60405161056f9190613a4b565b60405180910390f35b34801561058457600080fd5b5061059f600480360381019061059a9190613abc565b611671565b6040516105ac9190613c6c565b60405180910390f35b3480156105c157600080fd5b506105dc60048036038101906105d791906136dc565b611734565b6040516105e99190613718565b60405180910390f35b3480156105fe57600080fd5b506106196004803603810190610614919061398b565b611746565b60405161062691906138b4565b60405180910390f35b34801561063b57600080fd5b506106446117fe565b005b34801561065257600080fd5b5061066d6004803603810190610668919061398b565b611812565b60405161067a9190613d4c565b60405180910390f35b34801561068f57600080fd5b50610698611955565b6040516106a591906134f7565b60405180910390f35b3480156106ba57600080fd5b506106d560048036038101906106d09190613d9a565b611968565b005b3480156106e357600080fd5b506106fe60048036038101906106f991906136dc565b61197a565b005b34801561070c57600080fd5b5061071561198c565b6040516107229190613718565b60405180910390f35b34801561073757600080fd5b50610752600480360381019061074d91906136dc565b6119b6565b005b34801561076057600080fd5b506107696119c8565b6040516107769190613684565b60405180910390f35b34801561078b57600080fd5b506107a660048036038101906107a19190613dc7565b611a5a565b6040516107b39190613d4c565b60405180910390f35b3480156107c857600080fd5b506107d1611c66565b6040516107de9190613684565b60405180910390f35b3480156107f357600080fd5b506107fc611cf4565b60405161080991906138b4565b60405180910390f35b34801561081e57600080fd5b5061083960048036038101906108349190613f4a565b611cfa565b005b34801561084757600080fd5b50610862600480360381019061085d9190613f93565b611d15565b005b34801561087057600080fd5b50610879611d2e565b005b34801561088757600080fd5b50610890611d40565b60405161089d91906138b4565b60405180910390f35b6108c060048036038101906108bb9190614074565b611d45565b005b3480156108ce57600080fd5b506108e960048036038101906108e491906136dc565b611d96565b6040516108f6919061414c565b60405180910390f35b34801561090b57600080fd5b50610926600480360381019061092191906136dc565b611e00565b6040516109339190613684565b60405180910390f35b34801561094857600080fd5b50610963600480360381019061095e9190614167565b611e9e565b60405161097091906134f7565b60405180910390f35b34801561098557600080fd5b506109a0600480360381019061099b919061398b565b611f32565b005b3480156109ae57600080fd5b506109c960048036038101906109c49190613f4a565b611fb5565b005b60006109d682611fd0565b806109e657506109e582612062565b5b9050919050565b6109f56120dc565b6109ff828261215a565b5050565b606060028054610a12906141d6565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3e906141d6565b8015610a8b5780601f10610a6057610100808354040283529160200191610a8b565b820191906000526020600020905b815481529060010190602001808311610a6e57829003601f168201915b5050505050905090565b6000610aa0826122ef565b610ad6576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610b1e8161234e565b610b28838361244b565b505050565b610b356120dc565b80600d60006101000a81548160ff02191690831515021790555050565b600f8054610b5f906141d6565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8b906141d6565b8015610bd85780601f10610bad57610100808354040283529160200191610bd8565b820191906000526020600020905b815481529060010190602001808311610bbb57829003601f168201915b505050505081565b600d60009054906101000a900460ff16610c2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2690614253565b60405180910390fd5b600e54421015610c74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6b906142bf565b60405180910390fd5b61426783610c8061258f565b610c8a919061430e565b1115610ccb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc29061438e565b60405180910390fd5b6000339050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614158015610d3957503373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15610e23576d76a84fef008cdabe6409d2fe638b73ffffffffffffffffffffffffffffffffffffffff166390c9a2d0338773f7d134224a66c6a4ddeb7dee714a280b990448056040518463ffffffff1660e01b8152600401610d9d939291906143ae565b6020604051808303816000875af1158015610dbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de091906143fa565b610e1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1690614499565b60405180910390fd5b8490505b60008185604051602001610e38929190614522565b604051602081830303815290604052805190602001209050610e9e848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050601054836125a2565b610edd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed49061459a565b60405180910390fd5b601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610f6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f619061462c565b60405180910390fd5b6001601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610fdc3386604051806020016040528060008152506125b9565b8573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f81605d578ca3fce61808c5d5643123a85f6eb6896ffd9d43fed1d83b2aa5cc418760405161103991906138b4565b60405180910390a3505050505050565b6000611053612656565b6001546000540303905090565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461109e5761109d3361234e565b5b6110a984848461265f565b50505050565b600e5481565b6000806000600960008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff160361124a5760086040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b6000611254612981565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff1686611280919061464c565b61128a91906146bd565b90508160000151819350935050509250929050565b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461130d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113049061473a565b60405180910390fd5b600d60009054906101000a900460ff1661135c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135390614253565b60405180910390fd5b600e544210156113a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611398906142bf565b60405180910390fd5b60198111156113e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113dc906147cc565b60405180910390fd5b614267816113f161258f565b6113fb919061430e565b111561143c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114339061438e565b60405180910390fd5b600c548161144a919061464c565b34101561148c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148390614838565b60405180910390fd5b6114a63382604051806020016040528060008152506125b9565b3373ffffffffffffffffffffffffffffffffffffffff167f748a2986091c2034d6e93b6f44f771a79f0e1d6acd8a60c68c17d4e1e2feaed2826040516114ec91906138b4565b60405180910390a250565b61426781565b6115056120dc565b60006127104761151591906146bd565b9050730fc518de2ffc1305bdd5d8beee0137eb924e69a273ffffffffffffffffffffffffffffffffffffffff166108fc611b5883611553919061464c565b9081150290604051600060405180830381858888f1935050505015801561157e573d6000803e3d6000fd5b5073118c5485b6b76cbc20e722c381b4f671f4c2e1ea73ffffffffffffffffffffffffffffffffffffffff166108fc610bb8836115bb919061464c565b9081150290604051600060405180830381858888f193505050501580156115e6573d6000803e3d6000fd5b5050565b60116020528060005260406000206000915054906101000a900460ff1681565b6daaeb6d7670e522a718067333cd4e81565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461165a576116593361234e565b5b61166584848461298b565b50505050565b60105481565b6060600083839050905060008167ffffffffffffffff81111561169757611696613e1f565b5b6040519080825280602002602001820160405280156116d057816020015b6116bd6133f4565b8152602001906001900390816116b55790505b50905060005b828114611728576116ff8686838181106116f3576116f2614858565b5b90506020020135611d96565b82828151811061171257611711614858565b5b60200260200101819052508060010190506116d6565b50809250505092915050565b600061173f826129ab565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036117ad576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b6118066120dc565b6118106000612a77565b565b6060600080600061182285611746565b905060008167ffffffffffffffff8111156118405761183f613e1f565b5b60405190808252806020026020018201604052801561186e5781602001602082028036833780820191505090505b5090506118796133f4565b6000611883612656565b90505b8386146119475761189681612b3d565b9150816040015161193c57600073ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff16146118e157816000015194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361193b578083878060010198508151811061192e5761192d614858565b5b6020026020010181815250505b5b806001019050611886565b508195505050505050919050565b600d60009054906101000a900460ff1681565b6119706120dc565b8060108190555050565b6119826120dc565b80600e8190555050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6119be6120dc565b80600c8190555050565b6060600380546119d7906141d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611a03906141d6565b8015611a505780601f10611a2557610100808354040283529160200191611a50565b820191906000526020600020905b815481529060010190602001808311611a3357829003601f168201915b5050505050905090565b6060818310611a95576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611aa0612b68565b9050611aaa612656565b851015611abc57611ab9612656565b94505b80841115611ac8578093505b6000611ad387611746565b905084861015611af6576000868603905081811015611af0578091505b50611afb565b600090505b60008167ffffffffffffffff811115611b1757611b16613e1f565b5b604051908082528060200260200182016040528015611b455781602001602082028036833780820191505090505b50905060008203611b5c5780945050505050611c5f565b6000611b6788611d96565b905060008160400151611b7c57816000015190505b60008990505b888114158015611b925750848714155b15611c5157611ba081612b3d565b92508260400151611c4657600073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff1614611beb57826000015191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611c455780848880600101995081518110611c3857611c37614858565b5b6020026020010181815250505b5b806001019050611b82565b508583528296505050505050505b9392505050565b600b8054611c73906141d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611c9f906141d6565b8015611cec5780601f10611cc157610100808354040283529160200191611cec565b820191906000526020600020905b815481529060010190602001808311611ccf57829003601f168201915b505050505081565b600c5481565b611d026120dc565b80600b9081611d119190614a29565b5050565b81611d1f8161234e565b611d298383612b71565b505050565b611d366120dc565b611d3e612c7c565b565b601981565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611d8357611d823361234e565b5b611d8f85858585612cc9565b5050505050565b611d9e6133f4565b611da66133f4565b611dae612656565b831080611dc25750611dbe612b68565b8310155b15611dd05780915050611dfb565b611dd983612b3d565b9050806040015115611dee5780915050611dfb565b611df783612d3c565b9150505b919050565b6060611e0b826122ef565b611e41576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611e4b612d5c565b90506000815103611e6b5760405180602001604052806000815250611e96565b80611e7584612dee565b604051602001611e86929190614b37565b6040516020818303038152906040525b915050919050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611f3a6120dc565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611fa9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fa090614bcd565b60405180910390fd5b611fb281612a77565b50565b611fbd6120dc565b80600f9081611fcc9190614a29565b5050565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061202b57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061205b5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806120d557506120d482612e3e565b5b9050919050565b6120e4612ea8565b73ffffffffffffffffffffffffffffffffffffffff1661210261198c565b73ffffffffffffffffffffffffffffffffffffffff1614612158576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161214f90614c39565b60405180910390fd5b565b612162612981565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156121c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121b790614ccb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361222f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161222690614d37565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600860008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b6000816122fa612656565b11158015612309575060005482105b8015612347575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b60006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115612448576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b81526004016123c5929190614d57565b602060405180830381865afa1580156123e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240691906143fa565b61244757806040517fede71dcc00000000000000000000000000000000000000000000000000000000815260040161243e9190613718565b60405180910390fd5b5b50565b600061245682611734565b90508073ffffffffffffffffffffffffffffffffffffffff16612477612eb0565b73ffffffffffffffffffffffffffffffffffffffff16146124da576124a38161249e612eb0565b611e9e565b6124d9576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6000612599612656565b60005403905090565b6000826125af8584612eb8565b1490509392505050565b6125c38383612f0e565b60008373ffffffffffffffffffffffffffffffffffffffff163b1461265157600080549050600083820390505b61260360008683806001019450866130c9565b612639576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181106125f057816000541461264e57600080fd5b50505b505050565b60006001905090565b600061266a826129ab565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146126d1576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806126dd84613219565b915091506126f381876126ee612eb0565b613240565b61273f5761270886612703612eb0565b611e9e565b61273e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036127a5576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6127b28686866001613284565b80156127bd57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001019190508190555061288b8561286788888761328a565b7c0200000000000000000000000000000000000000000000000000000000176132b2565b600460008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603612911576000600185019050600060046000838152602001908152602001600020540361290f57600054811461290e578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461297986868660016132dd565b505050505050565b6000612710905090565b6129a683838360405180602001604052806000815250611d45565b505050565b600080829050806129ba612656565b11612a4057600054811015612a3f5760006004600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603612a3d575b60008103612a33576004600083600190039350838152602001908152602001600020549050612a09565b8092505050612a72565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612b456133f4565b612b6160046000848152602001908152602001600020546132e3565b9050919050565b60008054905090565b8060076000612b7e612eb0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16612c2b612eb0565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612c7091906134f7565b60405180910390a35050565b6008600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff02191690555050565b612cd4848484611060565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612d3657612cff848484846130c9565b612d35576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b612d446133f4565b612d55612d50836129ab565b6132e3565b9050919050565b6060600b8054612d6b906141d6565b80601f0160208091040260200160405190810160405280929190818152602001828054612d97906141d6565b8015612de45780601f10612db957610100808354040283529160200191612de4565b820191906000526020600020905b815481529060010190602001808311612dc757829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b600115612e2957600184039350600a81066030018453600a8104905080612e07575b50828103602084039350808452505050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b600033905090565b60008082905060005b8451811015612f0357612eee82868381518110612ee157612ee0614858565b5b6020026020010151613399565b91508080612efb90614d80565b915050612ec1565b508091505092915050565b60008054905060008203612f4e576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612f5b6000848385613284565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612fd283612fc3600086600061328a565b612fcc856133c4565b176132b2565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b81811461307357808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050613038565b50600082036130ae576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190555050506130c460008483856132dd565b505050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a026130ef612eb0565b8786866040518563ffffffff1660e01b81526004016131119493929190614e1d565b6020604051808303816000875af192505050801561314d57506040513d601f19601f8201168201806040525081019061314a9190614e7e565b60015b6131c6573d806000811461317d576040519150601f19603f3d011682016040523d82523d6000602084013e613182565b606091505b5060008151036131be576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e86132a18686846133d4565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b6132eb6133f4565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b60008183106133b1576133ac82846133dd565b6133bc565b6133bb83836133dd565b5b905092915050565b60006001821460e11b9050919050565b60009392505050565b600082600052816020526040600020905092915050565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61348c81613457565b811461349757600080fd5b50565b6000813590506134a981613483565b92915050565b6000602082840312156134c5576134c461344d565b5b60006134d38482850161349a565b91505092915050565b60008115159050919050565b6134f1816134dc565b82525050565b600060208201905061350c60008301846134e8565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061353d82613512565b9050919050565b61354d81613532565b811461355857600080fd5b50565b60008135905061356a81613544565b92915050565b60006bffffffffffffffffffffffff82169050919050565b61359181613570565b811461359c57600080fd5b50565b6000813590506135ae81613588565b92915050565b600080604083850312156135cb576135ca61344d565b5b60006135d98582860161355b565b92505060206135ea8582860161359f565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561362e578082015181840152602081019050613613565b60008484015250505050565b6000601f19601f8301169050919050565b6000613656826135f4565b61366081856135ff565b9350613670818560208601613610565b6136798161363a565b840191505092915050565b6000602082019050818103600083015261369e818461364b565b905092915050565b6000819050919050565b6136b9816136a6565b81146136c457600080fd5b50565b6000813590506136d6816136b0565b92915050565b6000602082840312156136f2576136f161344d565b5b6000613700848285016136c7565b91505092915050565b61371281613532565b82525050565b600060208201905061372d6000830184613709565b92915050565b6000806040838503121561374a5761374961344d565b5b60006137588582860161355b565b9250506020613769858286016136c7565b9150509250929050565b61377c816134dc565b811461378757600080fd5b50565b60008135905061379981613773565b92915050565b6000602082840312156137b5576137b461344d565b5b60006137c38482850161378a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126137f1576137f06137cc565b5b8235905067ffffffffffffffff81111561380e5761380d6137d1565b5b60208301915083602082028301111561382a576138296137d6565b5b9250929050565b6000806000806060858703121561384b5761384a61344d565b5b60006138598782880161355b565b945050602061386a878288016136c7565b935050604085013567ffffffffffffffff81111561388b5761388a613452565b5b613897878288016137db565b925092505092959194509250565b6138ae816136a6565b82525050565b60006020820190506138c960008301846138a5565b92915050565b6000806000606084860312156138e8576138e761344d565b5b60006138f68682870161355b565b93505060206139078682870161355b565b9250506040613918868287016136c7565b9150509250925092565b600080604083850312156139395761393861344d565b5b6000613947858286016136c7565b9250506020613958858286016136c7565b9150509250929050565b60006040820190506139776000830185613709565b61398460208301846138a5565b9392505050565b6000602082840312156139a1576139a061344d565b5b60006139af8482850161355b565b91505092915050565b6000819050919050565b60006139dd6139d86139d384613512565b6139b8565b613512565b9050919050565b60006139ef826139c2565b9050919050565b6000613a01826139e4565b9050919050565b613a11816139f6565b82525050565b6000602082019050613a2c6000830184613a08565b92915050565b6000819050919050565b613a4581613a32565b82525050565b6000602082019050613a606000830184613a3c565b92915050565b60008083601f840112613a7c57613a7b6137cc565b5b8235905067ffffffffffffffff811115613a9957613a986137d1565b5b602083019150836020820283011115613ab557613ab46137d6565b5b9250929050565b60008060208385031215613ad357613ad261344d565b5b600083013567ffffffffffffffff811115613af157613af0613452565b5b613afd85828601613a66565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613b3e81613532565b82525050565b600067ffffffffffffffff82169050919050565b613b6181613b44565b82525050565b613b70816134dc565b82525050565b600062ffffff82169050919050565b613b8e81613b76565b82525050565b608082016000820151613baa6000850182613b35565b506020820151613bbd6020850182613b58565b506040820151613bd06040850182613b67565b506060820151613be36060850182613b85565b50505050565b6000613bf58383613b94565b60808301905092915050565b6000602082019050919050565b6000613c1982613b09565b613c238185613b14565b9350613c2e83613b25565b8060005b83811015613c5f578151613c468882613be9565b9750613c5183613c01565b925050600181019050613c32565b5085935050505092915050565b60006020820190508181036000830152613c868184613c0e565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613cc3816136a6565b82525050565b6000613cd58383613cba565b60208301905092915050565b6000602082019050919050565b6000613cf982613c8e565b613d038185613c99565b9350613d0e83613caa565b8060005b83811015613d3f578151613d268882613cc9565b9750613d3183613ce1565b925050600181019050613d12565b5085935050505092915050565b60006020820190508181036000830152613d668184613cee565b905092915050565b613d7781613a32565b8114613d8257600080fd5b50565b600081359050613d9481613d6e565b92915050565b600060208284031215613db057613daf61344d565b5b6000613dbe84828501613d85565b91505092915050565b600080600060608486031215613de057613ddf61344d565b5b6000613dee8682870161355b565b9350506020613dff868287016136c7565b9250506040613e10868287016136c7565b9150509250925092565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613e578261363a565b810181811067ffffffffffffffff82111715613e7657613e75613e1f565b5b80604052505050565b6000613e89613443565b9050613e958282613e4e565b919050565b600067ffffffffffffffff821115613eb557613eb4613e1f565b5b613ebe8261363a565b9050602081019050919050565b82818337600083830152505050565b6000613eed613ee884613e9a565b613e7f565b905082815260208101848484011115613f0957613f08613e1a565b5b613f14848285613ecb565b509392505050565b600082601f830112613f3157613f306137cc565b5b8135613f41848260208601613eda565b91505092915050565b600060208284031215613f6057613f5f61344d565b5b600082013567ffffffffffffffff811115613f7e57613f7d613452565b5b613f8a84828501613f1c565b91505092915050565b60008060408385031215613faa57613fa961344d565b5b6000613fb88582860161355b565b9250506020613fc98582860161378a565b9150509250929050565b600067ffffffffffffffff821115613fee57613fed613e1f565b5b613ff78261363a565b9050602081019050919050565b600061401761401284613fd3565b613e7f565b90508281526020810184848401111561403357614032613e1a565b5b61403e848285613ecb565b509392505050565b600082601f83011261405b5761405a6137cc565b5b813561406b848260208601614004565b91505092915050565b6000806000806080858703121561408e5761408d61344d565b5b600061409c8782880161355b565b94505060206140ad8782880161355b565b93505060406140be878288016136c7565b925050606085013567ffffffffffffffff8111156140df576140de613452565b5b6140eb87828801614046565b91505092959194509250565b60808201600082015161410d6000850182613b35565b5060208201516141206020850182613b58565b5060408201516141336040850182613b67565b5060608201516141466060850182613b85565b50505050565b600060808201905061416160008301846140f7565b92915050565b6000806040838503121561417e5761417d61344d565b5b600061418c8582860161355b565b925050602061419d8582860161355b565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806141ee57607f821691505b602082108103614201576142006141a7565b5b50919050565b7f4d696e74206576656e74206973206e6f74206163746976650000000000000000600082015250565b600061423d6018836135ff565b915061424882614207565b602082019050919050565b6000602082019050818103600083015261426c81614230565b9050919050565b7f4d696e74206576656e7420686173206e6f742073746172746564207965740000600082015250565b60006142a9601e836135ff565b91506142b482614273565b602082019050919050565b600060208201905081810360008301526142d88161429c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614319826136a6565b9150614324836136a6565b925082820190508082111561433c5761433b6142df565b5b92915050565b7f4d696e7420776f756c6420657863656564206d617820737570706c7900000000600082015250565b6000614378601c836135ff565b915061438382614342565b602082019050919050565b600060208201905081810360008301526143a78161436b565b9050919050565b60006060820190506143c36000830186613709565b6143d06020830185613709565b6143dd6040830184613709565b949350505050565b6000815190506143f481613773565b92915050565b6000602082840312156144105761440f61344d565b5b600061441e848285016143e5565b91505092915050565b7f436c61696d6572206973206e6f7420616c6c6f77656420746f20616374206f6e60008201527f20626568616c66206f6620746865207661756c74000000000000000000000000602082015250565b60006144836034836135ff565b915061448e82614427565b604082019050919050565b600060208201905081810360008301526144b281614476565b9050919050565b60008160601b9050919050565b60006144d1826144b9565b9050919050565b60006144e3826144c6565b9050919050565b6144fb6144f682613532565b6144d8565b82525050565b6000819050919050565b61451c614517826136a6565b614501565b82525050565b600061452e82856144ea565b60148201915061453e828461450b565b6020820191508190509392505050565b7f496e76616c696420574c206d65726b6c652070726f6f66000000000000000000600082015250565b60006145846017836135ff565b915061458f8261454e565b602082019050919050565b600060208201905081810360008301526145b381614577565b9050919050565b7f574c206d696e7420616c6c6f636174696f6e20697320616c726561647920757360008201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b60006146166022836135ff565b9150614621826145ba565b604082019050919050565b6000602082019050818103600083015261464581614609565b9050919050565b6000614657826136a6565b9150614662836136a6565b9250828202614670816136a6565b91508282048414831517614687576146866142df565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006146c8826136a6565b91506146d3836136a6565b9250826146e3576146e261468e565b5b828204905092915050565b7f436f6e7472616374206d696e74696e67206973206e6f7420616c6c6f77656400600082015250565b6000614724601f836135ff565b915061472f826146ee565b602082019050919050565b6000602082019050818103600083015261475381614717565b9050919050565b7f4d696e7420776f756c6420657863656564206d617820616d6f756e742070657260008201527f206d696e74000000000000000000000000000000000000000000000000000000602082015250565b60006147b66025836135ff565b91506147c18261475a565b604082019050919050565b600060208201905081810360008301526147e5816147a9565b9050919050565b7f4554482076616c75652073656e74206973206e6f7420636f7272656374000000600082015250565b6000614822601d836135ff565b915061482d826147ec565b602082019050919050565b6000602082019050818103600083015261485181614815565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026148e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826148ac565b6148f386836148ac565b95508019841693508086168417925050509392505050565b600061492661492161491c846136a6565b6139b8565b6136a6565b9050919050565b6000819050919050565b6149408361490b565b61495461494c8261492d565b8484546148b9565b825550505050565b600090565b61496961495c565b614974818484614937565b505050565b5b818110156149985761498d600082614961565b60018101905061497a565b5050565b601f8211156149dd576149ae81614887565b6149b78461489c565b810160208510156149c6578190505b6149da6149d28561489c565b830182614979565b50505b505050565b600082821c905092915050565b6000614a00600019846008026149e2565b1980831691505092915050565b6000614a1983836149ef565b9150826002028217905092915050565b614a32826135f4565b67ffffffffffffffff811115614a4b57614a4a613e1f565b5b614a5582546141d6565b614a6082828561499c565b600060209050601f831160018114614a935760008415614a81578287015190505b614a8b8582614a0d565b865550614af3565b601f198416614aa186614887565b60005b82811015614ac957848901518255600182019150602085019450602081019050614aa4565b86831015614ae65784890151614ae2601f8916826149ef565b8355505b6001600288020188555050505b505050505050565b600081905092915050565b6000614b11826135f4565b614b1b8185614afb565b9350614b2b818560208601613610565b80840191505092915050565b6000614b438285614b06565b9150614b4f8284614b06565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614bb76026836135ff565b9150614bc282614b5b565b604082019050919050565b60006020820190508181036000830152614be681614baa565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614c236020836135ff565b9150614c2e82614bed565b602082019050919050565b60006020820190508181036000830152614c5281614c16565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b6000614cb5602a836135ff565b9150614cc082614c59565b604082019050919050565b60006020820190508181036000830152614ce481614ca8565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b6000614d216019836135ff565b9150614d2c82614ceb565b602082019050919050565b60006020820190508181036000830152614d5081614d14565b9050919050565b6000604082019050614d6c6000830185613709565b614d796020830184613709565b9392505050565b6000614d8b826136a6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614dbd57614dbc6142df565b5b600182019050919050565b600081519050919050565b600082825260208201905092915050565b6000614def82614dc8565b614df98185614dd3565b9350614e09818560208601613610565b614e128161363a565b840191505092915050565b6000608082019050614e326000830187613709565b614e3f6020830186613709565b614e4c60408301856138a5565b8181036060830152614e5e8184614de4565b905095945050505050565b600081519050614e7881613483565b92915050565b600060208284031215614e9457614e9361344d565b5b6000614ea284828501614e69565b9150509291505056fea264697066735822122061ef02c87e8ed0f6b262a13095086f2f7a2aa1a1ab12b5e4c521cf56a226bbe864736f6c6343000813003300000000000000000000000000000000000000000000000000000000000000605997bab0574b6a3f234bc014017f75471e59b5e36849fbd3664eec27ad2a087f0000000000000000000000000000000000000000000000000000000064838970000000000000000000000000000000000000000000000000000000000000002068747470733a2f2f6170692e64616e6b732e6172742f76312f746f6b656e732f
Deployed Bytecode
0x60806040526004361061025c5760003560e01c806370a0823111610144578063a035b1fe116100b6578063b88d4fde1161007a578063b88d4fde146108a6578063c23dc68f146108c2578063c87b56dd146108ff578063e985e9c51461093c578063f2fde38b14610979578063ffe630b5146109a25761025c565b8063a035b1fe146107e7578063a0bcfc7f14610812578063a22cb4651461083b578063aa1b103f14610864578063aefd1bc31461087b5761025c565b80638d427735116101085780638d427735146106d75780638da5cb5b1461070057806391b7f5ed1461072b57806395d89b411461075457806399a2557a1461077f5780639abc8320146107bc5761025c565b806370a08231146105f2578063715018a61461062f5780638462151c1461064657806389dd772e146106835780638ac1e161146106ae5761025c565b8063290dfa62116101dd57806341335c6c116101a157806341335c6c146104c957806341f434341461050657806342842e0e1461053157806354c06aee1461054d5780635bbb2177146105785780636352211e146105b55761025c565b8063290dfa62146104025780632a55205a1461042d5780632db115441461046b57806332cb6b0c146104875780633ccfd60b146104b25761025c565b80630dc4957d116102245780630dc4957d1461034b5780630f7309e81461037457806311564c511461039f57806318160ddd146103bb57806323b872dd146103e65761025c565b806301ffc9a71461026157806304634d8d1461029e57806306fdde03146102c7578063081812fc146102f2578063095ea7b31461032f575b600080fd5b34801561026d57600080fd5b50610288600480360381019061028391906134af565b6109cb565b60405161029591906134f7565b60405180910390f35b3480156102aa57600080fd5b506102c560048036038101906102c091906135b4565b6109ed565b005b3480156102d357600080fd5b506102dc610a03565b6040516102e99190613684565b60405180910390f35b3480156102fe57600080fd5b50610319600480360381019061031491906136dc565b610a95565b6040516103269190613718565b60405180910390f35b61034960048036038101906103449190613733565b610b14565b005b34801561035757600080fd5b50610372600480360381019061036d919061379f565b610b2d565b005b34801561038057600080fd5b50610389610b52565b6040516103969190613684565b60405180910390f35b6103b960048036038101906103b49190613831565b610be0565b005b3480156103c757600080fd5b506103d0611049565b6040516103dd91906138b4565b60405180910390f35b61040060048036038101906103fb91906138cf565b611060565b005b34801561040e57600080fd5b506104176110af565b60405161042491906138b4565b60405180910390f35b34801561043957600080fd5b50610454600480360381019061044f9190613922565b6110b5565b604051610462929190613962565b60405180910390f35b610485600480360381019061048091906136dc565b61129f565b005b34801561049357600080fd5b5061049c6114f7565b6040516104a991906138b4565b60405180910390f35b3480156104be57600080fd5b506104c76114fd565b005b3480156104d557600080fd5b506104f060048036038101906104eb919061398b565b6115ea565b6040516104fd91906134f7565b60405180910390f35b34801561051257600080fd5b5061051b61160a565b6040516105289190613a17565b60405180910390f35b61054b600480360381019061054691906138cf565b61161c565b005b34801561055957600080fd5b5061056261166b565b60405161056f9190613a4b565b60405180910390f35b34801561058457600080fd5b5061059f600480360381019061059a9190613abc565b611671565b6040516105ac9190613c6c565b60405180910390f35b3480156105c157600080fd5b506105dc60048036038101906105d791906136dc565b611734565b6040516105e99190613718565b60405180910390f35b3480156105fe57600080fd5b506106196004803603810190610614919061398b565b611746565b60405161062691906138b4565b60405180910390f35b34801561063b57600080fd5b506106446117fe565b005b34801561065257600080fd5b5061066d6004803603810190610668919061398b565b611812565b60405161067a9190613d4c565b60405180910390f35b34801561068f57600080fd5b50610698611955565b6040516106a591906134f7565b60405180910390f35b3480156106ba57600080fd5b506106d560048036038101906106d09190613d9a565b611968565b005b3480156106e357600080fd5b506106fe60048036038101906106f991906136dc565b61197a565b005b34801561070c57600080fd5b5061071561198c565b6040516107229190613718565b60405180910390f35b34801561073757600080fd5b50610752600480360381019061074d91906136dc565b6119b6565b005b34801561076057600080fd5b506107696119c8565b6040516107769190613684565b60405180910390f35b34801561078b57600080fd5b506107a660048036038101906107a19190613dc7565b611a5a565b6040516107b39190613d4c565b60405180910390f35b3480156107c857600080fd5b506107d1611c66565b6040516107de9190613684565b60405180910390f35b3480156107f357600080fd5b506107fc611cf4565b60405161080991906138b4565b60405180910390f35b34801561081e57600080fd5b5061083960048036038101906108349190613f4a565b611cfa565b005b34801561084757600080fd5b50610862600480360381019061085d9190613f93565b611d15565b005b34801561087057600080fd5b50610879611d2e565b005b34801561088757600080fd5b50610890611d40565b60405161089d91906138b4565b60405180910390f35b6108c060048036038101906108bb9190614074565b611d45565b005b3480156108ce57600080fd5b506108e960048036038101906108e491906136dc565b611d96565b6040516108f6919061414c565b60405180910390f35b34801561090b57600080fd5b50610926600480360381019061092191906136dc565b611e00565b6040516109339190613684565b60405180910390f35b34801561094857600080fd5b50610963600480360381019061095e9190614167565b611e9e565b60405161097091906134f7565b60405180910390f35b34801561098557600080fd5b506109a0600480360381019061099b919061398b565b611f32565b005b3480156109ae57600080fd5b506109c960048036038101906109c49190613f4a565b611fb5565b005b60006109d682611fd0565b806109e657506109e582612062565b5b9050919050565b6109f56120dc565b6109ff828261215a565b5050565b606060028054610a12906141d6565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3e906141d6565b8015610a8b5780601f10610a6057610100808354040283529160200191610a8b565b820191906000526020600020905b815481529060010190602001808311610a6e57829003601f168201915b5050505050905090565b6000610aa0826122ef565b610ad6576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6006600083815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b81610b1e8161234e565b610b28838361244b565b505050565b610b356120dc565b80600d60006101000a81548160ff02191690831515021790555050565b600f8054610b5f906141d6565b80601f0160208091040260200160405190810160405280929190818152602001828054610b8b906141d6565b8015610bd85780601f10610bad57610100808354040283529160200191610bd8565b820191906000526020600020905b815481529060010190602001808311610bbb57829003601f168201915b505050505081565b600d60009054906101000a900460ff16610c2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2690614253565b60405180910390fd5b600e54421015610c74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c6b906142bf565b60405180910390fd5b61426783610c8061258f565b610c8a919061430e565b1115610ccb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cc29061438e565b60405180910390fd5b6000339050600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614158015610d3957503373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b15610e23576d76a84fef008cdabe6409d2fe638b73ffffffffffffffffffffffffffffffffffffffff166390c9a2d0338773f7d134224a66c6a4ddeb7dee714a280b990448056040518463ffffffff1660e01b8152600401610d9d939291906143ae565b6020604051808303816000875af1158015610dbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de091906143fa565b610e1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e1690614499565b60405180910390fd5b8490505b60008185604051602001610e38929190614522565b604051602081830303815290604052805190602001209050610e9e848480806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f82011690508083019250505050505050601054836125a2565b610edd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed49061459a565b60405180910390fd5b601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610f6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f619061462c565b60405180910390fd5b6001601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550610fdc3386604051806020016040528060008152506125b9565b8573ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f81605d578ca3fce61808c5d5643123a85f6eb6896ffd9d43fed1d83b2aa5cc418760405161103991906138b4565b60405180910390a3505050505050565b6000611053612656565b6001546000540303905090565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461109e5761109d3361234e565b5b6110a984848461265f565b50505050565b600e5481565b6000806000600960008681526020019081526020016000206040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff16815250509050600073ffffffffffffffffffffffffffffffffffffffff16816000015173ffffffffffffffffffffffffffffffffffffffff160361124a5760086040518060400160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016000820160149054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff168152505090505b6000611254612981565b6bffffffffffffffffffffffff1682602001516bffffffffffffffffffffffff1686611280919061464c565b61128a91906146bd565b90508160000151819350935050509250929050565b3273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461130d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113049061473a565b60405180910390fd5b600d60009054906101000a900460ff1661135c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135390614253565b60405180910390fd5b600e544210156113a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611398906142bf565b60405180910390fd5b60198111156113e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113dc906147cc565b60405180910390fd5b614267816113f161258f565b6113fb919061430e565b111561143c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114339061438e565b60405180910390fd5b600c548161144a919061464c565b34101561148c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148390614838565b60405180910390fd5b6114a63382604051806020016040528060008152506125b9565b3373ffffffffffffffffffffffffffffffffffffffff167f748a2986091c2034d6e93b6f44f771a79f0e1d6acd8a60c68c17d4e1e2feaed2826040516114ec91906138b4565b60405180910390a250565b61426781565b6115056120dc565b60006127104761151591906146bd565b9050730fc518de2ffc1305bdd5d8beee0137eb924e69a273ffffffffffffffffffffffffffffffffffffffff166108fc611b5883611553919061464c565b9081150290604051600060405180830381858888f1935050505015801561157e573d6000803e3d6000fd5b5073118c5485b6b76cbc20e722c381b4f671f4c2e1ea73ffffffffffffffffffffffffffffffffffffffff166108fc610bb8836115bb919061464c565b9081150290604051600060405180830381858888f193505050501580156115e6573d6000803e3d6000fd5b5050565b60116020528060005260406000206000915054906101000a900460ff1681565b6daaeb6d7670e522a718067333cd4e81565b823373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161461165a576116593361234e565b5b61166584848461298b565b50505050565b60105481565b6060600083839050905060008167ffffffffffffffff81111561169757611696613e1f565b5b6040519080825280602002602001820160405280156116d057816020015b6116bd6133f4565b8152602001906001900390816116b55790505b50905060005b828114611728576116ff8686838181106116f3576116f2614858565b5b90506020020135611d96565b82828151811061171257611711614858565b5b60200260200101819052508060010190506116d6565b50809250505092915050565b600061173f826129ab565b9050919050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036117ad576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b67ffffffffffffffff600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054169050919050565b6118066120dc565b6118106000612a77565b565b6060600080600061182285611746565b905060008167ffffffffffffffff8111156118405761183f613e1f565b5b60405190808252806020026020018201604052801561186e5781602001602082028036833780820191505090505b5090506118796133f4565b6000611883612656565b90505b8386146119475761189681612b3d565b9150816040015161193c57600073ffffffffffffffffffffffffffffffffffffffff16826000015173ffffffffffffffffffffffffffffffffffffffff16146118e157816000015194505b8773ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff160361193b578083878060010198508151811061192e5761192d614858565b5b6020026020010181815250505b5b806001019050611886565b508195505050505050919050565b600d60009054906101000a900460ff1681565b6119706120dc565b8060108190555050565b6119826120dc565b80600e8190555050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6119be6120dc565b80600c8190555050565b6060600380546119d7906141d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611a03906141d6565b8015611a505780601f10611a2557610100808354040283529160200191611a50565b820191906000526020600020905b815481529060010190602001808311611a3357829003601f168201915b5050505050905090565b6060818310611a95576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080611aa0612b68565b9050611aaa612656565b851015611abc57611ab9612656565b94505b80841115611ac8578093505b6000611ad387611746565b905084861015611af6576000868603905081811015611af0578091505b50611afb565b600090505b60008167ffffffffffffffff811115611b1757611b16613e1f565b5b604051908082528060200260200182016040528015611b455781602001602082028036833780820191505090505b50905060008203611b5c5780945050505050611c5f565b6000611b6788611d96565b905060008160400151611b7c57816000015190505b60008990505b888114158015611b925750848714155b15611c5157611ba081612b3d565b92508260400151611c4657600073ffffffffffffffffffffffffffffffffffffffff16836000015173ffffffffffffffffffffffffffffffffffffffff1614611beb57826000015191505b8a73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611c455780848880600101995081518110611c3857611c37614858565b5b6020026020010181815250505b5b806001019050611b82565b508583528296505050505050505b9392505050565b600b8054611c73906141d6565b80601f0160208091040260200160405190810160405280929190818152602001828054611c9f906141d6565b8015611cec5780601f10611cc157610100808354040283529160200191611cec565b820191906000526020600020905b815481529060010190602001808311611ccf57829003601f168201915b505050505081565b600c5481565b611d026120dc565b80600b9081611d119190614a29565b5050565b81611d1f8161234e565b611d298383612b71565b505050565b611d366120dc565b611d3e612c7c565b565b601981565b833373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611d8357611d823361234e565b5b611d8f85858585612cc9565b5050505050565b611d9e6133f4565b611da66133f4565b611dae612656565b831080611dc25750611dbe612b68565b8310155b15611dd05780915050611dfb565b611dd983612b3d565b9050806040015115611dee5780915050611dfb565b611df783612d3c565b9150505b919050565b6060611e0b826122ef565b611e41576040517fa14c4b5000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611e4b612d5c565b90506000815103611e6b5760405180602001604052806000815250611e96565b80611e7584612dee565b604051602001611e86929190614b37565b6040516020818303038152906040525b915050919050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b611f3a6120dc565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611fa9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fa090614bcd565b60405180910390fd5b611fb281612a77565b50565b611fbd6120dc565b80600f9081611fcc9190614a29565b5050565b60006301ffc9a760e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061202b57506380ac58cd60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b8061205b5750635b5e139f60e01b827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916145b9050919050565b60007f2a55205a000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806120d557506120d482612e3e565b5b9050919050565b6120e4612ea8565b73ffffffffffffffffffffffffffffffffffffffff1661210261198c565b73ffffffffffffffffffffffffffffffffffffffff1614612158576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161214f90614c39565b60405180910390fd5b565b612162612981565b6bffffffffffffffffffffffff16816bffffffffffffffffffffffff1611156121c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121b790614ccb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361222f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161222690614d37565b60405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001826bffffffffffffffffffffffff16815250600860008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160000160146101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055509050505050565b6000816122fa612656565b11158015612309575060005482105b8015612347575060007c0100000000000000000000000000000000000000000000000000000000600460008581526020019081526020016000205416145b9050919050565b60006daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff163b1115612448576daaeb6d7670e522a718067333cd4e73ffffffffffffffffffffffffffffffffffffffff1663c617113430836040518363ffffffff1660e01b81526004016123c5929190614d57565b602060405180830381865afa1580156123e2573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061240691906143fa565b61244757806040517fede71dcc00000000000000000000000000000000000000000000000000000000815260040161243e9190613718565b60405180910390fd5b5b50565b600061245682611734565b90508073ffffffffffffffffffffffffffffffffffffffff16612477612eb0565b73ffffffffffffffffffffffffffffffffffffffff16146124da576124a38161249e612eb0565b611e9e565b6124d9576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b826006600084815260200190815260200160002060000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550818373ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a4505050565b6000612599612656565b60005403905090565b6000826125af8584612eb8565b1490509392505050565b6125c38383612f0e565b60008373ffffffffffffffffffffffffffffffffffffffff163b1461265157600080549050600083820390505b61260360008683806001019450866130c9565b612639576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8181106125f057816000541461264e57600080fd5b50505b505050565b60006001905090565b600061266a826129ab565b90508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146126d1576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806126dd84613219565b915091506126f381876126ee612eb0565b613240565b61273f5761270886612703612eb0565b611e9e565b61273e576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16036127a5576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6127b28686866001613284565b80156127bd57600082555b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001900391905081905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081546001019190508190555061288b8561286788888761328a565b7c0200000000000000000000000000000000000000000000000000000000176132b2565b600460008681526020019081526020016000208190555060007c0200000000000000000000000000000000000000000000000000000000841603612911576000600185019050600060046000838152602001908152602001600020540361290f57600054811461290e578360046000838152602001908152602001600020819055505b5b505b838573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a461297986868660016132dd565b505050505050565b6000612710905090565b6129a683838360405180602001604052806000815250611d45565b505050565b600080829050806129ba612656565b11612a4057600054811015612a3f5760006004600083815260200190815260200160002054905060007c0100000000000000000000000000000000000000000000000000000000821603612a3d575b60008103612a33576004600083600190039350838152602001908152602001600020549050612a09565b8092505050612a72565b505b5b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b919050565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612b456133f4565b612b6160046000848152602001908152602001600020546132e3565b9050919050565b60008054905090565b8060076000612b7e612eb0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16612c2b612eb0565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051612c7091906134f7565b60405180910390a35050565b6008600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556000820160146101000a8154906bffffffffffffffffffffffff02191690555050565b612cd4848484611060565b60008373ffffffffffffffffffffffffffffffffffffffff163b14612d3657612cff848484846130c9565b612d35576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5b50505050565b612d446133f4565b612d55612d50836129ab565b6132e3565b9050919050565b6060600b8054612d6b906141d6565b80601f0160208091040260200160405190810160405280929190818152602001828054612d97906141d6565b8015612de45780601f10612db957610100808354040283529160200191612de4565b820191906000526020600020905b815481529060010190602001808311612dc757829003601f168201915b5050505050905090565b606060a060405101806040526020810391506000825281835b600115612e2957600184039350600a81066030018453600a8104905080612e07575b50828103602084039350808452505050919050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b600033905090565b600033905090565b60008082905060005b8451811015612f0357612eee82868381518110612ee157612ee0614858565b5b6020026020010151613399565b91508080612efb90614d80565b915050612ec1565b508091505092915050565b60008054905060008203612f4e576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b612f5b6000848385613284565b600160406001901b178202600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550612fd283612fc3600086600061328a565b612fcc856133c4565b176132b2565b6004600083815260200190815260200160002081905550600080838301905073ffffffffffffffffffffffffffffffffffffffff85169150828260007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600183015b81811461307357808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600181019050613038565b50600082036130ae576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8060008190555050506130c460008483856132dd565b505050565b60008373ffffffffffffffffffffffffffffffffffffffff1663150b7a026130ef612eb0565b8786866040518563ffffffff1660e01b81526004016131119493929190614e1d565b6020604051808303816000875af192505050801561314d57506040513d601f19601f8201168201806040525081019061314a9190614e7e565b60015b6131c6573d806000811461317d576040519150601f19603f3d011682016040523d82523d6000602084013e613182565b606091505b5060008151036131be576040517fd1a57ed600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805181602001fd5b63150b7a0260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614915050949350505050565b60008060006006600085815260200190815260200160002090508092508254915050915091565b600073ffffffffffffffffffffffffffffffffffffffff8316925073ffffffffffffffffffffffffffffffffffffffff821691508382148383141790509392505050565b50505050565b60008060e883901c905060e86132a18686846133d4565b62ffffff16901b9150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff83169250814260a01b178317905092915050565b50505050565b6132eb6133f4565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060a082901c816020019067ffffffffffffffff16908167ffffffffffffffff168152505060007c01000000000000000000000000000000000000000000000000000000008316141581604001901515908115158152505060e882901c816060019062ffffff16908162ffffff1681525050919050565b60008183106133b1576133ac82846133dd565b6133bc565b6133bb83836133dd565b5b905092915050565b60006001821460e11b9050919050565b60009392505050565b600082600052816020526040600020905092915050565b6040518060800160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600067ffffffffffffffff168152602001600015158152602001600062ffffff1681525090565b6000604051905090565b600080fd5b600080fd5b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61348c81613457565b811461349757600080fd5b50565b6000813590506134a981613483565b92915050565b6000602082840312156134c5576134c461344d565b5b60006134d38482850161349a565b91505092915050565b60008115159050919050565b6134f1816134dc565b82525050565b600060208201905061350c60008301846134e8565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061353d82613512565b9050919050565b61354d81613532565b811461355857600080fd5b50565b60008135905061356a81613544565b92915050565b60006bffffffffffffffffffffffff82169050919050565b61359181613570565b811461359c57600080fd5b50565b6000813590506135ae81613588565b92915050565b600080604083850312156135cb576135ca61344d565b5b60006135d98582860161355b565b92505060206135ea8582860161359f565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561362e578082015181840152602081019050613613565b60008484015250505050565b6000601f19601f8301169050919050565b6000613656826135f4565b61366081856135ff565b9350613670818560208601613610565b6136798161363a565b840191505092915050565b6000602082019050818103600083015261369e818461364b565b905092915050565b6000819050919050565b6136b9816136a6565b81146136c457600080fd5b50565b6000813590506136d6816136b0565b92915050565b6000602082840312156136f2576136f161344d565b5b6000613700848285016136c7565b91505092915050565b61371281613532565b82525050565b600060208201905061372d6000830184613709565b92915050565b6000806040838503121561374a5761374961344d565b5b60006137588582860161355b565b9250506020613769858286016136c7565b9150509250929050565b61377c816134dc565b811461378757600080fd5b50565b60008135905061379981613773565b92915050565b6000602082840312156137b5576137b461344d565b5b60006137c38482850161378a565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f8401126137f1576137f06137cc565b5b8235905067ffffffffffffffff81111561380e5761380d6137d1565b5b60208301915083602082028301111561382a576138296137d6565b5b9250929050565b6000806000806060858703121561384b5761384a61344d565b5b60006138598782880161355b565b945050602061386a878288016136c7565b935050604085013567ffffffffffffffff81111561388b5761388a613452565b5b613897878288016137db565b925092505092959194509250565b6138ae816136a6565b82525050565b60006020820190506138c960008301846138a5565b92915050565b6000806000606084860312156138e8576138e761344d565b5b60006138f68682870161355b565b93505060206139078682870161355b565b9250506040613918868287016136c7565b9150509250925092565b600080604083850312156139395761393861344d565b5b6000613947858286016136c7565b9250506020613958858286016136c7565b9150509250929050565b60006040820190506139776000830185613709565b61398460208301846138a5565b9392505050565b6000602082840312156139a1576139a061344d565b5b60006139af8482850161355b565b91505092915050565b6000819050919050565b60006139dd6139d86139d384613512565b6139b8565b613512565b9050919050565b60006139ef826139c2565b9050919050565b6000613a01826139e4565b9050919050565b613a11816139f6565b82525050565b6000602082019050613a2c6000830184613a08565b92915050565b6000819050919050565b613a4581613a32565b82525050565b6000602082019050613a606000830184613a3c565b92915050565b60008083601f840112613a7c57613a7b6137cc565b5b8235905067ffffffffffffffff811115613a9957613a986137d1565b5b602083019150836020820283011115613ab557613ab46137d6565b5b9250929050565b60008060208385031215613ad357613ad261344d565b5b600083013567ffffffffffffffff811115613af157613af0613452565b5b613afd85828601613a66565b92509250509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613b3e81613532565b82525050565b600067ffffffffffffffff82169050919050565b613b6181613b44565b82525050565b613b70816134dc565b82525050565b600062ffffff82169050919050565b613b8e81613b76565b82525050565b608082016000820151613baa6000850182613b35565b506020820151613bbd6020850182613b58565b506040820151613bd06040850182613b67565b506060820151613be36060850182613b85565b50505050565b6000613bf58383613b94565b60808301905092915050565b6000602082019050919050565b6000613c1982613b09565b613c238185613b14565b9350613c2e83613b25565b8060005b83811015613c5f578151613c468882613be9565b9750613c5183613c01565b925050600181019050613c32565b5085935050505092915050565b60006020820190508181036000830152613c868184613c0e565b905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613cc3816136a6565b82525050565b6000613cd58383613cba565b60208301905092915050565b6000602082019050919050565b6000613cf982613c8e565b613d038185613c99565b9350613d0e83613caa565b8060005b83811015613d3f578151613d268882613cc9565b9750613d3183613ce1565b925050600181019050613d12565b5085935050505092915050565b60006020820190508181036000830152613d668184613cee565b905092915050565b613d7781613a32565b8114613d8257600080fd5b50565b600081359050613d9481613d6e565b92915050565b600060208284031215613db057613daf61344d565b5b6000613dbe84828501613d85565b91505092915050565b600080600060608486031215613de057613ddf61344d565b5b6000613dee8682870161355b565b9350506020613dff868287016136c7565b9250506040613e10868287016136c7565b9150509250925092565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b613e578261363a565b810181811067ffffffffffffffff82111715613e7657613e75613e1f565b5b80604052505050565b6000613e89613443565b9050613e958282613e4e565b919050565b600067ffffffffffffffff821115613eb557613eb4613e1f565b5b613ebe8261363a565b9050602081019050919050565b82818337600083830152505050565b6000613eed613ee884613e9a565b613e7f565b905082815260208101848484011115613f0957613f08613e1a565b5b613f14848285613ecb565b509392505050565b600082601f830112613f3157613f306137cc565b5b8135613f41848260208601613eda565b91505092915050565b600060208284031215613f6057613f5f61344d565b5b600082013567ffffffffffffffff811115613f7e57613f7d613452565b5b613f8a84828501613f1c565b91505092915050565b60008060408385031215613faa57613fa961344d565b5b6000613fb88582860161355b565b9250506020613fc98582860161378a565b9150509250929050565b600067ffffffffffffffff821115613fee57613fed613e1f565b5b613ff78261363a565b9050602081019050919050565b600061401761401284613fd3565b613e7f565b90508281526020810184848401111561403357614032613e1a565b5b61403e848285613ecb565b509392505050565b600082601f83011261405b5761405a6137cc565b5b813561406b848260208601614004565b91505092915050565b6000806000806080858703121561408e5761408d61344d565b5b600061409c8782880161355b565b94505060206140ad8782880161355b565b93505060406140be878288016136c7565b925050606085013567ffffffffffffffff8111156140df576140de613452565b5b6140eb87828801614046565b91505092959194509250565b60808201600082015161410d6000850182613b35565b5060208201516141206020850182613b58565b5060408201516141336040850182613b67565b5060608201516141466060850182613b85565b50505050565b600060808201905061416160008301846140f7565b92915050565b6000806040838503121561417e5761417d61344d565b5b600061418c8582860161355b565b925050602061419d8582860161355b565b9150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806141ee57607f821691505b602082108103614201576142006141a7565b5b50919050565b7f4d696e74206576656e74206973206e6f74206163746976650000000000000000600082015250565b600061423d6018836135ff565b915061424882614207565b602082019050919050565b6000602082019050818103600083015261426c81614230565b9050919050565b7f4d696e74206576656e7420686173206e6f742073746172746564207965740000600082015250565b60006142a9601e836135ff565b91506142b482614273565b602082019050919050565b600060208201905081810360008301526142d88161429c565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000614319826136a6565b9150614324836136a6565b925082820190508082111561433c5761433b6142df565b5b92915050565b7f4d696e7420776f756c6420657863656564206d617820737570706c7900000000600082015250565b6000614378601c836135ff565b915061438382614342565b602082019050919050565b600060208201905081810360008301526143a78161436b565b9050919050565b60006060820190506143c36000830186613709565b6143d06020830185613709565b6143dd6040830184613709565b949350505050565b6000815190506143f481613773565b92915050565b6000602082840312156144105761440f61344d565b5b600061441e848285016143e5565b91505092915050565b7f436c61696d6572206973206e6f7420616c6c6f77656420746f20616374206f6e60008201527f20626568616c66206f6620746865207661756c74000000000000000000000000602082015250565b60006144836034836135ff565b915061448e82614427565b604082019050919050565b600060208201905081810360008301526144b281614476565b9050919050565b60008160601b9050919050565b60006144d1826144b9565b9050919050565b60006144e3826144c6565b9050919050565b6144fb6144f682613532565b6144d8565b82525050565b6000819050919050565b61451c614517826136a6565b614501565b82525050565b600061452e82856144ea565b60148201915061453e828461450b565b6020820191508190509392505050565b7f496e76616c696420574c206d65726b6c652070726f6f66000000000000000000600082015250565b60006145846017836135ff565b915061458f8261454e565b602082019050919050565b600060208201905081810360008301526145b381614577565b9050919050565b7f574c206d696e7420616c6c6f636174696f6e20697320616c726561647920757360008201527f6564000000000000000000000000000000000000000000000000000000000000602082015250565b60006146166022836135ff565b9150614621826145ba565b604082019050919050565b6000602082019050818103600083015261464581614609565b9050919050565b6000614657826136a6565b9150614662836136a6565b9250828202614670816136a6565b91508282048414831517614687576146866142df565b5b5092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006146c8826136a6565b91506146d3836136a6565b9250826146e3576146e261468e565b5b828204905092915050565b7f436f6e7472616374206d696e74696e67206973206e6f7420616c6c6f77656400600082015250565b6000614724601f836135ff565b915061472f826146ee565b602082019050919050565b6000602082019050818103600083015261475381614717565b9050919050565b7f4d696e7420776f756c6420657863656564206d617820616d6f756e742070657260008201527f206d696e74000000000000000000000000000000000000000000000000000000602082015250565b60006147b66025836135ff565b91506147c18261475a565b604082019050919050565b600060208201905081810360008301526147e5816147a9565b9050919050565b7f4554482076616c75652073656e74206973206e6f7420636f7272656374000000600082015250565b6000614822601d836135ff565b915061482d826147ec565b602082019050919050565b6000602082019050818103600083015261485181614815565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008190508160005260206000209050919050565b60006020601f8301049050919050565b600082821b905092915050565b6000600883026148e97fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff826148ac565b6148f386836148ac565b95508019841693508086168417925050509392505050565b600061492661492161491c846136a6565b6139b8565b6136a6565b9050919050565b6000819050919050565b6149408361490b565b61495461494c8261492d565b8484546148b9565b825550505050565b600090565b61496961495c565b614974818484614937565b505050565b5b818110156149985761498d600082614961565b60018101905061497a565b5050565b601f8211156149dd576149ae81614887565b6149b78461489c565b810160208510156149c6578190505b6149da6149d28561489c565b830182614979565b50505b505050565b600082821c905092915050565b6000614a00600019846008026149e2565b1980831691505092915050565b6000614a1983836149ef565b9150826002028217905092915050565b614a32826135f4565b67ffffffffffffffff811115614a4b57614a4a613e1f565b5b614a5582546141d6565b614a6082828561499c565b600060209050601f831160018114614a935760008415614a81578287015190505b614a8b8582614a0d565b865550614af3565b601f198416614aa186614887565b60005b82811015614ac957848901518255600182019150602085019450602081019050614aa4565b86831015614ae65784890151614ae2601f8916826149ef565b8355505b6001600288020188555050505b505050505050565b600081905092915050565b6000614b11826135f4565b614b1b8185614afb565b9350614b2b818560208601613610565b80840191505092915050565b6000614b438285614b06565b9150614b4f8284614b06565b91508190509392505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000614bb76026836135ff565b9150614bc282614b5b565b604082019050919050565b60006020820190508181036000830152614be681614baa565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000614c236020836135ff565b9150614c2e82614bed565b602082019050919050565b60006020820190508181036000830152614c5281614c16565b9050919050565b7f455243323938313a20726f79616c7479206665652077696c6c2065786365656460008201527f2073616c65507269636500000000000000000000000000000000000000000000602082015250565b6000614cb5602a836135ff565b9150614cc082614c59565b604082019050919050565b60006020820190508181036000830152614ce481614ca8565b9050919050565b7f455243323938313a20696e76616c696420726563656976657200000000000000600082015250565b6000614d216019836135ff565b9150614d2c82614ceb565b602082019050919050565b60006020820190508181036000830152614d5081614d14565b9050919050565b6000604082019050614d6c6000830185613709565b614d796020830184613709565b9392505050565b6000614d8b826136a6565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614dbd57614dbc6142df565b5b600182019050919050565b600081519050919050565b600082825260208201905092915050565b6000614def82614dc8565b614df98185614dd3565b9350614e09818560208601613610565b614e128161363a565b840191505092915050565b6000608082019050614e326000830187613709565b614e3f6020830186613709565b614e4c60408301856138a5565b8181036060830152614e5e8184614de4565b905095945050505050565b600081519050614e7881613483565b92915050565b600060208284031215614e9457614e9361344d565b5b6000614ea284828501614e69565b9150509291505056fea264697066735822122061ef02c87e8ed0f6b262a13095086f2f7a2aa1a1ab12b5e4c521cf56a226bbe864736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000605997bab0574b6a3f234bc014017f75471e59b5e36849fbd3664eec27ad2a087f0000000000000000000000000000000000000000000000000000000064838970000000000000000000000000000000000000000000000000000000000000002068747470733a2f2f6170692e64616e6b732e6172742f76312f746f6b656e732f
-----Decoded View---------------
Arg [0] : _baseUri (string): https://api.danks.art/v1/tokens/
Arg [1] : _wlMerkleRoot (bytes32): 0x5997bab0574b6a3f234bc014017f75471e59b5e36849fbd3664eec27ad2a087f
Arg [2] : _mintEventStartTime (uint256): 1686342000
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 5997bab0574b6a3f234bc014017f75471e59b5e36849fbd3664eec27ad2a087f
Arg [2] : 0000000000000000000000000000000000000000000000000000000064838970
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [4] : 68747470733a2f2f6170692e64616e6b732e6172742f76312f746f6b656e732f
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.