ETH Price: $3,649.71 (+1.96%)

Contract

0x21852DEb59C57330E71d337a754Bc4c65A69Ca8d
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...212609932024-11-24 23:49:355 days ago1732492175IN
0x21852DEb...65A69Ca8d
0 ETH0.000358219.57261003
VIEW ADVANCED FILTER

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TeikoKey

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 10 : TeikoKey.sol
// SPDX-License-Identifier: MIT

// @title Teiko Key for Teiko World
// @author TheV

//                                                                                                                       _________________________ 
// [... [......[........[..[..   [..      [....          [..        [..    [....     [.......    [..      [.....        ///      __       __      \
//      [..    [..      [..[..  [..     [..    [..       [..        [..  [..    [..  [..    [..  [..      [..   [..    |||      |  |     |  |      |
//      [..    [..      [..[.. [..    [..        [..     [..   [.   [..[..        [..[..    [..  [..      [..    [..   |||      |__|  _  |__|      |
//      [..    [......  [..[. [.      [..        [..     [..  [..   [..[..        [..[. [..      [..      [..    [..    \\\______    /_\     _____/
//      [..    [..      [..[..  [..   [..        [..     [.. [. [.. [..[..        [..[..  [..    [..      [..    [..           \\\__________/
//      [..    [..      [..[..   [..    [..     [..      [. [.    [....  [..     [.. [..    [..  [..      [..   [..            |||         |
//      [..    [........[..[..     [..    [....          [..        [..    [....     [..      [..[........[.....                \\\_______/

pragma solidity >=0.7.0;

import "https://github.com/chiru-labs/ERC721A/contracts/ERC721A.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "operator_filter/OperatorFilterer.sol";
import {CANONICAL_CORI_SUBSCRIPTION} from "operator_filter/lib/Constants.sol";


contract TeikoKey is ERC721A, Ownable, OperatorFilterer
{
    //////////////////////////////////////////////////////////////////
    // Library
    //////////////////////////////////////////////////////////////////
    
    using Counters for Counters.Counter;

    //////////////////////////////////////////////////////////////////
    // Enums
    //////////////////////////////////////////////////////////////////

    enum MintPhase
    {
        CLOSED,
        WHITELIST,
        ALLOWLIST,
        PUBLIC
    }

    enum KeyType
    {
        REGULAR,
        ROBOT,
        ZOMBIE,
        APE,
        SPIRIT,
        GOLD
    }

    //////////////////////////////////////////////////////////////////
    // Attributes
    //////////////////////////////////////////////////////////////////

    Counters.Counter private _tokenIds;
    MintPhase public currentMintPhase = MintPhase.CLOSED;
    uint256 public constant MAX_SUPPLY = 2008;
    bytes32 constant public whitelistRole = keccak256("whitelisted");
    bytes32 constant public allowlistRole = keccak256("allowlisted");
    uint8 public maxMintWhitelist = 2;
    uint8 public maxMintAllowlist = 1;
    uint8 public maxMintPublic = 1;
    address public mainAddress = 0x9Cc8C097251d71f68f674c0f4d2c86fB170e7BCD;
    address public signerAddress = 0x8fD261f08991619c2c0ad36B3a73E8f874BB5372;
    string public baseURI = "https://ipfs.io/ipns/k51qzi5uqu5djzdmli4l9utu46cvd35sn9plo3u50pkam7gtqw3ifq0crypp0p";
    uint256 public price = 0 ether;
    mapping (address => uint256) public mints;
    mapping (uint256 => uint8) public keyPercents;
    mapping(address => int8) public approvedCallers;
    mapping(uint256 => string) public tokenURIs;
    mapping(uint256 => KeyType) public keyTypes;
    mapping(KeyType => uint16) public maxCountKeyTypes;
    mapping(KeyType => uint8) public currentCountKeyTypes;

    //////////////////////////////////////////////////////////////////
    // Constructor
    //////////////////////////////////////////////////////////////////

    constructor() ERC721A("Teiko Key", "TEIKOKEY") OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, false)
    {
        maxCountKeyTypes[KeyType.REGULAR] = 1083;
        maxCountKeyTypes[KeyType.ROBOT] = 450;
        maxCountKeyTypes[KeyType.ZOMBIE] = 300;
        maxCountKeyTypes[KeyType.APE] = 120;
        maxCountKeyTypes[KeyType.SPIRIT] = 50;
        maxCountKeyTypes[KeyType.GOLD] = 5;
    }

    //////////////////////////////////////////////////////////////////
    // Modifiers
    //////////////////////////////////////////////////////////////////

    modifier onlyApprovedOrOwner(address addr)
    {
        require(approvedCallers[addr] == 1 || addr == owner(), "Caller is not approved nor owner");
        _;
    }

    modifier onlyOwnerOfOrApproved(address addr, uint256 tokenId)
    {
        require(ownerOf(tokenId) == addr || approvedCallers[addr] == 1, "Caller is not owner of that token id nor approved");
        _;
    }

    //////////////////////////////////////////////////////////////////
    // OperatorFilter functions
    //////////////////////////////////////////////////////////////////

    /**
     * @notice Registers self with the operator filter registry
    */
    function register()
        external onlyOwner
    {
        OPERATOR_FILTER_REGISTRY.register(address(this));
    }

    /**
     * @notice Unregisters self from the operator filter registry
    */
    function unregister()
        external onlyOwner
    {
        OPERATOR_FILTER_REGISTRY.unregister(address(this));
    }

    /**
     * @notice Registers self with the operator filter registry, and susbscribe to 
        the filtered operators of the given subscription 
    */
    function registerAndSubscribe(address subscription)
        external onlyOwner
    {
        OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscription);
    }

    /**
     * @notice Registers self with the operator filter registry, and copy
        the filtered operators of the given subscription 
    */
    function registerAndCopyEntries(address registrantToCopy)
        external onlyOwner
    {
        OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), registrantToCopy);
    }

    /**
     * @notice Update given operator address to filtered/unfiltered state
    */
    function updateOperator(address operator, bool filtered)
        external onlyOwner
    {
        OPERATOR_FILTER_REGISTRY.updateOperator(address(this), operator, filtered);
    }

    /**
     * @notice Update given operator smart contract code hash to filtered/unfiltered state
    */
    function updateCodeHash(bytes32 codeHash, bool filtered)
        external onlyOwner
    {
        OPERATOR_FILTER_REGISTRY.updateCodeHash(address(this), codeHash, filtered);
    }

    /**
     * @notice Batch function for updateOperator
    */
    function updateOperators(address[] calldata operators, bool filtered)
        external onlyOwner
    {
        OPERATOR_FILTER_REGISTRY.updateOperators(address(this), operators, filtered);
    }

    /**
     * @notice Batch function for updateCodeHash
    */
    function updateCodeHashes(bytes32[] calldata codeHashes, bool filtered)
        external onlyOwner
    {
        OPERATOR_FILTER_REGISTRY.updateCodeHashes(address(this), codeHashes, filtered);
    }

    /**
     * @notice Check if a given operator address is currently filtered
    */
    function isOperatorAllowed(address operator)
        external view
        returns (bool)
    {
        return OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator);
    }

    /**
     * @notice Subscribe to OperatorFilterRegistry contract : activate modifiers
    */
    function subscribe(address subscription)
        external onlyOwner
    {
        return OPERATOR_FILTER_REGISTRY.subscribe(address(this), subscription);
    }

    /**
     * @notice Unsubscribe to OperatorFilterRegistry contract : deactivate modifiers
    */
    function unsubscribe(bool copyExistingEntries)
        external onlyOwner
    {
        return OPERATOR_FILTER_REGISTRY.unsubscribe(address(this), copyExistingEntries);
    }

    /**
     * @notice Copy filtered operators of a given OperatorFilterRegistry
        registered smart contract
    */
    function copyEntriesOf(address registrantToCopy)
        external onlyOwner
    {
        return OPERATOR_FILTER_REGISTRY.copyEntriesOf(address(this), registrantToCopy);
    }

    /**
     * @notice Returns the list of filtered operators
    */
    function filteredOperators()
        external
        returns (address[] memory)
    {
        return OPERATOR_FILTER_REGISTRY.filteredOperators(address(this));
    }

    /**
    * @notice Overriding ERC721A.supportsInterface as advised for OperatorFilterRegistry 
        smart contract
    */
    function supportsInterface(bytes4 interfaceId)
        public view virtual 
        override
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    /**
    * @notice Overriding ERC721A.approve to integrate OperatorFilter modifier 
        onlyAllowedOperatorApproval
    */
    function approve(address operator, uint256 tokenId)
        public payable
        override
        onlyAllowedOperatorApproval(operator)
    {
        super.approve(operator, tokenId);
    }
    
    /**
    * @notice Overriding ERC721A.setApprovalForAll to integrate OperatorFilter modifier 
        onlyAllowedOperatorApproval
    */
    function setApprovalForAll(address operator, bool approved)
        public
        override
        onlyAllowedOperatorApproval(operator)
    {
        super.setApprovalForAll(operator, approved);
    }

    /**
    * @notice Overriding ERC721A.safeTransferFrom to integrate
        OperatorFilter modifier onlyAllowedOperator
    */
    function safeTransferFrom(address from, address to, uint256 tokenId)
        public payable
        override
        onlyAllowedOperator(from)
    {
        super.safeTransferFrom(from, to, tokenId);
    }

    /**
    * @notice Overriding ERC721A.safeTransferFrom to integrate
        OperatorFilter modifier onlyAllowedOperator
    */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
        public payable
        override
        onlyAllowedOperator(from)
    {
        super.safeTransferFrom(from, to, tokenId, data);
    }

    /**
    * @notice Overriding ERC721A.transferFrom to integrate
        OperatorFilter modifier onlyAllowedOperator
    */
    function transferFrom(address from, address to, uint256 tokenId)
        public payable
        override
        onlyAllowedOperator(from)
    {
        super.transferFrom(from, to, tokenId);
    }

    // Mint Functions
    ////////////////////

    /**
    * @notice Internal mint logic
    */
    function _mintNFT(uint256 nMint, address recipient)
        private
    {
        require(_tokenIds.current() + nMint <= MAX_SUPPLY, "No more NFT to mint");

        mints[recipient] += nMint;

        for (uint256 i = 0; i < nMint; i++)
        {
            _tokenIds.increment();
        }

        // Use _mint instead of _safeMint 
        // Because _mint is better when INDIVIDUALS are going to mint
        // While _safeMint is better when SMART CONTRACTS are going to mint
        _mint(recipient, nMint);
    }

    /**
    * @notice Main mint entry point
    */
    function mintNFT(uint256 nMint, uint8 v, bytes32 r, bytes32 s, string calldata nonce, uint256 deadline)
        external payable
    {
        require(currentMintPhase != MintPhase.CLOSED, "Mint period have not started yet");
        require(tx.origin == msg.sender, "No bots allowed");
        require(msg.value >= price * nMint, "Not enough ETH to mint");
        if (currentMintPhase == MintPhase.WHITELIST)
        {
            require(isRole(whitelistRole, nonce, deadline, v, r, s), "You are not whitelisted");
            require(mints[msg.sender] + nMint <= maxMintWhitelist, "Too much NFT minted");
        }
        else if (currentMintPhase == MintPhase.ALLOWLIST)
        {
            require(isRole(allowlistRole, nonce, deadline, v, r, s), "You are not allowlisted");
            require(mints[msg.sender] + nMint <= maxMintAllowlist, "Too much NFT minted");
        }
        else if (currentMintPhase == MintPhase.PUBLIC)
        {
            require(mints[msg.sender] + nMint <= maxMintPublic, "Too much NFT minted");
        }

        return _mintNFT(nMint, msg.sender);
    }

    /**
    * @notice Team giveway mint entry point
    */
    function giveaway(uint256 nMint, address recipient)
        external
        onlyApprovedOrOwner(msg.sender)
    {
        return _mintNFT(nMint, recipient);
    }

    /**
    * @notice Burn function
    */
    function burnNFT(uint256 tokenId)
        external
        onlyOwnerOfOrApproved(msg.sender, tokenId)
    {
        _burn(tokenId);
    }

    // Attributes getters
    ////////////////////

    /**
    * @notice Get metadatas of the given <tokenId>
    */
    function tokenURI(uint256 tokenId)
        public view
        override
        returns (string memory)
    {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory tokenIdURI = tokenURIs[tokenId];
        string memory emptyString = "";

        if (keccak256(abi.encodePacked(tokenIdURI)) == keccak256(abi.encodePacked(emptyString)))
        {
            return string(abi.encodePacked(abi.encodePacked(abi.encodePacked(baseURI, "/"), Strings.toString(tokenId)), ".json"));
        }
        else
        {
            return tokenIdURI;
        }        
    }

    // Attributes setters
    ////////////////////

    /**
    * @notice If <addr> is an approved caller, remove it from the list.
    * otherwise, add it to the list of approved callers
    */
    function toggleApprovedCaller(address addr)
        external
        onlyOwner
    {
        if (approvedCallers[addr] == 1)
        {
            approvedCallers[addr] = 0;
        }
        else
        {
            approvedCallers[addr] = 1;
        }
    }
    
    /**
    * @notice Set a specific <tokenIdURI> for a given <tokenId>
    */
    function setTokenUri(uint8 tokenId, string memory tokenIdURI)
        external
        onlyApprovedOrOwner(msg.sender)
    {
        tokenURIs[tokenId] = tokenIdURI;
    }

    /**
    * @notice Set the current mint phase (Whitelist, Allowlist or Public)
    */
    function setMintPhase(MintPhase _mintPhase)
        external
        onlyOwner
    {
        require(uint256(_mintPhase) >= 0 && uint256(_mintPhase) <= 3, "_mintPhase have to be between 0 and 3");
        require(_mintPhase > currentMintPhase, "new mint phase must be strictly greater than current one");
        currentMintPhase = _mintPhase;
    }
    
    /**
    * @notice Set the mint price
    */
    function setPrice(uint256 priceGwei)
        external
        onlyOwner
    {
        price = priceGwei * 10**9;
    }

    /**
    * @notice Set the base tokenURI, on which metadatas are stored like <_baseURI>/<token_id>.json
    */
    function setBaseUri(string memory _baseURI)
        external
        onlyOwner
    {
        baseURI = _baseURI;
    }

    /**
    * @notice Set the max mintable NFTs by Whitelisted address
    */
    function setMaxPerWalletWhitelist(uint8 maxMint)
        external
        onlyOwner
    {
        maxMintWhitelist = maxMint;
    }

    /**
    * @notice Set the max mintable NFTs by Allowlisted address
    */
    function setMaxPerWalletAllowlist(uint8 maxMint)
        external
        onlyOwner
    {
        maxMintAllowlist = maxMint;
    }

    /**
    * @notice Set the max mintable NFTs by Public (neither Whitelist or Allowlist) address
    */
    function setMaxPerWalletPublic(uint8 maxMint)
        external
        onlyOwner
    {
        maxMintPublic = maxMint;
    }

    /**
    * @notice Set the main team wallet
    */
    function setMainAddress(address _mainAddress)
        external
        onlyOwner
    {
        mainAddress = _mainAddress;
    }

    /**
    * @notice Set the address of the signer
    */
    function setSignerAddress(address addr)
        external
        onlyOwner
    {
        signerAddress = addr;
    }

    // Helpers function
    //////////////////////////

    /**
    * @notice Freeze the <tokenId> metadata, and attribute its key type (Regular, Robot, Ape, Zombie or Spirit)
    */
    function freezeKey(uint256 tokenId, uint8 percent, string calldata nonce, uint256 deadline, uint8 v, bytes32 r, bytes32 s)    
        external
    {
        require(ownerOf(tokenId) == msg.sender || msg.sender == owner(), "Not your NFT nor the owner");
        require(isAllowed(nonce, deadline, v, r, s), "You are not allowed");
        require(keyTypes[tokenId] == KeyType.REGULAR, "Key have already been frozen");
        require(percent >= 0 && percent <= 100, "Percent have to be between 0 and 100");

        keyPercents[tokenId] = percent;

        if (percent < 25)
        {
            revert("Nothing to claim");
        }
        else if (percent < 50 && (currentCountKeyTypes[KeyType.ROBOT] < maxCountKeyTypes[KeyType.ROBOT]))
        {
            keyTypes[tokenId] = KeyType.ROBOT;
            currentCountKeyTypes[KeyType.ROBOT]++;
        }
        else if (percent < 75 && (currentCountKeyTypes[KeyType.ZOMBIE] < maxCountKeyTypes[KeyType.ZOMBIE]))
        {
            keyTypes[tokenId] = KeyType.ZOMBIE;
            currentCountKeyTypes[KeyType.ZOMBIE]++;
        }
        else if (percent < 100 && (currentCountKeyTypes[KeyType.APE] < maxCountKeyTypes[KeyType.APE]))
        {
            keyTypes[tokenId] = KeyType.APE;
            currentCountKeyTypes[KeyType.APE]++;
        }
        else if (percent == 100 && (currentCountKeyTypes[KeyType.SPIRIT] < maxCountKeyTypes[KeyType.SPIRIT]))
        {
            keyTypes[tokenId] = KeyType.SPIRIT;
            currentCountKeyTypes[KeyType.SPIRIT]++;
        }
    }

    /**
    * @notice Freeze the Gold keys (1/1 NFTs)
    */
    function freezeGoldKeys(uint256[] calldata tokenIds)
        external
        onlyOwner
    {
        for (uint256 idx = 0; idx < tokenIds.length; idx++)
        {
            unchecked
            {
                keyPercents[tokenIds[idx]] = 100;
                keyTypes[tokenIds[idx]] = KeyType.GOLD;
            }
        }
    }

    /**
    * @notice Check the given signature params against signer address
        Used to verify signature validity
    */
    function isAllowed(string calldata nonce, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
        internal view
        returns (bool)
    {
        require(block.timestamp <= deadline, "Signing too late");
        require(
            recoverSigner(msg.sender, nonce, deadline, v, r, s) == signerAddress,
            "Wrong signer"
        );
        return true;
    }

    /**
    * @notice Check the given signature params against signer address
        Used to verify role validity
    */
    function isRole(bytes32 role, string calldata nonce, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
        internal view
        returns (bool)
    {
        require(block.timestamp <= deadline, "Signing too late");
        require(
            recoverRole(role, msg.sender, nonce, deadline, v, r, s) == signerAddress,
            "Wrong signer"
        );
        return true;
    }

    /**
    * @notice Retrieve the signer address induced by the given signature params
    */
    function recoverSigner(address addr, string memory nonce, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
        internal pure
        returns (address)
    {
        return ecrecover(sha256(abi.encodePacked(addr, nonce, deadline)), v, r, s);
    }

    function recoverRole(bytes32 role, address addr, string memory nonce, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
        internal pure
        returns (address)
    {
        return ecrecover(sha256(abi.encodePacked(role, addr, nonce, deadline)), v, r, s);
    }

    function withdraw()
        external onlyOwner
    {
        uint256 amount = address(this).balance;
        require(amount > 0, "Nothing to withdraw");
        // bool success = payable(mainAddress).send(amount);
        (bool success, ) = payable(mainAddress).call{value: amount}("");
        require(success, "Failed to withdraw");
    }

    receive()
        external payable
    {
    }

    fallback()
        external
    {
    }
}

File 2 of 10 : Constants.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E;
address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;

File 3 of 10 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol";
/**
 * @title  OperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 *         Please note that if your token contract does not provide an owner with EIP-173, it must provide
 *         administration methods on the contract itself to interact with the registry otherwise the subscription
 *         will be locked to the options set during construction.
 */

abstract contract OperatorFilterer {
    /// @dev Emitted when an operator is not allowed.
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS);

    /// @dev The constructor that is called when the contract is being deployed.
    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (subscribe) {
                OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    OPERATOR_FILTER_REGISTRY.register(address(this));
                }
            }
        }
    }

    /**
     * @dev A helper function to check if an operator is allowed.
     */
    modifier onlyAllowedOperator(address from) virtual {
        // Allow spending tokens from addresses with balance
        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
        // from an EOA.
        if (from != msg.sender) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    /**
     * @dev A helper function to check if an operator approval is allowed.
     */
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    /**
     * @dev A helper function to check if an operator is allowed.
     */
    function _checkFilterOperator(address operator) internal view virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            // under normal circumstances, this function will revert rather than return false, but inheriting contracts
            // may specify their own OperatorFilterRegistry implementations, which may behave differently
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

File 4 of 10 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_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) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @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] = _HEX_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 5 of 10 : 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 6 of 10 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 7 of 10 : 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.selector);
        return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Returns whether the ownership slot at `index` is initialized.
     * An uninitialized slot does not necessarily mean that the slot has no owner.
     */
    function _ownershipIsInitialized(uint256 index) internal view virtual returns (bool) {
        return _packedOwnerships[index] != 0;
    }

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

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256 packed) {
        if (_startTokenId() <= tokenId) {
            packed = _packedOwnerships[tokenId];
            // If the data at the starting slot does not exist, start the scan.
            if (packed == 0) {
                if (tokenId >= _currentIndex) _revert(OwnerQueryForNonexistentToken.selector);
                // Invariant:
                // There will always be an initialized ownership slot
                // (i.e. `ownership.addr != address(0) && ownership.burned == false`)
                // before an unintialized ownership slot
                // (i.e. `ownership.addr == address(0) && ownership.burned == false`)
                // Hence, `tokenId` will not underflow.
                //
                // We can directly compare the packed value.
                // If the address is zero, packed will be zero.
                for (;;) {
                    unchecked {
                        packed = _packedOwnerships[--tokenId];
                    }
                    if (packed == 0) continue;
                    if (packed & _BITMASK_BURNED == 0) return packed;
                    // Otherwise, the token is burned, and we must revert.
                    // This handles the case of batch burned tokens, where only the burned bit
                    // of the starting slot is set, and remaining slots are left uninitialized.
                    _revert(OwnerQueryForNonexistentToken.selector);
                }
            }
            // Otherwise, the data exists and we can skip the scan.
            // This is possible because we have already achieved the target condition.
            // This saves 2143 gas on transfers of initialized tokens.
            // If the token is not burned, return `packed`. Otherwise, revert.
            if (packed & _BITMASK_BURNED == 0) return packed;
        }
        _revert(OwnerQueryForNonexistentToken.selector);
    }

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

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

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

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

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account. See {ERC721A-_approve}.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     */
    function approve(address to, uint256 tokenId) public payable virtual override {
        _approve(to, tokenId, true);
    }

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

        return _tokenApprovals[tokenId].value;
    }

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

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

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

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

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

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

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

        // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean.
        from = address(uint160(uint256(uint160(from)) & _BITMASK_ADDRESS));

        if (address(uint160(prevOwnershipPacked)) != from) _revert(TransferFromIncorrectOwner.selector);

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

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

        _beforeTokenTransfers(from, to, tokenId, 1);

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

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

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

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

        // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
        uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS;
        assembly {
            // Emit the `Transfer` event.
            log4(
                0, // Start of data (0, since no data).
                0, // End of data (0, since no data).
                _TRANSFER_EVENT_SIGNATURE, // Signature.
                from, // `from`.
                toMasked, // `to`.
                tokenId // `tokenId`.
            )
        }
        if (toMasked == 0) _revert(TransferToZeroAddress.selector);

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

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

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

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

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

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

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

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

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

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1);

            // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean.
            uint256 toMasked = uint256(uint160(to)) & _BITMASK_ADDRESS;

            if (toMasked == 0) _revert(MintToZeroAddress.selector);

            uint256 end = startTokenId + quantity;
            uint256 tokenId = startTokenId;

            do {
                assembly {
                    // Emit the `Transfer` event.
                    log4(
                        0, // Start of data (0, since no data).
                        0, // End of data (0, since no data).
                        _TRANSFER_EVENT_SIGNATURE, // Signature.
                        0, // `address(0)`.
                        toMasked, // `to`.
                        tokenId // `tokenId`.
                    )
                }
                // The `!=` check ensures that large values of `quantity`
                // that overflows uint256 will make the loop run out of gas.
            } while (++tokenId != end);

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

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

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

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

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

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

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

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

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

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

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

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

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

        if (approvalCheck && _msgSenderERC721A() != owner)
            if (!isApprovedForAll(owner, _msgSenderERC721A())) {
                _revert(ApprovalCallerNotOwnerNorApproved.selector);
            }

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

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

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

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

        address from = address(uint160(prevOwnershipPacked));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev For more efficient reverts.
     */
    function _revert(bytes4 errorSelector) internal pure {
        assembly {
            mstore(0x00, errorSelector)
            revert(0x00, 0x04)
        }
    }
}

File 8 of 10 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    /**
     * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns
     *         true if supplied registrant address is not registered.
     */
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);

    /**
     * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.
     */
    function register(address registrant) external;

    /**
     * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes.
     */
    function registerAndSubscribe(address registrant, address subscription) external;

    /**
     * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another
     *         address without subscribing.
     */
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;

    /**
     * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner.
     *         Note that this does not remove any filtered addresses or codeHashes.
     *         Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes.
     */
    function unregister(address addr) external;

    /**
     * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered.
     */
    function updateOperator(address registrant, address operator, bool filtered) external;

    /**
     * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates.
     */
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;

    /**
     * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered.
     */
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;

    /**
     * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates.
     */
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;

    /**
     * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous
     *         subscription if present.
     *         Note that accounts with subscriptions may go on to subscribe to other accounts - in this case,
     *         subscriptions will not be forwarded. Instead the former subscription's existing entries will still be
     *         used.
     */
    function subscribe(address registrant, address registrantToSubscribe) external;

    /**
     * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes.
     */
    function unsubscribe(address registrant, bool copyExistingEntries) external;

    /**
     * @notice Get the subscription address of a given registrant, if any.
     */
    function subscriptionOf(address addr) external returns (address registrant);

    /**
     * @notice Get the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscribers(address registrant) external returns (address[] memory);

    /**
     * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscriberAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.
     */
    function copyEntriesOf(address registrant, address registrantToCopy) external;

    /**
     * @notice Returns true if operator is filtered by a given address or its subscription.
     */
    function isOperatorFiltered(address registrant, address operator) external returns (bool);

    /**
     * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription.
     */
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);

    /**
     * @notice Returns true if a codeHash is filtered by a given address or its subscription.
     */
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);

    /**
     * @notice Returns a list of filtered operators for a given address or its subscription.
     */
    function filteredOperators(address addr) external returns (address[] memory);

    /**
     * @notice Returns the set of filtered codeHashes for a given address or its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);

    /**
     * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);

    /**
     * @notice Returns true if an address has registered
     */
    function isRegistered(address addr) external returns (bool);

    /**
     * @dev Convenience method to compute the code hash of an arbitrary contract
     */
    function codeHashOf(address addr) external returns (bytes32);
}

File 9 of 10 : 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);
}

File 10 of 10 : 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;
    }
}

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":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"stateMutability":"nonpayable","type":"fallback"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allowlistRole","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"approvedCallers","outputs":[{"internalType":"int8","name":"","type":"int8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burnNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"registrantToCopy","type":"address"}],"name":"copyEntriesOf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum TeikoKey.KeyType","name":"","type":"uint8"}],"name":"currentCountKeyTypes","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentMintPhase","outputs":[{"internalType":"enum TeikoKey.MintPhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"filteredOperators","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"freezeGoldKeys","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint8","name":"percent","type":"uint8"},{"internalType":"string","name":"nonce","type":"string"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"freezeKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nMint","type":"uint256"},{"internalType":"address","name":"recipient","type":"address"}],"name":"giveaway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"isOperatorAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"keyPercents","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"keyTypes","outputs":[{"internalType":"enum TeikoKey.KeyType","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mainAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum TeikoKey.KeyType","name":"","type":"uint8"}],"name":"maxCountKeyTypes","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintAllowlist","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintPublic","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMintWhitelist","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"nMint","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"string","name":"nonce","type":"string"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"mintNFT","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"registrantToCopy","type":"address"}],"name":"registerAndCopyEntries","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"subscription","type":"address"}],"name":"registerAndSubscribe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_mainAddress","type":"address"}],"name":"setMainAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"maxMint","type":"uint8"}],"name":"setMaxPerWalletAllowlist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"maxMint","type":"uint8"}],"name":"setMaxPerWalletPublic","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"maxMint","type":"uint8"}],"name":"setMaxPerWalletWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum TeikoKey.MintPhase","name":"_mintPhase","type":"uint8"}],"name":"setMintPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"priceGwei","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"tokenId","type":"uint8"},{"internalType":"string","name":"tokenIdURI","type":"string"}],"name":"setTokenUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"subscription","type":"address"}],"name":"subscribe","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":"address","name":"addr","type":"address"}],"name":"toggleApprovedCaller","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenURIs","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unregister","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"copyExistingEntries","type":"bool"}],"name":"unsubscribe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"codeHash","type":"bytes32"},{"internalType":"bool","name":"filtered","type":"bool"}],"name":"updateCodeHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"codeHashes","type":"bytes32[]"},{"internalType":"bool","name":"filtered","type":"bool"}],"name":"updateCodeHashes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"filtered","type":"bool"}],"name":"updateOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"operators","type":"address[]"},{"internalType":"bool","name":"filtered","type":"bool"}],"name":"updateOperators","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"whitelistRole","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

600a80546001600160c01b031916779cc8c097251d71f68f674c0f4d2c86fb170e7bcd01010200179055600b8054738fd261f08991619c2c0ad36b3a73e8f874bb53726001600160a01b03199091161790556101006040526053608081815290620044ac60a039600c906200007590826200046b565b506000600d553480156200008857600080fd5b50733cc6cdda760b79bafa08df41ecfa224f810dceb66000604051806040016040528060098152602001685465696b6f204b657960b81b815250604051806040016040528060088152602001675445494b4f4b455960c01b8152508160029081620000f491906200046b565b5060036200010382826200046b565b50506000805550620001153362000374565b6daaeb6d7670e522a718067333cd4e3b156200025a578015620001a857604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200018957600080fd5b505af11580156200019e573d6000803e3d6000fd5b505050506200025a565b6001600160a01b03821615620001f95760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af2903906044016200016e565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200024057600080fd5b505af115801562000255573d6000803e3d6000fd5b505050505b505060136020527f8fa6efc3be94b5b348b21fea823fe8d100408cee9b7f90524494500445d8ff6c805461043b61ffff19918216179091557f4155c2f711f2cdd34f8262ab8fb9b7020a700fe7b6948222152f7670d1fdf34d805482166101c21790557f0b9d2c0c271bb30544eb78c59bdaebdae2728e5f65814c07768a0abe90ed1923805461012c9083161790557f0d2a6872ef858a7f8ead18dc4f3f2e8d35c853d47e2816cbb9cdd49202554e0c8054821660781790557f01413ff7a3b1d5b6c016c061d48e2c7014700c777a29fcd068fff04265813d5d80546032908316179055600560008190527ff4b2859895858d6aa26d656e4999d552f6a869b74c43bba7d2a941c4d22c3559805490921617905562000537565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620003f157607f821691505b6020821081036200041257634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200046657600081815260208120601f850160051c81016020861015620004415750805b601f850160051c820191505b8181101562000462578281556001016200044d565b5050505b505050565b81516001600160401b03811115620004875762000487620003c6565b6200049f81620004988454620003dc565b8462000418565b602080601f831160018114620004d75760008415620004be5750858301515b600019600386901b1c1916600185901b17855562000462565b600085815260208120601f198616915b828110156200050857888601518255948401946001909101908401620004e7565b5085821015620005275787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b613f6580620005476000396000f3fe6080604052600436106103d25760003560e01c80636d44a3b2116101fd578063af88bbd111610118578063e79a198f116100ab578063f2fde38b1161007a578063f2fde38b14610bcd578063f543fd5e14610bed578063f8e07b3e14610c0d578063fa0add2714610c20578063fe000a0d14610c40576103d9565b8063e79a198f14610b57578063e985e9c514610b6c578063ec35e88714610b8c578063ef9b63ba14610bac576103d9565b8063c87b56dd116100e7578063c87b56dd14610ac3578063ce5460bd14610ae3578063db9771f514610b03578063ddf7ea0214610b23576103d9565b8063af88bbd114610a2c578063b65068ce14610a70578063b88d4fde14610a90578063c377bfe414610aa3576103d9565b806391b7f5ed11610190578063a22cb4651161015f578063a22cb4651461098b578063a71975af146109ab578063a759a7c8146109ed578063abad26d314610a0c576103d9565b806391b7f5ed1461092057806395d89b4114610940578063a035b1fe14610955578063a0bcfc7f1461096b576103d9565b806375ccc132116101cc57806375ccc132146108925780637d4e31c5146108b25780638cb3315a146108e25780638da5cb5b14610902576103d9565b80636d44a3b21461081d5780636e2c3ac31461083d57806370a082311461085d578063715018a61461087d576103d9565b80633297c6f9116102ed5780634bb451161161028057806363664b1b1161024f57806363664b1b14610798578063676d94db146107c85780636c0360eb146107e85780636c8b703f146107fd576103d9565b80634bb45116146106f95780635660f8511461072b5780635b7633d0146107585780636352211e14610778576103d9565b80633ccfd60b116102bc5780633ccfd60b1461068f57806341a7726a146106a457806341f43434146106c457806342842e0e146106e6576103d9565b80633297c6f91461061757806332cb6b0c146106395780633a1d40551461064f5780633c0a1d091461066f576103d9565b806318160ddd116103655780632890e0d7116103345780632890e0d71461059757806328bfde2e146105b757806331c07bbf146105d7578063324e1f0d146105f7576103d9565b806318160ddd146105185780631aa3a0081461053b57806323b872dd14610550578063262b1c2a14610563576103d9565b8063095ea7b3116103a1578063095ea7b3146104965780630cdd4234146104a95780630dd250e1146104d15780630f81fa86146104f8576103d9565b806301ffc9a7146103e7578063046dc1661461041c57806306fdde031461043c578063081812fc1461045e576103d9565b366103d957005b3480156103e557600080fd5b005b3480156103f357600080fd5b5061040761040236600461328f565b610c7d565b60405190151581526020015b60405180910390f35b34801561042857600080fd5b506103e56104373660046132c8565b610c8e565b34801561044857600080fd5b50610451610cb8565b6040516104139190613335565b34801561046a57600080fd5b5061047e610479366004613348565b610d4a565b6040516001600160a01b039091168152602001610413565b6103e56104a4366004613361565b610d85565b3480156104b557600080fd5b50600a5461047e9064010000000090046001600160a01b031681565b3480156104dd57600080fd5b50600a546104eb9060ff1681565b60405161041391906133a3565b34801561050457600080fd5b506103e561051336600461348b565b610d9e565b34801561052457600080fd5b50600154600054035b604051908152602001610413565b34801561054757600080fd5b506103e5610e3e565b6103e561055e3660046134d8565b610ea1565b34801561056f57600080fd5b5061052d7f679b4db551486bdc8b8c3d86cea88bd774cea7c203e4aa4e3b39b7bb5f64bc1481565b3480156105a357600080fd5b506103e56105b2366004613348565b610ec6565b3480156105c357600080fd5b506103e56105d23660046132c8565b610f70565b3480156105e357600080fd5b506103e56105f2366004613519565b610fe2565b34801561060357600080fd5b506103e561061236600461353a565b61113b565b34801561062357600080fd5b5061062c611161565b6040516104139190613555565b34801561064557600080fd5b5061052d6107d881565b34801561065b57600080fd5b506103e561066a3660046135fb565b6111dc565b34801561067b57600080fd5b506103e561068a366004613651565b611252565b34801561069b57600080fd5b506103e56112d5565b3480156106b057600080fd5b506103e56106bf3660046132c8565b6113c5565b3480156106d057600080fd5b5061047e6daaeb6d7670e522a718067333cd4e81565b6103e56106f43660046134d8565b61143e565b34801561070557600080fd5b50600a546107199062010000900460ff1681565b60405160ff9091168152602001610413565b34801561073757600080fd5b5061052d6107463660046132c8565b600e6020526000908152604090205481565b34801561076457600080fd5b50600b5461047e906001600160a01b031681565b34801561078457600080fd5b5061047e610793366004613348565b611463565b3480156107a457600080fd5b506107196107b3366004613681565b60146020526000908152604090205460ff1681565b3480156107d457600080fd5b506103e56107e33660046136a2565b61146e565b3480156107f457600080fd5b506104516114e8565b34801561080957600080fd5b50610451610818366004613348565b611576565b34801561082957600080fd5b506103e56108383660046136c7565b61158f565b34801561084957600080fd5b506103e5610858366004613736565b6115df565b34801561086957600080fd5b5061052d6108783660046132c8565b611ac0565b34801561088957600080fd5b506103e5611b05565b34801561089e57600080fd5b506104076108ad3660046132c8565b611b19565b3480156108be57600080fd5b506107196108cd366004613348565b600f6020526000908152604090205460ff1681565b3480156108ee57600080fd5b506103e56108fd3660046132c8565b611b98565b34801561090e57600080fd5b506008546001600160a01b031661047e565b34801561092c57600080fd5b506103e561093b366004613348565b611be0565b34801561094c57600080fd5b50610451611bfc565b34801561096157600080fd5b5061052d600d5481565b34801561097757600080fd5b506103e56109863660046137bf565b611c0b565b34801561099757600080fd5b506103e56109a63660046136c7565b611c1f565b3480156109b757600080fd5b506109da6109c63660046132c8565b601060205260009081526040812054900b81565b60405160009190910b8152602001610413565b3480156109f957600080fd5b50600a5461071990610100900460ff1681565b348015610a1857600080fd5b506103e5610a273660046137f3565b611c33565b348015610a3857600080fd5b50610a5d610a47366004613681565b60136020526000908152604090205461ffff1681565b60405161ffff9091168152602001610413565b348015610a7c57600080fd5b506103e5610a8b3660046135fb565b611ced565b6103e5610a9e366004613834565b611d2c565b348015610aaf57600080fd5b506103e5610abe3660046138b3565b611d52565b348015610acf57600080fd5b50610451610ade366004613348565b611d93565b348015610aef57600080fd5b506103e5610afe3660046132c8565b611f74565b348015610b0f57600080fd5b506103e5610b1e3660046132c8565b611fbc565b348015610b2f57600080fd5b5061052d7f26f5f9007a8ba555c69300783175e5dd0bdf079f9aec2934a52696503e64366281565b348015610b6357600080fd5b506103e5611ff2565b348015610b7857600080fd5b50610407610b873660046138d0565b61202b565b348015610b9857600080fd5b506103e5610ba736600461353a565b612059565b348015610bb857600080fd5b50600a54610719906301000000900460ff1681565b348015610bd957600080fd5b506103e5610be83660046132c8565b61207d565b348015610bf957600080fd5b506103e5610c0836600461353a565b6120f3565b6103e5610c1b3660046138fe565b61211b565b348015610c2c57600080fd5b506103e5610c3b3660046132c8565b61247a565b348015610c4c57600080fd5b50610c70610c5b366004613348565b60126020526000908152604090205460ff1681565b6040516104139190613977565b6000610c88826124c2565b92915050565b610c96612510565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b606060028054610cc79061398b565b80601f0160208091040260200160405190810160405280929190818152602001828054610cf39061398b565b8015610d405780601f10610d1557610100808354040283529160200191610d40565b820191906000526020600020905b815481529060010190602001808311610d2357829003601f168201915b5050505050905090565b6000610d558261256a565b610d6957610d696333d1c03960e21b6125af565b506000908152600660205260409020546001600160a01b031690565b81610d8f816125b9565b610d998383612672565b505050565b33600081815260106020526040812054900b60011480610dcb57506008546001600160a01b038281169116145b610e1c5760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f7420617070726f766564206e6f72206f776e657260448201526064015b60405180910390fd5b60ff83166000908152601160205260409020610e388382613a0b565b50505050565b610e46612510565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e486906024015b600060405180830381600087803b158015610e8d57600080fd5b505af1158015610e38573d6000803e3d6000fd5b826001600160a01b0381163314610ebb57610ebb336125b9565b610e3884848461267e565b338181610ed282611463565b6001600160a01b03161480610f0157506001600160a01b038216600090815260106020526040812054900b6001145b610f675760405162461bcd60e51b815260206004820152603160248201527f43616c6c6572206973206e6f74206f776e6572206f66207468617420746f6b656044820152701b881a59081b9bdc88185c1c1c9bdd9959607a1b6064820152608401610e13565b610d99836127e9565b610f78612510565b6001600160a01b038116600090815260106020526040812054900b600103610fbb576001600160a01b03166000908152601060205260409020805460ff19169055565b6001600160a01b0381166000908152601060205260409020805460ff191660011790555b50565b610fea612510565b6000816003811115610ffe57610ffe61338d565b1015801561101e5750600381600381111561101b5761101b61338d565b11155b6110785760405162461bcd60e51b815260206004820152602560248201527f5f6d696e745068617365206861766520746f206265206265747765656e203020604482015264616e64203360d81b6064820152608401610e13565b600a5460ff16600381111561108f5761108f61338d565b8160038111156110a1576110a161338d565b116111145760405162461bcd60e51b815260206004820152603860248201527f6e6577206d696e74207068617365206d757374206265207374726963746c792060448201527f67726561746572207468616e2063757272656e74206f6e6500000000000000006064820152608401610e13565b600a805482919060ff191660018360038111156111335761113361338d565b021790555050565b611143612510565b600a805460ff909216620100000262ff000019909216919091179055565b60405163c430880560e01b81523060048201526060906daaeb6d7670e522a718067333cd4e9063c4308805906024016000604051808303816000875af11580156111af573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111d79190810190613aca565b905090565b6111e4612510565b6040516303194c5b60e11b81526daaeb6d7670e522a718067333cd4e9063063298b69061121b903090879087908790600401613b7b565b600060405180830381600087803b15801561123557600080fd5b505af1158015611249573d6000803e3d6000fd5b50505050505050565b33600081815260106020526040812054900b6001148061127f57506008546001600160a01b038281169116145b6112cb5760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f7420617070726f766564206e6f72206f776e65726044820152606401610e13565b610d9983836127f4565b6112dd612510565b47806113215760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b6044820152606401610e13565b600a5460405160009164010000000090046001600160a01b03169083908381818185875af1925050503d8060008114611376576040519150601f19603f3d011682016040523d82523d6000602084013e61137b565b606091505b50509050806113c15760405162461bcd60e51b81526020600482015260126024820152714661696c656420746f20776974686472617760701b6044820152606401610e13565b5050565b6113cd612510565b604051632cc5350560e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063b314d414906044015b600060405180830381600087803b15801561142357600080fd5b505af1158015611437573d6000803e3d6000fd5b5050505050565b826001600160a01b038116331461145857611458336125b9565b610e388484846128b3565b6000610c88826128ce565b611476612510565b60405163712fc00b60e01b81523060048201526024810183905281151560448201526daaeb6d7670e522a718067333cd4e9063712fc00b906064015b600060405180830381600087803b1580156114cc57600080fd5b505af11580156114e0573d6000803e3d6000fd5b505050505050565b600c80546114f59061398b565b80601f01602080910402602001604051908101604052809291908181526020018280546115219061398b565b801561156e5780601f106115435761010080835404028352916020019161156e565b820191906000526020600020905b81548152906001019060200180831161155157829003601f168201915b505050505081565b601160205260009081526040902080546114f59061398b565b611597612510565b60405163a2f367ab60e01b81523060048201526001600160a01b038316602482015281151560448201526daaeb6d7670e522a718067333cd4e9063a2f367ab906064016114b2565b336115e989611463565b6001600160a01b0316148061160857506008546001600160a01b031633145b6116545760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420796f7572204e4654206e6f7220746865206f776e65720000000000006044820152606401610e13565b611662868686868686612964565b6116a45760405162461bcd60e51b8152602060048201526013602482015272165bdd48185c99481b9bdd08185b1b1bddd959606a1b6044820152606401610e13565b60008881526012602052604081205460ff1660058111156116c7576116c761338d565b146117145760405162461bcd60e51b815260206004820152601c60248201527f4b6579206861766520616c7265616479206265656e2066726f7a656e000000006044820152606401610e13565b60648760ff1611156117745760405162461bcd60e51b8152602060048201526024808201527f50657263656e74206861766520746f206265206265747765656e203020616e646044820152630203130360e41b6064820152608401610e13565b6000888152600f60205260409020805460ff191660ff8916908117909155601911156117d55760405162461bcd60e51b815260206004820152601060248201526f4e6f7468696e6720746f20636c61696d60801b6044820152606401610e13565b60328760ff1610801561183e575060016000527f4155c2f711f2cdd34f8262ab8fb9b7020a700fe7b6948222152f7670d1fdf34d5460146020527fb6c61a840592cc84133e4b25bd509abf4659307c57b160799b38490a5aa48f2c5461ffff90911660ff909116105b156118b4576000888152601260205260408120805460ff19166001908117909155601491905b60058111156118755761187561338d565b815260208101919091526040016000908120805460ff169161189683613be0565b91906101000a81548160ff021916908360ff16021790555050611ab6565b604b8760ff1610801561191d575060026000527f0b9d2c0c271bb30544eb78c59bdaebdae2728e5f65814c07768a0abe90ed19235460146020527fa1930aa930426c54c34daad2b9ada7c5d0ef0c96078a3c5bb79f6fa6602c4a7a5461ffff90911660ff909116105b15611947576000888152601260205260408120805460ff1916600290811790915560149190611864565b60648760ff161080156119b0575060036000527f0d2a6872ef858a7f8ead18dc4f3f2e8d35c853d47e2816cbb9cdd49202554e0c5460146020527f63d87a887046e0430be80fdeb014107d7198c879cbf2cddf39a6df195c86cb385461ffff90911660ff909116105b156119da576000888152601260205260408120805460ff1916600390811790915560149190611864565b8660ff166064148015611a43575060046000527f01413ff7a3b1d5b6c016c061d48e2c7014700c777a29fcd068fff04265813d5d5460146020527f52102136546d97ed3f65ec1070a32935d3048ea12f310d29c378dc9d6555c0d65461ffff90911660ff909116105b15611ab65760008881526012602090815260408220805460ff191660049081179091558252601490527f52102136546d97ed3f65ec1070a32935d3048ea12f310d29c378dc9d6555c0d6805460ff1691611a9c83613be0565b91906101000a81548160ff021916908360ff160217905550505b5050505050505050565b60006001600160a01b038216611ae057611ae06323d3ad8160e21b6125af565b506001600160a01b03166000908152600560205260409020546001600160401b031690565b611b0d612510565b611b176000612a50565b565b604051633185c44d60e21b81523060048201526001600160a01b03821660248201526000906daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611b74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c889190613bff565b611ba0612510565b604051630781ad2d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e90631e06b4b490604401611409565b611be8612510565b611bf681633b9aca00613c1c565b600d5550565b606060038054610cc79061398b565b611c13612510565b600c6113c18282613a0b565b81611c29816125b9565b610d998383612aa2565b611c3b612510565b60005b81811015610d99576064600f6000858585818110611c5e57611c5e613c33565b90506020020135815260200190815260200160002060006101000a81548160ff021916908360ff160217905550600560126000858585818110611ca357611ca3613c33565b60209081029290920135835250810191909152604001600020805460ff19166001836005811115611cd657611cd661338d565b021790555080611ce581613c49565b915050611c3e565b611cf5612510565b60405163a14584c160e01b81526daaeb6d7670e522a718067333cd4e9063a14584c19061121b903090879087908790600401613c62565b836001600160a01b0381163314611d4657611d46336125b9565b61143785858585612b0e565b611d5a612510565b60405163034a0dc160e41b815230600482015281151560248201526daaeb6d7670e522a718067333cd4e906334a0dc1090604401611409565b6060611d9e8261256a565b611e025760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610e13565b60008281526011602052604081208054611e1b9061398b565b80601f0160208091040260200160405190810160405280929190818152602001828054611e479061398b565b8015611e945780601f10611e6957610100808354040283529160200191611e94565b820191906000526020600020905b815481529060010190602001808311611e7757829003601f168201915b5050604080516020808201835260008252915195965094611ebb9450859350019050613cca565b6040516020818303038152906040528051906020012082604051602001611ee29190613cca565b6040516020818303038152906040528051906020012003611f6d57600c604051602001611f0f9190613ce6565b604051602081830303815290604052611f2785612b49565b604051602001611f38929190613d64565b60408051601f1981840301815290829052611f5591602001613d93565b60405160208183030381529060405292505050919050565b5092915050565b611f7c612510565b604051633e9f1edf60e11b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe90604401611409565b611fc4612510565b600a80546001600160a01b0390921664010000000002640100000000600160c01b0319909216919091179055565b611ffa612510565b604051631761612360e11b81523060048201526daaeb6d7670e522a718067333cd4e90632ec2c24690602401610e73565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b612061612510565b600a805460ff9092166101000261ff0019909216919091179055565b612085612510565b6001600160a01b0381166120ea5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e13565b610fdf81612a50565b6120fb612510565b600a805460ff90921663010000000263ff00000019909216919091179055565b6000600a5460ff1660038111156121345761213461338d565b036121815760405162461bcd60e51b815260206004820181905260248201527f4d696e7420706572696f642068617665206e6f742073746172746564207965746044820152606401610e13565b3233146121c25760405162461bcd60e51b815260206004820152600f60248201526e139bc8189bdd1cc8185b1b1bddd959608a1b6044820152606401610e13565b86600d546121d09190613c1c565b3410156122185760405162461bcd60e51b8152602060048201526016602482015275139bdd08195b9bdd59da08115512081d1bc81b5a5b9d60521b6044820152606401610e13565b6001600a5460ff1660038111156122315761223161338d565b03612322576122657f679b4db551486bdc8b8c3d86cea88bd774cea7c203e4aa4e3b39b7bb5f64bc148484848a8a8a612c51565b6122b15760405162461bcd60e51b815260206004820152601760248201527f596f7520617265206e6f742077686974656c69737465640000000000000000006044820152606401610e13565b600a54336000908152600e602052604090205461010090910460ff16906122d9908990613dbc565b111561231d5760405162461bcd60e51b8152602060048201526013602482015272151bdbc81b5d58da08139195081b5a5b9d1959606a1b6044820152606401610e13565b612470565b6002600a5460ff16600381111561233b5761233b61338d565b036123e45761236f7f26f5f9007a8ba555c69300783175e5dd0bdf079f9aec2934a52696503e6436628484848a8a8a612c51565b6123bb5760405162461bcd60e51b815260206004820152601760248201527f596f7520617265206e6f7420616c6c6f776c69737465640000000000000000006044820152606401610e13565b600a54336000908152600e60205260409020546201000090910460ff16906122d9908990613dbc565b6003600a5460ff1660038111156123fd576123fd61338d565b0361247057600a54336000908152600e6020526040902054630100000090910460ff169061242c908990613dbc565b11156124705760405162461bcd60e51b8152602060048201526013602482015272151bdbc81b5d58da08139195081b5a5b9d1959606a1b6044820152606401610e13565b61124987336127f4565b612482612510565b60405163a0af290360e01b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401611409565b60006301ffc9a760e01b6001600160e01b0319831614806124f357506380ac58cd60e01b6001600160e01b03198316145b80610c885750506001600160e01b031916635b5e139f60e01b1490565b6008546001600160a01b03163314611b175760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e13565b600080548210156125aa5760005b50600082815260046020526040812054908190036125a05761259983613dcf565b9250612578565b600160e01b161590505b919050565b8060005260046000fd5b6daaeb6d7670e522a718067333cd4e3b15610fdf57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612626573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061264a9190613bff565b610fdf57604051633b79c77360e21b81526001600160a01b0382166004820152602401610e13565b6113c182826001612d3f565b6000612689826128ce565b6001600160a01b0394851694909150811684146126af576126af62a1148160e81b6125af565b600082815260066020526040902080546126db8187335b6001600160a01b039081169116811491141790565b6126fd576126e9863361202b565b6126fd576126fd632ce44b5f60e11b6125af565b801561270857600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b8416900361279a576001840160008181526004602052604081205490036127985760005481146127985760008181526004602052604090208490555b505b6001600160a01b0385168481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4806000036127e4576127e4633a954ecd60e21b6125af565b611249565b610fdf816000612de2565b6107d88261280160095490565b61280b9190613dbc565b111561284f5760405162461bcd60e51b8152602060048201526013602482015272139bc81b5bdc9948139195081d1bc81b5a5b9d606a1b6044820152606401610e13565b6001600160a01b0381166000908152600e602052604081208054849290612877908490613dbc565b90915550600090505b828110156128a857612896600980546001019055565b806128a081613c49565b915050612880565b506113c18183612f23565b610d9983838360405180602001604052806000815250611d2c565b600081815260046020526040812054908190036129415760005482106128fe576128fe636f96cda160e11b6125af565b5b506000190160008181526004602052604090205480156128ff57600160e01b811660000361292c57919050565b61293c636f96cda160e11b6125af565b6128ff565b600160e01b811660000361295457919050565b6125aa636f96cda160e11b6125af565b6000844211156129a95760405162461bcd60e51b815260206004820152601060248201526f5369676e696e6720746f6f206c61746560801b6044820152606401610e13565b600b54604080516020601f8a018190048102820181019092528881526001600160a01b03909216916129fe913391908b908b90819084018382808284376000920191909152508b92508a915089905088612fe2565b6001600160a01b031614612a435760405162461bcd60e51b815260206004820152600c60248201526b2bb937b7339039b4b3b732b960a11b6044820152606401610e13565b5060019695505050505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612b19848484610ea1565b6001600160a01b0383163b15610e3857612b35848484846130bb565b610e3857610e386368d2bf6b60e11b6125af565b606081600003612b705750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612b9a5780612b8481613c49565b9150612b939050600a83613dfc565b9150612b74565b6000816001600160401b03811115612bb457612bb46133ce565b6040519080825280601f01601f191660200182016040528015612bde576020820181803683370190505b5090505b8415612c4957612bf3600183613e10565b9150612c00600a86613e23565b612c0b906030613dbc565b60f81b818381518110612c2057612c20613c33565b60200101906001600160f81b031916908160001a905350612c42600a86613dfc565b9450612be2565b949350505050565b600084421115612c965760405162461bcd60e51b815260206004820152601060248201526f5369676e696e6720746f6f206c61746560801b6044820152606401610e13565b600b54604080516020601f8a018190048102820181019092528881526001600160a01b0390921691612cec918b9133918c908c90819084018382808284376000920191909152508c92508b91508a90508961319d565b6001600160a01b031614612d315760405162461bcd60e51b815260206004820152600c60248201526b2bb937b7339039b4b3b732b960a11b6044820152606401610e13565b506001979650505050505050565b6000612d4a83611463565b9050818015612d625750336001600160a01b03821614155b15612d8557612d71813361202b565b612d8557612d856367d9dca160e11b6125af565b60008381526006602052604080822080546001600160a01b0319166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b6000612ded836128ce565b905080600080612e0b86600090815260066020526040902080549091565b915091508415612e4257612e208184336126c6565b612e4257612e2e833361202b565b612e4257612e42632ce44b5f60e11b6125af565b8015612e4d57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040812091909155600160e11b85169003612edb57600186016000818152600460205260408120549003612ed9576000548114612ed95760008181526004602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600180548101905550505050565b6000805490829003612f3f57612f3f63b562e8dd60e01b6125af565b60008181526004602090815260408083206001600160a01b0387164260a01b6001881460e11b17811790915580845260059092528220805468010000000000000001860201905590819003612f9d57612f9d622e076360e81b6125af565b818301825b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4818160010191508103612fa2575060005550505050565b600060016002888888604051602001612ffd93929190613e37565b60408051601f198184030181529082905261301791613cca565b602060405180830381855afa158015613034573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906130579190613e76565b6040805160008152602081018083529290925260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156130a5573d6000803e3d6000fd5b5050604051601f19015198975050505050505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906130f0903390899088908890600401613e8f565b6020604051808303816000875af192505050801561312b575060408051601f3d908101601f1916820190925261312891810190613ecc565b60015b613180573d808015613159576040519150601f19603f3d011682016040523d82523d6000602084013e61315e565b606091505b508051600003613178576131786368d2bf6b60e11b6125af565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b600060016002898989896040516020016131ba9493929190613ee9565b60408051601f19818403018152908290526131d491613cca565b602060405180830381855afa1580156131f1573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906132149190613e76565b6040805160008152602081018083529290925260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015613262573d6000803e3d6000fd5b5050604051601f1901519998505050505050505050565b6001600160e01b031981168114610fdf57600080fd5b6000602082840312156132a157600080fd5b81356132ac81613279565b9392505050565b6001600160a01b0381168114610fdf57600080fd5b6000602082840312156132da57600080fd5b81356132ac816132b3565b60005b838110156133005781810151838201526020016132e8565b50506000910152565b600081518084526133218160208601602086016132e5565b601f01601f19169290920160200192915050565b6020815260006132ac6020830184613309565b60006020828403121561335a57600080fd5b5035919050565b6000806040838503121561337457600080fd5b823561337f816132b3565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106133b7576133b761338d565b91905290565b803560ff811681146125aa57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561340c5761340c6133ce565b604052919050565b60006001600160401b0383111561342d5761342d6133ce565b613440601f8401601f19166020016133e4565b905082815283838301111561345457600080fd5b828260208301376000602084830101529392505050565b600082601f83011261347c57600080fd5b6132ac83833560208501613414565b6000806040838503121561349e57600080fd5b6134a7836133bd565b915060208301356001600160401b038111156134c257600080fd5b6134ce8582860161346b565b9150509250929050565b6000806000606084860312156134ed57600080fd5b83356134f8816132b3565b92506020840135613508816132b3565b929592945050506040919091013590565b60006020828403121561352b57600080fd5b8135600481106132ac57600080fd5b60006020828403121561354c57600080fd5b6132ac826133bd565b6020808252825182820181905260009190848201906040850190845b818110156135965783516001600160a01b031683529284019291840191600101613571565b50909695505050505050565b60008083601f8401126135b457600080fd5b5081356001600160401b038111156135cb57600080fd5b6020830191508360208260051b85010111156135e657600080fd5b9250929050565b8015158114610fdf57600080fd5b60008060006040848603121561361057600080fd5b83356001600160401b0381111561362657600080fd5b613632868287016135a2565b9094509250506020840135613646816135ed565b809150509250925092565b6000806040838503121561366457600080fd5b823591506020830135613676816132b3565b809150509250929050565b60006020828403121561369357600080fd5b8135600681106132ac57600080fd5b600080604083850312156136b557600080fd5b823591506020830135613676816135ed565b600080604083850312156136da57600080fd5b82356136e5816132b3565b91506020830135613676816135ed565b60008083601f84011261370757600080fd5b5081356001600160401b0381111561371e57600080fd5b6020830191508360208285010111156135e657600080fd5b60008060008060008060008060e0898b03121561375257600080fd5b8835975061376260208a016133bd565b965060408901356001600160401b0381111561377d57600080fd5b6137898b828c016136f5565b909750955050606089013593506137a260808a016133bd565b925060a0890135915060c089013590509295985092959890939650565b6000602082840312156137d157600080fd5b81356001600160401b038111156137e757600080fd5b612c498482850161346b565b6000806020838503121561380657600080fd5b82356001600160401b0381111561381c57600080fd5b613828858286016135a2565b90969095509350505050565b6000806000806080858703121561384a57600080fd5b8435613855816132b3565b93506020850135613865816132b3565b92506040850135915060608501356001600160401b0381111561388757600080fd5b8501601f8101871361389857600080fd5b6138a787823560208401613414565b91505092959194509250565b6000602082840312156138c557600080fd5b81356132ac816135ed565b600080604083850312156138e357600080fd5b82356138ee816132b3565b91506020830135613676816132b3565b600080600080600080600060c0888a03121561391957600080fd5b87359650613929602089016133bd565b9550604088013594506060880135935060808801356001600160401b0381111561395257600080fd5b61395e8a828b016136f5565b989b979a5095989497959660a090950135949350505050565b60208101600683106133b7576133b761338d565b600181811c9082168061399f57607f821691505b6020821081036139bf57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610d9957600081815260208120601f850160051c810160208610156139ec5750805b601f850160051c820191505b818110156114e0578281556001016139f8565b81516001600160401b03811115613a2457613a246133ce565b613a3881613a32845461398b565b846139c5565b602080601f831160018114613a6d5760008415613a555750858301515b600019600386901b1c1916600185901b1785556114e0565b600085815260208120601f198616915b82811015613a9c57888601518255948401946001909101908401613a7d565b5085821015613aba5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020808385031215613add57600080fd5b82516001600160401b0380821115613af457600080fd5b818501915085601f830112613b0857600080fd5b815181811115613b1a57613b1a6133ce565b8060051b9150613b2b8483016133e4565b8181529183018401918481019088841115613b4557600080fd5b938501935b83851015613b6f5784519250613b5f836132b3565b8282529385019390850190613b4a565b98975050505050505050565b6001600160a01b0385168152606060208201819052810183905260006001600160fb1b03841115613bab57600080fd5b8360051b80866080850137921515604083015250016080019392505050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff8103613bf657613bf6613bca565b60010192915050565b600060208284031215613c1157600080fd5b81516132ac816135ed565b8082028115828204841417610c8857610c88613bca565b634e487b7160e01b600052603260045260246000fd5b600060018201613c5b57613c5b613bca565b5060010190565b6001600160a01b03858116825260606020808401829052908301859052600091869160808501845b88811015613cb1578435613c9d816132b3565b841682529382019390820190600101613c8a565b5080945050505050821515604083015295945050505050565b60008251613cdc8184602087016132e5565b9190910192915050565b6000808354613cf48161398b565b60018281168015613d0c5760018114613d2157613d50565b60ff1984168752821515830287019450613d50565b8760005260208060002060005b85811015613d475781548a820152908401908201613d2e565b50505082870194505b50602f60f81b845290920195945050505050565b60008351613d768184602088016132e5565b835190830190613d8a8183602088016132e5565b01949350505050565b60008251613da58184602087016132e5565b64173539b7b760d91b920191825250600501919050565b80820180821115610c8857610c88613bca565b600081613dde57613dde613bca565b506000190190565b634e487b7160e01b600052601260045260246000fd5b600082613e0b57613e0b613de6565b500490565b81810381811115610c8857610c88613bca565b600082613e3257613e32613de6565b500690565b6bffffffffffffffffffffffff198460601b16815260008351613e618160148501602088016132e5565b60149201918201929092526034019392505050565b600060208284031215613e8857600080fd5b5051919050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613ec290830184613309565b9695505050505050565b600060208284031215613ede57600080fd5b81516132ac81613279565b8481526bffffffffffffffffffffffff198460601b16602082015260008351613f198160348501602088016132e5565b603492019182019290925260540194935050505056fea26469706673582212203a5e678d933e933ab370d6b35b99b368aeb02d2d0327ac4dfb1b7fabb74d780564736f6c6343000811003368747470733a2f2f697066732e696f2f69706e732f6b3531717a693575717535646a7a646d6c69346c3975747534366376643335736e39706c6f33753530706b616d3767747177336966713063727970703070

Deployed Bytecode

0x6080604052600436106103d25760003560e01c80636d44a3b2116101fd578063af88bbd111610118578063e79a198f116100ab578063f2fde38b1161007a578063f2fde38b14610bcd578063f543fd5e14610bed578063f8e07b3e14610c0d578063fa0add2714610c20578063fe000a0d14610c40576103d9565b8063e79a198f14610b57578063e985e9c514610b6c578063ec35e88714610b8c578063ef9b63ba14610bac576103d9565b8063c87b56dd116100e7578063c87b56dd14610ac3578063ce5460bd14610ae3578063db9771f514610b03578063ddf7ea0214610b23576103d9565b8063af88bbd114610a2c578063b65068ce14610a70578063b88d4fde14610a90578063c377bfe414610aa3576103d9565b806391b7f5ed11610190578063a22cb4651161015f578063a22cb4651461098b578063a71975af146109ab578063a759a7c8146109ed578063abad26d314610a0c576103d9565b806391b7f5ed1461092057806395d89b4114610940578063a035b1fe14610955578063a0bcfc7f1461096b576103d9565b806375ccc132116101cc57806375ccc132146108925780637d4e31c5146108b25780638cb3315a146108e25780638da5cb5b14610902576103d9565b80636d44a3b21461081d5780636e2c3ac31461083d57806370a082311461085d578063715018a61461087d576103d9565b80633297c6f9116102ed5780634bb451161161028057806363664b1b1161024f57806363664b1b14610798578063676d94db146107c85780636c0360eb146107e85780636c8b703f146107fd576103d9565b80634bb45116146106f95780635660f8511461072b5780635b7633d0146107585780636352211e14610778576103d9565b80633ccfd60b116102bc5780633ccfd60b1461068f57806341a7726a146106a457806341f43434146106c457806342842e0e146106e6576103d9565b80633297c6f91461061757806332cb6b0c146106395780633a1d40551461064f5780633c0a1d091461066f576103d9565b806318160ddd116103655780632890e0d7116103345780632890e0d71461059757806328bfde2e146105b757806331c07bbf146105d7578063324e1f0d146105f7576103d9565b806318160ddd146105185780631aa3a0081461053b57806323b872dd14610550578063262b1c2a14610563576103d9565b8063095ea7b3116103a1578063095ea7b3146104965780630cdd4234146104a95780630dd250e1146104d15780630f81fa86146104f8576103d9565b806301ffc9a7146103e7578063046dc1661461041c57806306fdde031461043c578063081812fc1461045e576103d9565b366103d957005b3480156103e557600080fd5b005b3480156103f357600080fd5b5061040761040236600461328f565b610c7d565b60405190151581526020015b60405180910390f35b34801561042857600080fd5b506103e56104373660046132c8565b610c8e565b34801561044857600080fd5b50610451610cb8565b6040516104139190613335565b34801561046a57600080fd5b5061047e610479366004613348565b610d4a565b6040516001600160a01b039091168152602001610413565b6103e56104a4366004613361565b610d85565b3480156104b557600080fd5b50600a5461047e9064010000000090046001600160a01b031681565b3480156104dd57600080fd5b50600a546104eb9060ff1681565b60405161041391906133a3565b34801561050457600080fd5b506103e561051336600461348b565b610d9e565b34801561052457600080fd5b50600154600054035b604051908152602001610413565b34801561054757600080fd5b506103e5610e3e565b6103e561055e3660046134d8565b610ea1565b34801561056f57600080fd5b5061052d7f679b4db551486bdc8b8c3d86cea88bd774cea7c203e4aa4e3b39b7bb5f64bc1481565b3480156105a357600080fd5b506103e56105b2366004613348565b610ec6565b3480156105c357600080fd5b506103e56105d23660046132c8565b610f70565b3480156105e357600080fd5b506103e56105f2366004613519565b610fe2565b34801561060357600080fd5b506103e561061236600461353a565b61113b565b34801561062357600080fd5b5061062c611161565b6040516104139190613555565b34801561064557600080fd5b5061052d6107d881565b34801561065b57600080fd5b506103e561066a3660046135fb565b6111dc565b34801561067b57600080fd5b506103e561068a366004613651565b611252565b34801561069b57600080fd5b506103e56112d5565b3480156106b057600080fd5b506103e56106bf3660046132c8565b6113c5565b3480156106d057600080fd5b5061047e6daaeb6d7670e522a718067333cd4e81565b6103e56106f43660046134d8565b61143e565b34801561070557600080fd5b50600a546107199062010000900460ff1681565b60405160ff9091168152602001610413565b34801561073757600080fd5b5061052d6107463660046132c8565b600e6020526000908152604090205481565b34801561076457600080fd5b50600b5461047e906001600160a01b031681565b34801561078457600080fd5b5061047e610793366004613348565b611463565b3480156107a457600080fd5b506107196107b3366004613681565b60146020526000908152604090205460ff1681565b3480156107d457600080fd5b506103e56107e33660046136a2565b61146e565b3480156107f457600080fd5b506104516114e8565b34801561080957600080fd5b50610451610818366004613348565b611576565b34801561082957600080fd5b506103e56108383660046136c7565b61158f565b34801561084957600080fd5b506103e5610858366004613736565b6115df565b34801561086957600080fd5b5061052d6108783660046132c8565b611ac0565b34801561088957600080fd5b506103e5611b05565b34801561089e57600080fd5b506104076108ad3660046132c8565b611b19565b3480156108be57600080fd5b506107196108cd366004613348565b600f6020526000908152604090205460ff1681565b3480156108ee57600080fd5b506103e56108fd3660046132c8565b611b98565b34801561090e57600080fd5b506008546001600160a01b031661047e565b34801561092c57600080fd5b506103e561093b366004613348565b611be0565b34801561094c57600080fd5b50610451611bfc565b34801561096157600080fd5b5061052d600d5481565b34801561097757600080fd5b506103e56109863660046137bf565b611c0b565b34801561099757600080fd5b506103e56109a63660046136c7565b611c1f565b3480156109b757600080fd5b506109da6109c63660046132c8565b601060205260009081526040812054900b81565b60405160009190910b8152602001610413565b3480156109f957600080fd5b50600a5461071990610100900460ff1681565b348015610a1857600080fd5b506103e5610a273660046137f3565b611c33565b348015610a3857600080fd5b50610a5d610a47366004613681565b60136020526000908152604090205461ffff1681565b60405161ffff9091168152602001610413565b348015610a7c57600080fd5b506103e5610a8b3660046135fb565b611ced565b6103e5610a9e366004613834565b611d2c565b348015610aaf57600080fd5b506103e5610abe3660046138b3565b611d52565b348015610acf57600080fd5b50610451610ade366004613348565b611d93565b348015610aef57600080fd5b506103e5610afe3660046132c8565b611f74565b348015610b0f57600080fd5b506103e5610b1e3660046132c8565b611fbc565b348015610b2f57600080fd5b5061052d7f26f5f9007a8ba555c69300783175e5dd0bdf079f9aec2934a52696503e64366281565b348015610b6357600080fd5b506103e5611ff2565b348015610b7857600080fd5b50610407610b873660046138d0565b61202b565b348015610b9857600080fd5b506103e5610ba736600461353a565b612059565b348015610bb857600080fd5b50600a54610719906301000000900460ff1681565b348015610bd957600080fd5b506103e5610be83660046132c8565b61207d565b348015610bf957600080fd5b506103e5610c0836600461353a565b6120f3565b6103e5610c1b3660046138fe565b61211b565b348015610c2c57600080fd5b506103e5610c3b3660046132c8565b61247a565b348015610c4c57600080fd5b50610c70610c5b366004613348565b60126020526000908152604090205460ff1681565b6040516104139190613977565b6000610c88826124c2565b92915050565b610c96612510565b600b80546001600160a01b0319166001600160a01b0392909216919091179055565b606060028054610cc79061398b565b80601f0160208091040260200160405190810160405280929190818152602001828054610cf39061398b565b8015610d405780601f10610d1557610100808354040283529160200191610d40565b820191906000526020600020905b815481529060010190602001808311610d2357829003601f168201915b5050505050905090565b6000610d558261256a565b610d6957610d696333d1c03960e21b6125af565b506000908152600660205260409020546001600160a01b031690565b81610d8f816125b9565b610d998383612672565b505050565b33600081815260106020526040812054900b60011480610dcb57506008546001600160a01b038281169116145b610e1c5760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f7420617070726f766564206e6f72206f776e657260448201526064015b60405180910390fd5b60ff83166000908152601160205260409020610e388382613a0b565b50505050565b610e46612510565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e486906024015b600060405180830381600087803b158015610e8d57600080fd5b505af1158015610e38573d6000803e3d6000fd5b826001600160a01b0381163314610ebb57610ebb336125b9565b610e3884848461267e565b338181610ed282611463565b6001600160a01b03161480610f0157506001600160a01b038216600090815260106020526040812054900b6001145b610f675760405162461bcd60e51b815260206004820152603160248201527f43616c6c6572206973206e6f74206f776e6572206f66207468617420746f6b656044820152701b881a59081b9bdc88185c1c1c9bdd9959607a1b6064820152608401610e13565b610d99836127e9565b610f78612510565b6001600160a01b038116600090815260106020526040812054900b600103610fbb576001600160a01b03166000908152601060205260409020805460ff19169055565b6001600160a01b0381166000908152601060205260409020805460ff191660011790555b50565b610fea612510565b6000816003811115610ffe57610ffe61338d565b1015801561101e5750600381600381111561101b5761101b61338d565b11155b6110785760405162461bcd60e51b815260206004820152602560248201527f5f6d696e745068617365206861766520746f206265206265747765656e203020604482015264616e64203360d81b6064820152608401610e13565b600a5460ff16600381111561108f5761108f61338d565b8160038111156110a1576110a161338d565b116111145760405162461bcd60e51b815260206004820152603860248201527f6e6577206d696e74207068617365206d757374206265207374726963746c792060448201527f67726561746572207468616e2063757272656e74206f6e6500000000000000006064820152608401610e13565b600a805482919060ff191660018360038111156111335761113361338d565b021790555050565b611143612510565b600a805460ff909216620100000262ff000019909216919091179055565b60405163c430880560e01b81523060048201526060906daaeb6d7670e522a718067333cd4e9063c4308805906024016000604051808303816000875af11580156111af573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111d79190810190613aca565b905090565b6111e4612510565b6040516303194c5b60e11b81526daaeb6d7670e522a718067333cd4e9063063298b69061121b903090879087908790600401613b7b565b600060405180830381600087803b15801561123557600080fd5b505af1158015611249573d6000803e3d6000fd5b50505050505050565b33600081815260106020526040812054900b6001148061127f57506008546001600160a01b038281169116145b6112cb5760405162461bcd60e51b815260206004820181905260248201527f43616c6c6572206973206e6f7420617070726f766564206e6f72206f776e65726044820152606401610e13565b610d9983836127f4565b6112dd612510565b47806113215760405162461bcd60e51b81526020600482015260136024820152724e6f7468696e6720746f20776974686472617760681b6044820152606401610e13565b600a5460405160009164010000000090046001600160a01b03169083908381818185875af1925050503d8060008114611376576040519150601f19603f3d011682016040523d82523d6000602084013e61137b565b606091505b50509050806113c15760405162461bcd60e51b81526020600482015260126024820152714661696c656420746f20776974686472617760701b6044820152606401610e13565b5050565b6113cd612510565b604051632cc5350560e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063b314d414906044015b600060405180830381600087803b15801561142357600080fd5b505af1158015611437573d6000803e3d6000fd5b5050505050565b826001600160a01b038116331461145857611458336125b9565b610e388484846128b3565b6000610c88826128ce565b611476612510565b60405163712fc00b60e01b81523060048201526024810183905281151560448201526daaeb6d7670e522a718067333cd4e9063712fc00b906064015b600060405180830381600087803b1580156114cc57600080fd5b505af11580156114e0573d6000803e3d6000fd5b505050505050565b600c80546114f59061398b565b80601f01602080910402602001604051908101604052809291908181526020018280546115219061398b565b801561156e5780601f106115435761010080835404028352916020019161156e565b820191906000526020600020905b81548152906001019060200180831161155157829003601f168201915b505050505081565b601160205260009081526040902080546114f59061398b565b611597612510565b60405163a2f367ab60e01b81523060048201526001600160a01b038316602482015281151560448201526daaeb6d7670e522a718067333cd4e9063a2f367ab906064016114b2565b336115e989611463565b6001600160a01b0316148061160857506008546001600160a01b031633145b6116545760405162461bcd60e51b815260206004820152601a60248201527f4e6f7420796f7572204e4654206e6f7220746865206f776e65720000000000006044820152606401610e13565b611662868686868686612964565b6116a45760405162461bcd60e51b8152602060048201526013602482015272165bdd48185c99481b9bdd08185b1b1bddd959606a1b6044820152606401610e13565b60008881526012602052604081205460ff1660058111156116c7576116c761338d565b146117145760405162461bcd60e51b815260206004820152601c60248201527f4b6579206861766520616c7265616479206265656e2066726f7a656e000000006044820152606401610e13565b60648760ff1611156117745760405162461bcd60e51b8152602060048201526024808201527f50657263656e74206861766520746f206265206265747765656e203020616e646044820152630203130360e41b6064820152608401610e13565b6000888152600f60205260409020805460ff191660ff8916908117909155601911156117d55760405162461bcd60e51b815260206004820152601060248201526f4e6f7468696e6720746f20636c61696d60801b6044820152606401610e13565b60328760ff1610801561183e575060016000527f4155c2f711f2cdd34f8262ab8fb9b7020a700fe7b6948222152f7670d1fdf34d5460146020527fb6c61a840592cc84133e4b25bd509abf4659307c57b160799b38490a5aa48f2c5461ffff90911660ff909116105b156118b4576000888152601260205260408120805460ff19166001908117909155601491905b60058111156118755761187561338d565b815260208101919091526040016000908120805460ff169161189683613be0565b91906101000a81548160ff021916908360ff16021790555050611ab6565b604b8760ff1610801561191d575060026000527f0b9d2c0c271bb30544eb78c59bdaebdae2728e5f65814c07768a0abe90ed19235460146020527fa1930aa930426c54c34daad2b9ada7c5d0ef0c96078a3c5bb79f6fa6602c4a7a5461ffff90911660ff909116105b15611947576000888152601260205260408120805460ff1916600290811790915560149190611864565b60648760ff161080156119b0575060036000527f0d2a6872ef858a7f8ead18dc4f3f2e8d35c853d47e2816cbb9cdd49202554e0c5460146020527f63d87a887046e0430be80fdeb014107d7198c879cbf2cddf39a6df195c86cb385461ffff90911660ff909116105b156119da576000888152601260205260408120805460ff1916600390811790915560149190611864565b8660ff166064148015611a43575060046000527f01413ff7a3b1d5b6c016c061d48e2c7014700c777a29fcd068fff04265813d5d5460146020527f52102136546d97ed3f65ec1070a32935d3048ea12f310d29c378dc9d6555c0d65461ffff90911660ff909116105b15611ab65760008881526012602090815260408220805460ff191660049081179091558252601490527f52102136546d97ed3f65ec1070a32935d3048ea12f310d29c378dc9d6555c0d6805460ff1691611a9c83613be0565b91906101000a81548160ff021916908360ff160217905550505b5050505050505050565b60006001600160a01b038216611ae057611ae06323d3ad8160e21b6125af565b506001600160a01b03166000908152600560205260409020546001600160401b031690565b611b0d612510565b611b176000612a50565b565b604051633185c44d60e21b81523060048201526001600160a01b03821660248201526000906daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611b74573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c889190613bff565b611ba0612510565b604051630781ad2d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e90631e06b4b490604401611409565b611be8612510565b611bf681633b9aca00613c1c565b600d5550565b606060038054610cc79061398b565b611c13612510565b600c6113c18282613a0b565b81611c29816125b9565b610d998383612aa2565b611c3b612510565b60005b81811015610d99576064600f6000858585818110611c5e57611c5e613c33565b90506020020135815260200190815260200160002060006101000a81548160ff021916908360ff160217905550600560126000858585818110611ca357611ca3613c33565b60209081029290920135835250810191909152604001600020805460ff19166001836005811115611cd657611cd661338d565b021790555080611ce581613c49565b915050611c3e565b611cf5612510565b60405163a14584c160e01b81526daaeb6d7670e522a718067333cd4e9063a14584c19061121b903090879087908790600401613c62565b836001600160a01b0381163314611d4657611d46336125b9565b61143785858585612b0e565b611d5a612510565b60405163034a0dc160e41b815230600482015281151560248201526daaeb6d7670e522a718067333cd4e906334a0dc1090604401611409565b6060611d9e8261256a565b611e025760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610e13565b60008281526011602052604081208054611e1b9061398b565b80601f0160208091040260200160405190810160405280929190818152602001828054611e479061398b565b8015611e945780601f10611e6957610100808354040283529160200191611e94565b820191906000526020600020905b815481529060010190602001808311611e7757829003601f168201915b5050604080516020808201835260008252915195965094611ebb9450859350019050613cca565b6040516020818303038152906040528051906020012082604051602001611ee29190613cca565b6040516020818303038152906040528051906020012003611f6d57600c604051602001611f0f9190613ce6565b604051602081830303815290604052611f2785612b49565b604051602001611f38929190613d64565b60408051601f1981840301815290829052611f5591602001613d93565b60405160208183030381529060405292505050919050565b5092915050565b611f7c612510565b604051633e9f1edf60e11b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe90604401611409565b611fc4612510565b600a80546001600160a01b0390921664010000000002640100000000600160c01b0319909216919091179055565b611ffa612510565b604051631761612360e11b81523060048201526daaeb6d7670e522a718067333cd4e90632ec2c24690602401610e73565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b612061612510565b600a805460ff9092166101000261ff0019909216919091179055565b612085612510565b6001600160a01b0381166120ea5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610e13565b610fdf81612a50565b6120fb612510565b600a805460ff90921663010000000263ff00000019909216919091179055565b6000600a5460ff1660038111156121345761213461338d565b036121815760405162461bcd60e51b815260206004820181905260248201527f4d696e7420706572696f642068617665206e6f742073746172746564207965746044820152606401610e13565b3233146121c25760405162461bcd60e51b815260206004820152600f60248201526e139bc8189bdd1cc8185b1b1bddd959608a1b6044820152606401610e13565b86600d546121d09190613c1c565b3410156122185760405162461bcd60e51b8152602060048201526016602482015275139bdd08195b9bdd59da08115512081d1bc81b5a5b9d60521b6044820152606401610e13565b6001600a5460ff1660038111156122315761223161338d565b03612322576122657f679b4db551486bdc8b8c3d86cea88bd774cea7c203e4aa4e3b39b7bb5f64bc148484848a8a8a612c51565b6122b15760405162461bcd60e51b815260206004820152601760248201527f596f7520617265206e6f742077686974656c69737465640000000000000000006044820152606401610e13565b600a54336000908152600e602052604090205461010090910460ff16906122d9908990613dbc565b111561231d5760405162461bcd60e51b8152602060048201526013602482015272151bdbc81b5d58da08139195081b5a5b9d1959606a1b6044820152606401610e13565b612470565b6002600a5460ff16600381111561233b5761233b61338d565b036123e45761236f7f26f5f9007a8ba555c69300783175e5dd0bdf079f9aec2934a52696503e6436628484848a8a8a612c51565b6123bb5760405162461bcd60e51b815260206004820152601760248201527f596f7520617265206e6f7420616c6c6f776c69737465640000000000000000006044820152606401610e13565b600a54336000908152600e60205260409020546201000090910460ff16906122d9908990613dbc565b6003600a5460ff1660038111156123fd576123fd61338d565b0361247057600a54336000908152600e6020526040902054630100000090910460ff169061242c908990613dbc565b11156124705760405162461bcd60e51b8152602060048201526013602482015272151bdbc81b5d58da08139195081b5a5b9d1959606a1b6044820152606401610e13565b61124987336127f4565b612482612510565b60405163a0af290360e01b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401611409565b60006301ffc9a760e01b6001600160e01b0319831614806124f357506380ac58cd60e01b6001600160e01b03198316145b80610c885750506001600160e01b031916635b5e139f60e01b1490565b6008546001600160a01b03163314611b175760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610e13565b600080548210156125aa5760005b50600082815260046020526040812054908190036125a05761259983613dcf565b9250612578565b600160e01b161590505b919050565b8060005260046000fd5b6daaeb6d7670e522a718067333cd4e3b15610fdf57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612626573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061264a9190613bff565b610fdf57604051633b79c77360e21b81526001600160a01b0382166004820152602401610e13565b6113c182826001612d3f565b6000612689826128ce565b6001600160a01b0394851694909150811684146126af576126af62a1148160e81b6125af565b600082815260066020526040902080546126db8187335b6001600160a01b039081169116811491141790565b6126fd576126e9863361202b565b6126fd576126fd632ce44b5f60e11b6125af565b801561270857600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b8416900361279a576001840160008181526004602052604081205490036127985760005481146127985760008181526004602052604090208490555b505b6001600160a01b0385168481887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4806000036127e4576127e4633a954ecd60e21b6125af565b611249565b610fdf816000612de2565b6107d88261280160095490565b61280b9190613dbc565b111561284f5760405162461bcd60e51b8152602060048201526013602482015272139bc81b5bdc9948139195081d1bc81b5a5b9d606a1b6044820152606401610e13565b6001600160a01b0381166000908152600e602052604081208054849290612877908490613dbc565b90915550600090505b828110156128a857612896600980546001019055565b806128a081613c49565b915050612880565b506113c18183612f23565b610d9983838360405180602001604052806000815250611d2c565b600081815260046020526040812054908190036129415760005482106128fe576128fe636f96cda160e11b6125af565b5b506000190160008181526004602052604090205480156128ff57600160e01b811660000361292c57919050565b61293c636f96cda160e11b6125af565b6128ff565b600160e01b811660000361295457919050565b6125aa636f96cda160e11b6125af565b6000844211156129a95760405162461bcd60e51b815260206004820152601060248201526f5369676e696e6720746f6f206c61746560801b6044820152606401610e13565b600b54604080516020601f8a018190048102820181019092528881526001600160a01b03909216916129fe913391908b908b90819084018382808284376000920191909152508b92508a915089905088612fe2565b6001600160a01b031614612a435760405162461bcd60e51b815260206004820152600c60248201526b2bb937b7339039b4b3b732b960a11b6044820152606401610e13565b5060019695505050505050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612b19848484610ea1565b6001600160a01b0383163b15610e3857612b35848484846130bb565b610e3857610e386368d2bf6b60e11b6125af565b606081600003612b705750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612b9a5780612b8481613c49565b9150612b939050600a83613dfc565b9150612b74565b6000816001600160401b03811115612bb457612bb46133ce565b6040519080825280601f01601f191660200182016040528015612bde576020820181803683370190505b5090505b8415612c4957612bf3600183613e10565b9150612c00600a86613e23565b612c0b906030613dbc565b60f81b818381518110612c2057612c20613c33565b60200101906001600160f81b031916908160001a905350612c42600a86613dfc565b9450612be2565b949350505050565b600084421115612c965760405162461bcd60e51b815260206004820152601060248201526f5369676e696e6720746f6f206c61746560801b6044820152606401610e13565b600b54604080516020601f8a018190048102820181019092528881526001600160a01b0390921691612cec918b9133918c908c90819084018382808284376000920191909152508c92508b91508a90508961319d565b6001600160a01b031614612d315760405162461bcd60e51b815260206004820152600c60248201526b2bb937b7339039b4b3b732b960a11b6044820152606401610e13565b506001979650505050505050565b6000612d4a83611463565b9050818015612d625750336001600160a01b03821614155b15612d8557612d71813361202b565b612d8557612d856367d9dca160e11b6125af565b60008381526006602052604080822080546001600160a01b0319166001600160a01b0388811691821790925591518693918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a450505050565b6000612ded836128ce565b905080600080612e0b86600090815260066020526040902080549091565b915091508415612e4257612e208184336126c6565b612e4257612e2e833361202b565b612e4257612e42632ce44b5f60e11b6125af565b8015612e4d57600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040812091909155600160e11b85169003612edb57600186016000818152600460205260408120549003612ed9576000548114612ed95760008181526004602052604090208590555b505b60405186906000906001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050600180548101905550505050565b6000805490829003612f3f57612f3f63b562e8dd60e01b6125af565b60008181526004602090815260408083206001600160a01b0387164260a01b6001881460e11b17811790915580845260059092528220805468010000000000000001860201905590819003612f9d57612f9d622e076360e81b6125af565b818301825b808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4818160010191508103612fa2575060005550505050565b600060016002888888604051602001612ffd93929190613e37565b60408051601f198184030181529082905261301791613cca565b602060405180830381855afa158015613034573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906130579190613e76565b6040805160008152602081018083529290925260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156130a5573d6000803e3d6000fd5b5050604051601f19015198975050505050505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906130f0903390899088908890600401613e8f565b6020604051808303816000875af192505050801561312b575060408051601f3d908101601f1916820190925261312891810190613ecc565b60015b613180573d808015613159576040519150601f19603f3d011682016040523d82523d6000602084013e61315e565b606091505b508051600003613178576131786368d2bf6b60e11b6125af565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b600060016002898989896040516020016131ba9493929190613ee9565b60408051601f19818403018152908290526131d491613cca565b602060405180830381855afa1580156131f1573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906132149190613e76565b6040805160008152602081018083529290925260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015613262573d6000803e3d6000fd5b5050604051601f1901519998505050505050505050565b6001600160e01b031981168114610fdf57600080fd5b6000602082840312156132a157600080fd5b81356132ac81613279565b9392505050565b6001600160a01b0381168114610fdf57600080fd5b6000602082840312156132da57600080fd5b81356132ac816132b3565b60005b838110156133005781810151838201526020016132e8565b50506000910152565b600081518084526133218160208601602086016132e5565b601f01601f19169290920160200192915050565b6020815260006132ac6020830184613309565b60006020828403121561335a57600080fd5b5035919050565b6000806040838503121561337457600080fd5b823561337f816132b3565b946020939093013593505050565b634e487b7160e01b600052602160045260246000fd5b60208101600483106133b7576133b761338d565b91905290565b803560ff811681146125aa57600080fd5b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561340c5761340c6133ce565b604052919050565b60006001600160401b0383111561342d5761342d6133ce565b613440601f8401601f19166020016133e4565b905082815283838301111561345457600080fd5b828260208301376000602084830101529392505050565b600082601f83011261347c57600080fd5b6132ac83833560208501613414565b6000806040838503121561349e57600080fd5b6134a7836133bd565b915060208301356001600160401b038111156134c257600080fd5b6134ce8582860161346b565b9150509250929050565b6000806000606084860312156134ed57600080fd5b83356134f8816132b3565b92506020840135613508816132b3565b929592945050506040919091013590565b60006020828403121561352b57600080fd5b8135600481106132ac57600080fd5b60006020828403121561354c57600080fd5b6132ac826133bd565b6020808252825182820181905260009190848201906040850190845b818110156135965783516001600160a01b031683529284019291840191600101613571565b50909695505050505050565b60008083601f8401126135b457600080fd5b5081356001600160401b038111156135cb57600080fd5b6020830191508360208260051b85010111156135e657600080fd5b9250929050565b8015158114610fdf57600080fd5b60008060006040848603121561361057600080fd5b83356001600160401b0381111561362657600080fd5b613632868287016135a2565b9094509250506020840135613646816135ed565b809150509250925092565b6000806040838503121561366457600080fd5b823591506020830135613676816132b3565b809150509250929050565b60006020828403121561369357600080fd5b8135600681106132ac57600080fd5b600080604083850312156136b557600080fd5b823591506020830135613676816135ed565b600080604083850312156136da57600080fd5b82356136e5816132b3565b91506020830135613676816135ed565b60008083601f84011261370757600080fd5b5081356001600160401b0381111561371e57600080fd5b6020830191508360208285010111156135e657600080fd5b60008060008060008060008060e0898b03121561375257600080fd5b8835975061376260208a016133bd565b965060408901356001600160401b0381111561377d57600080fd5b6137898b828c016136f5565b909750955050606089013593506137a260808a016133bd565b925060a0890135915060c089013590509295985092959890939650565b6000602082840312156137d157600080fd5b81356001600160401b038111156137e757600080fd5b612c498482850161346b565b6000806020838503121561380657600080fd5b82356001600160401b0381111561381c57600080fd5b613828858286016135a2565b90969095509350505050565b6000806000806080858703121561384a57600080fd5b8435613855816132b3565b93506020850135613865816132b3565b92506040850135915060608501356001600160401b0381111561388757600080fd5b8501601f8101871361389857600080fd5b6138a787823560208401613414565b91505092959194509250565b6000602082840312156138c557600080fd5b81356132ac816135ed565b600080604083850312156138e357600080fd5b82356138ee816132b3565b91506020830135613676816132b3565b600080600080600080600060c0888a03121561391957600080fd5b87359650613929602089016133bd565b9550604088013594506060880135935060808801356001600160401b0381111561395257600080fd5b61395e8a828b016136f5565b989b979a5095989497959660a090950135949350505050565b60208101600683106133b7576133b761338d565b600181811c9082168061399f57607f821691505b6020821081036139bf57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610d9957600081815260208120601f850160051c810160208610156139ec5750805b601f850160051c820191505b818110156114e0578281556001016139f8565b81516001600160401b03811115613a2457613a246133ce565b613a3881613a32845461398b565b846139c5565b602080601f831160018114613a6d5760008415613a555750858301515b600019600386901b1c1916600185901b1785556114e0565b600085815260208120601f198616915b82811015613a9c57888601518255948401946001909101908401613a7d565b5085821015613aba5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020808385031215613add57600080fd5b82516001600160401b0380821115613af457600080fd5b818501915085601f830112613b0857600080fd5b815181811115613b1a57613b1a6133ce565b8060051b9150613b2b8483016133e4565b8181529183018401918481019088841115613b4557600080fd5b938501935b83851015613b6f5784519250613b5f836132b3565b8282529385019390850190613b4a565b98975050505050505050565b6001600160a01b0385168152606060208201819052810183905260006001600160fb1b03841115613bab57600080fd5b8360051b80866080850137921515604083015250016080019392505050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff8103613bf657613bf6613bca565b60010192915050565b600060208284031215613c1157600080fd5b81516132ac816135ed565b8082028115828204841417610c8857610c88613bca565b634e487b7160e01b600052603260045260246000fd5b600060018201613c5b57613c5b613bca565b5060010190565b6001600160a01b03858116825260606020808401829052908301859052600091869160808501845b88811015613cb1578435613c9d816132b3565b841682529382019390820190600101613c8a565b5080945050505050821515604083015295945050505050565b60008251613cdc8184602087016132e5565b9190910192915050565b6000808354613cf48161398b565b60018281168015613d0c5760018114613d2157613d50565b60ff1984168752821515830287019450613d50565b8760005260208060002060005b85811015613d475781548a820152908401908201613d2e565b50505082870194505b50602f60f81b845290920195945050505050565b60008351613d768184602088016132e5565b835190830190613d8a8183602088016132e5565b01949350505050565b60008251613da58184602087016132e5565b64173539b7b760d91b920191825250600501919050565b80820180821115610c8857610c88613bca565b600081613dde57613dde613bca565b506000190190565b634e487b7160e01b600052601260045260246000fd5b600082613e0b57613e0b613de6565b500490565b81810381811115610c8857610c88613bca565b600082613e3257613e32613de6565b500690565b6bffffffffffffffffffffffff198460601b16815260008351613e618160148501602088016132e5565b60149201918201929092526034019392505050565b600060208284031215613e8857600080fd5b5051919050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613ec290830184613309565b9695505050505050565b600060208284031215613ede57600080fd5b81516132ac81613279565b8481526bffffffffffffffffffffffff198460601b16602082015260008351613f198160348501602088016132e5565b603492019182019290925260540194935050505056fea26469706673582212203a5e678d933e933ab370d6b35b99b368aeb02d2d0327ac4dfb1b7fabb74d780564736f6c63430008110033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.