ETH Price: $3,297.03 (+0.01%)

De Kings (DeKings)
 

Overview

TokenID

1115

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 0 Decimals)

Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
DeKings

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 18 : DeKings.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import "@openzeppelin/contracts/access/AccessControlEnumerable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./extensions/ERC721AQueryable.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";

contract DeKings is ERC721AQueryable, AccessControlEnumerable, DefaultOperatorFilterer{
    using Strings for uint256;

    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant WHITELIST_ROLE = keccak256("WHITELIST_ROLE");
    string private _baseURI_;
    string private _contractURI;
    address private _openSeaProxy;

    bool public tradingDisabled = true;
    uint256 public maxSupply;

    string private _uriSuffix = ".json";

    uint256 public publicCost;
    uint256 public publicSupply;

    uint256 public whitelistCost;

    bytes32 public whitelistMerkleRoot;
    bool public whitelistMintEnabled = false;
    bool public publicMintEnabled = false;

    address public paymentReceiver;

    /**
     * @dev Emitted when general trading is activated
     */
    event enabledTrading(address account);

    event baseURIUpdated(string baseURI);


    constructor (string memory name_,
        string memory symbol_,
        uint256 maxSupply_,
        string memory baseURI_,
        string memory contractURI_,
        address openSeaProxy_,
        uint256 publicCost_,
        uint256 whitelistCost_,
        uint256 publicSupply_
    )
    ERC721A(name_, symbol_) {
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
        _setupRole(MINTER_ROLE, _msgSender());
        _setupRole(WHITELIST_ROLE, _msgSender());
        _baseURI_ = baseURI_;
        _contractURI = contractURI_;
        _openSeaProxy = openSeaProxy_;
        maxSupply = maxSupply_;
        publicCost = publicCost_;
        whitelistCost = whitelistCost_;
        publicSupply = publicSupply_;
        paymentReceiver = _msgSender();
    }

    // Overwrite some default functions to prevent errors
    function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerable, ERC721A, IERC721A) returns (bool) {
        return super.supportsInterface(interfaceId);
    }

    /**
     * @dev Transfer many tokens at once
     */
    function batchTransferFrom(address from, address to, uint256[] memory tokenId) public returns (bool) {
        for (uint256 i; i < tokenId.length; i++) {
            transferFrom(from, to, tokenId[i]);
        }
        return true;
    }

    /**
     * @dev Mint for whitelisted users
     */
    function mintWhitelist(uint256 amount, bytes32[] calldata _merkleProof) public payable {
        require(whitelistMintEnabled, "mintWhitelist: The whitelist sale is not enabled");
        require(msg.value >= (whitelistCost * amount), "mintWhitelist: Insufficient funds");
        require((_nextTokenId() + amount) <= (publicSupply + 1), "mintWhitelist: max public supply reached");

        bytes32 leaf = keccak256(abi.encodePacked(_msgSender()));
        require(MerkleProof.verify(_merkleProof, whitelistMerkleRoot, leaf), "mintWhitelist: Invalid merkle proof");

        (bool os, ) = payable(paymentReceiver).call{value: address(this).balance}('');
        require(os);

        _privateMint(_msgSender(), amount);
    }

    /**
     * @dev Mint for public users
     */
    function mintPublic(uint256 amount) public payable {
        require(publicMintEnabled, "mintPublic: The public sale is not enabled");
        require(msg.value >= publicCost * amount, "mintPublic: Insufficient funds");
        require((_nextTokenId() + amount) <= (publicSupply + 1), "mintPublic: max public supply reached");

        (bool os, ) = payable(paymentReceiver).call{value: address(this).balance}('');
        require(os);

        _privateMint(_msgSender(), amount);
    }


    /**
     * @dev Mint tokens for user with the MINTER_ROLE
     */
    function mintMinter(address to, uint256 amount) public {
        require(hasRole(MINTER_ROLE, _msgSender()), "mintMinter: must have minter role to mint");
        _privateMint(to, amount);
    }

    function _privateMint(address to, uint256 amount) internal virtual {
        require((_nextTokenId() + amount) <= (maxSupply + 1), "mint: max supply reached");

        _mint(to, amount);
    }

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

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override(ERC721A, IERC721A) returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
        return bytes(_baseURI_).length > 0 ? string(abi.encodePacked(_baseURI_, tokenId.toString(), _uriSuffix)) : "";
    }

    /**
     * @dev Sets `_baseURI_`
     */
    function setBaseURI(string memory baseURI_) public {
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "setBaseURI: must have admin role");
        _baseURI_ = baseURI_;
        emit baseURIUpdated(baseURI_);
    }
    /**
     * @dev Sets `_uriSuffix`
     */
    function setUriSuffix(string memory uriSuffix_) public {
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "setUriSuffix: must have admin role");
        _uriSuffix = uriSuffix_;
    }
    /**
     * @dev Sets `_contractURI`
     */
    function setContractURI(string memory contractURI_) public {
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "setContractURI: must have admin role");
        _contractURI = contractURI_;
    }

    function contractURI() public view returns (string memory) {
        return _contractURI;
    }

    /**
     * @dev Enable trading
     */
    function enableTrading() public {
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "enableTrading: must have admin role");
        tradingDisabled = false;
        emit enabledTrading(_msgSender());
    }



    function setPublicCost(uint256 _publicCost) public{
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "setPublicCost: Action is not allowed");
        publicCost = _publicCost;
    }
    function setWhitelistCost(uint256 _whitelistCost) public{
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "setWhitelistCost: Action is not allowed");
        whitelistCost = _whitelistCost;
    }
    function setPublicSupply(uint256 _publicSupply) public{
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "setpublicSupply: Action is not allowed");
        publicSupply = _publicSupply;
    }
    function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot) public{
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "setWhitelistMerkleRoot: Action is not allowed");
        whitelistMerkleRoot = _whitelistMerkleRoot;
    }
    function setWhitelistMintEnabled(bool _whitelistMintEnabled) public{
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "setWhitelistMintEnabled: Action is not allowed");
        whitelistMintEnabled = _whitelistMintEnabled;
    }
    function setPublicMintEnabled(bool _publicMintEnabled) public{
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "setPublicMintEnabled: Action is not allowed");
        publicMintEnabled = _publicMintEnabled;
    }
    function setPaymentReceiver(address _paymentReceiver) public{
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "setPaymentReceiver: Action is not allowed");
        paymentReceiver = _paymentReceiver;
    }


    /**
     * @dev Sets `_openSeaProxy`
     */
    function setOpenSeaProxy(address openSeaProxy_) public {
        require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), "setOpenSeaProxy: must have admin role");
        _openSeaProxy = openSeaProxy_;
    }

    /**
     * @dev See {ERC721A-_beforeTokenTransfer}.
     *
     * Requirements:
     * - the contract must not be paused.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual override {
        super._beforeTokenTransfers(from, to, startTokenId, quantity);

        if(tradingDisabled){
            if(from != address(0)) // allow always minting
                require(hasRole(WHITELIST_ROLE, _msgSender()), "Trading is not yet enabled");
        }
    }

   /**
   * Override isApprovedForAll to auto-approve OS's proxy contract
   */
    function isApprovedForAll(address owner, address operator) public override(IERC721A, ERC721A) view returns (bool) {
        // if OpenSea's ERC721 Proxy Address is detected, auto-return true
        // for Polygon's Mumbai testnet, use 0xff7Ca10aF37178BdD056628eF42fD7F799fAc77c
        if (operator == _openSeaProxy) {
            return true;
        }

        // otherwise, use the default ERC721.isApprovedForAll()
        return super.isApprovedForAll(owner, operator);
    }

    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     */
    function burn(uint256 tokenId) public virtual {
        _burn(tokenId);
    }

    /**
    */

    function setApprovalForAll(address operator, bool approved) public override(IERC721A, ERC721A) onlyAllowedOperatorApproval(operator) {
        super.setApprovalForAll(operator, approved);
    }

    function approve(address operator, uint256 tokenId) public payable override(IERC721A, ERC721A) onlyAllowedOperatorApproval(operator) {
        super.approve(operator, tokenId);
    }

    function transferFrom(address from, address to, uint256 tokenId) public payable override(IERC721A, ERC721A) onlyAllowedOperator(from) {
        super.transferFrom(from, to, tokenId);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId) public payable override(IERC721A, ERC721A) onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, tokenId);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
    public
    payable
    override(IERC721A, ERC721A)
    onlyAllowedOperator(from)
    {
        super.safeTransferFrom(from, to, tokenId, data);
    }
}

File 2 of 18 : IERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721A.sol';

/**
 * @dev Interface of ERC721AQueryable.
 */
interface IERC721AQueryable is IERC721A {
    /**
     * Invalid query range (`start` >= `stop`).
     */
    error InvalidQueryRange();

    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *
     * - `addr = address(0)`
     * - `startTimestamp = 0`
     * - `burned = false`
     * - `extraData = 0`
     *
     * If the `tokenId` is burned:
     *
     * - `addr = <Address of owner before token was burned>`
     * - `startTimestamp = <Timestamp when token was burned>`
     * - `burned = true`
     * - `extraData = <Extra data when token was burned>`
     *
     * Otherwise:
     *
     * - `addr = <Address of owner>`
     * - `startTimestamp = <Timestamp of start of ownership>`
     * - `burned = false`
     * - `extraData = <Extra data at start of ownership>`
     */
    function explicitOwnershipOf(uint256 tokenId) external view returns (TokenOwnership memory);

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] memory tokenIds) external view returns (TokenOwnership[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start < stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view returns (uint256[] memory);

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(`totalSupply`) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K collections should be fine).
     */
    function tokensOfOwner(address owner) external view returns (uint256[] memory);
}

File 3 of 18 : ERC721AQueryable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721AQueryable.sol';
import '../ERC721A.sol';

/**
 * @title ERC721AQueryable.
 *
 * @dev ERC721A subclass with convenience query functions.
 */
abstract contract ERC721AQueryable is ERC721A, IERC721AQueryable {
    /**
     * @dev Returns the `TokenOwnership` struct at `tokenId` without reverting.
     *
     * If the `tokenId` is out of bounds:
     *
     * - `addr = address(0)`
     * - `startTimestamp = 0`
     * - `burned = false`
     * - `extraData = 0`
     *
     * If the `tokenId` is burned:
     *
     * - `addr = <Address of owner before token was burned>`
     * - `startTimestamp = <Timestamp when token was burned>`
     * - `burned = true`
     * - `extraData = <Extra data when token was burned>`
     *
     * Otherwise:
     *
     * - `addr = <Address of owner>`
     * - `startTimestamp = <Timestamp of start of ownership>`
     * - `burned = false`
     * - `extraData = <Extra data at start of ownership>`
     */
    function explicitOwnershipOf(uint256 tokenId) public view virtual override returns (TokenOwnership memory) {
        TokenOwnership memory ownership;
        if (tokenId < _startTokenId() || tokenId >= _nextTokenId()) {
            return ownership;
        }
        ownership = _ownershipAt(tokenId);
        if (ownership.burned) {
            return ownership;
        }
        return _ownershipOf(tokenId);
    }

    /**
     * @dev Returns an array of `TokenOwnership` structs at `tokenIds` in order.
     * See {ERC721AQueryable-explicitOwnershipOf}
     */
    function explicitOwnershipsOf(uint256[] calldata tokenIds)
        external
        view
        virtual
        override
        returns (TokenOwnership[] memory)
    {
        unchecked {
            uint256 tokenIdsLength = tokenIds.length;
            TokenOwnership[] memory ownerships = new TokenOwnership[](tokenIdsLength);
            for (uint256 i; i != tokenIdsLength; ++i) {
                ownerships[i] = explicitOwnershipOf(tokenIds[i]);
            }
            return ownerships;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`,
     * in the range [`start`, `stop`)
     * (i.e. `start <= tokenId < stop`).
     *
     * This function allows for tokens to be queried if the collection
     * grows too big for a single call of {ERC721AQueryable-tokensOfOwner}.
     *
     * Requirements:
     *
     * - `start < stop`
     */
    function tokensOfOwnerIn(
        address owner,
        uint256 start,
        uint256 stop
    ) external view virtual override returns (uint256[] memory) {
        unchecked {
            if (start >= stop) revert InvalidQueryRange();
            uint256 tokenIdsIdx;
            uint256 stopLimit = _nextTokenId();
            // Set `start = max(start, _startTokenId())`.
            if (start < _startTokenId()) {
                start = _startTokenId();
            }
            // Set `stop = min(stop, stopLimit)`.
            if (stop > stopLimit) {
                stop = stopLimit;
            }
            uint256 tokenIdsMaxLength = balanceOf(owner);
            // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`,
            // to cater for cases where `balanceOf(owner)` is too big.
            if (start < stop) {
                uint256 rangeLength = stop - start;
                if (rangeLength < tokenIdsMaxLength) {
                    tokenIdsMaxLength = rangeLength;
                }
            } else {
                tokenIdsMaxLength = 0;
            }
            uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength);
            if (tokenIdsMaxLength == 0) {
                return tokenIds;
            }
            // We need to call `explicitOwnershipOf(start)`,
            // because the slot at `start` may not be initialized.
            TokenOwnership memory ownership = explicitOwnershipOf(start);
            address currOwnershipAddr;
            // If the starting slot exists (i.e. not burned), initialize `currOwnershipAddr`.
            // `ownership.address` will not be zero, as `start` is clamped to the valid token ID range.
            if (!ownership.burned) {
                currOwnershipAddr = ownership.addr;
            }
            for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            // Downsize the array to fit.
            assembly {
                mstore(tokenIds, tokenIdsIdx)
            }
            return tokenIds;
        }
    }

    /**
     * @dev Returns an array of token IDs owned by `owner`.
     *
     * This function scans the ownership mapping and is O(`totalSupply`) in complexity.
     * It is meant to be called off-chain.
     *
     * See {ERC721AQueryable-tokensOfOwnerIn} for splitting the scan into
     * multiple smaller scans if the collection is large enough to cause
     * an out-of-gas error (10K collections should be fine).
     */
    function tokensOfOwner(address owner) external view virtual override returns (uint256[] memory) {
        unchecked {
            uint256 tokenIdsIdx;
            address currOwnershipAddr;
            uint256 tokenIdsLength = balanceOf(owner);
            uint256[] memory tokenIds = new uint256[](tokenIdsLength);
            TokenOwnership memory ownership;
            for (uint256 i = _startTokenId(); tokenIdsIdx != tokenIdsLength; ++i) {
                ownership = _ownershipAt(i);
                if (ownership.burned) {
                    continue;
                }
                if (ownership.addr != address(0)) {
                    currOwnershipAddr = ownership.addr;
                }
                if (currOwnershipAddr == owner) {
                    tokenIds[tokenIdsIdx++] = i;
                }
            }
            return tokenIds;
        }
    }
}

File 4 of 18 : 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 5 of 18 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.2.3
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        return _tokenApprovals[tokenId].value;
    }

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfers(from, to, tokenId, 1);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            uint256 toMasked;
            uint256 end = startTokenId + quantity;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        address from = address(uint160(prevOwnershipPacked));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.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.
 */
abstract contract OperatorFilterer {
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

    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));
                }
            }
        }
    }

    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);
        }
        _;
    }

    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    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) {
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

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

interface IOperatorFilterRegistry {
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);
    function register(address registrant) external;
    function registerAndSubscribe(address registrant, address subscription) external;
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;
    function unregister(address addr) external;
    function updateOperator(address registrant, address operator, bool filtered) external;
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
    function subscribe(address registrant, address registrantToSubscribe) external;
    function unsubscribe(address registrant, bool copyExistingEntries) external;
    function subscriptionOf(address addr) external returns (address registrant);
    function subscribers(address registrant) external returns (address[] memory);
    function subscriberAt(address registrant, uint256 index) external returns (address);
    function copyEntriesOf(address registrant, address registrantToCopy) external;
    function isOperatorFiltered(address registrant, address operator) external returns (bool);
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
    function filteredOperators(address addr) external returns (address[] memory);
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
    function isRegistered(address addr) external returns (bool);
    function codeHashOf(address addr) external returns (bytes32);
}

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

import {OperatorFilterer} from "./OperatorFilterer.sol";

/**
 * @title  DefaultOperatorFilterer
 * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
 */
abstract contract DefaultOperatorFilterer is OperatorFilterer {
    address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6);

    constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {}
}

File 9 of 18 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

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

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

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

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

        return result;
    }
}

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 12 of 18 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Tree proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 *
 * WARNING: You should avoid using leaf values that are 64 bytes long prior to
 * hashing, or use a hash function other than keccak256 for hashing leaves.
 * This is because the concatenation of a sorted pair of internal nodes in
 * the merkle tree could be reinterpreted as a leaf value.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

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

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

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

    /**
     * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by
     * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}.
     *
     * _Available since v4.7._
     */
    function multiProofVerify(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProof(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Calldata version of {multiProofVerify}
     *
     * _Available since v4.7._
     */
    function multiProofVerifyCalldata(
        bytes32[] calldata proof,
        bool[] calldata proofFlags,
        bytes32 root,
        bytes32[] memory leaves
    ) internal pure returns (bool) {
        return processMultiProofCalldata(proof, proofFlags, leaves) == root;
    }

    /**
     * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`,
     * consuming from one or the other at each step according to the instructions given by
     * `proofFlags`.
     *
     * _Available since v4.7._
     */
    function processMultiProof(
        bytes32[] memory proof,
        bool[] memory proofFlags,
        bytes32[] memory leaves
    ) internal pure returns (bytes32 merkleRoot) {
        // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by
        // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the
        // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of
        // the merkle tree.
        uint256 leavesLen = leaves.length;
        uint256 totalHashes = proofFlags.length;

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

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

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

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

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

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

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

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

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

File 13 of 18 : 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 14 of 18 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 15 of 18 : IAccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControl.sol";

/**
 * @dev External interface of AccessControlEnumerable declared to support ERC165 detection.
 */
interface IAccessControlEnumerable is IAccessControl {
    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) external view returns (address);

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) external view returns (uint256);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 17 of 18 : AccessControlEnumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol)

pragma solidity ^0.8.0;

import "./IAccessControlEnumerable.sol";
import "./AccessControl.sol";
import "../utils/structs/EnumerableSet.sol";

/**
 * @dev Extension of {AccessControl} that allows enumerating the members of each role.
 */
abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl {
    using EnumerableSet for EnumerableSet.AddressSet;

    mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers;

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

    /**
     * @dev Returns one of the accounts that have `role`. `index` must be a
     * value between 0 and {getRoleMemberCount}, non-inclusive.
     *
     * Role bearers are not sorted in any particular way, and their ordering may
     * change at any point.
     *
     * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure
     * you perform all queries on the same block. See the following
     * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post]
     * for more information.
     */
    function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) {
        return _roleMembers[role].at(index);
    }

    /**
     * @dev Returns the number of accounts that have `role`. Can be used
     * together with {getRoleMember} to enumerate all bearers of a role.
     */
    function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) {
        return _roleMembers[role].length();
    }

    /**
     * @dev Overload {_grantRole} to track enumerable memberships
     */
    function _grantRole(bytes32 role, address account) internal virtual override {
        super._grantRole(role, account);
        _roleMembers[role].add(account);
    }

    /**
     * @dev Overload {_revokeRole} to track enumerable memberships
     */
    function _revokeRole(bytes32 role, address account) internal virtual override {
        super._revokeRole(role, account);
        _roleMembers[role].remove(account);
    }
}

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

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint256","name":"maxSupply_","type":"uint256"},{"internalType":"string","name":"baseURI_","type":"string"},{"internalType":"string","name":"contractURI_","type":"string"},{"internalType":"address","name":"openSeaProxy_","type":"address"},{"internalType":"uint256","name":"publicCost_","type":"uint256"},{"internalType":"uint256","name":"whitelistCost_","type":"uint256"},{"internalType":"uint256","name":"publicSupply_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"baseURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"enabledTrading","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_ROLE","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":"owner","type":"address"}],"name":"balanceOf","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":"batchTransferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableTrading","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"explicitOwnershipOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"explicitOwnershipsOf","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"},{"internalType":"uint24","name":"extraData","type":"uint24"}],"internalType":"struct IERC721A.TokenOwnership[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"mintWhitelist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"paymentReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractURI_","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"openSeaProxy_","type":"address"}],"name":"setOpenSeaProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_paymentReceiver","type":"address"}],"name":"setPaymentReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicCost","type":"uint256"}],"name":"setPublicCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_publicMintEnabled","type":"bool"}],"name":"setPublicMintEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicSupply","type":"uint256"}],"name":"setPublicSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uriSuffix_","type":"string"}],"name":"setUriSuffix","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_whitelistCost","type":"uint256"}],"name":"setWhitelistCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_whitelistMerkleRoot","type":"bytes32"}],"name":"setWhitelistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_whitelistMintEnabled","type":"bool"}],"name":"setWhitelistMintEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tradingDisabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[],"name":"whitelistCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistMintEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]

600c805460ff60a01b1916600160a01b17905560c06040526005608090815264173539b7b760d91b60a052600e90620000399082620004f7565b506013805461ffff191690553480156200005257600080fd5b5060405162003fa538038062003fa583398101604081905262000075916200068f565b733cc6cdda760b79bafa08df41ecfa224f810dceb660018a8a60026200009c8382620004f7565b506003620000ab8282620004f7565b50600160005550506daaeb6d7670e522a718067333cd4e3b15620001f85780156200014657604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200012757600080fd5b505af11580156200013c573d6000803e3d6000fd5b50505050620001f8565b6001600160a01b03821615620001975760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af2903906044016200010c565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b158015620001de57600080fd5b505af1158015620001f3573d6000803e3d6000fd5b505050505b50620002089050600033620002ea565b620002347f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a633620002ea565b620002607fdc72ed553f2544c34465af23b847953efeb813428162d767f9ba5f4013be676033620002ea565b600a6200026e8782620004f7565b50600b6200027d8682620004f7565b50600c80546001600160a01b0319166001600160a01b038616179055600d879055600f83905560118290556010819055620002b53390565b601360026101000a8154816001600160a01b0302191690836001600160a01b0316021790555050505050505050505062000782565b620002f68282620002fa565b5050565b6200031182826200033d60201b62001db71760201c565b60008281526009602090815260409091206200033891839062001e3d620003e1821b17901c565b505050565b60008281526008602090815260408083206001600160a01b038516845290915290205460ff16620002f65760008281526008602090815260408083206001600160a01b03851684529091529020805460ff191660011790556200039d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620003f8836001600160a01b03841662000401565b90505b92915050565b60008181526001830160205260408120546200044a57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620003fb565b506000620003fb565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200047e57607f821691505b6020821081036200049f57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200033857600081815260208120601f850160051c81016020861015620004ce5750805b601f850160051c820191505b81811015620004ef57828155600101620004da565b505050505050565b81516001600160401b0381111562000513576200051362000453565b6200052b8162000524845462000469565b84620004a5565b602080601f8311600181146200056357600084156200054a5750858301515b600019600386901b1c1916600185901b178555620004ef565b600085815260208120601f198616915b82811015620005945788860151825594840194600190910190840162000573565b5085821015620005b35787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082601f830112620005d557600080fd5b81516001600160401b0380821115620005f257620005f262000453565b604051601f8301601f19908116603f011681019082821181831017156200061d576200061d62000453565b816040528381526020925086838588010111156200063a57600080fd5b600091505b838210156200065e57858201830151818301840152908201906200063f565b600093810190920192909252949350505050565b80516001600160a01b03811681146200068a57600080fd5b919050565b60008060008060008060008060006101208a8c031215620006af57600080fd5b89516001600160401b0380821115620006c757600080fd5b620006d58d838e01620005c3565b9a5060208c0151915080821115620006ec57600080fd5b620006fa8d838e01620005c3565b995060408c0151985060608c01519150808211156200071857600080fd5b620007268d838e01620005c3565b975060808c01519150808211156200073d57600080fd5b506200074c8c828d01620005c3565b9550506200075d60a08b0162000672565b935060c08a0151925060e08a015191506101008a015190509295985092959850929598565b61381380620007926000396000f3fe60806040526004361061036b5760003560e01c80638693da20116101c6578063bd32fb66116100f7578063d547741f11610095578063e8a3d4851161006f578063e8a3d485146109f5578063e985e9c514610a0a578063efd0cbf914610a2a578063f3993d1114610a3d57600080fd5b8063d547741f146109a9578063d5abeb01146109c9578063e7b99ec7146109df57600080fd5b8063ca15c873116100d1578063ca15c8731461090f578063cb37f3b21461092f578063d49479eb14610955578063d53913931461097557600080fd5b8063bd32fb66146108a2578063c23dc68f146108c2578063c87b56dd146108ef57600080fd5b806399a2557a11610164578063aa98e0c61161013e578063aa98e0c614610839578063ab1f458f1461084f578063b767a0981461086f578063b88d4fde1461088f57600080fd5b806399a2557a146107e4578063a217fddf14610804578063a22cb4651461081957600080fd5b806391d14854116101a057806391d148541461076e578063938e3d7b1461078e57806395148e9f146107ae57806395d89b41146107cf57600080fd5b80638693da20146107235780638a8c523c146107395780639010d07c1461074e57600080fd5b806342842e0e116102a057806365ebf99a1161023e5780637a997ab7116102185780637a997ab714610682578063811d2437146106b6578063818668d7146106d65780638462151c146106f657600080fd5b806365ebf99a146106285780636caede3d1461064857806370a082311461066257600080fd5b806355f804b31161027a57806355f804b3146105a55780635bbb2177146105c55780635e84d723146105f25780636352211e1461060857600080fd5b806342842e0e1461055257806342966c68146105655780634f882d491461058557600080fd5b806318160ddd1161030d57806326aa420a116102e757806326aa420a146104d05780632f2ff15d146104f057806336568abe1461051057806341f434341461053057600080fd5b806318160ddd1461046657806323b872dd1461048d578063248a9ca3146104a057600080fd5b8063081812fc11610349578063081812fc146103dc578063095ea7b3146104145780630f4161aa1461042757806316ba10e01461044657600080fd5b806301ffc9a714610370578063061431a8146103a557806306fdde03146103ba575b600080fd5b34801561037c57600080fd5b5061039061038b366004612df9565b610a5d565b60405190151581526020015b60405180910390f35b6103b86103b3366004612e61565b610a6e565b005b3480156103c657600080fd5b506103cf610d0f565b60405161039c9190612efc565b3480156103e857600080fd5b506103fc6103f7366004612f0f565b610da1565b6040516001600160a01b03909116815260200161039c565b6103b8610422366004612f44565b610de5565b34801561043357600080fd5b5060135461039090610100900460ff1681565b34801561045257600080fd5b506103b861046136600461300b565b610dfe565b34801561047257600080fd5b5060015460005403600019015b60405190815260200161039c565b6103b861049b366004613053565b610e70565b3480156104ac57600080fd5b5061047f6104bb366004612f0f565b60009081526008602052604090206001015490565b3480156104dc57600080fd5b506103b86104eb366004612f0f565b610e9b565b3480156104fc57600080fd5b506103b861050b36600461308f565b610f06565b34801561051c57600080fd5b506103b861052b36600461308f565b610f2b565b34801561053c57600080fd5b506103fc6daaeb6d7670e522a718067333cd4e81565b6103b8610560366004613053565b610fa5565b34801561057157600080fd5b506103b8610580366004612f0f565b610fca565b34801561059157600080fd5b506103b86105a03660046130bb565b610fd6565b3480156105b157600080fd5b506103b86105c036600461300b565b61105d565b3480156105d157600080fd5b506105e56105e03660046130d6565b6110fb565b60405161039c9190613153565b3480156105fe57600080fd5b5061047f60105481565b34801561061457600080fd5b506103fc610623366004612f0f565b6111c6565b34801561063457600080fd5b506103b86106433660046130bb565b6111d1565b34801561065457600080fd5b506013546103909060ff1681565b34801561066e57600080fd5b5061047f61067d3660046130bb565b611264565b34801561068e57600080fd5b5061047f7fdc72ed553f2544c34465af23b847953efeb813428162d767f9ba5f4013be676081565b3480156106c257600080fd5b506103b86106d1366004612f0f565b6112b2565b3480156106e257600080fd5b506103b86106f13660046131a3565b61131a565b34801561070257600080fd5b506107166107113660046130bb565b61139f565b60405161039c91906131c0565b34801561072f57600080fd5b5061047f600f5481565b34801561074557600080fd5b506103b86114a7565b34801561075a57600080fd5b506103fc6107693660046131f8565b61154c565b34801561077a57600080fd5b5061039061078936600461308f565b61156b565b34801561079a57600080fd5b506103b86107a936600461300b565b611596565b3480156107ba57600080fd5b50600c5461039090600160a01b900460ff1681565b3480156107db57600080fd5b506103cf611605565b3480156107f057600080fd5b506107166107ff36600461321a565b611614565b34801561081057600080fd5b5061047f600081565b34801561082557600080fd5b506103b861083436600461324d565b611799565b34801561084557600080fd5b5061047f60125481565b34801561085b57600080fd5b506103b861086a366004612f44565b6117ad565b34801561087b57600080fd5b506103b861088a3660046131a3565b61183f565b6103b861089d366004613284565b6118c0565b3480156108ae57600080fd5b506103b86108bd366004612f0f565b6118e6565b3480156108ce57600080fd5b506108e26108dd366004612f0f565b611958565b60405161039c91906132ff565b3480156108fb57600080fd5b506103cf61090a366004612f0f565b6119e0565b34801561091b57600080fd5b5061047f61092a366004612f0f565b611aae565b34801561093b57600080fd5b506013546103fc906201000090046001600160a01b031681565b34801561096157600080fd5b506103b8610970366004612f0f565b611ac5565b34801561098157600080fd5b5061047f7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b3480156109b557600080fd5b506103b86109c436600461308f565b611b31565b3480156109d557600080fd5b5061047f600d5481565b3480156109eb57600080fd5b5061047f60115481565b348015610a0157600080fd5b506103cf611b56565b348015610a1657600080fd5b50610390610a2536600461330d565b611b65565b6103b8610a38366004612f0f565b611bb4565b348015610a4957600080fd5b50610390610a58366004613337565b611d69565b6000610a6882611e52565b92915050565b60135460ff16610ade5760405162461bcd60e51b815260206004820152603060248201527f6d696e7457686974656c6973743a205468652077686974656c6973742073616c60448201526f19481a5cc81b9bdd08195b98589b195960821b60648201526084015b60405180910390fd5b82601154610aec9190613415565b341015610b455760405162461bcd60e51b815260206004820152602160248201527f6d696e7457686974656c6973743a20496e73756666696369656e742066756e646044820152607360f81b6064820152608401610ad5565b601054610b5390600161342c565b83610b5d60005490565b610b67919061342c565b1115610bc65760405162461bcd60e51b815260206004820152602860248201527f6d696e7457686974656c6973743a206d6178207075626c696320737570706c79604482015267081c995858da195960c21b6064820152608401610ad5565b6040516bffffffffffffffffffffffff193360601b166020820152600090603401604051602081830303815290604052805190602001209050610c40838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506012549150849050611e77565b610c985760405162461bcd60e51b815260206004820152602360248201527f6d696e7457686974656c6973743a20496e76616c6964206d65726b6c6520707260448201526237b7b360e91b6064820152608401610ad5565b6013546040516000916201000090046001600160a01b03169047908381818185875af1925050503d8060008114610ceb576040519150601f19603f3d011682016040523d82523d6000602084013e610cf0565b606091505b5050905080610cfe57600080fd5b610d083386611e8d565b5050505050565b606060028054610d1e9061343f565b80601f0160208091040260200160405190810160405280929190818152602001828054610d4a9061343f565b8015610d975780601f10610d6c57610100808354040283529160200191610d97565b820191906000526020600020905b815481529060010190602001808311610d7a57829003601f168201915b5050505050905090565b6000610dac82611f07565b610dc9576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b81610def81611f3c565b610df98383611ff5565b505050565b610e0960003361156b565b610e605760405162461bcd60e51b815260206004820152602260248201527f7365745572695375666669783a206d75737420686176652061646d696e20726f6044820152616c6560f01b6064820152608401610ad5565b600e610e6c82826134bf565b5050565b826001600160a01b0381163314610e8a57610e8a33611f3c565b610e95848484612095565b50505050565b610ea660003361156b565b610f015760405162461bcd60e51b815260206004820152602660248201527f7365747075626c6963537570706c793a20416374696f6e206973206e6f7420616044820152651b1b1bddd95960d21b6064820152608401610ad5565b601055565b600082815260086020526040902060010154610f2181612233565b610df9838361223d565b6001600160a01b0381163314610f9b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610ad5565b610e6c828261225f565b826001600160a01b0381163314610fbf57610fbf33611f3c565b610e95848484612281565b610fd38161229c565b50565b610fe160003361156b565b61103b5760405162461bcd60e51b815260206004820152602560248201527f7365744f70656e53656150726f78793a206d75737420686176652061646d696e60448201526420726f6c6560d81b6064820152608401610ad5565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b61106860003361156b565b6110b45760405162461bcd60e51b815260206004820181905260248201527f736574426173655552493a206d75737420686176652061646d696e20726f6c656044820152606401610ad5565b600a6110c082826134bf565b507fcca744ba4c4cd340a1c25929166dbc791d918d952bb4bd47422ed34144c384c7816040516110f09190612efc565b60405180910390a150565b6060816000816001600160401b0381111561111857611118612f6e565b60405190808252806020026020018201604052801561116a57816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816111365790505b50905060005b8281146111bd5761119886868381811061118c5761118c61357e565b90506020020135611958565b8282815181106111aa576111aa61357e565b6020908102919091010152600101611170565b50949350505050565b6000610a68826122a7565b6111dc60003361156b565b61123a5760405162461bcd60e51b815260206004820152602960248201527f7365745061796d656e7452656365697665723a20416374696f6e206973206e6f6044820152681d08185b1b1bddd95960ba1b6064820152608401610ad5565b601380546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b60006001600160a01b03821661128d576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6112bd60003361156b565b6113155760405162461bcd60e51b8152602060048201526024808201527f7365745075626c6963436f73743a20416374696f6e206973206e6f7420616c6c6044820152631bddd95960e21b6064820152608401610ad5565b600f55565b61132560003361156b565b6113855760405162461bcd60e51b815260206004820152602b60248201527f7365745075626c69634d696e74456e61626c65643a20416374696f6e2069732060448201526a1b9bdd08185b1b1bddd95960aa1b6064820152608401610ad5565b601380549115156101000261ff0019909216919091179055565b606060008060006113af85611264565b90506000816001600160401b038111156113cb576113cb612f6e565b6040519080825280602002602001820160405280156113f4578160200160208202803683370190505b50905061142160408051608081018252600080825260208201819052918101829052606081019190915290565b60015b83861461149b5761143481612316565b915081604001516114935781516001600160a01b03161561145457815194505b876001600160a01b0316856001600160a01b03160361149357808387806001019850815181106114865761148661357e565b6020026020010181815250505b600101611424565b50909695505050505050565b6114b260003361156b565b61150a5760405162461bcd60e51b815260206004820152602360248201527f656e61626c6554726164696e673a206d75737420686176652061646d696e20726044820152626f6c6560e81b6064820152608401610ad5565b600c805460ff60a01b191690556040805133815290517f31638ce44f3fd047989e98da7ef92256b98fd9f8744faaf74f866fad485b2c569181900360200190a1565b60008281526009602052604081206115649083612352565b9392505050565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6115a160003361156b565b6115f95760405162461bcd60e51b8152602060048201526024808201527f736574436f6e74726163745552493a206d75737420686176652061646d696e20604482015263726f6c6560e01b6064820152608401610ad5565b600b610e6c82826134bf565b606060038054610d1e9061343f565b606081831061163657604051631960ccad60e11b815260040160405180910390fd5b60008061164260005490565b9050600185101561165257600194505b8084111561165e578093505b600061166987611264565b9050848610156116885785850381811015611682578091505b5061168c565b5060005b6000816001600160401b038111156116a6576116a6612f6e565b6040519080825280602002602001820160405280156116cf578160200160208202803683370190505b509050816000036116e557935061156492505050565b60006116f088611958565b905060008160400151611701575080515b885b8881141580156117135750848714155b156117885761172181612316565b925082604001516117805782516001600160a01b03161561174157825191505b8a6001600160a01b0316826001600160a01b03160361178057808488806001019950815181106117735761177361357e565b6020026020010181815250505b600101611703565b505050928352509095945050505050565b816117a381611f3c565b610df9838361235e565b6117d77f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361156b565b6118355760405162461bcd60e51b815260206004820152602960248201527f6d696e744d696e7465723a206d7573742068617665206d696e74657220726f6c60448201526819481d1bc81b5a5b9d60ba1b6064820152608401610ad5565b610e6c8282611e8d565b61184a60003361156b565b6118ad5760405162461bcd60e51b815260206004820152602e60248201527f73657457686974656c6973744d696e74456e61626c65643a20416374696f6e2060448201526d1a5cc81b9bdd08185b1b1bddd95960921b6064820152608401610ad5565b6013805460ff1916911515919091179055565b836001600160a01b03811633146118da576118da33611f3c565b610d08858585856123ca565b6118f160003361156b565b6119535760405162461bcd60e51b815260206004820152602d60248201527f73657457686974656c6973744d65726b6c65526f6f743a20416374696f6e206960448201526c1cc81b9bdd08185b1b1bddd959609a1b6064820152608401610ad5565b601255565b60408051608081018252600080825260208201819052918101829052606081019190915260408051608081018252600080825260208201819052918101829052606081019190915260018310806119b157506000548310155b156119bc5792915050565b6119c583612316565b90508060400151156119d75792915050565b6115648361240e565b60606119eb82611f07565b611a4f5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610ad5565b6000600a8054611a5e9061343f565b905011611a7a5760405180602001604052806000815250610a68565b600a611a8583612443565b600e604051602001611a9993929190613607565b60405160208183030381529060405292915050565b6000818152600960205260408120610a689061254b565b611ad060003361156b565b611b2c5760405162461bcd60e51b815260206004820152602760248201527f73657457686974656c697374436f73743a20416374696f6e206973206e6f7420604482015266185b1b1bddd95960ca1b6064820152608401610ad5565b601155565b600082815260086020526040902060010154611b4c81612233565b610df9838361225f565b6060600b8054610d1e9061343f565b600c546000906001600160a01b0390811690831603611b8657506001610a68565b6001600160a01b0380841660009081526007602090815260408083209386168352929052205460ff16611564565b601354610100900460ff16611c1e5760405162461bcd60e51b815260206004820152602a60248201527f6d696e745075626c69633a20546865207075626c69632073616c65206973206e6044820152691bdd08195b98589b195960b21b6064820152608401610ad5565b80600f54611c2c9190613415565b341015611c7b5760405162461bcd60e51b815260206004820152601e60248201527f6d696e745075626c69633a20496e73756666696369656e742066756e647300006044820152606401610ad5565b601054611c8990600161342c565b81611c9360005490565b611c9d919061342c565b1115611cf95760405162461bcd60e51b815260206004820152602560248201527f6d696e745075626c69633a206d6178207075626c696320737570706c792072656044820152641858da195960da1b6064820152608401610ad5565b6013546040516000916201000090046001600160a01b03169047908381818185875af1925050503d8060008114611d4c576040519150601f19603f3d011682016040523d82523d6000602084013e611d51565b606091505b5050905080611d5f57600080fd5b610e6c3383611e8d565b6000805b8251811015611dac57611d9a8585858481518110611d8d57611d8d61357e565b6020026020010151610e70565b80611da48161363a565b915050611d6d565b506001949350505050565b611dc1828261156b565b610e6c5760008281526008602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611df93390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611564836001600160a01b038416612555565b60006001600160e01b03198216635a05180f60e01b1480610a685750610a68826125a4565b600082611e8485846125d9565b14949350505050565b600d54611e9b90600161342c565b81611ea560005490565b611eaf919061342c565b1115611efd5760405162461bcd60e51b815260206004820152601860248201527f6d696e743a206d617820737570706c79207265616368656400000000000000006044820152606401610ad5565b610e6c8282612626565b600081600111158015611f1b575060005482105b8015610a68575050600090815260046020526040902054600160e01b161590565b6daaeb6d7670e522a718067333cd4e3b15610fd357604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611fa9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fcd9190613653565b610fd357604051633b79c77360e21b81526001600160a01b0382166004820152602401610ad5565b6000612000826111c6565b9050336001600160a01b038216146120395761201c8133611b65565b612039576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006120a0826122a7565b9050836001600160a01b0316816001600160a01b0316146120d35760405162a1148160e81b815260040160405180910390fd5b600082815260066020526040902080546120ff8187335b6001600160a01b039081169116811491141790565b61212a5761210d8633611b65565b61212a57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661215157604051633a954ecd60e21b815260040160405180910390fd5b61215e868686600161270d565b801561216957600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036121fb576001840160008181526004602052604081205490036121f95760005481146121f95760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03166000805160206137be83398151915260405160405180910390a45b505050505050565b610fd381336127a4565b6122478282611db7565b6000828152600960205260409020610df99082611e3d565b6122698282612808565b6000828152600960205260409020610df9908261286f565b610df9838383604051806020016040528060008152506118c0565b610fd3816000612884565b600081806001116122fd576000548110156122fd5760008181526004602052604081205490600160e01b821690036122fb575b806000036115645750600019016000818152600460205260409020546122da565b505b604051636f96cda160e11b815260040160405180910390fd5b604080516080810182526000808252602082018190529181018290526060810191909152600082815260046020526040902054610a68906129ca565b60006115648383612a11565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6123d5848484610e70565b6001600160a01b0383163b15610e95576123f184848484612a3b565b610e95576040516368d2bf6b60e11b815260040160405180910390fd5b604080516080810182526000808252602082018190529181018290526060810191909152610a6861243e836122a7565b6129ca565b60608160000361246a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612494578061247e8161363a565b915061248d9050600a83613686565b915061246e565b6000816001600160401b038111156124ae576124ae612f6e565b6040519080825280601f01601f1916602001820160405280156124d8576020820181803683370190505b5090505b8415612543576124ed60018361369a565b91506124fa600a866136ad565b61250590603061342c565b60f81b81838151811061251a5761251a61357e565b60200101906001600160f81b031916908160001a90535061253c600a86613686565b94506124dc565b949350505050565b6000610a68825490565b600081815260018301602052604081205461259c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a68565b506000610a68565b60006001600160e01b03198216637965db0b60e01b1480610a6857506301ffc9a760e01b6001600160e01b0319831614610a68565b600081815b845181101561261e5761260a828683815181106125fd576125fd61357e565b6020026020010151612b26565b9150806126168161363a565b9150506125de565b509392505050565b600080549082900361264b5760405163b562e8dd60e01b815260040160405180910390fd5b612658600084838561270d565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083906000805160206137be8339815191528180a4600183015b8181146126e357808360006000805160206137be833981519152600080a46001016126bd565b508160000361270457604051622e076360e81b815260040160405180910390fd5b60005550505050565b600c54600160a01b900460ff1615610e95576001600160a01b03841615610e95576127587fdc72ed553f2544c34465af23b847953efeb813428162d767f9ba5f4013be67603361156b565b610e955760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f742079657420656e61626c65640000000000006044820152606401610ad5565b6127ae828261156b565b610e6c576127c6816001600160a01b03166014612b55565b6127d1836020612b55565b6040516020016127e29291906136c1565b60408051601f198184030181529082905262461bcd60e51b8252610ad591600401612efc565b612812828261156b565b15610e6c5760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611564836001600160a01b038416612cf0565b600061288f836122a7565b9050806000806128ad86600090815260066020526040902080549091565b9150915084156128ed576128c28184336120ea565b6128ed576128d08333611b65565b6128ed57604051632ce44b5f60e11b815260040160405180910390fd5b6128fb83600088600161270d565b801561290657600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040812091909155600160e11b85169003612994576001860160008181526004602052604081205490036129925760005481146129925760008181526004602052604090208590555b505b60405186906000906001600160a01b038616906000805160206137be833981519152908390a45050600180548101905550505050565b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b6000826000018281548110612a2857612a2861357e565b9060005260206000200154905092915050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612a70903390899088908890600401613736565b6020604051808303816000875af1925050508015612aab575060408051601f3d908101601f19168201909252612aa891810190613773565b60015b612b09573d808015612ad9576040519150601f19603f3d011682016040523d82523d6000602084013e612ade565b606091505b508051600003612b01576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b6000818310612b42576000828152602084905260409020611564565b6000838152602083905260409020611564565b60606000612b64836002613415565b612b6f90600261342c565b6001600160401b03811115612b8657612b86612f6e565b6040519080825280601f01601f191660200182016040528015612bb0576020820181803683370190505b509050600360fc1b81600081518110612bcb57612bcb61357e565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612bfa57612bfa61357e565b60200101906001600160f81b031916908160001a9053506000612c1e846002613415565b612c2990600161342c565b90505b6001811115612ca1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612c5d57612c5d61357e565b1a60f81b828281518110612c7357612c7361357e565b60200101906001600160f81b031916908160001a90535060049490941c93612c9a81613790565b9050612c2c565b5083156115645760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ad5565b60008181526001830160205260408120548015612dd9576000612d1460018361369a565b8554909150600090612d289060019061369a565b9050818114612d8d576000866000018281548110612d4857612d4861357e565b9060005260206000200154905080876000018481548110612d6b57612d6b61357e565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612d9e57612d9e6137a7565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a68565b6000915050610a68565b6001600160e01b031981168114610fd357600080fd5b600060208284031215612e0b57600080fd5b813561156481612de3565b60008083601f840112612e2857600080fd5b5081356001600160401b03811115612e3f57600080fd5b6020830191508360208260051b8501011115612e5a57600080fd5b9250929050565b600080600060408486031215612e7657600080fd5b8335925060208401356001600160401b03811115612e9357600080fd5b612e9f86828701612e16565b9497909650939450505050565b60005b83811015612ec7578181015183820152602001612eaf565b50506000910152565b60008151808452612ee8816020860160208601612eac565b601f01601f19169290920160200192915050565b6020815260006115646020830184612ed0565b600060208284031215612f2157600080fd5b5035919050565b80356001600160a01b0381168114612f3f57600080fd5b919050565b60008060408385031215612f5757600080fd5b612f6083612f28565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612fac57612fac612f6e565b604052919050565b60006001600160401b03831115612fcd57612fcd612f6e565b612fe0601f8401601f1916602001612f84565b9050828152838383011115612ff457600080fd5b828260208301376000602084830101529392505050565b60006020828403121561301d57600080fd5b81356001600160401b0381111561303357600080fd5b8201601f8101841361304457600080fd5b61254384823560208401612fb4565b60008060006060848603121561306857600080fd5b61307184612f28565b925061307f60208501612f28565b9150604084013590509250925092565b600080604083850312156130a257600080fd5b823591506130b260208401612f28565b90509250929050565b6000602082840312156130cd57600080fd5b61156482612f28565b600080602083850312156130e957600080fd5b82356001600160401b038111156130ff57600080fd5b61310b85828601612e16565b90969095509350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b8181101561149b57613182838551613117565b928401926080929092019160010161316f565b8015158114610fd357600080fd5b6000602082840312156131b557600080fd5b813561156481613195565b6020808252825182820181905260009190848201906040850190845b8181101561149b578351835292840192918401916001016131dc565b6000806040838503121561320b57600080fd5b50508035926020909101359150565b60008060006060848603121561322f57600080fd5b61323884612f28565b95602085013595506040909401359392505050565b6000806040838503121561326057600080fd5b61326983612f28565b9150602083013561327981613195565b809150509250929050565b6000806000806080858703121561329a57600080fd5b6132a385612f28565b93506132b160208601612f28565b92506040850135915060608501356001600160401b038111156132d357600080fd5b8501601f810187136132e457600080fd5b6132f387823560208401612fb4565b91505092959194509250565b60808101610a688284613117565b6000806040838503121561332057600080fd5b61332983612f28565b91506130b260208401612f28565b60008060006060848603121561334c57600080fd5b61335584612f28565b92506020613364818601612f28565b925060408501356001600160401b038082111561338057600080fd5b818701915087601f83011261339457600080fd5b8135818111156133a6576133a6612f6e565b8060051b91506133b7848301612f84565b818152918301840191848101908a8411156133d157600080fd5b938501935b838510156133ef578435825293850193908501906133d6565b8096505050505050509250925092565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a6857610a686133ff565b80820180821115610a6857610a686133ff565b600181811c9082168061345357607f821691505b60208210810361347357634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610df957600081815260208120601f850160051c810160208610156134a05750805b601f850160051c820191505b8181101561222b578281556001016134ac565b81516001600160401b038111156134d8576134d8612f6e565b6134ec816134e6845461343f565b84613479565b602080601f83116001811461352157600084156135095750858301515b600019600386901b1c1916600185901b17855561222b565b600085815260208120601f198616915b8281101561355057888601518255948401946001909101908401613531565b508582101561356e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b600081546135a18161343f565b600182811680156135b957600181146135ce576135fd565b60ff19841687528215158302870194506135fd565b8560005260208060002060005b858110156135f45781548a8201529084019082016135db565b50505082870194505b5050505092915050565b60006136138286613594565b8451613623818360208901612eac565b61362f81830186613594565b979650505050505050565b60006001820161364c5761364c6133ff565b5060010190565b60006020828403121561366557600080fd5b815161156481613195565b634e487b7160e01b600052601260045260246000fd5b60008261369557613695613670565b500490565b81810381811115610a6857610a686133ff565b6000826136bc576136bc613670565b500690565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516136f9816017850160208801612eac565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161372a816028840160208801612eac565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061376990830184612ed0565b9695505050505050565b60006020828403121561378557600080fd5b815161156481612de3565b60008161379f5761379f6133ff565b506000190190565b634e487b7160e01b600052603160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212208718f167285b60fd5fd615e35241312d83e208471bad847feafe0cf3ad51b23b64736f6c6343000811003300000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000115c00000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000000000000000000000000000001aa535d3d0c0000000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000000000000098c00000000000000000000000000000000000000000000000000000000000000084465204b696e6773000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000744654b696e677300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d68747470733a2f2f64656b696e67732e696f2f6d6574612f6d6574615f000000000000000000000000000000000000000000000000000000000000000000002568747470733a2f2f64656b696e67732e696f2f6d6574612f636f6e74726163742e6a736f6e000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061036b5760003560e01c80638693da20116101c6578063bd32fb66116100f7578063d547741f11610095578063e8a3d4851161006f578063e8a3d485146109f5578063e985e9c514610a0a578063efd0cbf914610a2a578063f3993d1114610a3d57600080fd5b8063d547741f146109a9578063d5abeb01146109c9578063e7b99ec7146109df57600080fd5b8063ca15c873116100d1578063ca15c8731461090f578063cb37f3b21461092f578063d49479eb14610955578063d53913931461097557600080fd5b8063bd32fb66146108a2578063c23dc68f146108c2578063c87b56dd146108ef57600080fd5b806399a2557a11610164578063aa98e0c61161013e578063aa98e0c614610839578063ab1f458f1461084f578063b767a0981461086f578063b88d4fde1461088f57600080fd5b806399a2557a146107e4578063a217fddf14610804578063a22cb4651461081957600080fd5b806391d14854116101a057806391d148541461076e578063938e3d7b1461078e57806395148e9f146107ae57806395d89b41146107cf57600080fd5b80638693da20146107235780638a8c523c146107395780639010d07c1461074e57600080fd5b806342842e0e116102a057806365ebf99a1161023e5780637a997ab7116102185780637a997ab714610682578063811d2437146106b6578063818668d7146106d65780638462151c146106f657600080fd5b806365ebf99a146106285780636caede3d1461064857806370a082311461066257600080fd5b806355f804b31161027a57806355f804b3146105a55780635bbb2177146105c55780635e84d723146105f25780636352211e1461060857600080fd5b806342842e0e1461055257806342966c68146105655780634f882d491461058557600080fd5b806318160ddd1161030d57806326aa420a116102e757806326aa420a146104d05780632f2ff15d146104f057806336568abe1461051057806341f434341461053057600080fd5b806318160ddd1461046657806323b872dd1461048d578063248a9ca3146104a057600080fd5b8063081812fc11610349578063081812fc146103dc578063095ea7b3146104145780630f4161aa1461042757806316ba10e01461044657600080fd5b806301ffc9a714610370578063061431a8146103a557806306fdde03146103ba575b600080fd5b34801561037c57600080fd5b5061039061038b366004612df9565b610a5d565b60405190151581526020015b60405180910390f35b6103b86103b3366004612e61565b610a6e565b005b3480156103c657600080fd5b506103cf610d0f565b60405161039c9190612efc565b3480156103e857600080fd5b506103fc6103f7366004612f0f565b610da1565b6040516001600160a01b03909116815260200161039c565b6103b8610422366004612f44565b610de5565b34801561043357600080fd5b5060135461039090610100900460ff1681565b34801561045257600080fd5b506103b861046136600461300b565b610dfe565b34801561047257600080fd5b5060015460005403600019015b60405190815260200161039c565b6103b861049b366004613053565b610e70565b3480156104ac57600080fd5b5061047f6104bb366004612f0f565b60009081526008602052604090206001015490565b3480156104dc57600080fd5b506103b86104eb366004612f0f565b610e9b565b3480156104fc57600080fd5b506103b861050b36600461308f565b610f06565b34801561051c57600080fd5b506103b861052b36600461308f565b610f2b565b34801561053c57600080fd5b506103fc6daaeb6d7670e522a718067333cd4e81565b6103b8610560366004613053565b610fa5565b34801561057157600080fd5b506103b8610580366004612f0f565b610fca565b34801561059157600080fd5b506103b86105a03660046130bb565b610fd6565b3480156105b157600080fd5b506103b86105c036600461300b565b61105d565b3480156105d157600080fd5b506105e56105e03660046130d6565b6110fb565b60405161039c9190613153565b3480156105fe57600080fd5b5061047f60105481565b34801561061457600080fd5b506103fc610623366004612f0f565b6111c6565b34801561063457600080fd5b506103b86106433660046130bb565b6111d1565b34801561065457600080fd5b506013546103909060ff1681565b34801561066e57600080fd5b5061047f61067d3660046130bb565b611264565b34801561068e57600080fd5b5061047f7fdc72ed553f2544c34465af23b847953efeb813428162d767f9ba5f4013be676081565b3480156106c257600080fd5b506103b86106d1366004612f0f565b6112b2565b3480156106e257600080fd5b506103b86106f13660046131a3565b61131a565b34801561070257600080fd5b506107166107113660046130bb565b61139f565b60405161039c91906131c0565b34801561072f57600080fd5b5061047f600f5481565b34801561074557600080fd5b506103b86114a7565b34801561075a57600080fd5b506103fc6107693660046131f8565b61154c565b34801561077a57600080fd5b5061039061078936600461308f565b61156b565b34801561079a57600080fd5b506103b86107a936600461300b565b611596565b3480156107ba57600080fd5b50600c5461039090600160a01b900460ff1681565b3480156107db57600080fd5b506103cf611605565b3480156107f057600080fd5b506107166107ff36600461321a565b611614565b34801561081057600080fd5b5061047f600081565b34801561082557600080fd5b506103b861083436600461324d565b611799565b34801561084557600080fd5b5061047f60125481565b34801561085b57600080fd5b506103b861086a366004612f44565b6117ad565b34801561087b57600080fd5b506103b861088a3660046131a3565b61183f565b6103b861089d366004613284565b6118c0565b3480156108ae57600080fd5b506103b86108bd366004612f0f565b6118e6565b3480156108ce57600080fd5b506108e26108dd366004612f0f565b611958565b60405161039c91906132ff565b3480156108fb57600080fd5b506103cf61090a366004612f0f565b6119e0565b34801561091b57600080fd5b5061047f61092a366004612f0f565b611aae565b34801561093b57600080fd5b506013546103fc906201000090046001600160a01b031681565b34801561096157600080fd5b506103b8610970366004612f0f565b611ac5565b34801561098157600080fd5b5061047f7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b3480156109b557600080fd5b506103b86109c436600461308f565b611b31565b3480156109d557600080fd5b5061047f600d5481565b3480156109eb57600080fd5b5061047f60115481565b348015610a0157600080fd5b506103cf611b56565b348015610a1657600080fd5b50610390610a2536600461330d565b611b65565b6103b8610a38366004612f0f565b611bb4565b348015610a4957600080fd5b50610390610a58366004613337565b611d69565b6000610a6882611e52565b92915050565b60135460ff16610ade5760405162461bcd60e51b815260206004820152603060248201527f6d696e7457686974656c6973743a205468652077686974656c6973742073616c60448201526f19481a5cc81b9bdd08195b98589b195960821b60648201526084015b60405180910390fd5b82601154610aec9190613415565b341015610b455760405162461bcd60e51b815260206004820152602160248201527f6d696e7457686974656c6973743a20496e73756666696369656e742066756e646044820152607360f81b6064820152608401610ad5565b601054610b5390600161342c565b83610b5d60005490565b610b67919061342c565b1115610bc65760405162461bcd60e51b815260206004820152602860248201527f6d696e7457686974656c6973743a206d6178207075626c696320737570706c79604482015267081c995858da195960c21b6064820152608401610ad5565b6040516bffffffffffffffffffffffff193360601b166020820152600090603401604051602081830303815290604052805190602001209050610c40838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506012549150849050611e77565b610c985760405162461bcd60e51b815260206004820152602360248201527f6d696e7457686974656c6973743a20496e76616c6964206d65726b6c6520707260448201526237b7b360e91b6064820152608401610ad5565b6013546040516000916201000090046001600160a01b03169047908381818185875af1925050503d8060008114610ceb576040519150601f19603f3d011682016040523d82523d6000602084013e610cf0565b606091505b5050905080610cfe57600080fd5b610d083386611e8d565b5050505050565b606060028054610d1e9061343f565b80601f0160208091040260200160405190810160405280929190818152602001828054610d4a9061343f565b8015610d975780601f10610d6c57610100808354040283529160200191610d97565b820191906000526020600020905b815481529060010190602001808311610d7a57829003601f168201915b5050505050905090565b6000610dac82611f07565b610dc9576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b81610def81611f3c565b610df98383611ff5565b505050565b610e0960003361156b565b610e605760405162461bcd60e51b815260206004820152602260248201527f7365745572695375666669783a206d75737420686176652061646d696e20726f6044820152616c6560f01b6064820152608401610ad5565b600e610e6c82826134bf565b5050565b826001600160a01b0381163314610e8a57610e8a33611f3c565b610e95848484612095565b50505050565b610ea660003361156b565b610f015760405162461bcd60e51b815260206004820152602660248201527f7365747075626c6963537570706c793a20416374696f6e206973206e6f7420616044820152651b1b1bddd95960d21b6064820152608401610ad5565b601055565b600082815260086020526040902060010154610f2181612233565b610df9838361223d565b6001600160a01b0381163314610f9b5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610ad5565b610e6c828261225f565b826001600160a01b0381163314610fbf57610fbf33611f3c565b610e95848484612281565b610fd38161229c565b50565b610fe160003361156b565b61103b5760405162461bcd60e51b815260206004820152602560248201527f7365744f70656e53656150726f78793a206d75737420686176652061646d696e60448201526420726f6c6560d81b6064820152608401610ad5565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b61106860003361156b565b6110b45760405162461bcd60e51b815260206004820181905260248201527f736574426173655552493a206d75737420686176652061646d696e20726f6c656044820152606401610ad5565b600a6110c082826134bf565b507fcca744ba4c4cd340a1c25929166dbc791d918d952bb4bd47422ed34144c384c7816040516110f09190612efc565b60405180910390a150565b6060816000816001600160401b0381111561111857611118612f6e565b60405190808252806020026020018201604052801561116a57816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816111365790505b50905060005b8281146111bd5761119886868381811061118c5761118c61357e565b90506020020135611958565b8282815181106111aa576111aa61357e565b6020908102919091010152600101611170565b50949350505050565b6000610a68826122a7565b6111dc60003361156b565b61123a5760405162461bcd60e51b815260206004820152602960248201527f7365745061796d656e7452656365697665723a20416374696f6e206973206e6f6044820152681d08185b1b1bddd95960ba1b6064820152608401610ad5565b601380546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b60006001600160a01b03821661128d576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600560205260409020546001600160401b031690565b6112bd60003361156b565b6113155760405162461bcd60e51b8152602060048201526024808201527f7365745075626c6963436f73743a20416374696f6e206973206e6f7420616c6c6044820152631bddd95960e21b6064820152608401610ad5565b600f55565b61132560003361156b565b6113855760405162461bcd60e51b815260206004820152602b60248201527f7365745075626c69634d696e74456e61626c65643a20416374696f6e2069732060448201526a1b9bdd08185b1b1bddd95960aa1b6064820152608401610ad5565b601380549115156101000261ff0019909216919091179055565b606060008060006113af85611264565b90506000816001600160401b038111156113cb576113cb612f6e565b6040519080825280602002602001820160405280156113f4578160200160208202803683370190505b50905061142160408051608081018252600080825260208201819052918101829052606081019190915290565b60015b83861461149b5761143481612316565b915081604001516114935781516001600160a01b03161561145457815194505b876001600160a01b0316856001600160a01b03160361149357808387806001019850815181106114865761148661357e565b6020026020010181815250505b600101611424565b50909695505050505050565b6114b260003361156b565b61150a5760405162461bcd60e51b815260206004820152602360248201527f656e61626c6554726164696e673a206d75737420686176652061646d696e20726044820152626f6c6560e81b6064820152608401610ad5565b600c805460ff60a01b191690556040805133815290517f31638ce44f3fd047989e98da7ef92256b98fd9f8744faaf74f866fad485b2c569181900360200190a1565b60008281526009602052604081206115649083612352565b9392505050565b60009182526008602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6115a160003361156b565b6115f95760405162461bcd60e51b8152602060048201526024808201527f736574436f6e74726163745552493a206d75737420686176652061646d696e20604482015263726f6c6560e01b6064820152608401610ad5565b600b610e6c82826134bf565b606060038054610d1e9061343f565b606081831061163657604051631960ccad60e11b815260040160405180910390fd5b60008061164260005490565b9050600185101561165257600194505b8084111561165e578093505b600061166987611264565b9050848610156116885785850381811015611682578091505b5061168c565b5060005b6000816001600160401b038111156116a6576116a6612f6e565b6040519080825280602002602001820160405280156116cf578160200160208202803683370190505b509050816000036116e557935061156492505050565b60006116f088611958565b905060008160400151611701575080515b885b8881141580156117135750848714155b156117885761172181612316565b925082604001516117805782516001600160a01b03161561174157825191505b8a6001600160a01b0316826001600160a01b03160361178057808488806001019950815181106117735761177361357e565b6020026020010181815250505b600101611703565b505050928352509095945050505050565b816117a381611f3c565b610df9838361235e565b6117d77f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63361156b565b6118355760405162461bcd60e51b815260206004820152602960248201527f6d696e744d696e7465723a206d7573742068617665206d696e74657220726f6c60448201526819481d1bc81b5a5b9d60ba1b6064820152608401610ad5565b610e6c8282611e8d565b61184a60003361156b565b6118ad5760405162461bcd60e51b815260206004820152602e60248201527f73657457686974656c6973744d696e74456e61626c65643a20416374696f6e2060448201526d1a5cc81b9bdd08185b1b1bddd95960921b6064820152608401610ad5565b6013805460ff1916911515919091179055565b836001600160a01b03811633146118da576118da33611f3c565b610d08858585856123ca565b6118f160003361156b565b6119535760405162461bcd60e51b815260206004820152602d60248201527f73657457686974656c6973744d65726b6c65526f6f743a20416374696f6e206960448201526c1cc81b9bdd08185b1b1bddd959609a1b6064820152608401610ad5565b601255565b60408051608081018252600080825260208201819052918101829052606081019190915260408051608081018252600080825260208201819052918101829052606081019190915260018310806119b157506000548310155b156119bc5792915050565b6119c583612316565b90508060400151156119d75792915050565b6115648361240e565b60606119eb82611f07565b611a4f5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610ad5565b6000600a8054611a5e9061343f565b905011611a7a5760405180602001604052806000815250610a68565b600a611a8583612443565b600e604051602001611a9993929190613607565b60405160208183030381529060405292915050565b6000818152600960205260408120610a689061254b565b611ad060003361156b565b611b2c5760405162461bcd60e51b815260206004820152602760248201527f73657457686974656c697374436f73743a20416374696f6e206973206e6f7420604482015266185b1b1bddd95960ca1b6064820152608401610ad5565b601155565b600082815260086020526040902060010154611b4c81612233565b610df9838361225f565b6060600b8054610d1e9061343f565b600c546000906001600160a01b0390811690831603611b8657506001610a68565b6001600160a01b0380841660009081526007602090815260408083209386168352929052205460ff16611564565b601354610100900460ff16611c1e5760405162461bcd60e51b815260206004820152602a60248201527f6d696e745075626c69633a20546865207075626c69632073616c65206973206e6044820152691bdd08195b98589b195960b21b6064820152608401610ad5565b80600f54611c2c9190613415565b341015611c7b5760405162461bcd60e51b815260206004820152601e60248201527f6d696e745075626c69633a20496e73756666696369656e742066756e647300006044820152606401610ad5565b601054611c8990600161342c565b81611c9360005490565b611c9d919061342c565b1115611cf95760405162461bcd60e51b815260206004820152602560248201527f6d696e745075626c69633a206d6178207075626c696320737570706c792072656044820152641858da195960da1b6064820152608401610ad5565b6013546040516000916201000090046001600160a01b03169047908381818185875af1925050503d8060008114611d4c576040519150601f19603f3d011682016040523d82523d6000602084013e611d51565b606091505b5050905080611d5f57600080fd5b610e6c3383611e8d565b6000805b8251811015611dac57611d9a8585858481518110611d8d57611d8d61357e565b6020026020010151610e70565b80611da48161363a565b915050611d6d565b506001949350505050565b611dc1828261156b565b610e6c5760008281526008602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611df93390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000611564836001600160a01b038416612555565b60006001600160e01b03198216635a05180f60e01b1480610a685750610a68826125a4565b600082611e8485846125d9565b14949350505050565b600d54611e9b90600161342c565b81611ea560005490565b611eaf919061342c565b1115611efd5760405162461bcd60e51b815260206004820152601860248201527f6d696e743a206d617820737570706c79207265616368656400000000000000006044820152606401610ad5565b610e6c8282612626565b600081600111158015611f1b575060005482105b8015610a68575050600090815260046020526040902054600160e01b161590565b6daaeb6d7670e522a718067333cd4e3b15610fd357604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611fa9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fcd9190613653565b610fd357604051633b79c77360e21b81526001600160a01b0382166004820152602401610ad5565b6000612000826111c6565b9050336001600160a01b038216146120395761201c8133611b65565b612039576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60006120a0826122a7565b9050836001600160a01b0316816001600160a01b0316146120d35760405162a1148160e81b815260040160405180910390fd5b600082815260066020526040902080546120ff8187335b6001600160a01b039081169116811491141790565b61212a5761210d8633611b65565b61212a57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b03851661215157604051633a954ecd60e21b815260040160405180910390fd5b61215e868686600161270d565b801561216957600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b841690036121fb576001840160008181526004602052604081205490036121f95760005481146121f95760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03166000805160206137be83398151915260405160405180910390a45b505050505050565b610fd381336127a4565b6122478282611db7565b6000828152600960205260409020610df99082611e3d565b6122698282612808565b6000828152600960205260409020610df9908261286f565b610df9838383604051806020016040528060008152506118c0565b610fd3816000612884565b600081806001116122fd576000548110156122fd5760008181526004602052604081205490600160e01b821690036122fb575b806000036115645750600019016000818152600460205260409020546122da565b505b604051636f96cda160e11b815260040160405180910390fd5b604080516080810182526000808252602082018190529181018290526060810191909152600082815260046020526040902054610a68906129ca565b60006115648383612a11565b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6123d5848484610e70565b6001600160a01b0383163b15610e95576123f184848484612a3b565b610e95576040516368d2bf6b60e11b815260040160405180910390fd5b604080516080810182526000808252602082018190529181018290526060810191909152610a6861243e836122a7565b6129ca565b60608160000361246a5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612494578061247e8161363a565b915061248d9050600a83613686565b915061246e565b6000816001600160401b038111156124ae576124ae612f6e565b6040519080825280601f01601f1916602001820160405280156124d8576020820181803683370190505b5090505b8415612543576124ed60018361369a565b91506124fa600a866136ad565b61250590603061342c565b60f81b81838151811061251a5761251a61357e565b60200101906001600160f81b031916908160001a90535061253c600a86613686565b94506124dc565b949350505050565b6000610a68825490565b600081815260018301602052604081205461259c57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a68565b506000610a68565b60006001600160e01b03198216637965db0b60e01b1480610a6857506301ffc9a760e01b6001600160e01b0319831614610a68565b600081815b845181101561261e5761260a828683815181106125fd576125fd61357e565b6020026020010151612b26565b9150806126168161363a565b9150506125de565b509392505050565b600080549082900361264b5760405163b562e8dd60e01b815260040160405180910390fd5b612658600084838561270d565b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083906000805160206137be8339815191528180a4600183015b8181146126e357808360006000805160206137be833981519152600080a46001016126bd565b508160000361270457604051622e076360e81b815260040160405180910390fd5b60005550505050565b600c54600160a01b900460ff1615610e95576001600160a01b03841615610e95576127587fdc72ed553f2544c34465af23b847953efeb813428162d767f9ba5f4013be67603361156b565b610e955760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f742079657420656e61626c65640000000000006044820152606401610ad5565b6127ae828261156b565b610e6c576127c6816001600160a01b03166014612b55565b6127d1836020612b55565b6040516020016127e29291906136c1565b60408051601f198184030181529082905262461bcd60e51b8252610ad591600401612efc565b612812828261156b565b15610e6c5760008281526008602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000611564836001600160a01b038416612cf0565b600061288f836122a7565b9050806000806128ad86600090815260066020526040902080549091565b9150915084156128ed576128c28184336120ea565b6128ed576128d08333611b65565b6128ed57604051632ce44b5f60e11b815260040160405180910390fd5b6128fb83600088600161270d565b801561290657600082555b6001600160a01b038316600081815260056020526040902080546fffffffffffffffffffffffffffffffff0190554260a01b17600360e01b17600087815260046020526040812091909155600160e11b85169003612994576001860160008181526004602052604081205490036129925760005481146129925760008181526004602052604090208590555b505b60405186906000906001600160a01b038616906000805160206137be833981519152908390a45050600180548101905550505050565b604080516080810182526001600160a01b038316815260a083901c6001600160401b03166020820152600160e01b831615159181019190915260e89190911c606082015290565b6000826000018281548110612a2857612a2861357e565b9060005260206000200154905092915050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612a70903390899088908890600401613736565b6020604051808303816000875af1925050508015612aab575060408051601f3d908101601f19168201909252612aa891810190613773565b60015b612b09573d808015612ad9576040519150601f19603f3d011682016040523d82523d6000602084013e612ade565b606091505b508051600003612b01576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b6000818310612b42576000828152602084905260409020611564565b6000838152602083905260409020611564565b60606000612b64836002613415565b612b6f90600261342c565b6001600160401b03811115612b8657612b86612f6e565b6040519080825280601f01601f191660200182016040528015612bb0576020820181803683370190505b509050600360fc1b81600081518110612bcb57612bcb61357e565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612bfa57612bfa61357e565b60200101906001600160f81b031916908160001a9053506000612c1e846002613415565b612c2990600161342c565b90505b6001811115612ca1576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612c5d57612c5d61357e565b1a60f81b828281518110612c7357612c7361357e565b60200101906001600160f81b031916908160001a90535060049490941c93612c9a81613790565b9050612c2c565b5083156115645760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610ad5565b60008181526001830160205260408120548015612dd9576000612d1460018361369a565b8554909150600090612d289060019061369a565b9050818114612d8d576000866000018281548110612d4857612d4861357e565b9060005260206000200154905080876000018481548110612d6b57612d6b61357e565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080612d9e57612d9e6137a7565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050610a68565b6000915050610a68565b6001600160e01b031981168114610fd357600080fd5b600060208284031215612e0b57600080fd5b813561156481612de3565b60008083601f840112612e2857600080fd5b5081356001600160401b03811115612e3f57600080fd5b6020830191508360208260051b8501011115612e5a57600080fd5b9250929050565b600080600060408486031215612e7657600080fd5b8335925060208401356001600160401b03811115612e9357600080fd5b612e9f86828701612e16565b9497909650939450505050565b60005b83811015612ec7578181015183820152602001612eaf565b50506000910152565b60008151808452612ee8816020860160208601612eac565b601f01601f19169290920160200192915050565b6020815260006115646020830184612ed0565b600060208284031215612f2157600080fd5b5035919050565b80356001600160a01b0381168114612f3f57600080fd5b919050565b60008060408385031215612f5757600080fd5b612f6083612f28565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612fac57612fac612f6e565b604052919050565b60006001600160401b03831115612fcd57612fcd612f6e565b612fe0601f8401601f1916602001612f84565b9050828152838383011115612ff457600080fd5b828260208301376000602084830101529392505050565b60006020828403121561301d57600080fd5b81356001600160401b0381111561303357600080fd5b8201601f8101841361304457600080fd5b61254384823560208401612fb4565b60008060006060848603121561306857600080fd5b61307184612f28565b925061307f60208501612f28565b9150604084013590509250925092565b600080604083850312156130a257600080fd5b823591506130b260208401612f28565b90509250929050565b6000602082840312156130cd57600080fd5b61156482612f28565b600080602083850312156130e957600080fd5b82356001600160401b038111156130ff57600080fd5b61310b85828601612e16565b90969095509350505050565b80516001600160a01b031682526020808201516001600160401b03169083015260408082015115159083015260609081015162ffffff16910152565b6020808252825182820181905260009190848201906040850190845b8181101561149b57613182838551613117565b928401926080929092019160010161316f565b8015158114610fd357600080fd5b6000602082840312156131b557600080fd5b813561156481613195565b6020808252825182820181905260009190848201906040850190845b8181101561149b578351835292840192918401916001016131dc565b6000806040838503121561320b57600080fd5b50508035926020909101359150565b60008060006060848603121561322f57600080fd5b61323884612f28565b95602085013595506040909401359392505050565b6000806040838503121561326057600080fd5b61326983612f28565b9150602083013561327981613195565b809150509250929050565b6000806000806080858703121561329a57600080fd5b6132a385612f28565b93506132b160208601612f28565b92506040850135915060608501356001600160401b038111156132d357600080fd5b8501601f810187136132e457600080fd5b6132f387823560208401612fb4565b91505092959194509250565b60808101610a688284613117565b6000806040838503121561332057600080fd5b61332983612f28565b91506130b260208401612f28565b60008060006060848603121561334c57600080fd5b61335584612f28565b92506020613364818601612f28565b925060408501356001600160401b038082111561338057600080fd5b818701915087601f83011261339457600080fd5b8135818111156133a6576133a6612f6e565b8060051b91506133b7848301612f84565b818152918301840191848101908a8411156133d157600080fd5b938501935b838510156133ef578435825293850193908501906133d6565b8096505050505050509250925092565b634e487b7160e01b600052601160045260246000fd5b8082028115828204841417610a6857610a686133ff565b80820180821115610a6857610a686133ff565b600181811c9082168061345357607f821691505b60208210810361347357634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115610df957600081815260208120601f850160051c810160208610156134a05750805b601f850160051c820191505b8181101561222b578281556001016134ac565b81516001600160401b038111156134d8576134d8612f6e565b6134ec816134e6845461343f565b84613479565b602080601f83116001811461352157600084156135095750858301515b600019600386901b1c1916600185901b17855561222b565b600085815260208120601f198616915b8281101561355057888601518255948401946001909101908401613531565b508582101561356e5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b600081546135a18161343f565b600182811680156135b957600181146135ce576135fd565b60ff19841687528215158302870194506135fd565b8560005260208060002060005b858110156135f45781548a8201529084019082016135db565b50505082870194505b5050505092915050565b60006136138286613594565b8451613623818360208901612eac565b61362f81830186613594565b979650505050505050565b60006001820161364c5761364c6133ff565b5060010190565b60006020828403121561366557600080fd5b815161156481613195565b634e487b7160e01b600052601260045260246000fd5b60008261369557613695613670565b500490565b81810381811115610a6857610a686133ff565b6000826136bc576136bc613670565b500690565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516136f9816017850160208801612eac565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161372a816028840160208801612eac565b01602801949350505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061376990830184612ed0565b9695505050505050565b60006020828403121561378557600080fd5b815161156481612de3565b60008161379f5761379f6133ff565b506000190190565b634e487b7160e01b600052603160045260246000fdfeddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa26469706673582212208718f167285b60fd5fd615e35241312d83e208471bad847feafe0cf3ad51b23b64736f6c63430008110033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000115c00000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c100000000000000000000000000000000000000000000000001aa535d3d0c0000000000000000000000000000000000000000000000000000016345785d8a0000000000000000000000000000000000000000000000000000000000000000098c00000000000000000000000000000000000000000000000000000000000000084465204b696e6773000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000744654b696e677300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001d68747470733a2f2f64656b696e67732e696f2f6d6574612f6d6574615f000000000000000000000000000000000000000000000000000000000000000000002568747470733a2f2f64656b696e67732e696f2f6d6574612f636f6e74726163742e6a736f6e000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : name_ (string): De Kings
Arg [1] : symbol_ (string): DeKings
Arg [2] : maxSupply_ (uint256): 4444
Arg [3] : baseURI_ (string): https://dekings.io/meta/meta_
Arg [4] : contractURI_ (string): https://dekings.io/meta/contract.json
Arg [5] : openSeaProxy_ (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
Arg [6] : publicCost_ (uint256): 120000000000000000
Arg [7] : whitelistCost_ (uint256): 100000000000000000
Arg [8] : publicSupply_ (uint256): 2444

-----Encoded View---------------
18 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000160
Arg [2] : 000000000000000000000000000000000000000000000000000000000000115c
Arg [3] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [5] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [6] : 00000000000000000000000000000000000000000000000001aa535d3d0c0000
Arg [7] : 000000000000000000000000000000000000000000000000016345785d8a0000
Arg [8] : 000000000000000000000000000000000000000000000000000000000000098c
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000008
Arg [10] : 4465204b696e6773000000000000000000000000000000000000000000000000
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [12] : 44654b696e677300000000000000000000000000000000000000000000000000
Arg [13] : 000000000000000000000000000000000000000000000000000000000000001d
Arg [14] : 68747470733a2f2f64656b696e67732e696f2f6d6574612f6d6574615f000000
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000025
Arg [16] : 68747470733a2f2f64656b696e67732e696f2f6d6574612f636f6e7472616374
Arg [17] : 2e6a736f6e000000000000000000000000000000000000000000000000000000


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

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