ERC-721
Overview
Max Total Supply
3,333 DUDS
Holders
749
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 DUDSLoading...
Loading
Loading...
Loading
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
duds
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // ██████████████ // ███████████████████ // ██████████████████████ // ████████████████████████ // ██████████████████████████ // ██████████████████████████ // ██████████ ██████████████ // █████████ ██ // █████████ █████ █████ // ████████████████ █████████ // ███████████ █ ████ ██ ██ // ████ ███ ██ ████ █ // ██ █ ███ ██ ██ █ ██ // ███ ████ ███ ██ ██ // ██████████████████████ // ███████████████████████ // ████████████████ ███████ // ███████████████████████████ // ███████ ██████████████████ // ██████████ ███████████████ // ████████████████ ██████ // █████████████ ██████ ███████████ // ███████████████████ ███████████████████████ pragma solidity ^0.8.24; import "erc721a/contracts/ERC721A.sol"; import "erc721a/contracts/extensions/ERC721AQueryable.sol"; import "erc721a/contracts/extensions/ERC721ABurnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/interfaces/IERC20.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; contract duds is ERC721AQueryable, ERC721ABurnable, ReentrancyGuard, Ownable, ERC2981 { uint256 private numFreeMint; uint256 private numAllowlistMint; bytes32 private merkleRootFree; bytes32 private merkleRootAllowlist; bool private isFreeMintActive = false; bool private isAllowlistMintActive = false; bool private isMintActive = false; uint256 private reservedFreeMint = 333; uint256 private maxAllowlistMint = 3000; uint256 private collectionSize = 3333; uint16 private maxPerWalletFreeMint = 1; uint256 private maxPerWalletAllowlist = 10; uint256 private maxPerWallet = 15; uint256 private allowlistMintPrice = 10 ether; uint256 private publicMintPrice = 15 ether; string private _baseTokenURI = ""; bool public isTradingEnabled = false; constructor() ERC721A("duds", "DUDS") Ownable(msg.sender) { _setDefaultRoyalty(0x972Cf275d3629Aa959A2FF7D127b070de0917425, 333); } function pack(uint16 a, uint16 b, uint16 c) internal pure returns (uint64) { return (uint64(a) << 32) | (uint64(b) << 16) | uint64(c); } function unpack(uint64 a) internal pure returns (uint16, uint16, uint16) { return (uint16(a >> 32), uint16(a >> 16), uint16(a)); } function increaseFreeMints(address account) internal { ( uint16 senderFreeMints, uint16 senderAllowlistMints, uint16 senderGifts ) = unpack(_getAux(account)); _setAux( account, pack( senderFreeMints + 1, senderAllowlistMints, senderGifts ) ); } function increaseAllowlistMints(address account, uint256 quantity) internal { ( uint16 senderFreeMints, uint16 senderAllowlistMints, uint16 senderGifts ) = unpack(_getAux(account)); _setAux( account, pack( senderFreeMints, senderAllowlistMints + uint16(quantity), senderGifts ) ); } function increaseGifts(address account, uint256 quantity) internal { ( uint16 senderFreeMints, uint16 senderAllowlistMints, uint16 senderGifts ) = unpack(_getAux(account)); _setAux( account, pack( senderFreeMints, senderAllowlistMints, senderGifts + uint16(quantity) ) ); } modifier callerIsUser() { require(tx.origin == msg.sender, "The caller is another contract."); _; } modifier freeMintActive() { require(isFreeMintActive, "Free mint is not open."); _; } modifier allowlistMintActive() { require(isAllowlistMintActive, "Allowlist mint is not open."); _; } modifier publicMintActive() { require(isMintActive, "Mint is not open."); _; } modifier isValidMerkleProof(bytes32[] calldata merkleProof, bytes32 root) { require( MerkleProof.verify( merkleProof, root, keccak256(abi.encodePacked(msg.sender)) ), "Address does not exist in this allowlist." ); _; } modifier freeMintLeft() { require( numFreeMint + 1 <= reservedFreeMint, "There are no free mint tokens left." ); _; } modifier allowlistMintLeft(uint256 quantity) { require( numAllowlistMint + quantity <= maxAllowlistMint, "There are no allowlist mint tokens left." ); _; } modifier mintLeft(uint256 quantity) { require( totalSupply() + quantity <= collectionSize - (reservedFreeMint - numFreeMint), "There are no tokens left to mint." ); _; } modifier lessThanMaxPerWalletFree() { (uint16 senderFreeMints, , ) = unpack(_getAux(msg.sender)); require( senderFreeMints < maxPerWalletFreeMint, "This wallet has reached its maximum allocation of free mint tokens." ); _; } modifier lessThanMaxPerWalletAllowlist(uint256 quantity) { (, uint16 senderAllowlistMints, ) = unpack(_getAux(msg.sender)); require( senderAllowlistMints + quantity <= maxPerWalletAllowlist, "This wallet has reached its maximum allocation of allowlist tokens." ); _; } modifier lessThanMaxPerWallet(uint256 quantity) { ( uint16 senderFreeMints, uint16 senderAllowlistMints, uint16 senderGifts ) = unpack(_getAux(msg.sender)); require( _numberMinted(msg.sender) + quantity <= maxPerWallet + senderFreeMints + senderAllowlistMints + senderGifts, "This wallet has reached its maximum allocation of tokens." ); _; } modifier isCorrectPayment(uint256 price, uint256 quantity) { require(price * quantity == msg.value, "Incorrect amount of ETH sent."); _; } function freeMint( bytes32[] calldata merkleProof ) external payable nonReentrant callerIsUser freeMintActive isValidMerkleProof(merkleProof, merkleRootFree) freeMintLeft mintLeft(1) lessThanMaxPerWalletFree { numFreeMint += 1; increaseFreeMints(msg.sender); _safeMint(msg.sender, 1); } function allowlistMint( uint256 quantity, bytes32[] calldata merkleProof ) external payable nonReentrant callerIsUser allowlistMintActive isValidMerkleProof(merkleProof, merkleRootAllowlist) allowlistMintLeft(quantity) mintLeft(quantity) lessThanMaxPerWalletAllowlist(quantity) isCorrectPayment(allowlistMintPrice, quantity) { numAllowlistMint += quantity; increaseAllowlistMints(msg.sender, quantity); payable(owner()).transfer(msg.value); _safeMint(msg.sender, quantity); } function mint( uint256 quantity ) external payable nonReentrant callerIsUser publicMintActive mintLeft(quantity) lessThanMaxPerWallet(quantity) isCorrectPayment(publicMintPrice, quantity) { payable(owner()).transfer(msg.value); _safeMint(msg.sender, quantity); } function gift( address[] calldata addresses ) external nonReentrant onlyOwner mintLeft(addresses.length) { uint256 numToGift = addresses.length; for (uint256 i = 0; i < numToGift; i++) { increaseGifts(addresses[i], 1); _safeMint(addresses[i], 1); } } function giftMultiple( address[] calldata addresses, uint256[] calldata quantities ) external nonReentrant onlyOwner { require( addresses.length == quantities.length, "The number of recipients and quantities must be the same." ); uint256 totalGifts = 0; for (uint256 i = 0; i < quantities.length; i++) { totalGifts += quantities[i]; } require( totalSupply() + totalGifts <= collectionSize, "There are no tokens left to mint." ); for (uint256 i = 0; i < addresses.length; i++) { increaseGifts(addresses[i], quantities[i]); _safeMint(addresses[i], quantities[i]); } } function numberMinted(address owner) public view returns (uint256) { return _numberMinted(owner); } function getNumFreeMint() public view returns (uint256) { return numFreeMint; } function getNumAllowlistMint() public view returns (uint256) { return numAllowlistMint; } function getFreeMerkleRoot() public view returns (bytes32) { return merkleRootFree; } function getAllowlistMerkleRoot() public view returns (bytes32) { return merkleRootAllowlist; } function getIsFreeMintActive() public view returns (bool) { return isFreeMintActive; } function getIsAllowlistMintActive() public view returns (bool) { return isAllowlistMintActive; } function getIsMintActive() public view returns (bool) { return isMintActive; } function getReservedFreeMint() public view returns (uint256) { return reservedFreeMint; } function getMaxAllowlistMint() public view returns (uint256) { return maxAllowlistMint; } function getCollectionSize() public view returns (uint256) { return collectionSize; } function getMaxPerWalletFreeMint() public view returns (uint16) { return maxPerWalletFreeMint; } function getMaxPerWalletAllowlist() public view returns (uint256) { return maxPerWalletAllowlist; } function getMaxPerWallet() public view returns (uint256) { return maxPerWallet; } function getAllowlistMintPrice() public view returns (uint256) { return allowlistMintPrice; } function getPublicMintPrice() public view returns (uint256) { return publicMintPrice; } function getOwnerAllowlistFreeMintCount( address owner ) public view returns (uint16) { (uint16 ownerAllowlistFreeMints, , ) = unpack(_getAux(owner)); return ownerAllowlistFreeMints; } function getOwnerAllowlistMintCount( address owner ) public view returns (uint16) { (, uint16 ownerAllowlistMints, ) = unpack(_getAux(owner)); return ownerAllowlistMints; } function getOwnerGiftsCount(address owner) public view returns (uint16) { (, , uint16 ownerGifts) = unpack(_getAux(owner)); return ownerGifts; } function tokenURI( uint256 tokenId ) public view virtual override(IERC721A, ERC721A) returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId), ".json")) : ""; } function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; } function setFreeMerkleRoot(bytes32 _merkleRootFree) external onlyOwner { merkleRootFree = _merkleRootFree; } function setAllowlistMerkleRoot( bytes32 _merkleRootAllowlist ) external onlyOwner { merkleRootAllowlist = _merkleRootAllowlist; } function setFreeMintActive(bool _isFreeMintActive) external onlyOwner { isFreeMintActive = _isFreeMintActive; } function setAllowlistMintActive( bool _isAllowlistMintActive ) external onlyOwner { isAllowlistMintActive = _isAllowlistMintActive; } function setMintActive(bool _isMintActive) external onlyOwner { isMintActive = _isMintActive; } function setReservedFreeMint(uint256 _reservedFreeMint) external onlyOwner { require( _reservedFreeMint >= numFreeMint, "Cannot set reserved free mint to less than the number of free mint tokens already minted." ); reservedFreeMint = _reservedFreeMint; } function setMaxPerWalletFreeMint(uint16 _maxPerWalletFreeMint) external onlyOwner { maxPerWalletFreeMint = _maxPerWalletFreeMint; } function setMaxAllowlistMint(uint256 _maxAllowlistMint) external onlyOwner { require( _maxAllowlistMint >= numAllowlistMint, "Cannot set max allowlist mint to less than the number of allowlist mint tokens already minted." ); maxAllowlistMint = _maxAllowlistMint; } function setCollectionSize(uint256 _collectionSize) external onlyOwner { require( _collectionSize <= collectionSize, "Cannot increase collection size." ); require( _collectionSize >= totalSupply(), "Cannot set collection size to less than the number of tokens already minted." ); collectionSize = _collectionSize; } function setMaxPerWalletAllowlist( uint256 _maxPerWalletAllowlist ) external onlyOwner { maxPerWalletAllowlist = _maxPerWalletAllowlist; } function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner { maxPerWallet = _maxPerWallet; } function setAllowlistMintPrice( uint256 _allowlistMintPrice ) external onlyOwner { allowlistMintPrice = _allowlistMintPrice; } function setPublicMintPrice(uint256 _publicMintPrice) external onlyOwner { publicMintPrice = _publicMintPrice; } function setBaseURI(string calldata baseURI) external onlyOwner { _baseTokenURI = baseURI; } function withdraw() external onlyOwner nonReentrant { uint256 balance = address(this).balance; require(balance > 0, "No balance to withdraw"); uint256 amountToSend = balance; (bool success, ) = msg.sender.call{value: amountToSend}(""); require(success, "Transfer failed"); } function withdrawTokens(IERC20 token) external onlyOwner nonReentrant { token.transfer(msg.sender, token.balanceOf(address(this))); } function supportsInterface( bytes4 interfaceId ) public view virtual override(IERC721A, ERC721A, ERC2981) returns (bool) { return ERC721A.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId); } function setDefaultRoyalty( address receiver, uint96 feeNumerator ) public onlyOwner { _setDefaultRoyalty(receiver, feeNumerator); } function setTradingEnabled(bool _enabled) external onlyOwner { isTradingEnabled = _enabled; } function setApprovalForAll(address operator, bool approved) public override(ERC721A, IERC721A) { require(isTradingEnabled, "Trading not enabled yet"); super.setApprovalForAll(operator, approved); } function approve(address to, uint256 tokenId) public payable override(ERC721A, IERC721A) { require(isTradingEnabled, "Trading not enabled yet"); super.approve(to, tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.20; import {IERC165} from "../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. */ 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 v5.0.0) (token/common/ERC2981.sol) pragma solidity ^0.8.20; import {IERC2981} from "../../interfaces/IERC2981.sol"; import {IERC165, ERC165} from "../../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. */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 tokenId => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev The default royalty set is invalid (eg. (numerator / denominator) >= 1). */ error ERC2981InvalidDefaultRoyalty(uint256 numerator, uint256 denominator); /** * @dev The default royalty receiver is invalid. */ error ERC2981InvalidDefaultRoyaltyReceiver(address receiver); /** * @dev The royalty set for an specific `tokenId` is invalid (eg. (numerator / denominator) >= 1). */ error ERC2981InvalidTokenRoyalty(uint256 tokenId, uint256 numerator, uint256 denominator); /** * @dev The royalty receiver for `tokenId` is invalid. */ error ERC2981InvalidTokenRoyaltyReceiver(uint256 tokenId, address receiver); /** * @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 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 { uint256 denominator = _feeDenominator(); if (feeNumerator > denominator) { // Royalty fee will exceed the sale price revert ERC2981InvalidDefaultRoyalty(feeNumerator, denominator); } if (receiver == address(0)) { revert ERC2981InvalidDefaultRoyaltyReceiver(address(0)); } _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 { uint256 denominator = _feeDenominator(); if (feeNumerator > denominator) { // Royalty fee will exceed the sale price revert ERC2981InvalidTokenRoyalty(tokenId, feeNumerator, denominator); } if (receiver == address(0)) { revert ERC2981InvalidTokenRoyaltyReceiver(tokenId, address(0)); } _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.20; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the Merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates Merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** *@dev The multiproof provided is not valid. */ error MerkleProofInvalidMultiproof(); /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify(bytes32[] memory proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} */ function verifyCalldata(bytes32[] calldata proof, bytes32 root, bytes32 leaf) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all Merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the Merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { if (proofPos != proofLen) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all Merkle trees admit multiproofs. See {processMultiProof} for details. */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuilds the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the Merkle tree. uint256 leavesLen = leaves.length; uint256 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value from the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? (leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]) : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { if (proofPos != proofLen) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Sorts the pair (a, b) and hashes the result. */ function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } /** * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory. */ function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./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); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) pragma solidity ^0.8.20; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; uint256 private _status; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); constructor() { _status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // 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()`. * * The `_sequentialUpTo()` function can be overriden to enable spot mints * (i.e. non-consecutive mints) for `tokenId`s greater than `_sequentialUpTo()`. * * 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; // The amount of tokens minted above `_sequentialUpTo()`. // We call these spot mints (i.e. non-sequential mints). uint256 private _spotMinted; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); if (_sequentialUpTo() < _startTokenId()) _revert(SequentialUpToTooSmall.selector); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID for sequential mints. * * Override this function to change the starting token ID for sequential mints. * * Note: The value returned must never change after any tokens have been minted. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the maximum token ID (inclusive) for sequential mints. * * Override this function to return a value less than 2**256 - 1, * but greater than `_startTokenId()`, to enable spot (non-sequential) mints. * * Note: The value returned must never change after any tokens have been minted. */ function _sequentialUpTo() internal view virtual returns (uint256) { return type(uint256).max; } /** * @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 result) { // Counter underflow is impossible as `_burnCounter` cannot be incremented // more than `_currentIndex + _spotMinted - _startTokenId()` times. unchecked { // With spot minting, the intermediate `result` can be temporarily negative, // and the computation must be unchecked. result = _currentIndex - _burnCounter - _startTokenId(); if (_sequentialUpTo() != type(uint256).max) result += _spotMinted; } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256 result) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { result = _currentIndex - _startTokenId(); if (_sequentialUpTo() != type(uint256).max) result += _spotMinted; } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } /** * @dev Returns the total number of tokens that are spot-minted. */ function _totalSpotMinted() internal view virtual returns (uint256) { return _spotMinted; } // ============================================================= // 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.selector); 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.selector); 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 Returns whether the ownership slot at `index` is initialized. * An uninitialized slot does not necessarily mean that the slot has no owner. */ function _ownershipIsInitialized(uint256 index) internal view virtual returns (bool) { return _packedOwnerships[index] != 0; } /** * @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); } } /** * @dev Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) { if (_startTokenId() <= tokenId) { packed = _packedOwnerships[tokenId]; if (tokenId > _sequentialUpTo()) { if (_packedOwnershipExists(packed)) return packed; _revert(OwnerQueryForNonexistentToken.selector); } // If the data at the starting slot does not exist, start the scan. if (packed == 0) { if (tokenId >= _currentIndex) _revert(OwnerQueryForNonexistentToken.selector); // 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, `tokenId` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. for (;;) { unchecked { packed = _packedOwnerships[--tokenId]; } if (packed == 0) continue; if (packed & _BITMASK_BURNED == 0) return packed; // Otherwise, the token is burned, and we must revert. // This handles the case of batch burned tokens, where only the burned bit // of the starting slot is set, and remaining slots are left uninitialized. _revert(OwnerQueryForNonexistentToken.selector); } } // Otherwise, the data exists and we can skip the scan. // This is possible because we have already achieved the target condition. // This saves 2143 gas on transfers of initialized tokens. // If the token is not burned, return `packed`. Otherwise, revert. if (packed & _BITMASK_BURNED == 0) return packed; } _revert(OwnerQueryForNonexistentToken.selector); } /** * @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. See {ERC721A-_approve}. * * Requirements: * * - The caller must own the token or be an approved operator. */ function approve(address to, uint256 tokenId) public payable virtual override { _approve(to, tokenId, true); } /** * @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.selector); 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 result) { if (_startTokenId() <= tokenId) { if (tokenId > _sequentialUpTo()) return _packedOwnershipExists(_packedOwnerships[tokenId]); if (tokenId < _currentIndex) { uint256 packed; while ((packed = _packedOwnerships[tokenId]) == 0) --tokenId; result = packed & _BITMASK_BURNED == 0; } } } /** * @dev Returns whether `packed` represents a token that exists. */ function _packedOwnershipExists(uint256 packed) private pure returns (bool result) { assembly { // The following is equivalent to `owner != address(0) && burned == false`. // Symbolically tested. result := gt(and(packed, _BITMASK_ADDRESS), and(packed, _BITMASK_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); // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean. from = address(uint160(uint256(uint160(from)) & _BITMASK_ADDRESS)); if (address(uint160(prevOwnershipPacked)) != from) _revert(TransferFromIncorrectOwner.selector); (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.selector); _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; } } } } // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; assembly { // 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. from, // `from`. toMasked, // `to`. tokenId // `tokenId`. ) } if (toMasked == 0) _revert(TransferToZeroAddress.selector); _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.selector); } } /** * @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.selector); } 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.selector); _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: // - `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) ); // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; if (toMasked == 0) _revert(MintToZeroAddress.selector); uint256 end = startTokenId + quantity; uint256 tokenId = startTokenId; if (end - 1 > _sequentialUpTo()) _revert(SequentialMintExceedsLimit.selector); do { assembly { // 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`. tokenId // `tokenId`. ) } // The `!=` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. } while (++tokenId != end); _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.selector); if (quantity == 0) _revert(MintZeroQuantity.selector); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) _revert(MintERC2309QuantityExceedsLimit.selector); _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) ); if (startTokenId + quantity - 1 > _sequentialUpTo()) _revert(SequentialMintExceedsLimit.selector); 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.selector); } } while (index < end); // This prevents reentrancy to `_safeMint`. // It does not prevent reentrancy to `_safeMintSpot`. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } /** * @dev Mints a single token at `tokenId`. * * Note: A spot-minted `tokenId` that has been burned can be re-minted again. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` must be greater than `_sequentialUpTo()`. * - `tokenId` must not exist. * * Emits a {Transfer} event for each mint. */ function _mintSpot(address to, uint256 tokenId) internal virtual { if (tokenId <= _sequentialUpTo()) _revert(SpotMintTokenIdTooSmall.selector); uint256 prevOwnershipPacked = _packedOwnerships[tokenId]; if (_packedOwnershipExists(prevOwnershipPacked)) _revert(TokenAlreadyExists.selector); _beforeTokenTransfers(address(0), to, tokenId, 1); // Overflows are incredibly unrealistic. // The `numberMinted` for `to` is incremented by 1, and has a max limit of 2**64 - 1. // `_spotMinted` is incremented by 1, and has a max limit of 2**256 - 1. unchecked { // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `true` (as `quantity == 1`). _packedOwnerships[tokenId] = _packOwnershipData( to, _nextInitializedFlag(1) | _nextExtraData(address(0), to, prevOwnershipPacked) ); // Updates: // - `balance += 1`. // - `numberMinted += 1`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += (1 << _BITPOS_NUMBER_MINTED) | 1; // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS; if (toMasked == 0) _revert(MintToZeroAddress.selector); assembly { // 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`. tokenId // `tokenId`. ) } ++_spotMinted; } _afterTokenTransfers(address(0), to, tokenId, 1); } /** * @dev Safely mints a single token at `tokenId`. * * Note: A spot-minted `tokenId` that has been burned can be re-minted again. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}. * - `tokenId` must be greater than `_sequentialUpTo()`. * - `tokenId` must not exist. * * See {_mintSpot}. * * Emits a {Transfer} event. */ function _safeMintSpot( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mintSpot(to, tokenId); unchecked { if (to.code.length != 0) { uint256 currentSpotMinted = _spotMinted; if (!_checkContractOnERC721Received(address(0), to, tokenId, _data)) { _revert(TransferToNonERC721ReceiverImplementer.selector); } // This prevents reentrancy to `_safeMintSpot`. // It does not prevent reentrancy to `_safeMint`. if (_spotMinted != currentSpotMinted) revert(); } } } /** * @dev Equivalent to `_safeMintSpot(to, tokenId, '')`. */ function _safeMintSpot(address to, uint256 tokenId) internal virtual { _safeMintSpot(to, tokenId, ''); } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @dev Equivalent to `_approve(to, tokenId, false)`. */ function _approve(address to, uint256 tokenId) internal virtual { _approve(to, tokenId, false); } /** * @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: * * - `tokenId` must exist. * * Emits an {Approval} event. */ function _approve( address to, uint256 tokenId, bool approvalCheck ) internal virtual { address owner = ownerOf(tokenId); if (approvalCheck && _msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { _revert(ApprovalCallerNotOwnerNorApproved.selector); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } // ============================================================= // 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.selector); } _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 + _spotMinted` 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.selector); 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) } } /** * @dev For more efficient reverts. */ function _revert(bytes4 errorSelector) internal pure { assembly { mstore(0x00, errorSelector) revert(0x00, 0x04) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721ABurnable.sol'; import '../ERC721A.sol'; /** * @title ERC721ABurnable. * * @dev ERC721A token that can be irreversibly burned (destroyed). */ abstract contract ERC721ABurnable is ERC721A, IERC721ABurnable { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual override { _burn(tokenId, true); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // 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 ownership) { unchecked { if (tokenId >= _startTokenId()) { if (tokenId > _sequentialUpTo()) return _ownershipAt(tokenId); if (tokenId < _nextTokenId()) { // If the `tokenId` is within bounds, // scan backwards for the initialized ownership slot. while (!_ownershipIsInitialized(tokenId)) --tokenId; return _ownershipAt(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) { TokenOwnership[] memory ownerships; uint256 i = tokenIds.length; assembly { // Grab the free memory pointer. ownerships := mload(0x40) // Store the length. mstore(ownerships, i) // Allocate one word for the length, // `tokenIds.length` words for the pointers. i := shl(5, i) // Multiply `i` by 32. mstore(0x40, add(add(ownerships, 0x20), i)) } while (i != 0) { uint256 tokenId; assembly { i := sub(i, 0x20) tokenId := calldataload(add(tokenIds.offset, i)) } TokenOwnership memory ownership = explicitOwnershipOf(tokenId); assembly { // Store the pointer of `ownership` in the `ownerships` array. mstore(add(add(ownerships, 0x20), i), ownership) } } 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) { return _tokensOfOwnerIn(owner, start, stop); } /** * @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) { // If spot mints are enabled, full-range scan is disabled. if (_sequentialUpTo() != type(uint256).max) _revert(NotCompatibleWithSpotMints.selector); uint256 start = _startTokenId(); uint256 stop = _nextTokenId(); uint256[] memory tokenIds; if (start != stop) tokenIds = _tokensOfOwnerIn(owner, start, stop); return tokenIds; } /** * @dev Helper function for returning an array of token IDs owned by `owner`. * * Note that this function is optimized for smaller bytecode size over runtime gas, * since it is meant to be called off-chain. */ function _tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) private view returns (uint256[] memory tokenIds) { unchecked { if (start >= stop) _revert(InvalidQueryRange.selector); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) start = _startTokenId(); uint256 nextTokenId = _nextTokenId(); // If spot mints are enabled, scan all the way until the specified `stop`. uint256 stopLimit = _sequentialUpTo() != type(uint256).max ? stop : nextTokenId; // Set `stop = min(stop, stopLimit)`. if (stop >= stopLimit) stop = stopLimit; // Number of tokens to scan. uint256 tokenIdsMaxLength = balanceOf(owner); // Set `tokenIdsMaxLength` to zero if the range contains no tokens. if (start >= stop) tokenIdsMaxLength = 0; // If there are one or more tokens to scan. if (tokenIdsMaxLength != 0) { // Set `tokenIdsMaxLength = min(balanceOf(owner), tokenIdsMaxLength)`. if (stop - start <= tokenIdsMaxLength) tokenIdsMaxLength = stop - start; uint256 m; // Start of available memory. assembly { // Grab the free memory pointer. tokenIds := mload(0x40) // Allocate one word for the length, and `tokenIdsMaxLength` words // for the data. `shl(5, x)` is equivalent to `mul(32, x)`. m := add(tokenIds, shl(5, add(tokenIdsMaxLength, 1))) mstore(0x40, m) } // 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; uint256 tokenIdsIdx; // Use a do-while, which is slightly more efficient for this case, // as the array will at least contain one element. do { if (_sequentialUpTo() != type(uint256).max) { // Skip the remaining unused sequential slots. if (start == nextTokenId) start = _sequentialUpTo() + 1; // Reset `currOwnershipAddr`, as each spot-minted token is a batch of one. if (start > _sequentialUpTo()) currOwnershipAddr = address(0); } ownership = _ownershipAt(start); // This implicitly allocates memory. assembly { switch mload(add(ownership, 0x40)) // if `ownership.burned == false`. case 0 { // if `ownership.addr != address(0)`. // The `addr` already has it's upper 96 bits clearned, // since it is written to memory with regular Solidity. if mload(ownership) { currOwnershipAddr := mload(ownership) } // if `currOwnershipAddr == owner`. // The `shl(96, x)` is to make the comparison agnostic to any // dirty upper 96 bits in `owner`. if iszero(shl(96, xor(currOwnershipAddr, owner))) { tokenIdsIdx := add(tokenIdsIdx, 1) mstore(add(tokenIds, shl(5, tokenIdsIdx)), start) } } // Otherwise, reset `currOwnershipAddr`. // This handles the case of batch burned tokens // (burned bit of first slot set, remaining slots left uninitialized). default { currOwnershipAddr := 0 } start := add(start, 1) // Free temporary memory implicitly allocated for ownership // to avoid quadratic memory expansion costs. mstore(0x40, m) } } while (!(start == stop || tokenIdsIdx == tokenIdsMaxLength)); // Store the length of the array. assembly { mstore(tokenIds, tokenIdsIdx) } } } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import '../IERC721A.sol'; /** * @dev Interface of ERC721ABurnable. */ interface IERC721ABurnable is IERC721A { /** * @dev Burns `tokenId`. See {ERC721A-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) external; }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.3.0 // 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.3.0 // 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(); /** * `_sequentialUpTo()` must be greater than `_startTokenId()`. */ error SequentialUpToTooSmall(); /** * The `tokenId` of a sequential mint exceeds `_sequentialUpTo()`. */ error SequentialMintExceedsLimit(); /** * Spot minting requires a `tokenId` greater than `_sequentialUpTo()`. */ error SpotMintTokenIdTooSmall(); /** * Cannot mint over a token that already exists. */ error TokenAlreadyExists(); /** * The feature is not compatible with spot mints. */ error NotCompatibleWithSpotMints(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external payable; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidDefaultRoyalty","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidDefaultRoyaltyReceiver","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"name":"ERC2981InvalidTokenRoyalty","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC2981InvalidTokenRoyaltyReceiver","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NotCompatibleWithSpotMints","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[],"name":"SequentialMintExceedsLimit","type":"error"},{"inputs":[],"name":"SequentialUpToTooSmall","type":"error"},{"inputs":[],"name":"SpotMintTokenIdTooSmall","type":"error"},{"inputs":[],"name":"TokenAlreadyExists","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"allowlistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"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":"ownership","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":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"freeMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getAllowlistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllowlistMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCollectionSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFreeMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getIsAllowlistMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getIsFreeMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getIsMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxAllowlistMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxPerWalletAllowlist","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxPerWalletFreeMint","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumAllowlistMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNumFreeMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getOwnerAllowlistFreeMintCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getOwnerAllowlistMintCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"getOwnerGiftsCount","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPublicMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getReservedFreeMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"gift","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"quantities","type":"uint256[]"}],"name":"giftMultiple","outputs":[],"stateMutability":"nonpayable","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":"isTradingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"numberMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"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":"bytes32","name":"_merkleRootAllowlist","type":"bytes32"}],"name":"setAllowlistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isAllowlistMintActive","type":"bool"}],"name":"setAllowlistMintActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_allowlistMintPrice","type":"uint256"}],"name":"setAllowlistMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collectionSize","type":"uint256"}],"name":"setCollectionSize","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":"bytes32","name":"_merkleRootFree","type":"bytes32"}],"name":"setFreeMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isFreeMintActive","type":"bool"}],"name":"setFreeMintActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxAllowlistMint","type":"uint256"}],"name":"setMaxAllowlistMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerWallet","type":"uint256"}],"name":"setMaxPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerWalletAllowlist","type":"uint256"}],"name":"setMaxPerWalletAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_maxPerWalletFreeMint","type":"uint16"}],"name":"setMaxPerWalletFreeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isMintActive","type":"bool"}],"name":"setMintActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicMintPrice","type":"uint256"}],"name":"setPublicMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_reservedFreeMint","type":"uint256"}],"name":"setReservedFreeMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_enabled","type":"bool"}],"name":"setTradingEnabled","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":"result","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":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"withdrawTokens","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6011805462ffffff1916905561014d601255610bb8601355610d056014556015805461ffff19166001179055600a601655600f601755678ac7230489e8000060185567d02ab486cedc000060195560a060405260006080908152601a90620000689082620002ec565b50601b805460ff191690553480156200008057600080fd5b5033604051806040016040528060048152602001636475647360e01b815250604051806040016040528060048152602001634455445360e01b8152508160029081620000cd9190620002ec565b506003620000dc8282620002ec565b5050600080555060016009556001600160a01b0381166200011857604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b62000123816200014c565b506200014673972cf275d3629aa959a2ff7d127b070de091742561014d6200019e565b620003b8565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127106001600160601b038216811015620001df57604051636f483d0960e01b81526001600160601b0383166004820152602481018290526044016200010f565b6001600160a01b0383166200020b57604051635b6cc80560e11b8152600060048201526024016200010f565b50604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600b55565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200027057607f821691505b6020821081036200029157634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002e7576000816000526020600020601f850160051c81016020861015620002c25750805b601f850160051c820191505b81811015620002e357828155600101620002ce565b5050505b505050565b81516001600160401b0381111562000308576200030862000245565b62000320816200031984546200025b565b8462000297565b602080601f8311600181146200035857600084156200033f5750858301515b600019600386901b1c1916600185901b178555620002e3565b600085815260208120601f198616915b82811015620003895788860151825594840194600190910190840162000368565b5085821015620003a85787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61373680620003c86000396000f3fe6080604052600436106103d95760003560e01c80637155c1ea116101fd578063b88d4fde11610118578063dc33e681116100ab578063e985e9c51161007a578063e985e9c514610b05578063ee1cc94414610b4e578063f2fde38b14610b6e578063f95df41414610b8e578063ffccd4b014610bae57600080fd5b8063dc33e68114610a98578063e066fb7d14610ab8578063e268e4d314610acd578063e93362b314610aed57600080fd5b8063c87b56dd116100e7578063c87b56dd14610a2a578063d433f93f14610a4a578063d439287c14610a63578063d684340914610a7857600080fd5b8063b88d4fde146109aa578063c23dc68f146109bd578063c2e5ec04146109ea578063c5ccb95c14610a0a57600080fd5b80638da5cb5b11610190578063a22cb4651161015f578063a22cb4651461092d578063abad65551461094d578063aca8ffe71461096a578063af0b5da31461098a57600080fd5b80638da5cb5b146108c757806395d89b41146108e557806399a2557a146108fa578063a0712d681461091a57600080fd5b80638399e681116101cc5780638399e681146108495780638462151c1461086757806388d15d501461089457806389e98a1b146108a757600080fd5b80637155c1ea146107ec578063744dab38146108015780637bc9200e14610816578063817cc12d1461082957600080fd5b806338da2f69116102f85780635bbb21771161028b578063694f45a11161025a578063694f45a114610778578063695a213e1461078d5780636bbc4291146107a257806370a08231146107b7578063715018a6146107d757600080fd5b80635bbb2177146106eb5780635d82cf6e146107185780636352211e14610738578063638df30b1461075857600080fd5b806342966c68116102c757806342966c681461066b57806349df728c1461068b5780634f9b563c146106ab57806355f804b3146106cb57600080fd5b806338da2f691461060e5780633b9315b41461062e5780633ccfd60b1461064357806342842e0e1461065857600080fd5b806318160ddd116103705780632a55205a1161033f5780632a55205a1461057a5780632ad23b21146105b957806334ab41d6146105ce57806334b1d403146105ee57600080fd5b806318160ddd1461050f5780631e48db9014610532578063210bfb971461055257806323b872dd1461056757600080fd5b8063081812fc116103ac578063081812fc14610471578063095ea7b3146104a95780631066fed9146104bc578063163e1e61146104ef57600080fd5b806301ffc9a7146103de57806304634d8d14610413578063064a59d01461043557806306fdde031461044f575b600080fd5b3480156103ea57600080fd5b506103fe6103f9366004612d6b565b610bc3565b60405190151581526020015b60405180910390f35b34801561041f57600080fd5b5061043361042e366004612d9d565b610be3565b005b34801561044157600080fd5b50601b546103fe9060ff1681565b34801561045b57600080fd5b50610464610bf9565b60405161040a9190612e32565b34801561047d57600080fd5b5061049161048c366004612e45565b610c8b565b6040516001600160a01b03909116815260200161040a565b6104336104b7366004612e5e565b610cc6565b3480156104c857600080fd5b506104dc6104d7366004612e8a565b610d21565b60405161ffff909116815260200161040a565b3480156104fb57600080fd5b5061043361050a366004612eec565b610d57565b34801561051b57600080fd5b50600154600054035b60405190815260200161040a565b34801561053e57600080fd5b506104dc61054d366004612e8a565b610e3e565b34801561055e57600080fd5b50601354610524565b610433610575366004612f2e565b610e56565b34801561058657600080fd5b5061059a610595366004612f6f565b610fc5565b604080516001600160a01b03909316835260208301919091520161040a565b3480156105c557600080fd5b50600d54610524565b3480156105da57600080fd5b506104dc6105e9366004612e8a565b611073565b3480156105fa57600080fd5b50610433610609366004612e45565b61108b565b34801561061a57600080fd5b50610433610629366004612f9f565b611098565b34801561063a57600080fd5b50601054610524565b34801561064f57600080fd5b506104336110ba565b610433610666366004612f2e565b6111ac565b34801561067757600080fd5b50610433610686366004612e45565b6111cc565b34801561069757600080fd5b506104336106a6366004612e8a565b6111da565b3480156106b757600080fd5b506104336106c6366004612f9f565b6112d6565b3480156106d757600080fd5b506104336106e6366004612fbc565b6112f1565b3480156106f757600080fd5b5061070b610706366004612eec565b611306565b60405161040a919061306b565b34801561072457600080fd5b50610433610733366004612e45565b611352565b34801561074457600080fd5b50610491610753366004612e45565b61135f565b34801561076457600080fd5b50610433610773366004612e45565b61136a565b34801561078457600080fd5b50600e54610524565b34801561079957600080fd5b50600f54610524565b3480156107ae57600080fd5b50601754610524565b3480156107c357600080fd5b506105246107d2366004612e8a565b611377565b3480156107e357600080fd5b506104336113bd565b3480156107f857600080fd5b50601454610524565b34801561080d57600080fd5b50601954610524565b6104336108243660046130b9565b6113cf565b34801561083557600080fd5b50610433610844366004612e45565b611721565b34801561085557600080fd5b5060115462010000900460ff166103fe565b34801561087357600080fd5b50610887610882366004612e8a565b6117cc565b60405161040a9190613105565b6104336108a2366004612eec565b6117fb565b3480156108b357600080fd5b506104336108c236600461313d565b611a84565b3480156108d357600080fd5b50600a546001600160a01b0316610491565b3480156108f157600080fd5b50610464611c32565b34801561090657600080fd5b506108876109153660046131a9565b611c41565b610433610928366004612e45565b611c4e565b34801561093957600080fd5b506104336109483660046131de565b611eab565b34801561095957600080fd5b50601154610100900460ff166103fe565b34801561097657600080fd5b50610433610985366004612e45565b611f01565b34801561099657600080fd5b506104336109a5366004612e45565b611ff1565b6104336109b8366004613222565b61209c565b3480156109c957600080fd5b506109dd6109d8366004612e45565b6120d7565b60405161040a9190613302565b3480156109f657600080fd5b50610433610a05366004612f9f565b612131565b348015610a1657600080fd5b50610433610a25366004613310565b61214c565b348015610a3657600080fd5b50610464610a45366004612e45565b61216c565b348015610a5657600080fd5b5060155461ffff166104dc565b348015610a6f57600080fd5b50601654610524565b348015610a8457600080fd5b50610433610a93366004612e45565b6121f0565b348015610aa457600080fd5b50610524610ab3366004612e8a565b6121fd565b348015610ac457600080fd5b50601854610524565b348015610ad957600080fd5b50610433610ae8366004612e45565b612228565b348015610af957600080fd5b5060115460ff166103fe565b348015610b1157600080fd5b506103fe610b20366004613334565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610b5a57600080fd5b50610433610b69366004612f9f565b612235565b348015610b7a57600080fd5b50610433610b89366004612e8a565b612259565b348015610b9a57600080fd5b50610433610ba9366004612e45565b612294565b348015610bba57600080fd5b50601254610524565b6000610bce826122a1565b80610bdd5750610bdd826122ef565b92915050565b610beb612324565b610bf58282612351565b5050565b606060028054610c0890613362565b80601f0160208091040260200160405190810160405280929190818152602001828054610c3490613362565b8015610c815780601f10610c5657610100808354040283529160200191610c81565b820191906000526020600020905b815481529060010190602001808311610c6457829003601f168201915b5050505050905090565b6000610c96826123f4565b610caa57610caa6333d1c03960e21b612437565b506000908152600660205260409020546001600160a01b031690565b601b5460ff16610d175760405162461bcd60e51b8152602060048201526017602482015276151c98591a5b99c81b9bdd08195b98589b1959081e595d604a1b60448201526064015b60405180910390fd5b610bf58282612441565b600080610d4d610d308461244d565b602081901c63ffffffff1691601082901c65ffffffffffff169190565b5090949350505050565b610d5f61246b565b610d67612324565b600d546012548291610d78916133b2565b601454610d8591906133b2565b81610d936001546000540390565b610d9d91906133c5565b1115610dbb5760405162461bcd60e51b8152600401610d0e906133d8565b8160005b81811015610e3157610df8858583818110610ddc57610ddc613419565b9050602002016020810190610df19190612e8a565b6001612495565b610e29858583818110610e0d57610e0d613419565b9050602002016020810190610e229190612e8a565b600161251f565b600101610dbf565b505050610bf56001600955565b600080610e4d610d308461244d565b95945050505050565b6000610e6182612539565b6001600160a01b039485169490915081168414610e8757610e8762a1148160e81b612437565b60008281526006602052604090208054610eb38187335b6001600160a01b039081169116811491141790565b610ed557610ec18633610b20565b610ed557610ed5632ce44b5f60e11b612437565b8015610ee057600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610f7257600184016000818152600460205260408120549003610f70576000548114610f705760008181526004602052604090208490555b505b6001600160a01b0385168481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a480600003610fbc57610fbc633a954ecd60e21b612437565b50505050505050565b6000828152600c602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161103a575060408051808201909152600b546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611059906001600160601b03168761342f565b6110639190613446565b91519350909150505b9250929050565b600080611082610d308461244d565b50949350505050565b611093612324565b601655565b6110a0612324565b601180549115156101000261ff0019909216919091179055565b6110c2612324565b6110ca61246b565b47806111115760405162461bcd60e51b81526020600482015260166024820152754e6f2062616c616e636520746f20776974686472617760501b6044820152606401610d0e565b6040518190600090339083908381818185875af1925050503d8060008114611155576040519150601f19603f3d011682016040523d82523d6000602084013e61115a565b606091505b505090508061119d5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610d0e565b5050506111aa6001600955565b565b6111c78383836040518060200160405280600081525061209c565b505050565b6111d78160016125cf565b50565b6111e2612324565b6111ea61246b565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa158015611238573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125c9190613468565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156112a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112cb9190613481565b506111d76001600955565b6112de612324565b6011805460ff1916911515919091179055565b6112f9612324565b601a6111c78284836134ee565b60408051828152600583901b8082016020019092526060915b801561134a57601f198082019186010135600061133b826120d7565b848401602001525061131f9050565b509392505050565b61135a612324565b601955565b6000610bdd82612539565b611372612324565b600f55565b60006001600160a01b038216611397576113976323d3ad8160e21b612437565b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6113c5612324565b6111aa6000612710565b6113d761246b565b3233146113f65760405162461bcd60e51b8152600401610d0e906135ae565b601154610100900460ff1661144d5760405162461bcd60e51b815260206004820152601b60248201527f416c6c6f776c697374206d696e74206973206e6f74206f70656e2e00000000006044820152606401610d0e565b81816010546114c5838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516bffffffffffffffffffffffff193360601b16602082015285925060340190505b60405160208183030381529060405280519060200120612762565b6114e15760405162461bcd60e51b8152600401610d0e906135e5565b8560135481600e546114f391906133c5565b11156115525760405162461bcd60e51b815260206004820152602860248201527f546865726520617265206e6f20616c6c6f776c697374206d696e7420746f6b656044820152673739903632b33a1760c11b6064820152608401610d0e565b86600d5460125461156391906133b2565b60145461157091906133b2565b8161157e6001546000540390565b61158891906133c5565b11156115a65760405162461bcd60e51b8152600401610d0e906133d8565b8760006115b5610d303361244d565b50915050601654828261ffff166115cc91906133c5565b111561164c5760405162461bcd60e51b815260206004820152604360248201527f546869732077616c6c657420686173207265616368656420697473206d61786960448201527f6d756d20616c6c6f636174696f6e206f6620616c6c6f776c69737420746f6b6560648201526237399760e91b608482015260a401610d0e565b6018548a3461165b828461342f565b146116a85760405162461bcd60e51b815260206004820152601d60248201527f496e636f727265637420616d6f756e74206f66204554482073656e742e0000006044820152606401610d0e565b8b600e60008282546116ba91906133c5565b909155506116ca9050338d612778565b600a546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611703573d6000803e3d6000fd5b5061170e338d61251f565b5050505050505050506111c76001600955565b611729612324565b600e548110156117c75760405162461bcd60e51b815260206004820152605e60248201527f43616e6e6f7420736574206d617820616c6c6f776c697374206d696e7420746f60448201527f206c657373207468616e20746865206e756d626572206f6620616c6c6f776c6960648201527f7374206d696e7420746f6b656e7320616c7265616479206d696e7465642e0000608482015260a401610d0e565b601355565b60606000806117da60005490565b905060608183146117f3576117f08584846127c9565b90505b949350505050565b61180361246b565b3233146118225760405162461bcd60e51b8152600401610d0e906135ae565b60115460ff1661186d5760405162461bcd60e51b8152602060048201526016602482015275233932b29036b4b73a1034b9903737ba1037b832b71760511b6044820152606401610d0e565b8181600f546118ce838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516bffffffffffffffffffffffff193360601b16602082015285925060340190506114aa565b6118ea5760405162461bcd60e51b8152600401610d0e906135e5565b601254600d546118fb9060016133c5565b11156119555760405162461bcd60e51b815260206004820152602360248201527f546865726520617265206e6f2066726565206d696e7420746f6b656e73206c65604482015262333a1760e91b6064820152608401610d0e565b6001600d5460125461196791906133b2565b60145461197491906133b2565b816119826001546000540390565b61198c91906133c5565b11156119aa5760405162461bcd60e51b8152600401610d0e906133d8565b60006119b8610d303361244d565b505060155490915061ffff90811690821610611a485760405162461bcd60e51b815260206004820152604360248201527f546869732077616c6c657420686173207265616368656420697473206d61786960448201527f6d756d20616c6c6f636174696f6e206f662066726565206d696e7420746f6b6560648201526237399760e91b608482015260a401610d0e565b6001600d6000828254611a5b91906133c5565b90915550611a6a9050336128c2565b611a7533600161251f565b5050505050610bf56001600955565b611a8c61246b565b611a94612324565b828114611b095760405162461bcd60e51b815260206004820152603960248201527f546865206e756d626572206f6620726563697069656e747320616e642071756160448201527f6e746974696573206d757374206265207468652073616d652e000000000000006064820152608401610d0e565b6000805b82811015611b4357838382818110611b2757611b27613419565b9050602002013582611b3991906133c5565b9150600101611b0d565b5060145481611b556001546000540390565b611b5f91906133c5565b1115611b7d5760405162461bcd60e51b8152600401610d0e906133d8565b60005b84811015611c2057611bd0868683818110611b9d57611b9d613419565b9050602002016020810190611bb29190612e8a565b858584818110611bc457611bc4613419565b90506020020135612495565b611c18868683818110611be557611be5613419565b9050602002016020810190611bfa9190612e8a565b858584818110611c0c57611c0c613419565b9050602002013561251f565b600101611b80565b5050611c2c6001600955565b50505050565b606060038054610c0890613362565b60606117f38484846127c9565b611c5661246b565b323314611c755760405162461bcd60e51b8152600401610d0e906135ae565b60115462010000900460ff16611cc15760405162461bcd60e51b815260206004820152601160248201527026b4b73a1034b9903737ba1037b832b71760791b6044820152606401610d0e565b80600d54601254611cd291906133b2565b601454611cdf91906133b2565b81611ced6001546000540390565b611cf791906133c5565b1115611d155760405162461bcd60e51b8152600401610d0e906133d8565b816000806000611d27610d303361244d565b9250925092508061ffff168261ffff168461ffff16601754611d4991906133c5565b611d5391906133c5565b611d5d91906133c5565b33600090815260056020526040908190205486911c67ffffffffffffffff16611d8691906133c5565b1115611dfa5760405162461bcd60e51b815260206004820152603960248201527f546869732077616c6c657420686173207265616368656420697473206d61786960448201527f6d756d20616c6c6f636174696f6e206f6620746f6b656e732e000000000000006064820152608401610d0e565b6019548634611e09828461342f565b14611e565760405162461bcd60e51b815260206004820152601d60248201527f496e636f727265637420616d6f756e74206f66204554482073656e742e0000006044820152606401610d0e565b600a546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611e8f573d6000803e3d6000fd5b50611e9a338961251f565b505050505050506111d76001600955565b601b5460ff16611ef75760405162461bcd60e51b8152602060048201526017602482015276151c98591a5b99c81b9bdd08195b98589b1959081e595d604a1b6044820152606401610d0e565b610bf5828261290f565b611f09612324565b601454811115611f5b5760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f7420696e63726561736520636f6c6c656374696f6e2073697a652e6044820152606401610d0e565b60015460005403811015611fec5760405162461bcd60e51b815260206004820152604c60248201527f43616e6e6f742073657420636f6c6c656374696f6e2073697a6520746f206c6560448201527f7373207468616e20746865206e756d626572206f6620746f6b656e7320616c7260648201526b32b0b23c9036b4b73a32b21760a11b608482015260a401610d0e565b601455565b611ff9612324565b600d548110156120975760405162461bcd60e51b815260206004820152605960248201527f43616e6e6f74207365742072657365727665642066726565206d696e7420746f60448201527f206c657373207468616e20746865206e756d626572206f662066726565206d6960648201527f6e7420746f6b656e7320616c7265616479206d696e7465642e00000000000000608482015260a401610d0e565b601255565b6120a7848484610e56565b6001600160a01b0383163b15611c2c576120c38484848461297b565b611c2c57611c2c6368d2bf6b60e11b612437565b6040805160808101825260008082526020820181905291810182905260608101829052905482101561212c575b6000828152600460205260409020546121235760001990910190612104565b610bdd82612a5d565b919050565b612139612324565b601b805460ff1916911515919091179055565b612154612324565b6015805461ffff191661ffff92909216919091179055565b6060612177826123f4565b61219457604051630a14c4b560e41b815260040160405180910390fd5b600061219e612adc565b905080516000036121be57604051806020016040528060008152506121e9565b806121c884612aeb565b6040516020016121d992919061362e565b6040516020818303038152906040525b9392505050565b6121f8612324565b601855565b6001600160a01b0381166000908152600560205260408082205467ffffffffffffffff911c16610bdd565b612230612324565b601755565b61223d612324565b60118054911515620100000262ff000019909216919091179055565b612261612324565b6001600160a01b03811661228b57604051631e4fbdf760e01b815260006004820152602401610d0e565b6111d781612710565b61229c612324565b601055565b60006301ffc9a760e01b6001600160e01b0319831614806122d257506380ac58cd60e01b6001600160e01b03198316145b80610bdd5750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b0319821663152a902d60e11b1480610bdd57506301ffc9a760e01b6001600160e01b0319831614610bdd565b600a546001600160a01b031633146111aa5760405163118cdaa760e01b8152336004820152602401610d0e565b6127106001600160601b03821681101561239057604051636f483d0960e01b81526001600160601b038316600482015260248101829052604401610d0e565b6001600160a01b0383166123ba57604051635b6cc80560e11b815260006004820152602401610d0e565b50604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600b55565b6000805482101561212c5760005b506000828152600460205260408120549081900361242a576124238361366d565b9250612402565b600160e01b161592915050565b8060005260046000fd5b610bf582826001612b2f565b6001600160a01b031660009081526005602052604090205460c01c90565b60026009540361248e57604051633ee5aeb560e01b815260040160405180910390fd5b6002600955565b60008060006124a6610d308661244d565b91945092509050612518856124e685856124c08987613684565b65ffff00000000602084901b1663ffff0000601084901b161761ffff8216179392505050565b6001600160a01b03909116600090815260056020526040902080546001600160c01b031660c09290921b919091179055565b5050505050565b610bf5828260405180602001604052806000815250612bd2565b600081815260046020526040902054806000036125ac57600054821061256957612569636f96cda160e11b612437565b5b5060001901600081815260046020526040902054801561256a57600160e01b811660000361259757919050565b6125a7636f96cda160e11b612437565b61256a565b600160e01b81166000036125bf57919050565b61212c636f96cda160e11b612437565b60006125da83612539565b9050806000806125f886600090815260066020526040902080549091565b91509150841561262f5761260d818433610e9e565b61262f5761261b8333610b20565b61262f5761262f632ce44b5f60e11b612437565b801561263a57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040812091909155600160e11b851690036126c8576001860160008181526004602052604081205490036126c65760005481146126c65760008181526004602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600180548101905550505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008261276f8584612c2f565b14949350505050565b6000806000612789610d308661244d565b91945092509050612518856124e6856127a28887613684565b8565ffff00000000602084901b1663ffff0000601084901b161761ffff8216179392505050565b60608183106127e2576127e2631960ccad60e11b612437565b600054808084106127f1578093505b60006127fc87611377565b9050848610612809575060005b80156128b857808686031161281d57508484035b604080516001830160051b8101918290529450600061283b886120d7565b90506000816040015161284c575080515b60005b6128588a612a5d565b92506040830151600081146128705760009250612895565b83511561287c57835192505b8b831860601b612895576001820191508a8260051b8a01525b5060018a01995083604052888a14806128ad57508481145b1561284f5787525050505b5050509392505050565b60008060006128d3610d308561244d565b91945092509050611c2c846124e66128ec866001613684565b65ffff0000000060209190911b1663ffff0000601087901b161761ffff85161790565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906129b09033908990889088906004016136a6565b6020604051808303816000875af19250505080156129eb575060408051601f3d908101601f191682019092526129e8918101906136e3565b60015b612a40573d808015612a19576040519150601f19603f3d011682016040523d82523d6000602084013e612a1e565b606091505b508051600003612a3857612a386368d2bf6b60e11b612437565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260046020526040902054610bdd90604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b6060601a8054610c0890613362565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a900480612b055750819003601f19909101908152919050565b6000612b3a8361135f565b9050818015612b525750336001600160a01b03821614155b15612b7557612b618133610b20565b612b7557612b756367d9dca160e11b612437565b60008381526006602052604080822080546001600160a01b0319166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b612bdc8383612c6a565b6001600160a01b0383163b156111c7576000548281035b612c06600086838060010194508661297b565b612c1a57612c1a6368d2bf6b60e11b612437565b818110612bf357816000541461251857600080fd5b600081815b845181101561134a57612c6082868381518110612c5357612c53613419565b6020026020010151612d29565b9150600101612c34565b6000805490829003612c8657612c8663b562e8dd60e01b612437565b60008181526004602090815260408083206001600160a01b0387164260a01b6001881460e11b17811790915580845260059092528220805468010000000000000001860201905590819003612ce457612ce4622e076360e81b612437565b818301825b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4818160010191508103612ce9575060005550505050565b6000818310612d455760008281526020849052604090206121e9565b5060009182526020526040902090565b6001600160e01b0319811681146111d757600080fd5b600060208284031215612d7d57600080fd5b81356121e981612d55565b6001600160a01b03811681146111d757600080fd5b60008060408385031215612db057600080fd5b8235612dbb81612d88565b915060208301356001600160601b0381168114612dd757600080fd5b809150509250929050565b60005b83811015612dfd578181015183820152602001612de5565b50506000910152565b60008151808452612e1e816020860160208601612de2565b601f01601f19169290920160200192915050565b6020815260006121e96020830184612e06565b600060208284031215612e5757600080fd5b5035919050565b60008060408385031215612e7157600080fd5b8235612e7c81612d88565b946020939093013593505050565b600060208284031215612e9c57600080fd5b81356121e981612d88565b60008083601f840112612eb957600080fd5b50813567ffffffffffffffff811115612ed157600080fd5b6020830191508360208260051b850101111561106c57600080fd5b60008060208385031215612eff57600080fd5b823567ffffffffffffffff811115612f1657600080fd5b612f2285828601612ea7565b90969095509350505050565b600080600060608486031215612f4357600080fd5b8335612f4e81612d88565b92506020840135612f5e81612d88565b929592945050506040919091013590565b60008060408385031215612f8257600080fd5b50508035926020909101359150565b80151581146111d757600080fd5b600060208284031215612fb157600080fd5b81356121e981612f91565b60008060208385031215612fcf57600080fd5b823567ffffffffffffffff80821115612fe757600080fd5b818501915085601f830112612ffb57600080fd5b81358181111561300a57600080fd5b86602082850101111561301c57600080fd5b60209290920196919550909350505050565b80516001600160a01b0316825260208082015167ffffffffffffffff169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b818110156130ad5761309a83855161302e565b9284019260809290920191600101613087565b50909695505050505050565b6000806000604084860312156130ce57600080fd5b83359250602084013567ffffffffffffffff8111156130ec57600080fd5b6130f886828701612ea7565b9497909650939450505050565b6020808252825182820181905260009190848201906040850190845b818110156130ad57835183529284019291840191600101613121565b6000806000806040858703121561315357600080fd5b843567ffffffffffffffff8082111561316b57600080fd5b61317788838901612ea7565b9096509450602087013591508082111561319057600080fd5b5061319d87828801612ea7565b95989497509550505050565b6000806000606084860312156131be57600080fd5b83356131c981612d88565b95602085013595506040909401359392505050565b600080604083850312156131f157600080fd5b82356131fc81612d88565b91506020830135612dd781612f91565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561323857600080fd5b843561324381612d88565b9350602085013561325381612d88565b925060408501359150606085013567ffffffffffffffff8082111561327757600080fd5b818701915087601f83011261328b57600080fd5b81358181111561329d5761329d61320c565b604051601f8201601f19908116603f011681019083821181831017156132c5576132c561320c565b816040528281528a60208487010111156132de57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60808101610bdd828461302e565b60006020828403121561332257600080fd5b813561ffff811681146121e957600080fd5b6000806040838503121561334757600080fd5b823561335281612d88565b91506020830135612dd781612d88565b600181811c9082168061337657607f821691505b60208210810361339657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610bdd57610bdd61339c565b80820180821115610bdd57610bdd61339c565b60208082526021908201527f546865726520617265206e6f20746f6b656e73206c65667420746f206d696e746040820152601760f91b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417610bdd57610bdd61339c565b60008261346357634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561347a57600080fd5b5051919050565b60006020828403121561349357600080fd5b81516121e981612f91565b601f8211156111c7576000816000526020600020601f850160051c810160208610156134c75750805b601f850160051c820191505b818110156134e6578281556001016134d3565b505050505050565b67ffffffffffffffff8311156135065761350661320c565b61351a836135148354613362565b8361349e565b6000601f84116001811461354e57600085156135365750838201355b600019600387901b1c1916600186901b178355612518565b600083815260209020601f19861690835b8281101561357f578685013582556020948501946001909201910161355f565b508682101561359c5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6020808252601f908201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163742e00604082015260600190565b60208082526029908201527f4164647265737320646f6573206e6f7420657869737420696e20746869732061604082015268363637bbb634b9ba1760b91b606082015260800190565b60008351613640818460208801612de2565b835190830190613654818360208801612de2565b64173539b7b760d91b9101908152600501949350505050565b60008161367c5761367c61339c565b506000190190565b61ffff81811683821601908082111561369f5761369f61339c565b5092915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906136d990830184612e06565b9695505050505050565b6000602082840312156136f557600080fd5b81516121e981612d5556fea26469706673582212208dab0c1b148d0ad550c597f83071158f258bea82365deccb7b7ecae133ec974764736f6c63430008180033
Deployed Bytecode
0x6080604052600436106103d95760003560e01c80637155c1ea116101fd578063b88d4fde11610118578063dc33e681116100ab578063e985e9c51161007a578063e985e9c514610b05578063ee1cc94414610b4e578063f2fde38b14610b6e578063f95df41414610b8e578063ffccd4b014610bae57600080fd5b8063dc33e68114610a98578063e066fb7d14610ab8578063e268e4d314610acd578063e93362b314610aed57600080fd5b8063c87b56dd116100e7578063c87b56dd14610a2a578063d433f93f14610a4a578063d439287c14610a63578063d684340914610a7857600080fd5b8063b88d4fde146109aa578063c23dc68f146109bd578063c2e5ec04146109ea578063c5ccb95c14610a0a57600080fd5b80638da5cb5b11610190578063a22cb4651161015f578063a22cb4651461092d578063abad65551461094d578063aca8ffe71461096a578063af0b5da31461098a57600080fd5b80638da5cb5b146108c757806395d89b41146108e557806399a2557a146108fa578063a0712d681461091a57600080fd5b80638399e681116101cc5780638399e681146108495780638462151c1461086757806388d15d501461089457806389e98a1b146108a757600080fd5b80637155c1ea146107ec578063744dab38146108015780637bc9200e14610816578063817cc12d1461082957600080fd5b806338da2f69116102f85780635bbb21771161028b578063694f45a11161025a578063694f45a114610778578063695a213e1461078d5780636bbc4291146107a257806370a08231146107b7578063715018a6146107d757600080fd5b80635bbb2177146106eb5780635d82cf6e146107185780636352211e14610738578063638df30b1461075857600080fd5b806342966c68116102c757806342966c681461066b57806349df728c1461068b5780634f9b563c146106ab57806355f804b3146106cb57600080fd5b806338da2f691461060e5780633b9315b41461062e5780633ccfd60b1461064357806342842e0e1461065857600080fd5b806318160ddd116103705780632a55205a1161033f5780632a55205a1461057a5780632ad23b21146105b957806334ab41d6146105ce57806334b1d403146105ee57600080fd5b806318160ddd1461050f5780631e48db9014610532578063210bfb971461055257806323b872dd1461056757600080fd5b8063081812fc116103ac578063081812fc14610471578063095ea7b3146104a95780631066fed9146104bc578063163e1e61146104ef57600080fd5b806301ffc9a7146103de57806304634d8d14610413578063064a59d01461043557806306fdde031461044f575b600080fd5b3480156103ea57600080fd5b506103fe6103f9366004612d6b565b610bc3565b60405190151581526020015b60405180910390f35b34801561041f57600080fd5b5061043361042e366004612d9d565b610be3565b005b34801561044157600080fd5b50601b546103fe9060ff1681565b34801561045b57600080fd5b50610464610bf9565b60405161040a9190612e32565b34801561047d57600080fd5b5061049161048c366004612e45565b610c8b565b6040516001600160a01b03909116815260200161040a565b6104336104b7366004612e5e565b610cc6565b3480156104c857600080fd5b506104dc6104d7366004612e8a565b610d21565b60405161ffff909116815260200161040a565b3480156104fb57600080fd5b5061043361050a366004612eec565b610d57565b34801561051b57600080fd5b50600154600054035b60405190815260200161040a565b34801561053e57600080fd5b506104dc61054d366004612e8a565b610e3e565b34801561055e57600080fd5b50601354610524565b610433610575366004612f2e565b610e56565b34801561058657600080fd5b5061059a610595366004612f6f565b610fc5565b604080516001600160a01b03909316835260208301919091520161040a565b3480156105c557600080fd5b50600d54610524565b3480156105da57600080fd5b506104dc6105e9366004612e8a565b611073565b3480156105fa57600080fd5b50610433610609366004612e45565b61108b565b34801561061a57600080fd5b50610433610629366004612f9f565b611098565b34801561063a57600080fd5b50601054610524565b34801561064f57600080fd5b506104336110ba565b610433610666366004612f2e565b6111ac565b34801561067757600080fd5b50610433610686366004612e45565b6111cc565b34801561069757600080fd5b506104336106a6366004612e8a565b6111da565b3480156106b757600080fd5b506104336106c6366004612f9f565b6112d6565b3480156106d757600080fd5b506104336106e6366004612fbc565b6112f1565b3480156106f757600080fd5b5061070b610706366004612eec565b611306565b60405161040a919061306b565b34801561072457600080fd5b50610433610733366004612e45565b611352565b34801561074457600080fd5b50610491610753366004612e45565b61135f565b34801561076457600080fd5b50610433610773366004612e45565b61136a565b34801561078457600080fd5b50600e54610524565b34801561079957600080fd5b50600f54610524565b3480156107ae57600080fd5b50601754610524565b3480156107c357600080fd5b506105246107d2366004612e8a565b611377565b3480156107e357600080fd5b506104336113bd565b3480156107f857600080fd5b50601454610524565b34801561080d57600080fd5b50601954610524565b6104336108243660046130b9565b6113cf565b34801561083557600080fd5b50610433610844366004612e45565b611721565b34801561085557600080fd5b5060115462010000900460ff166103fe565b34801561087357600080fd5b50610887610882366004612e8a565b6117cc565b60405161040a9190613105565b6104336108a2366004612eec565b6117fb565b3480156108b357600080fd5b506104336108c236600461313d565b611a84565b3480156108d357600080fd5b50600a546001600160a01b0316610491565b3480156108f157600080fd5b50610464611c32565b34801561090657600080fd5b506108876109153660046131a9565b611c41565b610433610928366004612e45565b611c4e565b34801561093957600080fd5b506104336109483660046131de565b611eab565b34801561095957600080fd5b50601154610100900460ff166103fe565b34801561097657600080fd5b50610433610985366004612e45565b611f01565b34801561099657600080fd5b506104336109a5366004612e45565b611ff1565b6104336109b8366004613222565b61209c565b3480156109c957600080fd5b506109dd6109d8366004612e45565b6120d7565b60405161040a9190613302565b3480156109f657600080fd5b50610433610a05366004612f9f565b612131565b348015610a1657600080fd5b50610433610a25366004613310565b61214c565b348015610a3657600080fd5b50610464610a45366004612e45565b61216c565b348015610a5657600080fd5b5060155461ffff166104dc565b348015610a6f57600080fd5b50601654610524565b348015610a8457600080fd5b50610433610a93366004612e45565b6121f0565b348015610aa457600080fd5b50610524610ab3366004612e8a565b6121fd565b348015610ac457600080fd5b50601854610524565b348015610ad957600080fd5b50610433610ae8366004612e45565b612228565b348015610af957600080fd5b5060115460ff166103fe565b348015610b1157600080fd5b506103fe610b20366004613334565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610b5a57600080fd5b50610433610b69366004612f9f565b612235565b348015610b7a57600080fd5b50610433610b89366004612e8a565b612259565b348015610b9a57600080fd5b50610433610ba9366004612e45565b612294565b348015610bba57600080fd5b50601254610524565b6000610bce826122a1565b80610bdd5750610bdd826122ef565b92915050565b610beb612324565b610bf58282612351565b5050565b606060028054610c0890613362565b80601f0160208091040260200160405190810160405280929190818152602001828054610c3490613362565b8015610c815780601f10610c5657610100808354040283529160200191610c81565b820191906000526020600020905b815481529060010190602001808311610c6457829003601f168201915b5050505050905090565b6000610c96826123f4565b610caa57610caa6333d1c03960e21b612437565b506000908152600660205260409020546001600160a01b031690565b601b5460ff16610d175760405162461bcd60e51b8152602060048201526017602482015276151c98591a5b99c81b9bdd08195b98589b1959081e595d604a1b60448201526064015b60405180910390fd5b610bf58282612441565b600080610d4d610d308461244d565b602081901c63ffffffff1691601082901c65ffffffffffff169190565b5090949350505050565b610d5f61246b565b610d67612324565b600d546012548291610d78916133b2565b601454610d8591906133b2565b81610d936001546000540390565b610d9d91906133c5565b1115610dbb5760405162461bcd60e51b8152600401610d0e906133d8565b8160005b81811015610e3157610df8858583818110610ddc57610ddc613419565b9050602002016020810190610df19190612e8a565b6001612495565b610e29858583818110610e0d57610e0d613419565b9050602002016020810190610e229190612e8a565b600161251f565b600101610dbf565b505050610bf56001600955565b600080610e4d610d308461244d565b95945050505050565b6000610e6182612539565b6001600160a01b039485169490915081168414610e8757610e8762a1148160e81b612437565b60008281526006602052604090208054610eb38187335b6001600160a01b039081169116811491141790565b610ed557610ec18633610b20565b610ed557610ed5632ce44b5f60e11b612437565b8015610ee057600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b84169003610f7257600184016000818152600460205260408120549003610f70576000548114610f705760008181526004602052604090208490555b505b6001600160a01b0385168481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a480600003610fbc57610fbc633a954ecd60e21b612437565b50505050505050565b6000828152600c602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b031692820192909252829161103a575060408051808201909152600b546001600160a01b0381168252600160a01b90046001600160601b031660208201525b602081015160009061271090611059906001600160601b03168761342f565b6110639190613446565b91519350909150505b9250929050565b600080611082610d308461244d565b50949350505050565b611093612324565b601655565b6110a0612324565b601180549115156101000261ff0019909216919091179055565b6110c2612324565b6110ca61246b565b47806111115760405162461bcd60e51b81526020600482015260166024820152754e6f2062616c616e636520746f20776974686472617760501b6044820152606401610d0e565b6040518190600090339083908381818185875af1925050503d8060008114611155576040519150601f19603f3d011682016040523d82523d6000602084013e61115a565b606091505b505090508061119d5760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b6044820152606401610d0e565b5050506111aa6001600955565b565b6111c78383836040518060200160405280600081525061209c565b505050565b6111d78160016125cf565b50565b6111e2612324565b6111ea61246b565b6040516370a0823160e01b81523060048201526001600160a01b0382169063a9059cbb90339083906370a0823190602401602060405180830381865afa158015611238573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125c9190613468565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af11580156112a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112cb9190613481565b506111d76001600955565b6112de612324565b6011805460ff1916911515919091179055565b6112f9612324565b601a6111c78284836134ee565b60408051828152600583901b8082016020019092526060915b801561134a57601f198082019186010135600061133b826120d7565b848401602001525061131f9050565b509392505050565b61135a612324565b601955565b6000610bdd82612539565b611372612324565b600f55565b60006001600160a01b038216611397576113976323d3ad8160e21b612437565b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6113c5612324565b6111aa6000612710565b6113d761246b565b3233146113f65760405162461bcd60e51b8152600401610d0e906135ae565b601154610100900460ff1661144d5760405162461bcd60e51b815260206004820152601b60248201527f416c6c6f776c697374206d696e74206973206e6f74206f70656e2e00000000006044820152606401610d0e565b81816010546114c5838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516bffffffffffffffffffffffff193360601b16602082015285925060340190505b60405160208183030381529060405280519060200120612762565b6114e15760405162461bcd60e51b8152600401610d0e906135e5565b8560135481600e546114f391906133c5565b11156115525760405162461bcd60e51b815260206004820152602860248201527f546865726520617265206e6f20616c6c6f776c697374206d696e7420746f6b656044820152673739903632b33a1760c11b6064820152608401610d0e565b86600d5460125461156391906133b2565b60145461157091906133b2565b8161157e6001546000540390565b61158891906133c5565b11156115a65760405162461bcd60e51b8152600401610d0e906133d8565b8760006115b5610d303361244d565b50915050601654828261ffff166115cc91906133c5565b111561164c5760405162461bcd60e51b815260206004820152604360248201527f546869732077616c6c657420686173207265616368656420697473206d61786960448201527f6d756d20616c6c6f636174696f6e206f6620616c6c6f776c69737420746f6b6560648201526237399760e91b608482015260a401610d0e565b6018548a3461165b828461342f565b146116a85760405162461bcd60e51b815260206004820152601d60248201527f496e636f727265637420616d6f756e74206f66204554482073656e742e0000006044820152606401610d0e565b8b600e60008282546116ba91906133c5565b909155506116ca9050338d612778565b600a546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611703573d6000803e3d6000fd5b5061170e338d61251f565b5050505050505050506111c76001600955565b611729612324565b600e548110156117c75760405162461bcd60e51b815260206004820152605e60248201527f43616e6e6f7420736574206d617820616c6c6f776c697374206d696e7420746f60448201527f206c657373207468616e20746865206e756d626572206f6620616c6c6f776c6960648201527f7374206d696e7420746f6b656e7320616c7265616479206d696e7465642e0000608482015260a401610d0e565b601355565b60606000806117da60005490565b905060608183146117f3576117f08584846127c9565b90505b949350505050565b61180361246b565b3233146118225760405162461bcd60e51b8152600401610d0e906135ae565b60115460ff1661186d5760405162461bcd60e51b8152602060048201526016602482015275233932b29036b4b73a1034b9903737ba1037b832b71760511b6044820152606401610d0e565b8181600f546118ce838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040516bffffffffffffffffffffffff193360601b16602082015285925060340190506114aa565b6118ea5760405162461bcd60e51b8152600401610d0e906135e5565b601254600d546118fb9060016133c5565b11156119555760405162461bcd60e51b815260206004820152602360248201527f546865726520617265206e6f2066726565206d696e7420746f6b656e73206c65604482015262333a1760e91b6064820152608401610d0e565b6001600d5460125461196791906133b2565b60145461197491906133b2565b816119826001546000540390565b61198c91906133c5565b11156119aa5760405162461bcd60e51b8152600401610d0e906133d8565b60006119b8610d303361244d565b505060155490915061ffff90811690821610611a485760405162461bcd60e51b815260206004820152604360248201527f546869732077616c6c657420686173207265616368656420697473206d61786960448201527f6d756d20616c6c6f636174696f6e206f662066726565206d696e7420746f6b6560648201526237399760e91b608482015260a401610d0e565b6001600d6000828254611a5b91906133c5565b90915550611a6a9050336128c2565b611a7533600161251f565b5050505050610bf56001600955565b611a8c61246b565b611a94612324565b828114611b095760405162461bcd60e51b815260206004820152603960248201527f546865206e756d626572206f6620726563697069656e747320616e642071756160448201527f6e746974696573206d757374206265207468652073616d652e000000000000006064820152608401610d0e565b6000805b82811015611b4357838382818110611b2757611b27613419565b9050602002013582611b3991906133c5565b9150600101611b0d565b5060145481611b556001546000540390565b611b5f91906133c5565b1115611b7d5760405162461bcd60e51b8152600401610d0e906133d8565b60005b84811015611c2057611bd0868683818110611b9d57611b9d613419565b9050602002016020810190611bb29190612e8a565b858584818110611bc457611bc4613419565b90506020020135612495565b611c18868683818110611be557611be5613419565b9050602002016020810190611bfa9190612e8a565b858584818110611c0c57611c0c613419565b9050602002013561251f565b600101611b80565b5050611c2c6001600955565b50505050565b606060038054610c0890613362565b60606117f38484846127c9565b611c5661246b565b323314611c755760405162461bcd60e51b8152600401610d0e906135ae565b60115462010000900460ff16611cc15760405162461bcd60e51b815260206004820152601160248201527026b4b73a1034b9903737ba1037b832b71760791b6044820152606401610d0e565b80600d54601254611cd291906133b2565b601454611cdf91906133b2565b81611ced6001546000540390565b611cf791906133c5565b1115611d155760405162461bcd60e51b8152600401610d0e906133d8565b816000806000611d27610d303361244d565b9250925092508061ffff168261ffff168461ffff16601754611d4991906133c5565b611d5391906133c5565b611d5d91906133c5565b33600090815260056020526040908190205486911c67ffffffffffffffff16611d8691906133c5565b1115611dfa5760405162461bcd60e51b815260206004820152603960248201527f546869732077616c6c657420686173207265616368656420697473206d61786960448201527f6d756d20616c6c6f636174696f6e206f6620746f6b656e732e000000000000006064820152608401610d0e565b6019548634611e09828461342f565b14611e565760405162461bcd60e51b815260206004820152601d60248201527f496e636f727265637420616d6f756e74206f66204554482073656e742e0000006044820152606401610d0e565b600a546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015611e8f573d6000803e3d6000fd5b50611e9a338961251f565b505050505050506111d76001600955565b601b5460ff16611ef75760405162461bcd60e51b8152602060048201526017602482015276151c98591a5b99c81b9bdd08195b98589b1959081e595d604a1b6044820152606401610d0e565b610bf5828261290f565b611f09612324565b601454811115611f5b5760405162461bcd60e51b815260206004820181905260248201527f43616e6e6f7420696e63726561736520636f6c6c656374696f6e2073697a652e6044820152606401610d0e565b60015460005403811015611fec5760405162461bcd60e51b815260206004820152604c60248201527f43616e6e6f742073657420636f6c6c656374696f6e2073697a6520746f206c6560448201527f7373207468616e20746865206e756d626572206f6620746f6b656e7320616c7260648201526b32b0b23c9036b4b73a32b21760a11b608482015260a401610d0e565b601455565b611ff9612324565b600d548110156120975760405162461bcd60e51b815260206004820152605960248201527f43616e6e6f74207365742072657365727665642066726565206d696e7420746f60448201527f206c657373207468616e20746865206e756d626572206f662066726565206d6960648201527f6e7420746f6b656e7320616c7265616479206d696e7465642e00000000000000608482015260a401610d0e565b601255565b6120a7848484610e56565b6001600160a01b0383163b15611c2c576120c38484848461297b565b611c2c57611c2c6368d2bf6b60e11b612437565b6040805160808101825260008082526020820181905291810182905260608101829052905482101561212c575b6000828152600460205260409020546121235760001990910190612104565b610bdd82612a5d565b919050565b612139612324565b601b805460ff1916911515919091179055565b612154612324565b6015805461ffff191661ffff92909216919091179055565b6060612177826123f4565b61219457604051630a14c4b560e41b815260040160405180910390fd5b600061219e612adc565b905080516000036121be57604051806020016040528060008152506121e9565b806121c884612aeb565b6040516020016121d992919061362e565b6040516020818303038152906040525b9392505050565b6121f8612324565b601855565b6001600160a01b0381166000908152600560205260408082205467ffffffffffffffff911c16610bdd565b612230612324565b601755565b61223d612324565b60118054911515620100000262ff000019909216919091179055565b612261612324565b6001600160a01b03811661228b57604051631e4fbdf760e01b815260006004820152602401610d0e565b6111d781612710565b61229c612324565b601055565b60006301ffc9a760e01b6001600160e01b0319831614806122d257506380ac58cd60e01b6001600160e01b03198316145b80610bdd5750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b0319821663152a902d60e11b1480610bdd57506301ffc9a760e01b6001600160e01b0319831614610bdd565b600a546001600160a01b031633146111aa5760405163118cdaa760e01b8152336004820152602401610d0e565b6127106001600160601b03821681101561239057604051636f483d0960e01b81526001600160601b038316600482015260248101829052604401610d0e565b6001600160a01b0383166123ba57604051635b6cc80560e11b815260006004820152602401610d0e565b50604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217600b55565b6000805482101561212c5760005b506000828152600460205260408120549081900361242a576124238361366d565b9250612402565b600160e01b161592915050565b8060005260046000fd5b610bf582826001612b2f565b6001600160a01b031660009081526005602052604090205460c01c90565b60026009540361248e57604051633ee5aeb560e01b815260040160405180910390fd5b6002600955565b60008060006124a6610d308661244d565b91945092509050612518856124e685856124c08987613684565b65ffff00000000602084901b1663ffff0000601084901b161761ffff8216179392505050565b6001600160a01b03909116600090815260056020526040902080546001600160c01b031660c09290921b919091179055565b5050505050565b610bf5828260405180602001604052806000815250612bd2565b600081815260046020526040902054806000036125ac57600054821061256957612569636f96cda160e11b612437565b5b5060001901600081815260046020526040902054801561256a57600160e01b811660000361259757919050565b6125a7636f96cda160e11b612437565b61256a565b600160e01b81166000036125bf57919050565b61212c636f96cda160e11b612437565b60006125da83612539565b9050806000806125f886600090815260066020526040902080549091565b91509150841561262f5761260d818433610e9e565b61262f5761261b8333610b20565b61262f5761262f632ce44b5f60e11b612437565b801561263a57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040812091909155600160e11b851690036126c8576001860160008181526004602052604081205490036126c65760005481146126c65760008181526004602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600180548101905550505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008261276f8584612c2f565b14949350505050565b6000806000612789610d308661244d565b91945092509050612518856124e6856127a28887613684565b8565ffff00000000602084901b1663ffff0000601084901b161761ffff8216179392505050565b60608183106127e2576127e2631960ccad60e11b612437565b600054808084106127f1578093505b60006127fc87611377565b9050848610612809575060005b80156128b857808686031161281d57508484035b604080516001830160051b8101918290529450600061283b886120d7565b90506000816040015161284c575080515b60005b6128588a612a5d565b92506040830151600081146128705760009250612895565b83511561287c57835192505b8b831860601b612895576001820191508a8260051b8a01525b5060018a01995083604052888a14806128ad57508481145b1561284f5787525050505b5050509392505050565b60008060006128d3610d308561244d565b91945092509050611c2c846124e66128ec866001613684565b65ffff0000000060209190911b1663ffff0000601087901b161761ffff85161790565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906129b09033908990889088906004016136a6565b6020604051808303816000875af19250505080156129eb575060408051601f3d908101601f191682019092526129e8918101906136e3565b60015b612a40573d808015612a19576040519150601f19603f3d011682016040523d82523d6000602084013e612a1e565b606091505b508051600003612a3857612a386368d2bf6b60e11b612437565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b604080516080810182526000808252602082018190529181018290526060810191909152600082815260046020526040902054610bdd90604080516080810182526001600160a01b038316815260a083901c67ffffffffffffffff166020820152600160e01b831615159181019190915260e89190911c606082015290565b6060601a8054610c0890613362565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a900480612b055750819003601f19909101908152919050565b6000612b3a8361135f565b9050818015612b525750336001600160a01b03821614155b15612b7557612b618133610b20565b612b7557612b756367d9dca160e11b612437565b60008381526006602052604080822080546001600160a01b0319166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b612bdc8383612c6a565b6001600160a01b0383163b156111c7576000548281035b612c06600086838060010194508661297b565b612c1a57612c1a6368d2bf6b60e11b612437565b818110612bf357816000541461251857600080fd5b600081815b845181101561134a57612c6082868381518110612c5357612c53613419565b6020026020010151612d29565b9150600101612c34565b6000805490829003612c8657612c8663b562e8dd60e01b612437565b60008181526004602090815260408083206001600160a01b0387164260a01b6001881460e11b17811790915580845260059092528220805468010000000000000001860201905590819003612ce457612ce4622e076360e81b612437565b818301825b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4818160010191508103612ce9575060005550505050565b6000818310612d455760008281526020849052604090206121e9565b5060009182526020526040902090565b6001600160e01b0319811681146111d757600080fd5b600060208284031215612d7d57600080fd5b81356121e981612d55565b6001600160a01b03811681146111d757600080fd5b60008060408385031215612db057600080fd5b8235612dbb81612d88565b915060208301356001600160601b0381168114612dd757600080fd5b809150509250929050565b60005b83811015612dfd578181015183820152602001612de5565b50506000910152565b60008151808452612e1e816020860160208601612de2565b601f01601f19169290920160200192915050565b6020815260006121e96020830184612e06565b600060208284031215612e5757600080fd5b5035919050565b60008060408385031215612e7157600080fd5b8235612e7c81612d88565b946020939093013593505050565b600060208284031215612e9c57600080fd5b81356121e981612d88565b60008083601f840112612eb957600080fd5b50813567ffffffffffffffff811115612ed157600080fd5b6020830191508360208260051b850101111561106c57600080fd5b60008060208385031215612eff57600080fd5b823567ffffffffffffffff811115612f1657600080fd5b612f2285828601612ea7565b90969095509350505050565b600080600060608486031215612f4357600080fd5b8335612f4e81612d88565b92506020840135612f5e81612d88565b929592945050506040919091013590565b60008060408385031215612f8257600080fd5b50508035926020909101359150565b80151581146111d757600080fd5b600060208284031215612fb157600080fd5b81356121e981612f91565b60008060208385031215612fcf57600080fd5b823567ffffffffffffffff80821115612fe757600080fd5b818501915085601f830112612ffb57600080fd5b81358181111561300a57600080fd5b86602082850101111561301c57600080fd5b60209290920196919550909350505050565b80516001600160a01b0316825260208082015167ffffffffffffffff169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b818110156130ad5761309a83855161302e565b9284019260809290920191600101613087565b50909695505050505050565b6000806000604084860312156130ce57600080fd5b83359250602084013567ffffffffffffffff8111156130ec57600080fd5b6130f886828701612ea7565b9497909650939450505050565b6020808252825182820181905260009190848201906040850190845b818110156130ad57835183529284019291840191600101613121565b6000806000806040858703121561315357600080fd5b843567ffffffffffffffff8082111561316b57600080fd5b61317788838901612ea7565b9096509450602087013591508082111561319057600080fd5b5061319d87828801612ea7565b95989497509550505050565b6000806000606084860312156131be57600080fd5b83356131c981612d88565b95602085013595506040909401359392505050565b600080604083850312156131f157600080fd5b82356131fc81612d88565b91506020830135612dd781612f91565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561323857600080fd5b843561324381612d88565b9350602085013561325381612d88565b925060408501359150606085013567ffffffffffffffff8082111561327757600080fd5b818701915087601f83011261328b57600080fd5b81358181111561329d5761329d61320c565b604051601f8201601f19908116603f011681019083821181831017156132c5576132c561320c565b816040528281528a60208487010111156132de57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60808101610bdd828461302e565b60006020828403121561332257600080fd5b813561ffff811681146121e957600080fd5b6000806040838503121561334757600080fd5b823561335281612d88565b91506020830135612dd781612d88565b600181811c9082168061337657607f821691505b60208210810361339657634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610bdd57610bdd61339c565b80820180821115610bdd57610bdd61339c565b60208082526021908201527f546865726520617265206e6f20746f6b656e73206c65667420746f206d696e746040820152601760f91b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b8082028115828204841417610bdd57610bdd61339c565b60008261346357634e487b7160e01b600052601260045260246000fd5b500490565b60006020828403121561347a57600080fd5b5051919050565b60006020828403121561349357600080fd5b81516121e981612f91565b601f8211156111c7576000816000526020600020601f850160051c810160208610156134c75750805b601f850160051c820191505b818110156134e6578281556001016134d3565b505050505050565b67ffffffffffffffff8311156135065761350661320c565b61351a836135148354613362565b8361349e565b6000601f84116001811461354e57600085156135365750838201355b600019600387901b1c1916600186901b178355612518565b600083815260209020601f19861690835b8281101561357f578685013582556020948501946001909201910161355f565b508682101561359c5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b6020808252601f908201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163742e00604082015260600190565b60208082526029908201527f4164647265737320646f6573206e6f7420657869737420696e20746869732061604082015268363637bbb634b9ba1760b91b606082015260800190565b60008351613640818460208801612de2565b835190830190613654818360208801612de2565b64173539b7b760d91b9101908152600501949350505050565b60008161367c5761367c61339c565b506000190190565b61ffff81811683821601908082111561369f5761369f61339c565b5092915050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906136d990830184612e06565b9695505050505050565b6000602082840312156136f557600080fd5b81516121e981612d5556fea26469706673582212208dab0c1b148d0ad550c597f83071158f258bea82365deccb7b7ecae133ec974764736f6c63430008180033
[ 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.