ETH Price: $3,419.56 (+0.83%)

Token

NounishCNP (NCNP)
 

Overview

Max Total Supply

3,333 NCNP

Holders

1,115

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 NCNP
0x72f16ef671cde6e375d7470eb76548c3578e640a
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
NounishCNP

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 21 : nounish_cnp.sol
// SPDX-License-Identifier: MIT
// Copyright (c) 2022 Keisuke OHNO

/*

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

*/

pragma solidity >=0.7.0 <0.9.0;

import { Base64 } from 'base64-sol/base64.sol';
import "contract-allow-list/contracts/ERC721AntiScam/ERC721AntiScam.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";


//tokenURI interface
interface iTokenURI {
    function tokenURI(uint256 _tokenId) external view returns (string memory);
}

contract NounishCNP is Ownable, ERC721AntiScam ,AccessControl {

    constructor(
    ) ERC721A("NounishCNP", "NCNP") {
        
        //Role initialization
        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setupRole(MINTER_ROLE       , msg.sender);
        _setupRole(AIRDROP_ROLE      , msg.sender);
        _setupRole(ADMIN             , msg.sender);


        //URI initialization
        setBaseURI("https://data.nounsjp.wtf/nounishcnp/metadata/");

        //CAL initialization
        setCAL(0xdbaa28cBe70aF04EbFB166b1A3E8F8034e5B9FC7);//Ethereum mainnet proxy
        addLocalContractAllowList(0xf42aa99F011A1fA7CDA90E5E98b277E306BcA83e);//looksrare
        addLocalContractAllowList(0x4feE7B061C97C9c496b01DbcE9CDb10c02f0a0Be);//rarible

        //setCAL(0xb506d7BbE23576b8AAf22477cd9A7FDF08002211);//Goerli testnet proxy
        setCALLevel(1);
        
        //first airdrop
        _safeMint(0xe86BB3269ef6F9d94e3BB5418AD06f2205B80CEc, 258);
        _safeMint(0x9d3C6d53a0768E2448Cc8021E3Af3b4Da3CEE7a6, 125);
        _safeMint(0x0Fdad22fe69e30Ba39356C9001B07cAF73BB8F5D, 125);
        _safeMint(0x2A47A46A5bCE64Ad1e3eC748255e752d3F57e96b, 125);
        //_safeMint(0xdEcf4B112d4120B6998e5020a6B4819E490F7db6, 633);

    }


    //
    //withdraw section
    //

    address public constant withdrawAddress = 0xB3A67853eA1c51779F3DedEf0f28fc1eac1349C1;

    function withdraw() public payable onlyOwner {
        (bool os, ) = payable(withdrawAddress).call{value: address(this).balance}('');
        require(os);
    }


    //
    //mint section
    //

    uint256 public cost = 3000000000000000;
    uint256 public maxSupply = 3333;
    uint256 public maxMintAmountPerTransaction = 100;
    uint256 public publicSaleMaxMintAmountPerAddress = 999;
    bool public paused = true;
    bool public onlyWhitelisted = true;
    bool public mintCount = true;
    mapping(address => uint256) public whitelistMintedAmount;
    mapping(address => uint256) public publicSaleMintedAmount;

    modifier callerIsUser() {
        require(tx.origin == msg.sender, "The caller is another contract.");
        _;
    }
 
    //mint with merkle tree
    bytes32 public merkleRoot;
    function mint(uint256 _mintAmount , uint256 _maxMintAmount , bytes32[] calldata _merkleProof ) public payable callerIsUser{
        require(!paused, "the contract is paused");
        require(0 < _mintAmount, "need to mint at least 1 NFT");
        require(_mintAmount <= maxMintAmountPerTransaction, "max mint amount per session exceeded");
        require(totalSupply() + _mintAmount <= maxSupply, "max NFT limit exceeded");
        require(cost * _mintAmount <= msg.value, "insufficient funds");

        //allow list and mint count
        if(onlyWhitelisted == true) {
            bytes32 leaf = keccak256( abi.encodePacked(msg.sender, _maxMintAmount) );
            require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "user is not whitelisted");
            if(mintCount == true){
                require(_mintAmount <= _maxMintAmount - whitelistMintedAmount[msg.sender] , "max NFT per address exceeded");
                whitelistMintedAmount[msg.sender] += _mintAmount;
            }
        }else{
            if(mintCount == true){
                require(_mintAmount <= publicSaleMaxMintAmountPerAddress - publicSaleMintedAmount[msg.sender] , "max NFT per address exceeded");
                publicSaleMintedAmount[msg.sender] += _mintAmount;
            }
        }

        _safeMint(msg.sender, _mintAmount);
    }

    function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
        merkleRoot = _merkleRoot;
    }


/*
    //mint with mapping
    mapping(address => uint256) public whitelistUserAmount;
    function mint(uint256 _mintAmount ) public payable callerIsUser{
        require(!paused, "the contract is paused");
        require(0 < _mintAmount, "need to mint at least 1 NFT");
        require(_mintAmount <= maxMintAmountPerTransaction, "max mint amount per session exceeded");
        require(totalSupply() + _mintAmount <= maxSupply, "max NFT limit exceeded");
        require(cost * _mintAmount <= msg.value, "insufficient funds");
        if(onlyWhitelisted == true) {
            require( whitelistUserAmount[msg.sender] != 0 , "user is not whitelisted");
            if(mintCount == true){
                require(_mintAmount <= whitelistUserAmount[msg.sender] - whitelistMintedAmount[msg.sender] , "max NFT per address exceeded");
                whitelistMintedAmount[msg.sender] += _mintAmount;
            }
        }else{
            if(mintCount == true){
                require(_mintAmount <= publicSaleMaxMintAmountPerAddress - publicSaleMintedAmount[msg.sender] , "max NFT per address exceeded");
                publicSaleMintedAmount[msg.sender] += _mintAmount;
            }
        }
        _safeMint(msg.sender, _mintAmount);
    }

    function setWhitelist(address[] memory addresses, uint256[] memory saleSupplies) public onlyOwner {
        require(addresses.length == saleSupplies.length);
        for (uint256 i = 0; i < addresses.length; i++) {
            whitelistUserAmount[addresses[i]] = saleSupplies[i];
        }
    }    
*/


    bytes32 public constant AIRDROP_ROLE = keccak256("AIRDROP_ROLE");
    function airdropMint(address[] calldata _airdropAddresses , uint256[] memory _UserMintAmount) public {
        require(hasRole(AIRDROP_ROLE, msg.sender), "Caller is not a air dropper");
        uint256 _mintAmount = 0;
        for (uint256 i = 0; i < _UserMintAmount.length; i++) {
            _mintAmount += _UserMintAmount[i];
        }
        require(0 < _mintAmount , "need to mint at least 1 NFT");
        require(totalSupply() + _mintAmount <= maxSupply, "max NFT limit exceeded");
        for (uint256 i = 0; i < _UserMintAmount.length; i++) {
            _safeMint(_airdropAddresses[i], _UserMintAmount[i] );
        }
    }



    function setMaxSupply(uint256 _maxSupply) public onlyOwner() {
        maxSupply = _maxSupply;
    }

    function setPublicSaleMaxMintAmountPerAddress(uint256 _publicSaleMaxMintAmountPerAddress) public onlyOwner() {
        publicSaleMaxMintAmountPerAddress = _publicSaleMaxMintAmountPerAddress;
    }

    function setCost(uint256 _newCost) public onlyOwner {
        cost = _newCost;
    }

    function setOnlyWhitelisted(bool _state) public onlyOwner {
        onlyWhitelisted = _state;
    }

    function setMaxMintAmountPerTransaction(uint256 _maxMintAmountPerTransaction) public onlyOwner {
        maxMintAmountPerTransaction = _maxMintAmountPerTransaction;
    }
  
    function pause(bool _state) public onlyOwner {
        paused = _state;
    }

    function setMintCount(bool _state) public onlyOwner {
        mintCount = _state;
    }
 


    //
    //URI section
    //

    string public baseURI;
    string public baseExtension = ".json";

    function _baseURI() internal view virtual override returns (string memory) {
        return baseURI;        
    }

    function setBaseURI(string memory _newBaseURI) public onlyOwner {
        baseURI = _newBaseURI;
    }

    function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
        baseExtension = _newBaseExtension;
    }



    //
    //interface metadata
    //

    iTokenURI public interfaceOfTokenURI;
    bool public useInterfaceMetadata = false;

    function setInterfaceOfTokenURI(address _address) public onlyOwner() {
        interfaceOfTokenURI = iTokenURI(_address);
    }

    function setUseInterfaceMetadata(bool _useInterfaceMetadata) public onlyOwner() {
        useInterfaceMetadata = _useInterfaceMetadata;
    }


    //
    //single metadata
    //

    bool public useSingleMetadata = false;
    string public imageURI;
    string public metadataTitle;
    string public metadataDescription;
    string public metadataAttributes;


    //single image metadata
    function setUseSingleMetadata(bool _useSingleMetadata) public onlyOwner() {
        useSingleMetadata = _useSingleMetadata;
    }
    function setMetadataTitle(string memory _metadataTitle) public onlyOwner {
        metadataTitle = _metadataTitle;
    }
    function setMetadataDescription(string memory _metadataDescription) public onlyOwner {
        metadataDescription = _metadataDescription;
    }
    function setMetadataAttributes(string memory _metadataAttributes) public onlyOwner {
        metadataAttributes = _metadataAttributes;
    }
    function setImageURI(string memory _newImageURI) public onlyOwner {
        imageURI = _newImageURI;
    }


    //
    //token URI
    //

    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        if (useInterfaceMetadata == true) {
            return interfaceOfTokenURI.tokenURI(tokenId);
        }
        if(useSingleMetadata == true){
            return string( abi.encodePacked( 'data:application/json;base64,' , Base64.encode(
                abi.encodePacked(
                    '{'
                        '"name":"' , metadataTitle ,'",' ,
                        '"description":"' , metadataDescription ,  '",' ,
                        '"image": "' , imageURI , '",' ,
                        '"attributes":[{"trait_type":"type","value":"' , metadataAttributes , '"}]',
                    '}'
                )
            ) ) );
        }
        return string(abi.encodePacked(ERC721A.tokenURI(tokenId), baseExtension));
    }

    function _startTokenId() internal view virtual override returns (uint256) {
        return 1;
    }



    //
    //burnin' section
    //

    bytes32 public constant MINTER_ROLE  = keccak256("MINTER_ROLE");
    bytes32 public constant BURNER_ROLE  = keccak256("BURNER_ROLE");

    function externalMint(address _address , uint256 _amount ) external payable {
        require(hasRole(MINTER_ROLE, msg.sender), "Caller is not a minter");
        require( _nextTokenId() -1 + _amount <= maxSupply , "max NFT limit exceeded");
        _safeMint( _address, _amount );
    }

    function externalBurn(uint256[] memory _burnTokenIds) external {
        require(hasRole(BURNER_ROLE, msg.sender), "Caller is not a burner");
        for (uint256 i = 0; i < _burnTokenIds.length; i++) {
            uint256 tokenId = _burnTokenIds[i];
            require(msg.sender == ownerOf(tokenId) , "Owner is different");
            _burn(tokenId);
        }        
    }




    //
    //viewer section
    //

    function tokensOfOwner(address owner) public view returns (uint256[] memory) {
        unchecked {
            uint256 tokenIdsIdx;
            address currOwnershipAddr;
            uint256 tokenIdsLength = balanceOf(owner);
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);
            TokenOwnership memory ownership;
            for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            return tokenIds;
        }
    }



    //
    //sbt section
    //

    bool public isSBT = false;

    function setIsSBT(bool _state) public onlyOwner {
        isSBT = _state;
    }

    function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity) internal virtual override{
        require( isSBT == false || from == address(0) || to == address(0x000000000000000000000000000000000000dEaD), "transfer is prohibited");
        super._beforeTokenTransfers(from, to, startTokenId, quantity);
    }

    function setApprovalForAll(address operator, bool approved) public virtual override {
        require( isSBT == false , "setApprovalForAll is prohibited");
        super.setApprovalForAll(operator, approved);
    }

    function approve(address to, uint256 tokenId) public payable virtual override {
        require( isSBT == false , "approve is prohibited");
        super.approve(to, tokenId);
    }





    //
    //ERC721AntiScam section
    //

    bytes32 public constant ADMIN = keccak256("ADMIN");

    /*///////////////////////////////////////////////////////////////
                        OVERRIDES ERC721Lockable
    //////////////////////////////////////////////////////////////*/
    function setTokenLock(uint256[] calldata tokenIds, LockStatus lockStatus)
        public
        override
    {
        //for (uint256 i = 0; i < tokenIds.length; i++) {
        //    require(msg.sender == ownerOf(tokenIds[i]), "not owner.");
        //}
        //_setTokenLock(tokenIds, lockStatus);
    }

    function setWalletLock(address to, LockStatus lockStatus)
        public
        override
    {
        //require(to == msg.sender, "not yourself.");
        //_setWalletLock(to, lockStatus);
    }

    function setContractLock(LockStatus lockStatus)
        public
        override
        onlyOwner
    {
        _setContractLock(lockStatus);
    }

    /*///////////////////////////////////////////////////////////////
                    OVERRIDES ERC721RestrictApprove
    //////////////////////////////////////////////////////////////*/
    function addLocalContractAllowList(address transferer)
        public
        override
        onlyRole(ADMIN)
    {
        _addLocalContractAllowList(transferer);
    }

    function removeLocalContractAllowList(address transferer)
        public
        override
        onlyRole(ADMIN)
    {
        _removeLocalContractAllowList(transferer);
    }

    function setCALLevel(uint256 level) public override onlyRole(ADMIN) {
        CALLevel = level;
    }

    function setCAL(address calAddress) public override onlyRole(ADMIN) {
        _setCAL(calAddress);
    }

    /*///////////////////////////////////////////////////////////////
                    OVERRIDES ERC721AntiScam
    //////////////////////////////////////////////////////////////*/
    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC721AntiScam, AccessControl)
        returns (bool)
    {
        return
            AccessControl.supportsInterface(interfaceId) ||
            ERC721AntiScam.supportsInterface(interfaceId);
    }





}

File 2 of 21 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The tree and the proofs can be generated using our
 * https://github.com/OpenZeppelin/merkle-tree[JavaScript library].
 * You will find a quickstart guide in the readme.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 * OpenZeppelin's JavaScript library generates merkle trees that are safe
 * against this attack out of the box.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Calldata version of {verify}
     *
     * _Available since v4.7._
     */
    function verifyCalldata(
        bytes32[] calldata proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProofCalldata(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Calldata version of {processProof}
     *
     * _Available since v4.7._
     */
    function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            computedHash = _hashPair(computedHash, proof[i]);
        }
        return computedHash;
    }

    /**
     * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction
     * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another
     * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false
     * respectively.
     *
     * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree
     * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the
     * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer).
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    /**
     * @dev Calldata version of {processMultiProof}.
     *
     * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details.
     *
     * _Available since v4.7._
     */
    function processMultiProofCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

        // Check proof validity.
        require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof");

        // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using
        // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop".
        bytes32[] memory hashes = new bytes32[](totalHashes);
        uint256 leafPos = 0;
        uint256 hashPos = 0;
        uint256 proofPos = 0;
        // At each step, we compute the next hash using two values:
        // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we
        //   get the next hash.
        // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the
        //   `proof` array.
        for (uint256 i = 0; i < totalHashes; i++) {
            bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++];
            bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++];
            hashes[i] = _hashPair(a, b);
        }

        if (totalHashes > 0) {
            return hashes[totalHashes - 1];
        } else if (leavesLen > 0) {
            return leaves[0];
        } else {
            return proof[0];
        }
    }

    function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) {
        return a < b ? _efficientHash(a, b) : _efficientHash(b, a);
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        /// @solidity memory-safe-assembly
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 3 of 21 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 21 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role);
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view virtual {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(account),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleGranted} event.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     *
     * May emit a {RoleRevoked} event.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been revoked `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     *
     * May emit a {RoleRevoked} event.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * May emit a {RoleGranted} event.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     *
     * NOTE: This function is deprecated in favor of {_grantRole}.
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 5 of 21 : ERC721AntiScam.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import "./IERC721AntiScam.sol";
import "./lockable/ERC721Lockable.sol";
import "./restrictApprove/ERC721RestrictApprove.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

/// @title AntiScam機能付きERC721A
/// @dev Readmeを見てください。

abstract contract ERC721AntiScam is
    IERC721AntiScam,
    ERC721Lockable,
    ERC721RestrictApprove,
    Ownable
{

    /*///////////////////////////////////////////////////////////////
                              OVERRIDES
    //////////////////////////////////////////////////////////////*/

    function isApprovedForAll(address owner, address operator)
        public
        view
        virtual
        override(ERC721Lockable, ERC721RestrictApprove)
        returns (bool)
    {
        if (isLocked(owner) || !_isAllowed(owner, operator)) {
            return false;
        }
        return super.isApprovedForAll(owner, operator);
    }

    function setApprovalForAll(address operator, bool approved)
        public
        virtual
        override(ERC721Lockable, ERC721RestrictApprove)
    {
        require(
            isLocked(msg.sender) == false || approved == false,
            "Can not approve locked token"
        );
        require(
            _isAllowed(operator) || approved == false,
            "RestrictApprove: Can not approve locked token"
        );
        super.setApprovalForAll(operator, approved);
    }

    function _beforeApprove(address to, uint256 tokenId)
        internal
        virtual
        override(ERC721Lockable, ERC721RestrictApprove)
    {
        ERC721Lockable._beforeApprove(to, tokenId);
        ERC721RestrictApprove._beforeApprove(to, tokenId);
    }

    function approve(address to, uint256 tokenId)
        public
        payable
        virtual
        override(ERC721Lockable, ERC721RestrictApprove)
    {
        _beforeApprove(to, tokenId);
        ERC721A.approve(to, tokenId);
    }

    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual override(ERC721A, ERC721Lockable) {
        ERC721Lockable._beforeTokenTransfers(from, to, startTokenId, quantity);
    }

    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual override(ERC721Lockable, ERC721RestrictApprove) {
        ERC721Lockable._afterTokenTransfers(from, to, startTokenId, quantity);
        ERC721RestrictApprove._afterTokenTransfers(from, to, startTokenId, quantity);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(ERC721Lockable, ERC721RestrictApprove)
        returns (bool)
    {
        return
            ERC721A.supportsInterface(interfaceId) ||
            ERC721Lockable.supportsInterface(interfaceId) ||
            ERC721RestrictApprove.supportsInterface(interfaceId) ||
            interfaceId == type(IERC721AntiScam).interfaceId;
    }
}

File 6 of 21 : base64.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides functions for encoding/decoding base64
library Base64 {
    string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
    bytes  internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000"
                                            hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
                                            hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
                                            hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";

    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return '';

        // load the table into memory
        string memory table = TABLE_ENCODE;

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((data.length + 2) / 3);

        // add some extra buffer at the end required for the writing
        string memory result = new string(encodedLen + 32);

        assembly {
            // set the actual output length
            mstore(result, encodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 3 bytes at a time
            for {} lt(dataPtr, endPtr) {}
            {
                // read 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // write 4 characters
                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(        input,  0x3F))))
                resultPtr := add(resultPtr, 1)
            }

            // padding with '='
            switch mod(mload(data), 3)
            case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
            case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
        }

        return result;
    }

    function decode(string memory _data) internal pure returns (bytes memory) {
        bytes memory data = bytes(_data);

        if (data.length == 0) return new bytes(0);
        require(data.length % 4 == 0, "invalid base64 decoder input");

        // load the table into memory
        bytes memory table = TABLE_DECODE;

        // every 4 characters represent 3 bytes
        uint256 decodedLen = (data.length / 4) * 3;

        // add some extra buffer at the end required for the writing
        bytes memory result = new bytes(decodedLen + 32);

        assembly {
            // padding with '='
            let lastBytes := mload(add(data, mload(data)))
            if eq(and(lastBytes, 0xFF), 0x3d) {
                decodedLen := sub(decodedLen, 1)
                if eq(and(lastBytes, 0xFFFF), 0x3d3d) {
                    decodedLen := sub(decodedLen, 1)
                }
            }

            // set the actual output length
            mstore(result, decodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 4 characters at a time
            for {} lt(dataPtr, endPtr) {}
            {
               // read 4 characters
               dataPtr := add(dataPtr, 4)
               let input := mload(dataPtr)

               // write 3 bytes
               let output := add(
                   add(
                       shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)),
                       shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))),
                   add(
                       shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)),
                               and(mload(add(tablePtr, and(        input , 0xFF))), 0xFF)
                    )
                )
                mstore(resultPtr, shl(232, output))
                resultPtr := add(resultPtr, 3)
            }
        }

        return result;
    }
}

File 7 of 21 : ERC721RestrictApprove.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import "erc721a/contracts/ERC721A.sol";
import "./IERC721RestrictApprove.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "../../proxy/interface/IContractAllowListProxy.sol";

/// @title AntiScam機能付きERC721A
/// @dev Readmeを見てください。

abstract contract ERC721RestrictApprove is ERC721A, IERC721RestrictApprove {
    using EnumerableSet for EnumerableSet.AddressSet;

    IContractAllowListProxy public CAL;
    EnumerableSet.AddressSet localAllowedAddresses;

    modifier onlyHolder(uint256 tokenId) {
        require(
            msg.sender == ownerOf(tokenId),
            "RestrictApprove: operation is only holder."
        );
        _;
    }

    /*//////////////////////////////////////////////////////////////
    変数
    //////////////////////////////////////////////////////////////*/
    bool public enableRestrict = true;

    // token lock
    mapping(uint256 => uint256) public tokenCALLevel;

    // wallet lock
    mapping(address => uint256) public walletCALLevel;

    // contract lock
    uint256 public CALLevel = 1;

    /*///////////////////////////////////////////////////////////////
    Approve抑制機能ロジック
    //////////////////////////////////////////////////////////////*/
    function _addLocalContractAllowList(address transferer)
        internal
        virtual
    {
        localAllowedAddresses.add(transferer);
        emit LocalCalAdded(msg.sender, transferer);
    }

    function _removeLocalContractAllowList(address transferer)
        internal
        virtual
    {
        localAllowedAddresses.remove(transferer);
        emit LocalCalRemoved(msg.sender, transferer);
    }

    function _isLocalAllowed(address transferer)
        internal
        view
        virtual
        returns (bool)
    {
        return localAllowedAddresses.contains(transferer);
    }

    function _isAllowed(address transferer)
        internal
        view
        virtual
        returns (bool)
    {
        return _isAllowed(msg.sender, transferer);
    }

    function _isAllowed(uint256 tokenId, address transferer)
        internal
        view
        virtual
        returns (bool)
    {
        uint256 level = _getCALLevel(msg.sender, tokenId);
        return _isAllowed(transferer, level);
    }

    function _isAllowed(address holder, address transferer)
        internal
        view
        virtual
        returns (bool)
    {
        uint256 level = _getCALLevel(holder);
        return _isAllowed(transferer, level);
    }

    function _isAllowed(address transferer, uint256 level)
        internal
        view
        virtual
        returns (bool)
    {
        if (!enableRestrict) {
            return true;
        }

        return _isLocalAllowed(transferer) || CAL.isAllowed(transferer, level);
    }

    function _getCALLevel(address holder, uint256 tokenId)
        internal
        view
        virtual
        returns (uint256)
    {
        if (tokenCALLevel[tokenId] > 0) {
            return tokenCALLevel[tokenId];
        }

        return _getCALLevel(holder);
    }

    function _getCALLevel(address holder)
        internal
        view
        virtual
        returns (uint256)
    {
        if (walletCALLevel[holder] > 0) {
            return walletCALLevel[holder];
        }

        return CALLevel;
    }

    function _setCAL(address _cal) internal virtual {
        CAL = IContractAllowListProxy(_cal);
    }

    function _deleteTokenCALLevel(uint256 tokenId) internal virtual {
        delete tokenCALLevel[tokenId];
    }

    function setTokenCALLevel(uint256 tokenId, uint256 level)
        external
        virtual
        onlyHolder(tokenId)
    {
        tokenCALLevel[tokenId] = level;
    }

    function setWalletCALLevel(uint256 level)
        external
        virtual
    {
        walletCALLevel[msg.sender] = level;
    }

    /*///////////////////////////////////////////////////////////////
                              OVERRIDES
    //////////////////////////////////////////////////////////////*/

    function isApprovedForAll(address owner, address operator)
        public
        view
        virtual
        override
        returns (bool)
    {
        if (_isAllowed(owner, operator) == false) {
            return false;
        }
        return super.isApprovedForAll(owner, operator);
    }

    function setApprovalForAll(address operator, bool approved)
        public
        virtual
        override
    {
        require(
            _isAllowed(operator) || approved == false,
            "RestrictApprove: Can not approve locked token"
        );
        super.setApprovalForAll(operator, approved);
    }

    function _beforeApprove(address to, uint256 tokenId)
        internal
        virtual
    {
        if (to != address(0)) {
            require(_isAllowed(tokenId, to), "RestrictApprove: The contract is not allowed.");
        }
    }

    function approve(address to, uint256 tokenId)
        public
        payable
        virtual
        override
    {
        _beforeApprove(to, tokenId);
        super.approve(to, tokenId);
    }

    function _afterTokenTransfers(
        address from,
        address, /*to*/
        uint256 startTokenId,
        uint256 /*quantity*/
    ) internal virtual override {
        // 転送やバーンにおいては、常にstartTokenIdは TokenIDそのものとなります。
        if (from != address(0)) {
            // CALレベルをデフォルトに戻す。
            _deleteTokenCALLevel(startTokenId);
        }
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceId == type(IERC721RestrictApprove).interfaceId ||
            super.supportsInterface(interfaceId);
    }
}

File 8 of 21 : ERC721Lockable.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import "./IERC721Lockable.sol";
import "erc721a/contracts/ERC721A.sol";

/// @title トークンのtransfer抑止機能付きコントラクト
/// @dev Readmeを見てください。

abstract contract ERC721Lockable is ERC721A, IERC721Lockable {
    /*//////////////////////////////////////////////////////////////
    ロック変数。トークンごとに個別ロック設定を行う
    //////////////////////////////////////////////////////////////*/
    bool public enableLock = true;
    LockStatus public contractLockStatus = LockStatus.UnLock;

    // token lock
    mapping(uint256 => LockStatus) public tokenLock;

    // wallet lock
    mapping(address => LockStatus) public walletLock;

    /*//////////////////////////////////////////////////////////////
    modifier
    //////////////////////////////////////////////////////////////*/
    modifier existToken(uint256 tokenId) {
        require(
            _exists(tokenId),
            "Lockable: locking query for nonexistent token"
        );
        _;
    }

    /*///////////////////////////////////////////////////////////////
    ロック機能ロジック
    //////////////////////////////////////////////////////////////*/

    // function getLockStatus(uint256 tokenId) external view returns (LockStatus) existToken(tokenId) {
    //     return _getLockStatus(ownerOf(tokenId), tokenId);
    // }

    function isLocked(uint256 tokenId)
        public
        view
        override
        existToken(tokenId)
        returns (bool)
    {
        if (!enableLock) {
            return false;
        }

        if (
            tokenLock[tokenId] == LockStatus.Lock ||
            (tokenLock[tokenId] == LockStatus.UnSet &&
                isLocked(ownerOf(tokenId)))
        ) {
            return true;
        }

        return false;
    }

    function isLocked(address holder) public view override returns (bool) {
        if (!enableLock) {
            return false;
        }

        if (
            walletLock[holder] == LockStatus.Lock ||
            (walletLock[holder] == LockStatus.UnSet &&
                contractLockStatus == LockStatus.Lock)
        ) {
            return true;
        }

        return false;
    }

    function getTokensUnderLock() public view override returns (uint256[] memory) {
        uint256 start = _startTokenId();
        uint256 end = _nextTokenId();

        return getTokensUnderLock(start, end);
    }

    function getTokensUnderLock(uint256 start, uint256 end)
        public
        view
        override
        returns (uint256[] memory)
    {
        bool[] memory lockList = new bool[](end - start + 1);
        uint256 i = 0;
        uint256 lockCount = 0;
        for (uint256 tokenId = start; tokenId <= end; tokenId++) {
            if (_exists(tokenId) && isLocked(tokenId)) {
                lockList[i] = true;
                lockCount++;
            } else {
                lockList[i] = false;
            }

            i++;
        }

        uint256[] memory tokensUnderLock = new uint256[](lockCount);

        i = 0;
        uint256 j = 0;
        for (uint256 tokenId = start; tokenId <= end; tokenId++) {
            if (lockList[i]) {
                tokensUnderLock[j] = tokenId;
                j++;
            }

            i++;
        }

        return tokensUnderLock;
    }

    function _deleteTokenLock(uint256 tokenId) internal virtual {
        delete tokenLock[tokenId];
    }

    function _setTokenLock(uint256[] calldata tokenIds, LockStatus lockStatus)
        internal
    {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            tokenLock[tokenIds[i]] = lockStatus;
            emit TokenLock(
                ownerOf(tokenIds[i]),
                msg.sender,
                lockStatus,
                tokenIds[i]
            );
        }
    }

    function _setWalletLock(address to, LockStatus lockStatus) internal {
        walletLock[to] = lockStatus;
        emit WalletLock(to, msg.sender, lockStatus);
    }

    function _setContractLock(LockStatus lockStatus) internal {
        contractLockStatus = lockStatus;
    }

    /*///////////////////////////////////////////////////////////////
                              OVERRIDES
    //////////////////////////////////////////////////////////////*/

    function isApprovedForAll(address owner, address operator)
        public
        view
        virtual
        override
        returns (bool)
    {
        if (isLocked(owner)) {
            return false;
        }
        return super.isApprovedForAll(owner, operator);
    }

    function setApprovalForAll(address operator, bool approved)
        public
        virtual
        override
    {
        require(
            isLocked(msg.sender) == false || approved == false,
            "Can not approve locked token"
        );
        super.setApprovalForAll(operator, approved);
    }

    function _beforeApprove(address /**to**/, uint256 tokenId) internal virtual {
        require(
            isLocked(tokenId) == false,
            "Lockable: Can not approve locked token"
        );
    }

    function approve(address to, uint256 tokenId)
        public
        payable
        virtual
        override
    {
        _beforeApprove(to, tokenId);
        super.approve(to, tokenId);
    }

    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 /*quantity*/
    ) internal virtual override {
        // 転送やバーンにおいては、常にstartTokenIdは TokenIDそのものとなります。
        if (from != address(0) && to != address(0)) {
            // トークンがロックされている場合、転送を許可しない
            require(
                isLocked(startTokenId) == false,
                "Lockable: Can not transfer locked token"
            );
        }
    }

    function _afterTokenTransfers(
        address from,
        address, /*to*/
        uint256 startTokenId,
        uint256 /*quantity*/
    ) internal virtual override {
        // 転送やバーンにおいては、常にstartTokenIdは TokenIDそのものとなります。
        if (from != address(0)) {
            // ロックをデフォルトに戻す。
            _deleteTokenLock(startTokenId);
        }
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override
        returns (bool)
    {
        return
            interfaceId == type(IERC721Lockable).interfaceId ||
            super.supportsInterface(interfaceId);
    }
}

File 9 of 21 : IERC721AntiScam.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

import "./lockable/IERC721Lockable.sol";
import "./restrictApprove/IERC721RestrictApprove.sol";

/// @title IERC721AntiScam
/// @dev 詐欺防止機能付きコントラクトのインターフェース
/// @author hayatti.eth

interface IERC721AntiScam is IERC721Lockable, IERC721RestrictApprove {
}

File 10 of 21 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 11 of 21 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 12 of 21 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _SYMBOLS = "0123456789abcdef";
    uint8 private constant _ADDRESS_LENGTH = 20;

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
    }
}

File 13 of 21 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 14 of 21 : IContractAllowListProxy.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.0 <0.9.0;

interface IContractAllowListProxy {
    function isAllowed(address _transferer, uint256 _level)
        external
        view
        returns (bool);
}

File 15 of 21 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 16 of 21 : IERC721RestrictApprove.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/// @title IERC721RestrictApprove
/// @dev Approve抑制機能付きコントラクトのインターフェース
/// @author Lavulite

interface IERC721RestrictApprove {
    /**
     * @dev CALレベルが変更された場合のイベント
     */
    event CalLevelChanged(address indexed operator, uint256 indexed level);
    
    /**
     * @dev LocalContractAllowListnに追加された場合のイベント
     */
    event LocalCalAdded(address indexed operator, address indexed transferer);

    /**
     * @dev LocalContractAllowListnに削除された場合のイベント
     */
    event LocalCalRemoved(address indexed operator, address indexed transferer);

    /**
     * @dev CALを利用する場合のCALのレベルを設定する。レベルが高いほど、許可されるコントラクトの範囲が狭い。
     */
    function setCALLevel(uint256 level) external;

    /**
     * @dev CALのアドレスをセットする。
     */
    function setCAL(address calAddress) external;

    /**
     * @dev CALのリストに無い独自の許可アドレスを追加する場合、こちらにアドレスを記載する。
     */
    function addLocalContractAllowList(address transferer) external;

    /**
     * @dev CALのリストにある独自の許可アドレスを削除する場合、こちらにアドレスを記載する。
     */
    function removeLocalContractAllowList(address transferer) external;

}

File 17 of 21 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

/**
 * @dev Interface of ERC721 token receiver.
 */
interface ERC721A__IERC721Receiver {
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @title ERC721A
 *
 * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721)
 * Non-Fungible Token Standard, including the Metadata extension.
 * Optimized for lower gas during batch mints.
 *
 * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...)
 * starting from `_startTokenId()`.
 *
 * Assumptions:
 *
 * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364).
    struct TokenApprovalRef {
        address value;
    }

    // =============================================================
    //                           CONSTANTS
    // =============================================================

    // Mask of an entry in packed address data.
    uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

    // The bit position of `numberMinted` in packed address data.
    uint256 private constant _BITPOS_NUMBER_MINTED = 64;

    // The bit position of `numberBurned` in packed address data.
    uint256 private constant _BITPOS_NUMBER_BURNED = 128;

    // The bit position of `aux` in packed address data.
    uint256 private constant _BITPOS_AUX = 192;

    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.
    uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

    // The bit position of `startTimestamp` in packed ownership.
    uint256 private constant _BITPOS_START_TIMESTAMP = 160;

    // The bit mask of the `burned` bit in packed ownership.
    uint256 private constant _BITMASK_BURNED = 1 << 224;

    // The bit position of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITPOS_NEXT_INITIALIZED = 225;

    // The bit mask of the `nextInitialized` bit in packed ownership.
    uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225;

    // The bit position of `extraData` in packed ownership.
    uint256 private constant _BITPOS_EXTRA_DATA = 232;

    // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
    uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;

    // The mask of the lower 160 bits for addresses.
    uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1;

    // The maximum `quantity` that can be minted with {_mintERC2309}.
    // This limit is to prevent overflows on the address data entries.
    // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309}
    // is required to cause an overflow, which is unrealistic.
    uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;

    // The `Transfer` event signature is given by:
    // `keccak256(bytes("Transfer(address,address,uint256)"))`.
    bytes32 private constant _TRANSFER_EVENT_SIGNATURE =
        0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef;

    // =============================================================
    //                            STORAGE
    // =============================================================

    // The next token ID to be minted.
    uint256 private _currentIndex;

    // The number of tokens burned.
    uint256 private _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned.
    // See {_packedOwnershipOf} implementation for details.
    //
    // Bits Layout:
    // - [0..159]   `addr`
    // - [160..223] `startTimestamp`
    // - [224]      `burned`
    // - [225]      `nextInitialized`
    // - [232..255] `extraData`
    mapping(uint256 => uint256) private _packedOwnerships;

    // Mapping owner address to address data.
    //
    // Bits Layout:
    // - [0..63]    `balance`
    // - [64..127]  `numberMinted`
    // - [128..191] `numberBurned`
    // - [192..255] `aux`
    mapping(address => uint256) private _packedAddressData;

    // Mapping from token ID to approved address.
    mapping(uint256 => TokenApprovalRef) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    // =============================================================
    //                          CONSTRUCTOR
    // =============================================================

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    // =============================================================
    //                   TOKEN COUNTING OPERATIONS
    // =============================================================

    /**
     * @dev Returns the starting token ID.
     * To change the starting token ID, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view virtual returns (uint256) {
        return _currentIndex;
    }

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than `_currentIndex - _startTokenId()` times.
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * @dev Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view virtual returns (uint256) {
        // Counter underflow is impossible as `_currentIndex` does not decrement,
        // and it is initialized to `_startTokenId()`.
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view virtual returns (uint256) {
        return _burnCounter;
    }

    // =============================================================
    //                    ADDRESS DATA OPERATIONS
    // =============================================================

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return uint64(_packedAddressData[owner] >> _BITPOS_AUX);
    }

    /**
     * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal virtual {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes
        // of the XOR of all function selectors in the interface.
        // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165)
        // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`)
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

    /**
     * @dev Returns the token collection name.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, it can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    // =============================================================
    //                     OWNERSHIPS OPERATIONS
    // =============================================================

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

    /**
     * @dev Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around over time.
     */
    function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnershipOf(tokenId));
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct at `index`.
     */
    function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnerships[index]);
    }

    /**
     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.
     */
    function _initializeOwnershipAt(uint256 index) internal virtual {
        if (_packedOwnerships[index] == 0) {
            _packedOwnerships[index] = _packedOwnershipOf(index);
        }
    }

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    uint256 packed = _packedOwnerships[curr];
                    // If not burned.
                    if (packed & _BITMASK_BURNED == 0) {
                        // Invariant:
                        // There will always be an initialized ownership slot
                        // (i.e. `ownership.addr != address(0) && ownership.burned == false`)
                        // before an unintialized ownership slot
                        // (i.e. `ownership.addr == address(0) && ownership.burned == false`)
                        // Hence, `curr` will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed will be zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * @dev Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP);
        ownership.burned = packed & _BITMASK_BURNED != 0;
        ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA);
    }

    /**
     * @dev Packs ownership data into a single uint256.
     */
    function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`.
            result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags))
        }
    }

    /**
     * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
     */
    function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
        // For branchless setting of the `nextInitialized` flag.
        assembly {
            // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`.
            result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
        }
    }

    // =============================================================
    //                      APPROVAL OPERATIONS
    // =============================================================

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the
     * zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) public payable virtual override {
        address owner = ownerOf(tokenId);

        if (_msgSenderERC721A() != owner)
            if (!isApprovedForAll(owner, _msgSenderERC721A())) {
                revert ApprovalCallerNotOwnerNorApproved();
            }

        _tokenApprovals[tokenId].value = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId].value;
    }

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom}
     * for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _operatorApprovals[_msgSenderERC721A()][operator] = approved;
        emit ApprovalForAll(_msgSenderERC721A(), operator, approved);
    }

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted. See {_mint}.
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`.
     */
    function _isSenderApprovedOrOwner(
        address approvedAddress,
        address owner,
        address msgSender
    ) private pure returns (bool result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, _BITMASK_ADDRESS)
            // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
            msgSender := and(msgSender, _BITMASK_ADDRESS)
            // `msgSender == owner || msgSender == approvedAddress`.
            result := or(eq(msgSender, owner), eq(msgSender, approvedAddress))
        }
    }

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedSlotAndAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId];
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`.
        assembly {
            approvedAddressSlot := tokenApproval.slot
            approvedAddress := sload(approvedAddressSlot)
        }
    }

    // =============================================================
    //                      TRANSFER OPERATIONS
    // =============================================================

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
            if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();

        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // We can directly increment and decrement the balances.
            --_packedAddressData[from]; // Updates: `balance -= 1`.
            ++_packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                to,
                _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public payable virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public payable virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

    /**
     * @dev Hook that is called before a set of serially-ordered token IDs
     * are about to be transferred. This includes minting.
     * And also called before burning one token.
     *
     * `startTokenId` - the first token ID to be transferred.
     * `quantity` - the amount to be transferred.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token IDs
     * have been transferred. This includes minting.
     * And also called after one token has been burned.
     *
     * `startTokenId` - the first token ID to be transferred.
     * `quantity` - the amount to be transferred.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * `from` - Previous owner of the given token ID.
     * `to` - Target address that will receive the token.
     * `tokenId` - Token ID to be transferred.
     * `_data` - Optional data to send along with the call.
     *
     * Returns whether the call correctly returned the expected magic value.
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
            bytes4 retval
        ) {
            return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    // =============================================================
    //                        MINT OPERATIONS
    // =============================================================

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _mint(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

            // Use assembly to loop and emit the `Transfer` event for gas savings.
            // The duplicated `log4` removes an extra check and reduces stack juggling.
            // The assembly, together with the surrounding Solidity code, have been
            // delicately arranged to nudge the compiler into producing optimized opcodes.
            assembly {
                // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
                toMasked := and(to, _BITMASK_ADDRESS)
                // Emit the `Transfer` event.
                log4(
                    0, // Start of data (0, since no data).
                    0, // End of data (0, since no data).
                    _TRANSFER_EVENT_SIGNATURE, // Signature.
                    0, // `address(0)`.
                    toMasked, // `to`.
                    startTokenId // `tokenId`.
                )

                // The `iszero(eq(,))` check ensures that large values of `quantity`
                // that overflows uint256 will make the loop run out of gas.
                // The compiler will optimize the `iszero` away for performance.
                for {
                    let tokenId := add(startTokenId, 1)
                } iszero(eq(tokenId, end)) {
                    tokenId := add(tokenId, 1)
                } {
                    // Emit the `Transfer` event. Similar to above.
                    log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId)
                }
            }
            if (toMasked == 0) revert MintToZeroAddress();

            _currentIndex = end;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal virtual {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);

            _currentIndex = startTokenId + quantity;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal virtual {
        _mint(to, quantity);

        unchecked {
            if (to.code.length != 0) {
                uint256 end = _currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (_currentIndex != end) revert();
            }
        }
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal virtual {
        _safeMint(to, quantity, '');
    }

    // =============================================================
    //                        BURN OPERATIONS
    // =============================================================

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        address from = address(uint160(prevOwnershipPacked));

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A()))
                if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`.
            _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1;

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                from,
                (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

    // =============================================================
    //                     EXTRA DATA OPERATIONS
    // =============================================================

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual {
        uint256 packed = _packedOwnerships[index];
        if (packed == 0) revert OwnershipNotInitializedForExtraData();
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA);
        _packedOwnerships[index] = packed;
    }

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

    /**
     * @dev Returns the next extra data for the packed ownership data.
     * The returned result is shifted into position.
     */
    function _nextExtraData(
        address from,
        address to,
        uint256 prevOwnershipPacked
    ) private view returns (uint256) {
        uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA);
        return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA;
    }

    // =============================================================
    //                       OTHER OPERATIONS
    // =============================================================

    /**
     * @dev Returns the message sender (defaults to `msg.sender`).
     *
     * If you are writing GSN compatible contracts, you need to override this function.
     */
    function _msgSenderERC721A() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @dev Converts a uint256 to its ASCII string decimal representation.
     */
    function _toString(uint256 value) internal pure virtual returns (string memory str) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit), but
            // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned.
            // We will need 1 word for the trailing zeros padding, 1 word for the length,
            // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0.
            let m := add(mload(0x40), 0xa0)
            // Update the free memory pointer to allocate.
            mstore(0x40, m)
            // Assign the `str` to the end.
            str := sub(m, 0x20)
            // Zeroize the slot after the string.
            mstore(str, 0)

            // Cache the end of the memory to calculate the length later.
            let end := str

            // We write the string from rightmost digit to leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // prettier-ignore
            for { let temp := value } 1 {} {
                str := sub(str, 1)
                // Write the character to the pointer.
                // The ASCII index of the '0' character is 48.
                mstore8(str, add(48, mod(temp, 10)))
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
                // prettier-ignore
                if iszero(temp) { break }
            }

            let length := sub(end, str)
            // Move the pointer 32 bytes leftwards to make room for the length.
            str := sub(str, 0x20)
            // Store the length.
            mstore(str, length)
        }
    }
}

File 18 of 21 : IERC721Lockable.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.8.0;

/**
 * @title IERC721Lockable
 * @dev トークンのtransfer抑止機能付きコントラクトのインターフェース
 * @author Lavulite
 */
interface IERC721Lockable {

   enum LockStatus {
      UnSet,
      UnLock,
      Lock
   }

    /**
     * @dev 個別ロックが指定された場合のイベント
     */
    event TokenLock(address indexed holder, address indexed operator, LockStatus lockStatus, uint256 indexed tokenId);
    
    /**
     * @dev ウォレットロックが指定された場合のイベント
     */
    event WalletLock(address indexed holder, address indexed operator, LockStatus lockStatus);

    /**
     * @dev 該当トークンIDのロックステータスを変更する。
     */
    function setTokenLock(uint256[] calldata tokenIds, LockStatus lockStatus) external;

    /**
     * @dev 該当ウォレットのロックステータスを変更する。
     */
    function setWalletLock(address to, LockStatus lockStatus) external;

    /**
     * @dev コントラクトのロックステータスを変更する。
     */
    function setContractLock(LockStatus lockStatus) external;

    /**
     * @dev 該当トークンIDがロックされているかを返す
     */
    function isLocked(uint256 tokenId) external view returns (bool);
    
    /**
     * @dev ウォレットロックを行っているかを返す
     */
    function isLocked(address holder) external view returns (bool);

    /**
     * @dev 転送が拒否されているトークンを全て返す
     */
    function getTokensUnderLock() external view returns (uint256[] memory);

    /**
     * @dev 転送が拒否されているstartからstopまでのトークンIDを返す
     */
    function getTokensUnderLock(uint256 start, uint256 end) external view returns (uint256[] memory);

}

File 19 of 21 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 20 of 21 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

File 21 of 21 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of ERC721A.
 */
interface IERC721A {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the
     * ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    /**
     * The `quantity` minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The `extraData` cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

    // =============================================================
    //                            STRUCTS
    // =============================================================

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Stores the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}.
        uint24 extraData;
    }

    // =============================================================
    //                         TOKEN COUNTERS
    // =============================================================

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see {_totalMinted}.
     */
    function totalSupply() external view returns (uint256);

    // =============================================================
    //                            IERC165
    // =============================================================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified)
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

    // =============================================================
    //                            IERC721
    // =============================================================

    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables
     * (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in `owner`'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`,
     * checking first that contract recipients are aware of the ERC721 protocol
     * to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move
     * this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement
     * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external payable;

    /**
     * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external payable;

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom}
     * whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token
     * by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external payable;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the
     * zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external payable;

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom}
     * for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    // =============================================================
    //                        IERC721Metadata
    // =============================================================

    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);

    // =============================================================
    //                           IERC2309
    // =============================================================

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId`
     * (inclusive) is transferred from `from` to `to`, as defined in the
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard.
     *
     * See {_mintERC2309} for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"uint256","name":"level","type":"uint256"}],"name":"CalLevelChanged","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":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"transferer","type":"address"}],"name":"LocalCalAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"transferer","type":"address"}],"name":"LocalCalRemoved","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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"holder","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"enum IERC721Lockable.LockStatus","name":"lockStatus","type":"uint8"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"holder","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"enum IERC721Lockable.LockStatus","name":"lockStatus","type":"uint8"}],"name":"WalletLock","type":"event"},{"inputs":[],"name":"ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"AIRDROP_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CAL","outputs":[{"internalType":"contract IContractAllowListProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CALLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"transferer","type":"address"}],"name":"addLocalContractAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_airdropAddresses","type":"address[]"},{"internalType":"uint256[]","name":"_UserMintAmount","type":"uint256[]"}],"name":"airdropMint","outputs":[],"stateMutability":"nonpayable","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":[],"name":"baseExtension","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractLockStatus","outputs":[{"internalType":"enum IERC721Lockable.LockStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableLock","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableRestrict","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_burnTokenIds","type":"uint256[]"}],"name":"externalBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"externalMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"getTokensUnderLock","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTokensUnderLock","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"imageURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"interfaceOfTokenURI","outputs":[{"internalType":"contract iTokenURI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"holder","type":"address"}],"name":"isLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSBT","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintAmountPerTransaction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataAttributes","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataDescription","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataTitle","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintAmount","type":"uint256"},{"internalType":"uint256","name":"_maxMintAmount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintCount","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onlyWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleMaxMintAmountPerAddress","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"publicSaleMintedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"transferer","type":"address"}],"name":"removeLocalContractAllowList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseExtension","type":"string"}],"name":"setBaseExtension","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"calAddress","type":"address"}],"name":"setCAL","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"level","type":"uint256"}],"name":"setCALLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum IERC721Lockable.LockStatus","name":"lockStatus","type":"uint8"}],"name":"setContractLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newCost","type":"uint256"}],"name":"setCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newImageURI","type":"string"}],"name":"setImageURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setInterfaceOfTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setIsSBT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxMintAmountPerTransaction","type":"uint256"}],"name":"setMaxMintAmountPerTransaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_metadataAttributes","type":"string"}],"name":"setMetadataAttributes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_metadataDescription","type":"string"}],"name":"setMetadataDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_metadataTitle","type":"string"}],"name":"setMetadataTitle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setMintCount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_state","type":"bool"}],"name":"setOnlyWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicSaleMaxMintAmountPerAddress","type":"uint256"}],"name":"setPublicSaleMaxMintAmountPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"level","type":"uint256"}],"name":"setTokenCALLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"enum IERC721Lockable.LockStatus","name":"lockStatus","type":"uint8"}],"name":"setTokenLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_useInterfaceMetadata","type":"bool"}],"name":"setUseInterfaceMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_useSingleMetadata","type":"bool"}],"name":"setUseSingleMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"level","type":"uint256"}],"name":"setWalletCALLevel","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"enum IERC721Lockable.LockStatus","name":"lockStatus","type":"uint8"}],"name":"setWalletLock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenCALLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenLock","outputs":[{"internalType":"enum IERC721Lockable.LockStatus","name":"","type":"uint8"}],"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":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"useInterfaceMetadata","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"useSingleMetadata","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"walletCALLevel","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"walletLock","outputs":[{"internalType":"enum IERC721Lockable.LockStatus","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistMintedAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"withdrawAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

6008805461ffff1916610101179055600e805460ff19166001908117909155601155660aa87bee538000601455610d0560155560646016556103e76017556018805462ffffff19166201010117905560c06040526005608081905264173539b7b760d91b60a09081526200007791601d919062000ec3565b50601e805461ffff60a01b191690556023805460ff191690553480156200009d57600080fd5b50604080518082018252600a81526904e6f756e697368434e560b41b60208083019182528351808501909452600484526304e434e560e41b908401528151919291620000ec9160029162000ec3565b5080516200010290600390602084019062000ec3565b50506001600055506200011533620002ad565b62000122600033620002ff565b6200014e7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633620002ff565b6200017a7f3a2f235c9daaf33349d300aadff2f15078a89df81bcfdd45ba11c8f816bddc6f33620002ff565b6200019560008051602062005c1683398151915233620002ff565b620001b96040518060600160405280602d815260200162005be9602d91396200030f565b620001d873dbaa28cbe70af04ebfb166b1a3e8f8034e5b9fc76200032e565b620001f773f42aa99f011a1fa7cda90e5e98b277e306bca83e6200036a565b62000216734fee7b061c97c9c496b01dbce9cdb10c02f0a0be6200036a565b62000222600162000390565b6200024473e86bb3269ef6f9d94e3bb5418ad06f2205b80cec610102620003b1565b62000265739d3c6d53a0768e2448cc8021e3af3b4da3cee7a6607d620003b1565b62000286730fdad22fe69e30ba39356c9001b07caf73bb8f5d607d620003b1565b620002a7732a47a46a5bce64ad1e3ec748255e752d3f57e96b607d620003b1565b620011a5565b601280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200030b8282620003d3565b5050565b620003196200045d565b80516200030b90601c90602084019062000ec3565b60008051602062005c168339815191526200034981620004bf565b600b80546001600160a01b0384166001600160a01b03199091161790555050565b60008051602062005c168339815191526200038581620004bf565b6200030b82620004ce565b60008051602062005c16833981519152620003ab81620004bf565b50601155565b6200030b8282604051806020016040528060008152506200052360201b60201c565b620003df82826200059a565b6200030b5760008281526013602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620004193390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6012546001600160a01b03163314620004bd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b565b620004cb8133620005c7565b50565b620004e981600c6200063f60201b620028391790919060201c565b506040516001600160a01b0382169033907fbd0af1fe0a2c1c7bb340c17a284a291138979c8eeb797e176dbd1c415199af3c90600090a350565b6200052f83836200065d565b6001600160a01b0383163b1562000595576000548281035b60018101906200055d9060009087908662000750565b6200057b576040516368d2bf6b60e11b815260040160405180910390fd5b818110620005475781600054146200059257600080fd5b50505b505050565b60008281526013602090815260408083206001600160a01b038516845290915290205460ff165b92915050565b620005d382826200059a565b6200030b57620005ee816200085160201b6200284e1760201c565b620006048360206200286062000864821b17811c565b6040516020016200061792919062000fc3565b60408051601f198184030181529082905262461bcd60e51b8252620004b4916004016200107b565b600062000656836001600160a01b03841662000a1d565b9392505050565b600054816200067f5760405163b562e8dd60e01b815260040160405180910390fd5b6200068e600084838562000a6f565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b1783179055828401908390839060008051602062005c368339815191528180a4600183015b8181146200071d578083600060008051602062005c36833981519152600080a4600101620006f4565b50816200073c57604051622e076360e81b815260040160405180910390fd5b600090815562000595915084838562000b0c565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290620007879033908990889088906004016200103c565b602060405180830381600087803b158015620007a257600080fd5b505af1925050508015620007d5575060408051601f3d908101601f19168201909252620007d29181019062000f69565b60015b62000834573d80801562000806576040519150601f19603f3d011682016040523d82523d6000602084013e6200080b565b606091505b5080516200082c576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b6060620005c16001600160a01b03831660145b6060600062000875836002620010ab565b6200088290600262001090565b6001600160401b038111156200089c576200089c6200118f565b6040519080825280601f01601f191660200182016040528015620008c7576020820181803683370190505b509050600360fc1b81600081518110620008e557620008e562001179565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811062000917576200091762001179565b60200101906001600160f81b031916908160001a90535060006200093d846002620010ab565b6200094a90600162001090565b90505b6001811115620009cc576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811062000982576200098262001179565b1a60f81b8282815181106200099b576200099b62001179565b60200101906001600160f81b031916908160001a90535060049490941c93620009c481620010fc565b90506200094d565b508315620006565760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401620004b4565b600081815260018301602052604081205462000a6657508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620005c1565b506000620005c1565b60235460ff16158062000a8957506001600160a01b038416155b8062000a9f57506001600160a01b03831661dead145b62000aed5760405162461bcd60e51b815260206004820152601660248201527f7472616e736665722069732070726f68696269746564000000000000000000006044820152606401620004b4565b62000b068484848462000b3e60201b620029fb1760201c565b50505050565b62000b258484848462000b5760201b62002a071760201c565b62000b068484848462000b8360201b62002a311760201c565b62000b068484848462000ba860201b62002a541760201c565b6001600160a01b0384161562000b06576000828152600960205260409020805460ff1916905562000b06565b6001600160a01b0384161562000b06576000828152600f602052604081205562000b06565b6001600160a01b0384161580159062000bc957506001600160a01b03831615155b1562000b065762000bda8262000c39565b1562000b065760405162461bcd60e51b815260206004820152602760248201527f4c6f636b61626c653a2043616e206e6f74207472616e73666572206c6f636b6560448201526632103a37b5b2b760c91b6064820152608401620004b4565b60008162000c478162000d4f565b62000cab5760405162461bcd60e51b815260206004820152602d60248201527f4c6f636b61626c653a206c6f636b696e6720717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b6064820152608401620004b4565b60085460ff1662000cc0576000915062000d49565b600260008481526009602052604090205460ff16600281111562000ce85762000ce862001163565b148062000d34575060008381526009602052604081205460ff16600281111562000d165762000d1662001163565b14801562000d34575062000d3462000d2e8462000d86565b62000d93565b1562000d44576001915062000d49565b600091505b50919050565b60008160011115801562000d64575060005482105b8015620005c1575050600090815260046020526040902054600160e01b161590565b6000620005c18262000e55565b60085460009060ff1662000da957506000919050565b60026001600160a01b0383166000908152600a602052604090205460ff16600281111562000ddb5762000ddb62001163565b148062000e3f57506001600160a01b0382166000908152600a602052604081205460ff16600281111562000e135762000e1362001163565b14801562000e3f57506002600854610100900460ff16600281111562000e3d5762000e3d62001163565b145b1562000e4d57506001919050565b506000919050565b6000818060011162000eaa5760005481101562000eaa57600081815260046020526040902054600160e01b811662000ea8575b806200065657506000190160008181526004602052604090205462000e88565b505b604051636f96cda160e11b815260040160405180910390fd5b82805462000ed19062001116565b90600052602060002090601f01602090048101928262000ef5576000855562000f40565b82601f1062000f1057805160ff191683800117855562000f40565b8280016001018555821562000f40579182015b8281111562000f4057825182559160200191906001019062000f23565b5062000f4e92915062000f52565b5090565b5b8082111562000f4e576000815560010162000f53565b60006020828403121562000f7c57600080fd5b81516001600160e01b0319811681146200065657600080fd5b6000815180845262000faf816020860160208601620010cd565b601f01601f19169290920160200192915050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835162000ffd816017850160208801620010cd565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835162001030816028840160208801620010cd565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090620010719083018462000f95565b9695505050505050565b60208152600062000656602083018462000f95565b60008219821115620010a657620010a66200114d565b500190565b6000816000190483118215151615620010c857620010c86200114d565b500290565b60005b83811015620010ea578181015183820152602001620010d0565b8381111562000b065750506000910152565b6000816200110e576200110e6200114d565b506000190190565b600181811c908216806200112b57607f821691505b6020821081141562000d4957634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b614a3480620011b56000396000f3fe60806040526004361061050d5760003560e01c806370a0823111610297578063a9e2acd511610165578063d6dfad76116100cc578063f138abfa11610085578063f138abfa14610ff8578063f2fde38b14611018578063f3b3059e14611038578063f6aacfb114611058578063fcd1aac914611078578063ff7682121461109857600080fd5b8063d6dfad7614610f4f578063da3ef23f14610f70578063ddecc4d014610f90578063e6d37b8814610fb0578063e985e9c514610fc3578063eb05629714610fe357600080fd5b8063bbb897441161011e578063bbb8974414610e9a578063c668286214610eb0578063c87b56dd14610ec5578063d539139314610ee5578063d547741f14610f19578063d5abeb0114610f3957600080fd5b8063a9e2acd514610de4578063aabb9a8614610e04578063b31391cb14610e19578063b5f94d0614610e46578063b88d4fde14610e66578063ba6269c614610e7957600080fd5b80638e73cf001161020957806399f98898116101c257806399f9889814610d235780639c70b51214610d36578063a217fddf14610d55578063a22cb46514610d6a578063a35c23ad14610d8a578063a58c12ae14610db757600080fd5b80638e73cf0014610c7957806391d1485414610c99578063942c927314610cb957806395d89b4114610cce5780639659867e14610ce3578063981eb34414610d0357600080fd5b80637c3dc1731161025b5780637c3dc17314610bbc5780637cb6475914610bdc5780638462151c14610bfc578063874a8b0214610c1c578063877984cb14610c3b5780638da5cb5b14610c5b57600080fd5b806370a0823114610b21578063715018a614610b4157806372b44d7114610b5657806373ef64fd14610b765780637988426914610b8c57600080fd5b8063282c51f3116103df5780634a4fbeec11610346578063599487c3116102ff578063599487c314610a725780635c975abb14610a925780636352211e14610aac5780636b8ee0ec14610acc5780636c0360eb14610aec5780636f8b44b014610b0157600080fd5b80634a4fbeec146109af5780634b81d8bd146109cf5780634f3db346146109fc5780634fdaf05214610a1257806355f804b314610a325780635978c01214610a5257600080fd5b8063396e8f5311610398578063396e8f531461091a5780633c9527641461093a5780633ccfd60b1461095a5780633cf40df31461096257806342842e0e1461097c57806344a0d68a1461098f57600080fd5b8063282c51f3146108545780632a0acc6a146108885780632eb4a7ab146108aa5780632f2ff15d146108c057806336568abe146108e0578063374032a11461090057600080fd5b8063135d088d116104835780631fac2a351161043c5780631fac2a35146107775780632398f843146107a457806323b872dd146107d157806323c03085146107e4578063248a9ca314610804578063279a669e1461083457600080fd5b8063135d088d1461069557806313c52826146106aa57806313faede6146106da5780631581b600146106fe57806318160ddd146107265780631e0fbfa21461074357600080fd5b806306fdde03116104d557806306fdde03146105cf57806307265389146105e4578063081812fc146105fe578063095ea7b3146106365780630f4345e21461064957806310c395bf1461066957600080fd5b806301340a321461051257806301ffc9a71461053d57806302329a291461056d578063025e332e1461058f57806304787ca2146105af575b600080fd5b34801561051e57600080fd5b506105276110b8565b6040516105349190614702565b60405180910390f35b34801561054957600080fd5b5061055d610558366004614232565b611146565b6040519015158152602001610534565b34801561057957600080fd5b5061058d6105883660046141bc565b611166565b005b34801561059b57600080fd5b5061058d6105aa366004613f3d565b611181565b3480156105bb57600080fd5b5061058d6105ca366004614287565b6111b8565b3480156105db57600080fd5b506105276111d3565b3480156105f057600080fd5b50600e5461055d9060ff1681565b34801561060a57600080fd5b5061061e6106193660046141f6565b611265565b6040516001600160a01b039091168152602001610534565b61058d6106443660046140a3565b6112a9565b34801561065557600080fd5b5061058d6106643660046141f6565b611303565b34801561067557600080fd5b5060085461068890610100900460ff1681565b60405161053491906146da565b3480156106a157600080fd5b50610527611321565b3480156106b657600080fd5b506106886106c5366004613f3d565b600a6020526000908152604090205460ff1681565b3480156106e657600080fd5b506106f060145481565b604051908152602001610534565b34801561070a57600080fd5b5061061e73b3a67853ea1c51779f3dedef0f28fc1eac1349c181565b34801561073257600080fd5b5060015460005403600019016106f0565b34801561074f57600080fd5b506106f07f3a2f235c9daaf33349d300aadff2f15078a89df81bcfdd45ba11c8f816bddc6f81565b34801561078357600080fd5b506106f0610792366004613f3d565b60196020526000908152604090205481565b3480156107b057600080fd5b506106f06107bf366004613f3d565b60106020526000908152604090205481565b61058d6107df366004613f8b565b61132e565b3480156107f057600080fd5b5061058d6107ff366004613f3d565b6114d1565b34801561081057600080fd5b506106f061081f3660046141f6565b60009081526013602052604090206001015490565b34801561084057600080fd5b5061058d61084f3660046140cd565b6114fb565b34801561086057600080fd5b506106f07f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b34801561089457600080fd5b506106f06000805160206149bf83398151915281565b3480156108b657600080fd5b506106f0601b5481565b3480156108cc57600080fd5b5061058d6108db36600461420f565b6116af565b3480156108ec57600080fd5b5061058d6108fb36600461420f565b6116d4565b34801561090c57600080fd5b5060085461055d9060ff1681565b34801561092657600080fd5b50600b5461061e906001600160a01b031681565b34801561094657600080fd5b5061058d6109553660046141bc565b61174e565b61058d611770565b34801561096e57600080fd5b5060235461055d9060ff1681565b61058d61098a366004613f8b565b6117e4565b34801561099b57600080fd5b5061058d6109aa3660046141f6565b6117ff565b3480156109bb57600080fd5b5061055d6109ca366004613f3d565b61180c565b3480156109db57600080fd5b506109ef6109ea366004614345565b6118c1565b60405161053491906146a2565b348015610a0857600080fd5b506106f060115481565b348015610a1e57600080fd5b5061058d610a2d36600461426c565b611a8f565b348015610a3e57600080fd5b5061058d610a4d366004614287565b611aa0565b348015610a5e57600080fd5b5061058d610a6d366004614188565b611abb565b348015610a7e57600080fd5b5061058d610a8d366004614287565b611bce565b348015610a9e57600080fd5b5060185461055d9060ff1681565b348015610ab857600080fd5b5061061e610ac73660046141f6565b611be9565b348015610ad857600080fd5b5061058d610ae73660046141bc565b611bf4565b348015610af857600080fd5b50610527611c1a565b348015610b0d57600080fd5b5061058d610b1c3660046141f6565b611c27565b348015610b2d57600080fd5b506106f0610b3c366004613f3d565b611c34565b348015610b4d57600080fd5b5061058d611c82565b348015610b6257600080fd5b5061058d610b71366004613f3d565b611c96565b348015610b8257600080fd5b506106f060175481565b348015610b9857600080fd5b50610688610ba73660046141f6565b60096020526000908152604090205460ff1681565b348015610bc857600080fd5b5061058d610bd7366004614345565b611cb7565b348015610be857600080fd5b5061058d610bf73660046141f6565b611d47565b348015610c0857600080fd5b506109ef610c17366004613f3d565b611d54565b348015610c2857600080fd5b5061058d610c37366004614079565b5050565b348015610c4757600080fd5b50601e5461061e906001600160a01b031681565b348015610c6757600080fd5b506012546001600160a01b031661061e565b348015610c8557600080fd5b5061058d610c943660046141bc565b611e63565b348015610ca557600080fd5b5061055d610cb436600461420f565b611e87565b348015610cc557600080fd5b50610527611eb2565b348015610cda57600080fd5b50610527611ebf565b348015610cef57600080fd5b5060185461055d9062010000900460ff1681565b348015610d0f57600080fd5b5061058d610d1e366004614287565b611ece565b61058d610d313660046140a3565b611ee8565b348015610d4257600080fd5b5060185461055d90610100900460ff1681565b348015610d6157600080fd5b506106f0600081565b348015610d7657600080fd5b5061058d610d85366004614042565b611fa2565b348015610d9657600080fd5b5061058d610da53660046141f6565b33600090815260106020526040902055565b348015610dc357600080fd5b506106f0610dd2366004613f3d565b601a6020526000908152604090205481565b348015610df057600080fd5b5061058d610dff3660046141f6565b611fff565b348015610e1057600080fd5b5061052761200c565b348015610e2557600080fd5b506106f0610e343660046141f6565b600f6020526000908152604090205481565b348015610e5257600080fd5b5061058d610e613660046141f6565b612019565b61058d610e74366004613fc7565b612026565b348015610e8557600080fd5b50601e5461055d90600160a01b900460ff1681565b348015610ea657600080fd5b506106f060165481565b348015610ebc57600080fd5b50610527612070565b348015610ed157600080fd5b50610527610ee03660046141f6565b61207d565b348015610ef157600080fd5b506106f07f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b348015610f2557600080fd5b5061058d610f3436600461420f565b6121a2565b348015610f4557600080fd5b506106f060155481565b348015610f5b57600080fd5b50601e5461055d90600160a81b900460ff1681565b348015610f7c57600080fd5b5061058d610f8b366004614287565b6121c7565b348015610f9c57600080fd5b5061058d610fab366004614287565b6121e2565b61058d610fbe366004614367565b6121fd565b348015610fcf57600080fd5b5061055d610fde366004613f58565b61260f565b348015610fef57600080fd5b506109ef61264a565b34801561100457600080fd5b5061058d6110133660046141bc565b612664565b34801561102457600080fd5b5061058d611033366004613f3d565b61268a565b34801561104457600080fd5b5061058d611053366004614135565b505050565b34801561106457600080fd5b5061055d6110733660046141f6565b612700565b34801561108457600080fd5b5061058d6110933660046141bc565b6127fd565b3480156110a457600080fd5b5061058d6110b3366004613f3d565b612818565b602280546110c59061489c565b80601f01602080910402602001604051908101604052809291908181526020018280546110f19061489c565b801561113e5780601f106111135761010080835404028352916020019161113e565b820191906000526020600020905b81548152906001019060200180831161112157829003601f168201915b505050505081565b600061115182612adf565b80611160575061116082612b14565b92915050565b61116e612b52565b6018805460ff1916911515919091179055565b6000805160206149bf83398151915261119981612bac565b600b80546001600160a01b0319166001600160a01b0384161790555050565b6111c0612b52565b8051610c3790601f906020840190613d6b565b6060600280546111e29061489c565b80601f016020809104026020016040519081016040528092919081815260200182805461120e9061489c565b801561125b5780601f106112305761010080835404028352916020019161125b565b820191906000526020600020905b81548152906001019060200180831161123e57829003601f168201915b5050505050905090565b600061127082612bb6565b61128d576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b60235460ff16156112f95760405162461bcd60e51b8152602060048201526015602482015274185c1c1c9bdd99481a5cc81c1c9bda1a589a5d1959605a1b60448201526064015b60405180910390fd5b610c378282612beb565b6000805160206149bf83398151915261131b81612bac565b50601155565b601f80546110c59061489c565b600061133982612bff565b9050836001600160a01b0316816001600160a01b03161461136c5760405162a1148160e81b815260040160405180910390fd5b600082815260066020526040902080546113988187335b6001600160a01b039081169116811491141790565b6113c3576113a6863361260f565b6113c357604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166113ea57604051633a954ecd60e21b815260040160405180910390fd5b6113f78686866001612c68565b801561140257600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040902055600160e11b831661148d576001840160008181526004602052604090205461148b57600054811461148b5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03166000805160206149df83398151915260405160405180910390a46114c98686866001612ce7565b505050505050565b6114d9612b52565b601e80546001600160a01b0319166001600160a01b0392909216919091179055565b6115257f3a2f235c9daaf33349d300aadff2f15078a89df81bcfdd45ba11c8f816bddc6f33611e87565b6115715760405162461bcd60e51b815260206004820152601b60248201527f43616c6c6572206973206e6f742061206169722064726f70706572000000000060448201526064016112f0565b6000805b82518110156115b7578281815181106115905761159061492e565b6020026020010151826115a391906147e9565b9150806115af816148d1565b915050611575565b50806000106116085760405162461bcd60e51b815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e4654000000000060448201526064016112f0565b601554600154600054839190036000190161162391906147e9565b11156116415760405162461bcd60e51b81526004016112f090614762565b60005b82518110156116a8576116968585838181106116625761166261492e565b90506020020160208101906116779190613f3d565b8483815181106116895761168961492e565b6020026020010151612cff565b806116a0816148d1565b915050611644565b5050505050565b6000828152601360205260409020600101546116ca81612bac565b6110538383612d19565b6001600160a01b03811633146117445760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016112f0565b610c378282612d9f565b611756612b52565b601880549115156101000261ff0019909216919091179055565b611778612b52565b60405160009073b3a67853ea1c51779f3dedef0f28fc1eac1349c19047908381818185875af1925050503d80600081146117ce576040519150601f19603f3d011682016040523d82523d6000602084013e6117d3565b606091505b50509050806117e157600080fd5b50565b61105383838360405180602001604052806000815250612026565b611807612b52565b601455565b60085460009060ff1661182157506000919050565b60026001600160a01b0383166000908152600a602052604090205460ff16600281111561185057611850614902565b14806118ac57506001600160a01b0382166000908152600a602052604081205460ff16600281111561188457611884614902565b1480156118ac57506002600854610100900460ff1660028111156118aa576118aa614902565b145b156118b957506001919050565b506000919050565b606060006118cf8484614842565b6118da9060016147e9565b6001600160401b038111156118f1576118f1614944565b60405190808252806020026020018201604052801561191a578160200160208202803683370190505b509050600080855b8581116119c25761193281612bb6565b8015611942575061194281612700565b1561197d57600184848151811061195b5761195b61492e565b9115156020928302919091019091015281611975816148d1565b9250506119a2565b60008484815181106119915761199161492e565b911515602092830291909101909101525b826119ac816148d1565b93505080806119ba906148d1565b915050611922565b506000816001600160401b038111156119dd576119dd614944565b604051908082528060200260200182016040528015611a06578160200160208202803683370190505b5060009350905082875b878111611a8257858581518110611a2957611a2961492e565b602002602001015115611a625780838381518110611a4957611a4961492e565b602090810291909101015281611a5e816148d1565b9250505b84611a6c816148d1565b9550508080611a7a906148d1565b915050611a10565b5090979650505050505050565b611a97612b52565b6117e181612e06565b611aa8612b52565b8051610c3790601c906020840190613d6b565b611ae57f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84833611e87565b611b2a5760405162461bcd60e51b815260206004820152601660248201527521b0b63632b91034b9903737ba103090313ab93732b960511b60448201526064016112f0565b60005b8151811015610c37576000828281518110611b4a57611b4a61492e565b60200260200101519050611b5d81611be9565b6001600160a01b0316336001600160a01b031614611bb25760405162461bcd60e51b815260206004820152601260248201527113dddb995c881a5cc8191a5999995c995b9d60721b60448201526064016112f0565b611bbb81612e2f565b5080611bc6816148d1565b915050611b2d565b611bd6612b52565b8051610c37906021906020840190613d6b565b600061116082612bff565b611bfc612b52565b601e8054911515600160a81b0260ff60a81b19909216919091179055565b601c80546110c59061489c565b611c2f612b52565b601555565b60006001600160a01b038216611c5d576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b611c8a612b52565b611c946000612e3a565b565b6000805160206149bf833981519152611cae81612bac565b610c3782612e8c565b81611cc181611be9565b6001600160a01b0316336001600160a01b031614611d345760405162461bcd60e51b815260206004820152602a60248201527f5265737472696374417070726f76653a206f7065726174696f6e206973206f6e604482015269363c903437b63232b91760b11b60648201526084016112f0565b506000918252600f602052604090912055565b611d4f612b52565b601b55565b60606000806000611d6485611c34565b90506000816001600160401b03811115611d8057611d80614944565b604051908082528060200260200182016040528015611da9578160200160208202803683370190505b509050611dd660408051608081018252600080825260208201819052918101829052606081019190915290565b60015b838614611e5757611de981612ed1565b9150816040015115611dfa57611e4f565b81516001600160a01b031615611e0f57815194505b876001600160a01b0316856001600160a01b03161415611e4f5780838780600101985081518110611e4257611e4261492e565b6020026020010181815250505b600101611dd9565b50909695505050505050565b611e6b612b52565b60188054911515620100000262ff000019909216919091179055565b60009182526013602090815260408084206001600160a01b0393909316845291905290205460ff1690565b602180546110c59061489c565b6060600380546111e29061489c565b611ed6612b52565b8051610c379060209081840190613d6b565b611f127f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611e87565b611f575760405162461bcd60e51b815260206004820152601660248201527521b0b63632b91034b9903737ba10309036b4b73a32b960511b60448201526064016112f0565b601554816001611f6660005490565b611f709190614842565b611f7a91906147e9565b1115611f985760405162461bcd60e51b81526004016112f090614762565b610c378282612cff565b60235460ff1615611ff55760405162461bcd60e51b815260206004820152601f60248201527f736574417070726f76616c466f72416c6c2069732070726f686962697465640060448201526064016112f0565b610c378282612f4f565b612007612b52565b601655565b602080546110c59061489c565b612021612b52565b601755565b61203184848461132e565b6001600160a01b0383163b1561206a5761204d84848484612fe6565b61206a576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b601d80546110c59061489c565b601e54606090600160a01b900460ff1615156001141561211757601e5460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd9060240160006040518083038186803b1580156120db57600080fd5b505afa1580156120ef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261116091908101906142cf565b601e54600160a81b900460ff161515600114156121865761216060206021601f602260405160200161214c94939291906144cc565b6040516020818303038152906040526130dd565b60405160200161217091906145ab565b6040516020818303038152906040529050919050565b61218f82613242565b601d6040516020016121709291906144ae565b6000828152601360205260409020600101546121bd81612bac565b6110538383612d9f565b6121cf612b52565b8051610c3790601d906020840190613d6b565b6121ea612b52565b8051610c37906022906020840190613d6b565b32331461224c5760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163742e0060448201526064016112f0565b60185460ff16156122985760405162461bcd60e51b81526020600482015260166024820152751d1a194818dbdb9d1c9858dd081a5cc81c185d5cd95960521b60448201526064016112f0565b836000106122e85760405162461bcd60e51b815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e4654000000000060448201526064016112f0565b6016548411156123465760405162461bcd60e51b8152602060048201526024808201527f6d6178206d696e7420616d6f756e74207065722073657373696f6e20657863656044820152631959195960e21b60648201526084016112f0565b601554600154600054869190036000190161236191906147e9565b111561237f5760405162461bcd60e51b81526004016112f090614762565b348460145461238e9190614823565b11156123d15760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b60448201526064016112f0565b60185460ff6101009091041615156001141561255e576040516bffffffffffffffffffffffff193360601b1660208201526034810184905260009060540160405160208183030381529060405280519060200120905061246883838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601b5491508490506132c6565b6124b45760405162461bcd60e51b815260206004820152601760248201527f75736572206973206e6f742077686974656c697374656400000000000000000060448201526064016112f0565b60185462010000900460ff1615156001141561255857336000908152601960205260409020546124e49085614842565b8511156125335760405162461bcd60e51b815260206004820152601c60248201527f6d6178204e46542070657220616464726573732065786365656465640000000060448201526064016112f0565b33600090815260196020526040812080548792906125529084906147e9565b90915550505b50612605565b60185462010000900460ff1615156001141561260557336000908152601a60205260409020546017546125919190614842565b8411156125e05760405162461bcd60e51b815260206004820152601c60248201527f6d6178204e46542070657220616464726573732065786365656465640000000060448201526064016112f0565b336000908152601a6020526040812080548692906125ff9084906147e9565b90915550505b61206a3385612cff565b600061261a8361180c565b8061262c575061262a83836132dc565b155b1561263957506000611160565b61264383836132fc565b9392505050565b60005460609060019061265d82826118c1565b9250505090565b61266c612b52565b601e8054911515600160a01b0260ff60a01b19909216919091179055565b612692612b52565b6001600160a01b0381166126f75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016112f0565b6117e181612e3a565b60008161270c81612bb6565b61276e5760405162461bcd60e51b815260206004820152602d60248201527f4c6f636b61626c653a206c6f636b696e6720717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084016112f0565b60085460ff1661278157600091506127f7565b600260008481526009602052604090205460ff1660028111156127a6576127a6614902565b14806127e4575060008381526009602052604081205460ff1660028111156127d0576127d0614902565b1480156127e457506127e46109ca84611be9565b156127f257600191506127f7565b600091505b50919050565b612805612b52565b6023805460ff1916911515919091179055565b6000805160206149bf83398151915261283081612bac565b610c378261331e565b6000612643836001600160a01b038416613363565b60606111606001600160a01b03831660145b6060600061286f836002614823565b61287a9060026147e9565b6001600160401b0381111561289157612891614944565b6040519080825280601f01601f1916602001820160405280156128bb576020820181803683370190505b509050600360fc1b816000815181106128d6576128d661492e565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106129055761290561492e565b60200101906001600160f81b031916908160001a9053506000612929846002614823565b6129349060016147e9565b90505b60018111156129ac576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106129685761296861492e565b1a60f81b82828151811061297e5761297e61492e565b60200101906001600160f81b031916908160001a90535060049490941c936129a581614885565b9050612937565b5083156126435760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016112f0565b61206a84848484612a54565b6001600160a01b0384161561206a576000828152600960205260409020805460ff1916905561206a565b6001600160a01b0384161561206a576000828152600f602052604081205561206a565b6001600160a01b03841615801590612a7457506001600160a01b03831615155b1561206a57612a8282612700565b1561206a5760405162461bcd60e51b815260206004820152602760248201527f4c6f636b61626c653a2043616e206e6f74207472616e73666572206c6f636b6560448201526632103a37b5b2b760c91b60648201526084016112f0565b60006001600160e01b03198216637965db0b60e01b148061116057506301ffc9a760e01b6001600160e01b0319831614611160565b6000612b1f826133b2565b80612b2e5750612b2e82613400565b80612b3d5750612b3d82613425565b806111605750506001600160e01b0319161590565b6012546001600160a01b03163314611c945760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016112f0565b6117e1813361344a565b600081600111158015612bca575060005482105b8015611160575050600090815260046020526040902054600160e01b161590565b612bf582826134a3565b610c3782826134b7565b60008180600111612c4f57600054811015612c4f57600081815260046020526040902054600160e01b8116612c4d575b80612643575060001901600081815260046020526040902054612c2f565b505b604051636f96cda160e11b815260040160405180910390fd5b60235460ff161580612c8157506001600160a01b038416155b80612c9657506001600160a01b03831661dead145b612cdb5760405162461bcd60e51b81526020600482015260166024820152751d1c985b9cd9995c881a5cc81c1c9bda1a589a5d195960521b60448201526064016112f0565b61206a848484846129fb565b612cf384848484612a07565b61206a84848484612a31565b610c37828260405180602001604052806000815250613557565b612d238282611e87565b610c375760008281526013602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612d5b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612da98282611e87565b15610c375760008281526013602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6008805482919061ff001916610100836002811115612e2757612e27614902565b021790555050565b6117e18160006135bd565b601280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612e97600c8261370a565b506040516001600160a01b0382169033907f3b01c97343869ca2757fcc37cdb8f71683b0a7aed858e3755f4529a1db85729290600090a350565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461116090604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b612f583361180c565b1580612f62575080155b612fae5760405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f7420617070726f7665206c6f636b656420746f6b656e0000000060448201526064016112f0565b612fb78261371f565b80612fc0575080155b612fdc5760405162461bcd60e51b81526004016112f090614715565b610c37828261372b565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061301b903390899088908890600401614665565b602060405180830381600087803b15801561303557600080fd5b505af1925050508015613065575060408051601f3d908101601f191682019092526130629181019061424f565b60015b6130c0573d808015613093576040519150601f19603f3d011682016040523d82523d6000602084013e613098565b606091505b5080516130b8576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60608151600014156130fd57505060408051602081019091526000815290565b600060405180606001604052806040815260200161497f604091399050600060038451600261312c91906147e9565b6131369190614801565b613141906004614823565b905060006131508260206147e9565b6001600160401b0381111561316757613167614944565b6040519080825280601f01601f191660200182016040528015613191576020820181803683370190505b509050818152600183018586518101602084015b818310156131fd576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f81168501518253506001016131a5565b600389510660018114613217576002811461322857613234565b613d3d60f01b600119830152613234565b603d60f81b6000198301525b509398975050505050505050565b606061324d82612bb6565b61326a57604051630a14c4b560e41b815260040160405180910390fd5b6000613274613763565b90508051600014156132955760405180602001604052806000815250612643565b8061329f84613772565b6040516020016132b092919061447f565b6040516020818303038152906040529392505050565b6000826132d385846137c0565b14949350505050565b6000806132e88461380d565b90506132f4838261384f565b949350505050565b600061330883836132dc565b61331457506000611160565b61264383836138f7565b613329600c82612839565b506040516001600160a01b0382169033907fbd0af1fe0a2c1c7bb340c17a284a291138979c8eeb797e176dbd1c415199af3c90600090a350565b60008181526001830160205260408120546133aa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611160565b506000611160565b60006301ffc9a760e01b6001600160e01b0319831614806133e357506380ac58cd60e01b6001600160e01b03198316145b806111605750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b03198216632742b5b960e01b14806111605750611160826133b2565b60006001600160e01b031982166380dfb9af60e01b1480611160575061116082613400565b6134548282611e87565b610c37576134618161284e565b61346c836020612860565b60405160200161347d9291906145f0565b60408051601f198184030181529082905262461bcd60e51b82526112f091600401614702565b6134ad828261393d565b610c3782826139a2565b60006134c282611be9565b9050336001600160a01b038216146134fb576134de813361260f565b6134fb576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6135618383613a1d565b6001600160a01b0383163b15611053576000548281035b61358b6000868380600101945086612fe6565b6135a8576040516368d2bf6b60e11b815260040160405180910390fd5b8181106135785781600054146116a857600080fd5b60006135c883612bff565b9050806000806135e686600090815260066020526040902080549091565b915091508415613626576135fb818433611383565b61362657613609833361260f565b61362657604051632ce44b5f60e11b815260040160405180910390fd5b613634836000886001612c68565b801561363f57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040902055600160e11b84166136c657600186016000818152600460205260409020546136c45760005481146136c45760008181526004602052604090208590555b505b60405186906000906001600160a01b038616906000805160206149df833981519152908390a46136fa836000886001612ce7565b5050600180548101905550505050565b6000612643836001600160a01b038416613b06565b600061116033836132dc565b6137348261371f565b8061373d575080155b6137595760405162461bcd60e51b81526004016112f090614715565b610c378282613bf9565b6060601c80546111e29061489c565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806137a9576137ae565b61378c565b50819003601f19909101908152919050565b600081815b8451811015613805576137f1828683815181106137e4576137e461492e565b6020026020010151613c62565b9150806137fd816148d1565b9150506137c5565b509392505050565b6001600160a01b0381166000908152601060205260408120541561384757506001600160a01b031660009081526010602052604090205490565b505060115490565b600e5460009060ff1661386457506001611160565b61386d83613c91565b806126435750600b54604051630f8350ed60e41b81526001600160a01b038581166004830152602482018590529091169063f8350ed09060440160206040518083038186803b1580156138bf57600080fd5b505afa1580156138d3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061264391906141d9565b60006139028361180c565b1561390f57506000611160565b6001600160a01b0380841660009081526007602090815260408083209386168352929052205460ff16612643565b61394681612700565b15610c375760405162461bcd60e51b815260206004820152602660248201527f4c6f636b61626c653a2043616e206e6f7420617070726f7665206c6f636b6564604482015265103a37b5b2b760d11b60648201526084016112f0565b6001600160a01b03821615610c37576139bb8183613c9e565b610c375760405162461bcd60e51b815260206004820152602d60248201527f5265737472696374417070726f76653a2054686520636f6e747261637420697360448201526c103737ba1030b63637bbb2b21760991b60648201526084016112f0565b60005481613a3e5760405163b562e8dd60e01b815260040160405180910390fd5b613a4b6000848385612c68565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083906000805160206149df8339815191528180a4600183015b818114613ad657808360006000805160206149df833981519152600080a4600101613ab0565b5081613af457604051622e076360e81b815260040160405180910390fd5b60009081556110539150848385612ce7565b60008181526001830160205260408120548015613bef576000613b2a600183614842565b8554909150600090613b3e90600190614842565b9050818114613ba3576000866000018281548110613b5e57613b5e61492e565b9060005260206000200154905080876000018481548110613b8157613b8161492e565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613bb457613bb4614918565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611160565b6000915050611160565b613c023361180c565b1580613c0c575080155b613c585760405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f7420617070726f7665206c6f636b656420746f6b656e0000000060448201526064016112f0565b610c378282613cab565b6000818310613c7e576000828152602084905260409020612643565b6000838152602083905260409020612643565b6000611160600c83613d17565b6000806132e83385613d39565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b03811660009081526001830160205260408120541515612643565b6000818152600f602052604081205415613d6257506000818152600f6020526040902054611160565b6126438361380d565b828054613d779061489c565b90600052602060002090601f016020900481019282613d995760008555613ddf565b82601f10613db257805160ff1916838001178555613ddf565b82800160010185558215613ddf579182015b82811115613ddf578251825591602001919060010190613dc4565b50613deb929150613def565b5090565b5b80821115613deb5760008155600101613df0565b6000613e17613e12846147c2565b614792565b9050828152838383011115613e2b57600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114613e5957600080fd5b919050565b60008083601f840112613e7057600080fd5b5081356001600160401b03811115613e8757600080fd5b6020830191508360208260051b8501011115613ea257600080fd5b9250929050565b600082601f830112613eba57600080fd5b813560206001600160401b03821115613ed557613ed5614944565b8160051b613ee4828201614792565b838152828101908684018388018501891015613eff57600080fd5b600093505b85841015613f22578035835260019390930192918401918401613f04565b50979650505050505050565b803560038110613e5957600080fd5b600060208284031215613f4f57600080fd5b61264382613e42565b60008060408385031215613f6b57600080fd5b613f7483613e42565b9150613f8260208401613e42565b90509250929050565b600080600060608486031215613fa057600080fd5b613fa984613e42565b9250613fb760208501613e42565b9150604084013590509250925092565b60008060008060808587031215613fdd57600080fd5b613fe685613e42565b9350613ff460208601613e42565b92506040850135915060608501356001600160401b0381111561401657600080fd5b8501601f8101871361402757600080fd5b61403687823560208401613e04565b91505092959194509250565b6000806040838503121561405557600080fd5b61405e83613e42565b9150602083013561406e8161495a565b809150509250929050565b6000806040838503121561408c57600080fd5b61409583613e42565b9150613f8260208401613f2e565b600080604083850312156140b657600080fd5b6140bf83613e42565b946020939093013593505050565b6000806000604084860312156140e257600080fd5b83356001600160401b03808211156140f957600080fd5b61410587838801613e5e565b9095509350602086013591508082111561411e57600080fd5b5061412b86828701613ea9565b9150509250925092565b60008060006040848603121561414a57600080fd5b83356001600160401b0381111561416057600080fd5b61416c86828701613e5e565b909450925061417f905060208501613f2e565b90509250925092565b60006020828403121561419a57600080fd5b81356001600160401b038111156141b057600080fd5b6132f484828501613ea9565b6000602082840312156141ce57600080fd5b81356126438161495a565b6000602082840312156141eb57600080fd5b81516126438161495a565b60006020828403121561420857600080fd5b5035919050565b6000806040838503121561422257600080fd5b82359150613f8260208401613e42565b60006020828403121561424457600080fd5b813561264381614968565b60006020828403121561426157600080fd5b815161264381614968565b60006020828403121561427e57600080fd5b61264382613f2e565b60006020828403121561429957600080fd5b81356001600160401b038111156142af57600080fd5b8201601f810184136142c057600080fd5b6132f484823560208401613e04565b6000602082840312156142e157600080fd5b81516001600160401b038111156142f757600080fd5b8201601f8101841361430857600080fd5b8051614316613e12826147c2565b81815285602083850101111561432b57600080fd5b61433c826020830160208601614859565b95945050505050565b6000806040838503121561435857600080fd5b50508035926020909101359150565b6000806000806060858703121561437d57600080fd5b843593506020850135925060408501356001600160401b038111156143a157600080fd5b6143ad87828801613e5e565b95989497509550505050565b600081518084526143d1816020860160208601614859565b601f01601f19169290920160200192915050565b8054600090600181811c90808316806143ff57607f831692505b602080841082141561442157634e487b7160e01b600052602260045260246000fd5b818015614435576001811461444657614473565b60ff19861689528489019650614473565b60008881526020902060005b8681101561446b5781548b820152908501908301614452565b505084890196505b50505050505092915050565b60008351614491818460208801614859565b8351908301906144a5818360208801614859565b01949350505050565b600083516144c0818460208801614859565b61433c818401856143e5565b683d913730b6b2911d1160b91b815260006144ea60098301876143e5565b61088b60f21b8082526e113232b9b1b934b83a34b7b7111d1160891b600283015261451860118301886143e5565b818152691134b6b0b3b2911d101160b11b6002820152915061453d600c8301876143e5565b9081527f2261747472696275746573223a5b7b2274726169745f74797065223a2274797060028201526b329116113b30b63ab2911d1160a11b6022820152905061458a602e8201856143e5565b62227d5d60e81b8152607d60f81b6003820152600401979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516145e381601d850160208701614859565b91909101601d0192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614628816017850160208801614859565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614659816028840160208801614859565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614698908301846143b9565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611e57578351835292840192918401916001016146be565b60208101600383106146fc57634e487b7160e01b600052602160045260246000fd5b91905290565b60208152600061264360208301846143b9565b6020808252602d908201527f5265737472696374417070726f76653a2043616e206e6f7420617070726f766560408201526c103637b1b5b2b2103a37b5b2b760991b606082015260800190565b6020808252601690820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b604082015260600190565b604051601f8201601f191681016001600160401b03811182821017156147ba576147ba614944565b604052919050565b60006001600160401b038211156147db576147db614944565b50601f01601f191660200190565b600082198211156147fc576147fc6148ec565b500190565b60008261481e57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561483d5761483d6148ec565b500290565b600082821015614854576148546148ec565b500390565b60005b8381101561487457818101518382015260200161485c565b8381111561206a5750506000910152565b600081614894576148946148ec565b506000190190565b600181811c908216806148b057607f821691505b602082108114156127f757634e487b7160e01b600052602260045260246000fd5b60006000198214156148e5576148e56148ec565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146117e157600080fd5b6001600160e01b0319811681146117e157600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d105fdf4ec339101e8ddb977516b736b02148b91eb993562ee143a8263c68c9e64736f6c6343000807003368747470733a2f2f646174612e6e6f756e736a702e7774662f6e6f756e697368636e702f6d657461646174612fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef

Deployed Bytecode

0x60806040526004361061050d5760003560e01c806370a0823111610297578063a9e2acd511610165578063d6dfad76116100cc578063f138abfa11610085578063f138abfa14610ff8578063f2fde38b14611018578063f3b3059e14611038578063f6aacfb114611058578063fcd1aac914611078578063ff7682121461109857600080fd5b8063d6dfad7614610f4f578063da3ef23f14610f70578063ddecc4d014610f90578063e6d37b8814610fb0578063e985e9c514610fc3578063eb05629714610fe357600080fd5b8063bbb897441161011e578063bbb8974414610e9a578063c668286214610eb0578063c87b56dd14610ec5578063d539139314610ee5578063d547741f14610f19578063d5abeb0114610f3957600080fd5b8063a9e2acd514610de4578063aabb9a8614610e04578063b31391cb14610e19578063b5f94d0614610e46578063b88d4fde14610e66578063ba6269c614610e7957600080fd5b80638e73cf001161020957806399f98898116101c257806399f9889814610d235780639c70b51214610d36578063a217fddf14610d55578063a22cb46514610d6a578063a35c23ad14610d8a578063a58c12ae14610db757600080fd5b80638e73cf0014610c7957806391d1485414610c99578063942c927314610cb957806395d89b4114610cce5780639659867e14610ce3578063981eb34414610d0357600080fd5b80637c3dc1731161025b5780637c3dc17314610bbc5780637cb6475914610bdc5780638462151c14610bfc578063874a8b0214610c1c578063877984cb14610c3b5780638da5cb5b14610c5b57600080fd5b806370a0823114610b21578063715018a614610b4157806372b44d7114610b5657806373ef64fd14610b765780637988426914610b8c57600080fd5b8063282c51f3116103df5780634a4fbeec11610346578063599487c3116102ff578063599487c314610a725780635c975abb14610a925780636352211e14610aac5780636b8ee0ec14610acc5780636c0360eb14610aec5780636f8b44b014610b0157600080fd5b80634a4fbeec146109af5780634b81d8bd146109cf5780634f3db346146109fc5780634fdaf05214610a1257806355f804b314610a325780635978c01214610a5257600080fd5b8063396e8f5311610398578063396e8f531461091a5780633c9527641461093a5780633ccfd60b1461095a5780633cf40df31461096257806342842e0e1461097c57806344a0d68a1461098f57600080fd5b8063282c51f3146108545780632a0acc6a146108885780632eb4a7ab146108aa5780632f2ff15d146108c057806336568abe146108e0578063374032a11461090057600080fd5b8063135d088d116104835780631fac2a351161043c5780631fac2a35146107775780632398f843146107a457806323b872dd146107d157806323c03085146107e4578063248a9ca314610804578063279a669e1461083457600080fd5b8063135d088d1461069557806313c52826146106aa57806313faede6146106da5780631581b600146106fe57806318160ddd146107265780631e0fbfa21461074357600080fd5b806306fdde03116104d557806306fdde03146105cf57806307265389146105e4578063081812fc146105fe578063095ea7b3146106365780630f4345e21461064957806310c395bf1461066957600080fd5b806301340a321461051257806301ffc9a71461053d57806302329a291461056d578063025e332e1461058f57806304787ca2146105af575b600080fd5b34801561051e57600080fd5b506105276110b8565b6040516105349190614702565b60405180910390f35b34801561054957600080fd5b5061055d610558366004614232565b611146565b6040519015158152602001610534565b34801561057957600080fd5b5061058d6105883660046141bc565b611166565b005b34801561059b57600080fd5b5061058d6105aa366004613f3d565b611181565b3480156105bb57600080fd5b5061058d6105ca366004614287565b6111b8565b3480156105db57600080fd5b506105276111d3565b3480156105f057600080fd5b50600e5461055d9060ff1681565b34801561060a57600080fd5b5061061e6106193660046141f6565b611265565b6040516001600160a01b039091168152602001610534565b61058d6106443660046140a3565b6112a9565b34801561065557600080fd5b5061058d6106643660046141f6565b611303565b34801561067557600080fd5b5060085461068890610100900460ff1681565b60405161053491906146da565b3480156106a157600080fd5b50610527611321565b3480156106b657600080fd5b506106886106c5366004613f3d565b600a6020526000908152604090205460ff1681565b3480156106e657600080fd5b506106f060145481565b604051908152602001610534565b34801561070a57600080fd5b5061061e73b3a67853ea1c51779f3dedef0f28fc1eac1349c181565b34801561073257600080fd5b5060015460005403600019016106f0565b34801561074f57600080fd5b506106f07f3a2f235c9daaf33349d300aadff2f15078a89df81bcfdd45ba11c8f816bddc6f81565b34801561078357600080fd5b506106f0610792366004613f3d565b60196020526000908152604090205481565b3480156107b057600080fd5b506106f06107bf366004613f3d565b60106020526000908152604090205481565b61058d6107df366004613f8b565b61132e565b3480156107f057600080fd5b5061058d6107ff366004613f3d565b6114d1565b34801561081057600080fd5b506106f061081f3660046141f6565b60009081526013602052604090206001015490565b34801561084057600080fd5b5061058d61084f3660046140cd565b6114fb565b34801561086057600080fd5b506106f07f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84881565b34801561089457600080fd5b506106f06000805160206149bf83398151915281565b3480156108b657600080fd5b506106f0601b5481565b3480156108cc57600080fd5b5061058d6108db36600461420f565b6116af565b3480156108ec57600080fd5b5061058d6108fb36600461420f565b6116d4565b34801561090c57600080fd5b5060085461055d9060ff1681565b34801561092657600080fd5b50600b5461061e906001600160a01b031681565b34801561094657600080fd5b5061058d6109553660046141bc565b61174e565b61058d611770565b34801561096e57600080fd5b5060235461055d9060ff1681565b61058d61098a366004613f8b565b6117e4565b34801561099b57600080fd5b5061058d6109aa3660046141f6565b6117ff565b3480156109bb57600080fd5b5061055d6109ca366004613f3d565b61180c565b3480156109db57600080fd5b506109ef6109ea366004614345565b6118c1565b60405161053491906146a2565b348015610a0857600080fd5b506106f060115481565b348015610a1e57600080fd5b5061058d610a2d36600461426c565b611a8f565b348015610a3e57600080fd5b5061058d610a4d366004614287565b611aa0565b348015610a5e57600080fd5b5061058d610a6d366004614188565b611abb565b348015610a7e57600080fd5b5061058d610a8d366004614287565b611bce565b348015610a9e57600080fd5b5060185461055d9060ff1681565b348015610ab857600080fd5b5061061e610ac73660046141f6565b611be9565b348015610ad857600080fd5b5061058d610ae73660046141bc565b611bf4565b348015610af857600080fd5b50610527611c1a565b348015610b0d57600080fd5b5061058d610b1c3660046141f6565b611c27565b348015610b2d57600080fd5b506106f0610b3c366004613f3d565b611c34565b348015610b4d57600080fd5b5061058d611c82565b348015610b6257600080fd5b5061058d610b71366004613f3d565b611c96565b348015610b8257600080fd5b506106f060175481565b348015610b9857600080fd5b50610688610ba73660046141f6565b60096020526000908152604090205460ff1681565b348015610bc857600080fd5b5061058d610bd7366004614345565b611cb7565b348015610be857600080fd5b5061058d610bf73660046141f6565b611d47565b348015610c0857600080fd5b506109ef610c17366004613f3d565b611d54565b348015610c2857600080fd5b5061058d610c37366004614079565b5050565b348015610c4757600080fd5b50601e5461061e906001600160a01b031681565b348015610c6757600080fd5b506012546001600160a01b031661061e565b348015610c8557600080fd5b5061058d610c943660046141bc565b611e63565b348015610ca557600080fd5b5061055d610cb436600461420f565b611e87565b348015610cc557600080fd5b50610527611eb2565b348015610cda57600080fd5b50610527611ebf565b348015610cef57600080fd5b5060185461055d9062010000900460ff1681565b348015610d0f57600080fd5b5061058d610d1e366004614287565b611ece565b61058d610d313660046140a3565b611ee8565b348015610d4257600080fd5b5060185461055d90610100900460ff1681565b348015610d6157600080fd5b506106f0600081565b348015610d7657600080fd5b5061058d610d85366004614042565b611fa2565b348015610d9657600080fd5b5061058d610da53660046141f6565b33600090815260106020526040902055565b348015610dc357600080fd5b506106f0610dd2366004613f3d565b601a6020526000908152604090205481565b348015610df057600080fd5b5061058d610dff3660046141f6565b611fff565b348015610e1057600080fd5b5061052761200c565b348015610e2557600080fd5b506106f0610e343660046141f6565b600f6020526000908152604090205481565b348015610e5257600080fd5b5061058d610e613660046141f6565b612019565b61058d610e74366004613fc7565b612026565b348015610e8557600080fd5b50601e5461055d90600160a01b900460ff1681565b348015610ea657600080fd5b506106f060165481565b348015610ebc57600080fd5b50610527612070565b348015610ed157600080fd5b50610527610ee03660046141f6565b61207d565b348015610ef157600080fd5b506106f07f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b348015610f2557600080fd5b5061058d610f3436600461420f565b6121a2565b348015610f4557600080fd5b506106f060155481565b348015610f5b57600080fd5b50601e5461055d90600160a81b900460ff1681565b348015610f7c57600080fd5b5061058d610f8b366004614287565b6121c7565b348015610f9c57600080fd5b5061058d610fab366004614287565b6121e2565b61058d610fbe366004614367565b6121fd565b348015610fcf57600080fd5b5061055d610fde366004613f58565b61260f565b348015610fef57600080fd5b506109ef61264a565b34801561100457600080fd5b5061058d6110133660046141bc565b612664565b34801561102457600080fd5b5061058d611033366004613f3d565b61268a565b34801561104457600080fd5b5061058d611053366004614135565b505050565b34801561106457600080fd5b5061055d6110733660046141f6565b612700565b34801561108457600080fd5b5061058d6110933660046141bc565b6127fd565b3480156110a457600080fd5b5061058d6110b3366004613f3d565b612818565b602280546110c59061489c565b80601f01602080910402602001604051908101604052809291908181526020018280546110f19061489c565b801561113e5780601f106111135761010080835404028352916020019161113e565b820191906000526020600020905b81548152906001019060200180831161112157829003601f168201915b505050505081565b600061115182612adf565b80611160575061116082612b14565b92915050565b61116e612b52565b6018805460ff1916911515919091179055565b6000805160206149bf83398151915261119981612bac565b600b80546001600160a01b0319166001600160a01b0384161790555050565b6111c0612b52565b8051610c3790601f906020840190613d6b565b6060600280546111e29061489c565b80601f016020809104026020016040519081016040528092919081815260200182805461120e9061489c565b801561125b5780601f106112305761010080835404028352916020019161125b565b820191906000526020600020905b81548152906001019060200180831161123e57829003601f168201915b5050505050905090565b600061127082612bb6565b61128d576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b60235460ff16156112f95760405162461bcd60e51b8152602060048201526015602482015274185c1c1c9bdd99481a5cc81c1c9bda1a589a5d1959605a1b60448201526064015b60405180910390fd5b610c378282612beb565b6000805160206149bf83398151915261131b81612bac565b50601155565b601f80546110c59061489c565b600061133982612bff565b9050836001600160a01b0316816001600160a01b03161461136c5760405162a1148160e81b815260040160405180910390fd5b600082815260066020526040902080546113988187335b6001600160a01b039081169116811491141790565b6113c3576113a6863361260f565b6113c357604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166113ea57604051633a954ecd60e21b815260040160405180910390fd5b6113f78686866001612c68565b801561140257600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040902055600160e11b831661148d576001840160008181526004602052604090205461148b57600054811461148b5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03166000805160206149df83398151915260405160405180910390a46114c98686866001612ce7565b505050505050565b6114d9612b52565b601e80546001600160a01b0319166001600160a01b0392909216919091179055565b6115257f3a2f235c9daaf33349d300aadff2f15078a89df81bcfdd45ba11c8f816bddc6f33611e87565b6115715760405162461bcd60e51b815260206004820152601b60248201527f43616c6c6572206973206e6f742061206169722064726f70706572000000000060448201526064016112f0565b6000805b82518110156115b7578281815181106115905761159061492e565b6020026020010151826115a391906147e9565b9150806115af816148d1565b915050611575565b50806000106116085760405162461bcd60e51b815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e4654000000000060448201526064016112f0565b601554600154600054839190036000190161162391906147e9565b11156116415760405162461bcd60e51b81526004016112f090614762565b60005b82518110156116a8576116968585838181106116625761166261492e565b90506020020160208101906116779190613f3d565b8483815181106116895761168961492e565b6020026020010151612cff565b806116a0816148d1565b915050611644565b5050505050565b6000828152601360205260409020600101546116ca81612bac565b6110538383612d19565b6001600160a01b03811633146117445760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016112f0565b610c378282612d9f565b611756612b52565b601880549115156101000261ff0019909216919091179055565b611778612b52565b60405160009073b3a67853ea1c51779f3dedef0f28fc1eac1349c19047908381818185875af1925050503d80600081146117ce576040519150601f19603f3d011682016040523d82523d6000602084013e6117d3565b606091505b50509050806117e157600080fd5b50565b61105383838360405180602001604052806000815250612026565b611807612b52565b601455565b60085460009060ff1661182157506000919050565b60026001600160a01b0383166000908152600a602052604090205460ff16600281111561185057611850614902565b14806118ac57506001600160a01b0382166000908152600a602052604081205460ff16600281111561188457611884614902565b1480156118ac57506002600854610100900460ff1660028111156118aa576118aa614902565b145b156118b957506001919050565b506000919050565b606060006118cf8484614842565b6118da9060016147e9565b6001600160401b038111156118f1576118f1614944565b60405190808252806020026020018201604052801561191a578160200160208202803683370190505b509050600080855b8581116119c25761193281612bb6565b8015611942575061194281612700565b1561197d57600184848151811061195b5761195b61492e565b9115156020928302919091019091015281611975816148d1565b9250506119a2565b60008484815181106119915761199161492e565b911515602092830291909101909101525b826119ac816148d1565b93505080806119ba906148d1565b915050611922565b506000816001600160401b038111156119dd576119dd614944565b604051908082528060200260200182016040528015611a06578160200160208202803683370190505b5060009350905082875b878111611a8257858581518110611a2957611a2961492e565b602002602001015115611a625780838381518110611a4957611a4961492e565b602090810291909101015281611a5e816148d1565b9250505b84611a6c816148d1565b9550508080611a7a906148d1565b915050611a10565b5090979650505050505050565b611a97612b52565b6117e181612e06565b611aa8612b52565b8051610c3790601c906020840190613d6b565b611ae57f3c11d16cbaffd01df69ce1c404f6340ee057498f5f00246190ea54220576a84833611e87565b611b2a5760405162461bcd60e51b815260206004820152601660248201527521b0b63632b91034b9903737ba103090313ab93732b960511b60448201526064016112f0565b60005b8151811015610c37576000828281518110611b4a57611b4a61492e565b60200260200101519050611b5d81611be9565b6001600160a01b0316336001600160a01b031614611bb25760405162461bcd60e51b815260206004820152601260248201527113dddb995c881a5cc8191a5999995c995b9d60721b60448201526064016112f0565b611bbb81612e2f565b5080611bc6816148d1565b915050611b2d565b611bd6612b52565b8051610c37906021906020840190613d6b565b600061116082612bff565b611bfc612b52565b601e8054911515600160a81b0260ff60a81b19909216919091179055565b601c80546110c59061489c565b611c2f612b52565b601555565b60006001600160a01b038216611c5d576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b611c8a612b52565b611c946000612e3a565b565b6000805160206149bf833981519152611cae81612bac565b610c3782612e8c565b81611cc181611be9565b6001600160a01b0316336001600160a01b031614611d345760405162461bcd60e51b815260206004820152602a60248201527f5265737472696374417070726f76653a206f7065726174696f6e206973206f6e604482015269363c903437b63232b91760b11b60648201526084016112f0565b506000918252600f602052604090912055565b611d4f612b52565b601b55565b60606000806000611d6485611c34565b90506000816001600160401b03811115611d8057611d80614944565b604051908082528060200260200182016040528015611da9578160200160208202803683370190505b509050611dd660408051608081018252600080825260208201819052918101829052606081019190915290565b60015b838614611e5757611de981612ed1565b9150816040015115611dfa57611e4f565b81516001600160a01b031615611e0f57815194505b876001600160a01b0316856001600160a01b03161415611e4f5780838780600101985081518110611e4257611e4261492e565b6020026020010181815250505b600101611dd9565b50909695505050505050565b611e6b612b52565b60188054911515620100000262ff000019909216919091179055565b60009182526013602090815260408084206001600160a01b0393909316845291905290205460ff1690565b602180546110c59061489c565b6060600380546111e29061489c565b611ed6612b52565b8051610c379060209081840190613d6b565b611f127f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633611e87565b611f575760405162461bcd60e51b815260206004820152601660248201527521b0b63632b91034b9903737ba10309036b4b73a32b960511b60448201526064016112f0565b601554816001611f6660005490565b611f709190614842565b611f7a91906147e9565b1115611f985760405162461bcd60e51b81526004016112f090614762565b610c378282612cff565b60235460ff1615611ff55760405162461bcd60e51b815260206004820152601f60248201527f736574417070726f76616c466f72416c6c2069732070726f686962697465640060448201526064016112f0565b610c378282612f4f565b612007612b52565b601655565b602080546110c59061489c565b612021612b52565b601755565b61203184848461132e565b6001600160a01b0383163b1561206a5761204d84848484612fe6565b61206a576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b601d80546110c59061489c565b601e54606090600160a01b900460ff1615156001141561211757601e5460405163c87b56dd60e01b8152600481018490526001600160a01b039091169063c87b56dd9060240160006040518083038186803b1580156120db57600080fd5b505afa1580156120ef573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261116091908101906142cf565b601e54600160a81b900460ff161515600114156121865761216060206021601f602260405160200161214c94939291906144cc565b6040516020818303038152906040526130dd565b60405160200161217091906145ab565b6040516020818303038152906040529050919050565b61218f82613242565b601d6040516020016121709291906144ae565b6000828152601360205260409020600101546121bd81612bac565b6110538383612d9f565b6121cf612b52565b8051610c3790601d906020840190613d6b565b6121ea612b52565b8051610c37906022906020840190613d6b565b32331461224c5760405162461bcd60e51b815260206004820152601f60248201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163742e0060448201526064016112f0565b60185460ff16156122985760405162461bcd60e51b81526020600482015260166024820152751d1a194818dbdb9d1c9858dd081a5cc81c185d5cd95960521b60448201526064016112f0565b836000106122e85760405162461bcd60e51b815260206004820152601b60248201527f6e65656420746f206d696e74206174206c656173742031204e4654000000000060448201526064016112f0565b6016548411156123465760405162461bcd60e51b8152602060048201526024808201527f6d6178206d696e7420616d6f756e74207065722073657373696f6e20657863656044820152631959195960e21b60648201526084016112f0565b601554600154600054869190036000190161236191906147e9565b111561237f5760405162461bcd60e51b81526004016112f090614762565b348460145461238e9190614823565b11156123d15760405162461bcd60e51b8152602060048201526012602482015271696e73756666696369656e742066756e647360701b60448201526064016112f0565b60185460ff6101009091041615156001141561255e576040516bffffffffffffffffffffffff193360601b1660208201526034810184905260009060540160405160208183030381529060405280519060200120905061246883838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050601b5491508490506132c6565b6124b45760405162461bcd60e51b815260206004820152601760248201527f75736572206973206e6f742077686974656c697374656400000000000000000060448201526064016112f0565b60185462010000900460ff1615156001141561255857336000908152601960205260409020546124e49085614842565b8511156125335760405162461bcd60e51b815260206004820152601c60248201527f6d6178204e46542070657220616464726573732065786365656465640000000060448201526064016112f0565b33600090815260196020526040812080548792906125529084906147e9565b90915550505b50612605565b60185462010000900460ff1615156001141561260557336000908152601a60205260409020546017546125919190614842565b8411156125e05760405162461bcd60e51b815260206004820152601c60248201527f6d6178204e46542070657220616464726573732065786365656465640000000060448201526064016112f0565b336000908152601a6020526040812080548692906125ff9084906147e9565b90915550505b61206a3385612cff565b600061261a8361180c565b8061262c575061262a83836132dc565b155b1561263957506000611160565b61264383836132fc565b9392505050565b60005460609060019061265d82826118c1565b9250505090565b61266c612b52565b601e8054911515600160a01b0260ff60a01b19909216919091179055565b612692612b52565b6001600160a01b0381166126f75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016112f0565b6117e181612e3a565b60008161270c81612bb6565b61276e5760405162461bcd60e51b815260206004820152602d60248201527f4c6f636b61626c653a206c6f636b696e6720717565727920666f72206e6f6e6560448201526c3c34b9ba32b73a103a37b5b2b760991b60648201526084016112f0565b60085460ff1661278157600091506127f7565b600260008481526009602052604090205460ff1660028111156127a6576127a6614902565b14806127e4575060008381526009602052604081205460ff1660028111156127d0576127d0614902565b1480156127e457506127e46109ca84611be9565b156127f257600191506127f7565b600091505b50919050565b612805612b52565b6023805460ff1916911515919091179055565b6000805160206149bf83398151915261283081612bac565b610c378261331e565b6000612643836001600160a01b038416613363565b60606111606001600160a01b03831660145b6060600061286f836002614823565b61287a9060026147e9565b6001600160401b0381111561289157612891614944565b6040519080825280601f01601f1916602001820160405280156128bb576020820181803683370190505b509050600360fc1b816000815181106128d6576128d661492e565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106129055761290561492e565b60200101906001600160f81b031916908160001a9053506000612929846002614823565b6129349060016147e9565b90505b60018111156129ac576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106129685761296861492e565b1a60f81b82828151811061297e5761297e61492e565b60200101906001600160f81b031916908160001a90535060049490941c936129a581614885565b9050612937565b5083156126435760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016112f0565b61206a84848484612a54565b6001600160a01b0384161561206a576000828152600960205260409020805460ff1916905561206a565b6001600160a01b0384161561206a576000828152600f602052604081205561206a565b6001600160a01b03841615801590612a7457506001600160a01b03831615155b1561206a57612a8282612700565b1561206a5760405162461bcd60e51b815260206004820152602760248201527f4c6f636b61626c653a2043616e206e6f74207472616e73666572206c6f636b6560448201526632103a37b5b2b760c91b60648201526084016112f0565b60006001600160e01b03198216637965db0b60e01b148061116057506301ffc9a760e01b6001600160e01b0319831614611160565b6000612b1f826133b2565b80612b2e5750612b2e82613400565b80612b3d5750612b3d82613425565b806111605750506001600160e01b0319161590565b6012546001600160a01b03163314611c945760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016112f0565b6117e1813361344a565b600081600111158015612bca575060005482105b8015611160575050600090815260046020526040902054600160e01b161590565b612bf582826134a3565b610c3782826134b7565b60008180600111612c4f57600054811015612c4f57600081815260046020526040902054600160e01b8116612c4d575b80612643575060001901600081815260046020526040902054612c2f565b505b604051636f96cda160e11b815260040160405180910390fd5b60235460ff161580612c8157506001600160a01b038416155b80612c9657506001600160a01b03831661dead145b612cdb5760405162461bcd60e51b81526020600482015260166024820152751d1c985b9cd9995c881a5cc81c1c9bda1a589a5d195960521b60448201526064016112f0565b61206a848484846129fb565b612cf384848484612a07565b61206a84848484612a31565b610c37828260405180602001604052806000815250613557565b612d238282611e87565b610c375760008281526013602090815260408083206001600160a01b03851684529091529020805460ff19166001179055612d5b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612da98282611e87565b15610c375760008281526013602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6008805482919061ff001916610100836002811115612e2757612e27614902565b021790555050565b6117e18160006135bd565b601280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612e97600c8261370a565b506040516001600160a01b0382169033907f3b01c97343869ca2757fcc37cdb8f71683b0a7aed858e3755f4529a1db85729290600090a350565b60408051608081018252600080825260208201819052918101829052606081019190915260008281526004602052604090205461116090604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b612f583361180c565b1580612f62575080155b612fae5760405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f7420617070726f7665206c6f636b656420746f6b656e0000000060448201526064016112f0565b612fb78261371f565b80612fc0575080155b612fdc5760405162461bcd60e51b81526004016112f090614715565b610c37828261372b565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a029061301b903390899088908890600401614665565b602060405180830381600087803b15801561303557600080fd5b505af1925050508015613065575060408051601f3d908101601f191682019092526130629181019061424f565b60015b6130c0573d808015613093576040519150601f19603f3d011682016040523d82523d6000602084013e613098565b606091505b5080516130b8576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b60608151600014156130fd57505060408051602081019091526000815290565b600060405180606001604052806040815260200161497f604091399050600060038451600261312c91906147e9565b6131369190614801565b613141906004614823565b905060006131508260206147e9565b6001600160401b0381111561316757613167614944565b6040519080825280601f01601f191660200182016040528015613191576020820181803683370190505b509050818152600183018586518101602084015b818310156131fd576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f81168501518253506001016131a5565b600389510660018114613217576002811461322857613234565b613d3d60f01b600119830152613234565b603d60f81b6000198301525b509398975050505050505050565b606061324d82612bb6565b61326a57604051630a14c4b560e41b815260040160405180910390fd5b6000613274613763565b90508051600014156132955760405180602001604052806000815250612643565b8061329f84613772565b6040516020016132b092919061447f565b6040516020818303038152906040529392505050565b6000826132d385846137c0565b14949350505050565b6000806132e88461380d565b90506132f4838261384f565b949350505050565b600061330883836132dc565b61331457506000611160565b61264383836138f7565b613329600c82612839565b506040516001600160a01b0382169033907fbd0af1fe0a2c1c7bb340c17a284a291138979c8eeb797e176dbd1c415199af3c90600090a350565b60008181526001830160205260408120546133aa57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611160565b506000611160565b60006301ffc9a760e01b6001600160e01b0319831614806133e357506380ac58cd60e01b6001600160e01b03198316145b806111605750506001600160e01b031916635b5e139f60e01b1490565b60006001600160e01b03198216632742b5b960e01b14806111605750611160826133b2565b60006001600160e01b031982166380dfb9af60e01b1480611160575061116082613400565b6134548282611e87565b610c37576134618161284e565b61346c836020612860565b60405160200161347d9291906145f0565b60408051601f198184030181529082905262461bcd60e51b82526112f091600401614702565b6134ad828261393d565b610c3782826139a2565b60006134c282611be9565b9050336001600160a01b038216146134fb576134de813361260f565b6134fb576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6135618383613a1d565b6001600160a01b0383163b15611053576000548281035b61358b6000868380600101945086612fe6565b6135a8576040516368d2bf6b60e11b815260040160405180910390fd5b8181106135785781600054146116a857600080fd5b60006135c883612bff565b9050806000806135e686600090815260066020526040902080549091565b915091508415613626576135fb818433611383565b61362657613609833361260f565b61362657604051632ce44b5f60e11b815260040160405180910390fd5b613634836000886001612c68565b801561363f57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040902055600160e11b84166136c657600186016000818152600460205260409020546136c45760005481146136c45760008181526004602052604090208590555b505b60405186906000906001600160a01b038616906000805160206149df833981519152908390a46136fa836000886001612ce7565b5050600180548101905550505050565b6000612643836001600160a01b038416613b06565b600061116033836132dc565b6137348261371f565b8061373d575080155b6137595760405162461bcd60e51b81526004016112f090614715565b610c378282613bf9565b6060601c80546111e29061489c565b606060a06040510180604052602081039150506000815280825b600183039250600a81066030018353600a9004806137a9576137ae565b61378c565b50819003601f19909101908152919050565b600081815b8451811015613805576137f1828683815181106137e4576137e461492e565b6020026020010151613c62565b9150806137fd816148d1565b9150506137c5565b509392505050565b6001600160a01b0381166000908152601060205260408120541561384757506001600160a01b031660009081526010602052604090205490565b505060115490565b600e5460009060ff1661386457506001611160565b61386d83613c91565b806126435750600b54604051630f8350ed60e41b81526001600160a01b038581166004830152602482018590529091169063f8350ed09060440160206040518083038186803b1580156138bf57600080fd5b505afa1580156138d3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061264391906141d9565b60006139028361180c565b1561390f57506000611160565b6001600160a01b0380841660009081526007602090815260408083209386168352929052205460ff16612643565b61394681612700565b15610c375760405162461bcd60e51b815260206004820152602660248201527f4c6f636b61626c653a2043616e206e6f7420617070726f7665206c6f636b6564604482015265103a37b5b2b760d11b60648201526084016112f0565b6001600160a01b03821615610c37576139bb8183613c9e565b610c375760405162461bcd60e51b815260206004820152602d60248201527f5265737472696374417070726f76653a2054686520636f6e747261637420697360448201526c103737ba1030b63637bbb2b21760991b60648201526084016112f0565b60005481613a3e5760405163b562e8dd60e01b815260040160405180910390fd5b613a4b6000848385612c68565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083906000805160206149df8339815191528180a4600183015b818114613ad657808360006000805160206149df833981519152600080a4600101613ab0565b5081613af457604051622e076360e81b815260040160405180910390fd5b60009081556110539150848385612ce7565b60008181526001830160205260408120548015613bef576000613b2a600183614842565b8554909150600090613b3e90600190614842565b9050818114613ba3576000866000018281548110613b5e57613b5e61492e565b9060005260206000200154905080876000018481548110613b8157613b8161492e565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080613bb457613bb4614918565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611160565b6000915050611160565b613c023361180c565b1580613c0c575080155b613c585760405162461bcd60e51b815260206004820152601c60248201527f43616e206e6f7420617070726f7665206c6f636b656420746f6b656e0000000060448201526064016112f0565b610c378282613cab565b6000818310613c7e576000828152602084905260409020612643565b6000838152602083905260409020612643565b6000611160600c83613d17565b6000806132e83385613d39565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b03811660009081526001830160205260408120541515612643565b6000818152600f602052604081205415613d6257506000818152600f6020526040902054611160565b6126438361380d565b828054613d779061489c565b90600052602060002090601f016020900481019282613d995760008555613ddf565b82601f10613db257805160ff1916838001178555613ddf565b82800160010185558215613ddf579182015b82811115613ddf578251825591602001919060010190613dc4565b50613deb929150613def565b5090565b5b80821115613deb5760008155600101613df0565b6000613e17613e12846147c2565b614792565b9050828152838383011115613e2b57600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b0381168114613e5957600080fd5b919050565b60008083601f840112613e7057600080fd5b5081356001600160401b03811115613e8757600080fd5b6020830191508360208260051b8501011115613ea257600080fd5b9250929050565b600082601f830112613eba57600080fd5b813560206001600160401b03821115613ed557613ed5614944565b8160051b613ee4828201614792565b838152828101908684018388018501891015613eff57600080fd5b600093505b85841015613f22578035835260019390930192918401918401613f04565b50979650505050505050565b803560038110613e5957600080fd5b600060208284031215613f4f57600080fd5b61264382613e42565b60008060408385031215613f6b57600080fd5b613f7483613e42565b9150613f8260208401613e42565b90509250929050565b600080600060608486031215613fa057600080fd5b613fa984613e42565b9250613fb760208501613e42565b9150604084013590509250925092565b60008060008060808587031215613fdd57600080fd5b613fe685613e42565b9350613ff460208601613e42565b92506040850135915060608501356001600160401b0381111561401657600080fd5b8501601f8101871361402757600080fd5b61403687823560208401613e04565b91505092959194509250565b6000806040838503121561405557600080fd5b61405e83613e42565b9150602083013561406e8161495a565b809150509250929050565b6000806040838503121561408c57600080fd5b61409583613e42565b9150613f8260208401613f2e565b600080604083850312156140b657600080fd5b6140bf83613e42565b946020939093013593505050565b6000806000604084860312156140e257600080fd5b83356001600160401b03808211156140f957600080fd5b61410587838801613e5e565b9095509350602086013591508082111561411e57600080fd5b5061412b86828701613ea9565b9150509250925092565b60008060006040848603121561414a57600080fd5b83356001600160401b0381111561416057600080fd5b61416c86828701613e5e565b909450925061417f905060208501613f2e565b90509250925092565b60006020828403121561419a57600080fd5b81356001600160401b038111156141b057600080fd5b6132f484828501613ea9565b6000602082840312156141ce57600080fd5b81356126438161495a565b6000602082840312156141eb57600080fd5b81516126438161495a565b60006020828403121561420857600080fd5b5035919050565b6000806040838503121561422257600080fd5b82359150613f8260208401613e42565b60006020828403121561424457600080fd5b813561264381614968565b60006020828403121561426157600080fd5b815161264381614968565b60006020828403121561427e57600080fd5b61264382613f2e565b60006020828403121561429957600080fd5b81356001600160401b038111156142af57600080fd5b8201601f810184136142c057600080fd5b6132f484823560208401613e04565b6000602082840312156142e157600080fd5b81516001600160401b038111156142f757600080fd5b8201601f8101841361430857600080fd5b8051614316613e12826147c2565b81815285602083850101111561432b57600080fd5b61433c826020830160208601614859565b95945050505050565b6000806040838503121561435857600080fd5b50508035926020909101359150565b6000806000806060858703121561437d57600080fd5b843593506020850135925060408501356001600160401b038111156143a157600080fd5b6143ad87828801613e5e565b95989497509550505050565b600081518084526143d1816020860160208601614859565b601f01601f19169290920160200192915050565b8054600090600181811c90808316806143ff57607f831692505b602080841082141561442157634e487b7160e01b600052602260045260246000fd5b818015614435576001811461444657614473565b60ff19861689528489019650614473565b60008881526020902060005b8681101561446b5781548b820152908501908301614452565b505084890196505b50505050505092915050565b60008351614491818460208801614859565b8351908301906144a5818360208801614859565b01949350505050565b600083516144c0818460208801614859565b61433c818401856143e5565b683d913730b6b2911d1160b91b815260006144ea60098301876143e5565b61088b60f21b8082526e113232b9b1b934b83a34b7b7111d1160891b600283015261451860118301886143e5565b818152691134b6b0b3b2911d101160b11b6002820152915061453d600c8301876143e5565b9081527f2261747472696275746573223a5b7b2274726169745f74797065223a2274797060028201526b329116113b30b63ab2911d1160a11b6022820152905061458a602e8201856143e5565b62227d5d60e81b8152607d60f81b6003820152600401979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516145e381601d850160208701614859565b91909101601d0192915050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351614628816017850160208801614859565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351614659816028840160208801614859565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614698908301846143b9565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b81811015611e57578351835292840192918401916001016146be565b60208101600383106146fc57634e487b7160e01b600052602160045260246000fd5b91905290565b60208152600061264360208301846143b9565b6020808252602d908201527f5265737472696374417070726f76653a2043616e206e6f7420617070726f766560408201526c103637b1b5b2b2103a37b5b2b760991b606082015260800190565b6020808252601690820152751b585e08139195081b1a5b5a5d08195e18d95959195960521b604082015260600190565b604051601f8201601f191681016001600160401b03811182821017156147ba576147ba614944565b604052919050565b60006001600160401b038211156147db576147db614944565b50601f01601f191660200190565b600082198211156147fc576147fc6148ec565b500190565b60008261481e57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561483d5761483d6148ec565b500290565b600082821015614854576148546148ec565b500390565b60005b8381101561487457818101518382015260200161485c565b8381111561206a5750506000910152565b600081614894576148946148ec565b506000190190565b600181811c908216806148b057607f821691505b602082108114156127f757634e487b7160e01b600052602260045260246000fd5b60006000198214156148e5576148e56148ec565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146117e157600080fd5b6001600160e01b0319811681146117e157600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220d105fdf4ec339101e8ddb977516b736b02148b91eb993562ee143a8263c68c9e64736f6c63430008070033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.