ETH Price: $3,301.81 (+0.07%)

MetaCene Treasure Box (MTB)
 

Overview

TokenID

1054

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

MetaCene Treasure Box is a collection of 2,997 limited edition generative NFTs for MetaCene’s founding creators.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
MTB

Compiler Version
v0.8.24+commit.e11b9ed9

Optimization Enabled:
Yes with 0 runs

Other Settings:
paris EvmVersion
File 1 of 16 : MTB.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";

contract MTB is ERC721Enumerable, AccessControl, IERC721Receiver {
    address public constant BURN_ADDRESS =
        0x000000000000000000000000000000000000dEaD;
    bytes32 public constant OPERATOR_ROLE = keccak256("OPERATOR_ROLE");
    uint256 public constant MigrateSupply = 2997;

    uint256 public migratelCount = 0;

    string public tokenBaseURI;
    uint256 public tokenIdCounter = 0;

    address public raritySigner1;
    address public raritySigner2;
    address public raritySigner3;
    address public raritySigner4;
    bool public migrateEnable;

    IERC721 public ceceNFT;
    mapping(uint256 => uint8) public tokenRarity;

    event Mint(address indexed to, uint256 indexed tokenId);
    modifier onlyOperator() {
        require(hasRole(OPERATOR_ROLE, msg.sender), "Not operator role");
        _;
    }

    constructor(
        address _nft,
        address[] memory _signerList
    ) ERC721("MetaCene Treasure Box", "MTB") {
        // constructor(
        //     address _nft,
        //     address[] memory _signerList
        // ) ERC721("TEST CCCC", "MTB") {
        _grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _grantRole(OPERATOR_ROLE, msg.sender);
        ceceNFT = IERC721(_nft);
        setSigner(_signerList);
        migrateEnable = true;
    }

    function migrate(
        uint256[] calldata tokenIds,
        bytes[] calldata signatures
    ) external payable {
        require(migrateEnable, "migrate not enable");
        require(tokenIds.length != 0, "token error");
        require(
            tokenIds.length == signatures.length,
            "signatures length error"
        );
        for (uint256 x = 0; x < tokenIds.length; x++) {
            uint256 tokenId = tokenIds[x];
            bytes memory signature = signatures[x];

            uint8 rarity = getRarity(signature, msg.sender, tokenId);
            require(rarity != 0, "signature error");

            // less then MigratelSupply
            require(
                migratelCount < MigrateSupply,
                "exceeded total migration amount"
            );

            ceceNFT.safeTransferFrom(msg.sender, BURN_ADDRESS, tokenId);

            tokenIdCounter = tokenIdCounter + 1;
            migratelCount = migratelCount + 1;
            super._mint(msg.sender, tokenIdCounter);
            tokenRarity[tokenIdCounter] = rarity;

            emit Mint(msg.sender, tokenIdCounter);
        }
    }

    function airdrop(
        address to,
        uint8[] calldata rarities
    ) external onlyOperator {
        require(rarities.length != 0, "rarities length error");
        migratelCount = migratelCount + rarities.length;
        // less then or equal MigratelSupply
        require(
            migratelCount <= MigrateSupply,
            "exceeded total migration amount"
        );

        for (uint256 x = 0; x < rarities.length; x++) {
            uint8 rarity = rarities[x];
            // rarity 1,2,3,4
            require(rarity >= 1 && rarity <= 4, "rarity error");
            tokenIdCounter = tokenIdCounter + 1;
            super._mint(to, tokenIdCounter);
            tokenRarity[tokenIdCounter] = rarity;

            emit Mint(to, tokenIdCounter);
        }
    }

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

    function setBaseURI(string memory uri) external onlyOperator {
        tokenBaseURI = uri;
    }

    function setMigrateEnable(bool enable) external onlyOperator {
        migrateEnable = enable;
    }

    function setCece(address _address) external onlyOperator {
        ceceNFT = IERC721(_address);
    }

    function setSigner(address[] memory _signerList) public onlyOperator {
        require(_signerList.length == 4, "signer length error");
        raritySigner1 = _signerList[0];
        raritySigner2 = _signerList[1];
        raritySigner3 = _signerList[2];
        raritySigner4 = _signerList[3];
    }

    function setOperatorRole(address _address) external {
        grantRole(OPERATOR_ROLE, _address);
    }

    function removeOperatorRole(address _address) external {
        revokeRole(OPERATOR_ROLE, _address);
    }

    function withdraw() external onlyOperator {
        (bool success, ) = payable(msg.sender).call{
            value: address(this).balance
        }("");
        require(success, "Withdraw eth failed");
    }

    function withdrawNFT(
        address address_,
        uint256 tokenId
    ) public onlyOperator {
        IERC721(address_).safeTransferFrom(address(this), msg.sender, tokenId);
    }

    function getMessageHash(
        address user,
        uint256 tokenId
    ) public view returns (bytes32) {
        bytes32 messageHash = keccak256(
            abi.encodePacked(address(this), user, tokenId, block.chainid)
        );
        bytes32 ethSignedMessageHash = ECDSA.toEthSignedMessageHash(
            messageHash
        );
        return ethSignedMessageHash;
    }

    function getRarity(
        bytes memory signature,
        address user,
        uint256 tokenId
    ) public view returns (uint8) {
        bytes32 ethSignedMessageHash = getMessageHash(user, tokenId);

        address recover_address = ECDSA.recover(
            ethSignedMessageHash,
            signature
        );

        if (raritySigner1 == recover_address) {
            return 1;
        } else if (raritySigner2 == recover_address) {
            return 2;
        } else if (raritySigner3 == recover_address) {
            return 3;
        } else if (raritySigner4 == recover_address) {
            return 4;
        }
        return 0;
    }

    function supportsInterface(
        bytes4 interfaceId
    ) public view override(ERC721Enumerable, AccessControl) returns (bool) {
        return super.supportsInterface(interfaceId);
    }

    function onERC721Received(
        address,
        address,
        uint256,
        bytes calldata
    ) external pure override returns (bytes4) {
        return IERC721Receiver.onERC721Received.selector;
    }
}

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

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

File 3 of 16 : 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 4 of 16 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

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

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

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _ownerOf(tokenId);
        require(owner != address(0), "ERC721: invalid token ID");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @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, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not token owner or approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
        _safeTransfer(from, to, tokenId, data);
    }

    /**
     * @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.
     *
     * `data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @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 (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _ownerOf(tokenId) != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId, 1);

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId, 1);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId, 1);

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId, 1);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId, 1);

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

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

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits an {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256, /* firstTokenId */
        uint256 batchSize
    ) internal virtual {
        if (batchSize > 1) {
            if (from != address(0)) {
                _balances[from] -= batchSize;
            }
            if (to != address(0)) {
                _balances[to] += batchSize;
            }
        }
    }

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}
}

File 5 of 16 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @dev See {IERC721Enumerable-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _allTokens.length;
    }

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev See {ERC721-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, firstTokenId, batchSize);

        if (batchSize > 1) {
            // Will only trigger during construction. Batch transferring (minting) is not available afterwards.
            revert("ERC721Enumerable: consecutive transfers not supported");
        }

        uint256 tokenId = firstTokenId;

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 6 of 16 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 7 of 16 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @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);
}

File 8 of 16 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @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`.
     *
     * 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 calldata data
    ) external;

    /**
     * @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 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
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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;

    /**
     * @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;

    /**
     * @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);
}

File 9 of 16 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 10 of 16 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 11 of 16 : 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 12 of 16 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 13 of 16 : 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 14 of 16 : 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 15 of 16 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

Settings
{
  "metadata": {
    "bytecodeHash": "none",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 0
  },
  "evmVersion": "paris",
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_nft","type":"address"},{"internalType":"address[]","name":"_signerList","type":"address[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Mint","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"},{"inputs":[],"name":"BURN_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MigrateSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint8[]","name":"rarities","type":"uint8[]"}],"name":"airdrop","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ceceNFT","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMessageHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRarity","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"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":"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":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"bytes[]","name":"signatures","type":"bytes[]"}],"name":"migrate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"migrateEnable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"migratelCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raritySigner1","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raritySigner2","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raritySigner3","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"raritySigner4","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeOperatorRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","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":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setCece","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"enable","type":"bool"}],"name":"setMigrateEnable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setOperatorRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_signerList","type":"address[]"}],"name":"setSigner","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":[],"name":"tokenBaseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenIdCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenRarity","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"address_","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawNFT","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526000600b556000600d553480156200001b57600080fd5b5060405162003a9938038062003a998339810160408190526200003e91620003ce565b6040518060400160405280601581526020017f4d65746143656e6520547265617375726520426f7800000000000000000000008152506040518060400160405280600381526020016226aa2160e91b8152508160009081620000a1919062000548565b506001620000b0828262000548565b50620000c2915060009050336200011e565b620000dd60008051602062003a79833981519152336200011e565b601280546001600160a01b0319166001600160a01b0384161790556200010381620001a9565b50506011805460ff60a01b1916600160a01b1790556200062a565b6200012a828262000370565b620001a5576000828152600a602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001643390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b620001c460008051602062003a798339815191523362000370565b6200020a5760405162461bcd60e51b81526020600482015260116024820152704e6f74206f70657261746f7220726f6c6560781b60448201526064015b60405180910390fd5b80516004146200025d5760405162461bcd60e51b815260206004820152601360248201527f7369676e6572206c656e677468206572726f7200000000000000000000000000604482015260640162000201565b8060008151811062000273576200027362000614565b6020026020010151600e60006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080600181518110620002b757620002b762000614565b6020026020010151600f60006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080600281518110620002fb57620002fb62000614565b6020026020010151601060006101000a8154816001600160a01b0302191690836001600160a01b03160217905550806003815181106200033f576200033f62000614565b6020026020010151601160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555050565b6000918252600a602090815260408084206001600160a01b0393909316845291905290205460ff1690565b80516001600160a01b0381168114620003b357600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215620003e257600080fd5b620003ed836200039b565b602084810151919350906001600160401b03808211156200040d57600080fd5b818601915086601f8301126200042257600080fd5b815181811115620004375762000437620003b8565b8060051b604051601f19603f830116810181811085821117156200045f576200045f620003b8565b6040529182528482019250838101850191898311156200047e57600080fd5b938501935b82851015620004a75762000497856200039b565b8452938501939285019262000483565b8096505050505050509250929050565b600181811c90821680620004cc57607f821691505b602082108103620004ed57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000543576000816000526020600020601f850160051c810160208610156200051e5750805b601f850160051c820191505b818110156200053f578281556001016200052a565b5050505b505050565b81516001600160401b03811115620005645762000564620003b8565b6200057c81620005758454620004b7565b84620004f3565b602080601f831160018114620005b457600084156200059b5750858301515b600019600386901b1c1916600185901b1785556200053f565b600085815260208120601f198616915b82811015620005e557888601518255948401946001909101908401620005c4565b5085821015620006045787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b61343f806200063a6000396000f3fe6080604052600436106102225760003560e01c806208525f1461022757806301ffc9a71461026457806306fdde0314610294578063081812fc146102b6578063095ea7b3146102d65780630c1d6826146102f8578063150b7a021461031c57806318160ddd1461036157806322ee82db1461037657806323b872dd14610396578063248a9ca3146103b65780632f2ff15d146103d65780632f745c59146103f657806336568abe146104165780633ccfd60b1461043657806342842e0e1461044b57806348960f0d1461046b5780634cf8a1301461049d5780634e99b800146104bd5780634f6ccce7146104d2578063512c91df146104f257806355e5a2501461051257806355f804b3146105325780635859156f146105525780636088e93a1461056857806361b3de5a146105885780636352211e146105a85780636975ddff146105c857806370a08231146105e85780637e79c25e146106085780639159be411461062957806391d14854146106495780639478941c1461066957806395d89b411461068957806398bdf6f51461069e5780639aa38640146106b45780639c328c4c146106d4578063a217fddf146106f4578063a22cb46514610709578063afb0a36914610729578063b88d4fde14610759578063c87b56dd14610779578063d547741f14610799578063e538c4e3146107b9578063e985e9c5146107cc578063f2daf60d146107ec578063f5b541a61461080c578063fccc28131461082e575b600080fd5b34801561023357600080fd5b50600f54610247906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027057600080fd5b5061028461027f3660046128d8565b610844565b604051901515815260200161025b565b3480156102a057600080fd5b506102a9610855565b60405161025b9190612945565b3480156102c257600080fd5b506102476102d1366004612958565b6108e7565b3480156102e257600080fd5b506102f66102f136600461298d565b61090e565b005b34801561030457600080fd5b5061030e600b5481565b60405190815260200161025b565b34801561032857600080fd5b506103486103373660046129b7565b630a85bd0160e11b95945050505050565b6040516001600160e01b0319909116815260200161025b565b34801561036d57600080fd5b5060085461030e565b34801561038257600080fd5b506102f6610391366004612a97565b610a28565b3480156103a257600080fd5b506102f66103b1366004612b43565b610baa565b3480156103c257600080fd5b5061030e6103d1366004612958565b610bdb565b3480156103e257600080fd5b506102f66103f1366004612b7f565b610bf0565b34801561040257600080fd5b5061030e61041136600461298d565b610c0c565b34801561042257600080fd5b506102f6610431366004612b7f565b610ca2565b34801561044257600080fd5b506102f6610d20565b34801561045757600080fd5b506102f6610466366004612b43565b610de5565b34801561047757600080fd5b5061048b610486366004612c22565b610e00565b60405160ff909116815260200161025b565b3480156104a957600080fd5b506102f66104b8366004612c68565b610eac565b3480156104c957600080fd5b506102a9610ec4565b3480156104de57600080fd5b5061030e6104ed366004612958565b610f52565b3480156104fe57600080fd5b5061030e61050d36600461298d565b610fe5565b34801561051e57600080fd5b506102f661052d366004612c68565b611095565b34801561053e57600080fd5b506102f661054d366004612c83565b6110eb565b34801561055e57600080fd5b5061030e610bb581565b34801561057457600080fd5b506102f661058336600461298d565b61112b565b34801561059457600080fd5b50601254610247906001600160a01b031681565b3480156105b457600080fd5b506102476105c3366004612958565b6111c5565b3480156105d457600080fd5b50601054610247906001600160a01b031681565b3480156105f457600080fd5b5061030e610603366004612c68565b6111f9565b34801561061457600080fd5b5060115461028490600160a01b900460ff1681565b34801561063557600080fd5b50601154610247906001600160a01b031681565b34801561065557600080fd5b50610284610664366004612b7f565b61127f565b34801561067557600080fd5b506102f6610684366004612c68565b6112aa565b34801561069557600080fd5b506102a96112c2565b3480156106aa57600080fd5b5061030e600d5481565b3480156106c057600080fd5b50600e54610247906001600160a01b031681565b3480156106e057600080fd5b506102f66106ef366004612d0f565b6112d1565b34801561070057600080fd5b5061030e600081565b34801561071557600080fd5b506102f6610724366004612d71565b611478565b34801561073557600080fd5b5061048b610744366004612958565b60136020526000908152604090205460ff1681565b34801561076557600080fd5b506102f6610774366004612d9b565b611483565b34801561078557600080fd5b506102a9610794366004612958565b6114b5565b3480156107a557600080fd5b506102f66107b4366004612b7f565b61151b565b6102f66107c7366004612e02565b611537565b3480156107d857600080fd5b506102846107e7366004612e6d565b6117eb565b3480156107f857600080fd5b506102f6610807366004612e97565b611819565b34801561081857600080fd5b5061030e6000805160206133d383398151915281565b34801561083a57600080fd5b5061024761dead81565b600061084f8261186b565b92915050565b60606000805461086490612eb2565b80601f016020809104026020016040519081016040528092919081815260200182805461089090612eb2565b80156108dd5780601f106108b2576101008083540402835291602001916108dd565b820191906000526020600020905b8154815290600101906020018083116108c057829003601f168201915b5050505050905090565b60006108f282611890565b506000908152600460205260409020546001600160a01b031690565b6000610919826111c5565b9050806001600160a01b0316836001600160a01b03160361098b5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806109a757506109a781336117eb565b610a195760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610982565b610a2383836118b5565b505050565b610a406000805160206133d38339815191523361127f565b610a5c5760405162461bcd60e51b815260040161098290612eec565b8051600414610aa35760405162461bcd60e51b815260206004820152601360248201527239b4b3b732b9103632b733ba341032b93937b960691b6044820152606401610982565b80600081518110610ab657610ab6612f17565b6020026020010151600e60006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080600181518110610af757610af7612f17565b6020026020010151600f60006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080600281518110610b3857610b38612f17565b6020026020010151601060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080600381518110610b7957610b79612f17565b6020026020010151601160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555050565b610bb43382611923565b610bd05760405162461bcd60e51b815260040161098290612f2d565b610a23838383611982565b6000908152600a602052604090206001015490565b610bf982610bdb565b610c0281611ae1565b610a238383611aeb565b6000610c17836111f9565b8210610c795760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610982565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6001600160a01b0381163314610d125760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610982565b610d1c8282611b71565b5050565b610d386000805160206133d38339815191523361127f565b610d545760405162461bcd60e51b815260040161098290612eec565b604051600090339047908381818185875af1925050503d8060008114610d96576040519150601f19603f3d011682016040523d82523d6000602084013e610d9b565b606091505b5050905080610de25760405162461bcd60e51b815260206004820152601360248201527215da5d1a191c985dc8195d1a0819985a5b1959606a1b6044820152606401610982565b50565b610a2383838360405180602001604052806000815250611483565b600080610e0d8484610fe5565b90506000610e1b8287611bd8565b600e549091506001600160a01b03808316911603610e3e57600192505050610ea5565b600f546001600160a01b03808316911603610e5e57600292505050610ea5565b6010546001600160a01b03808316911603610e7e57600392505050610ea5565b6011546001600160a01b03808316911603610e9e57600492505050610ea5565b6000925050505b9392505050565b610de26000805160206133d383398151915282610bf0565b600c8054610ed190612eb2565b80601f0160208091040260200160405190810160405280929190818152602001828054610efd90612eb2565b8015610f4a5780601f10610f1f57610100808354040283529160200191610f4a565b820191906000526020600020905b815481529060010190602001808311610f2d57829003601f168201915b505050505081565b6000610f5d60085490565b8210610fc05760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610982565b60088281548110610fd357610fd3612f17565b90600052602060002001549050919050565b6040516001600160601b031930606090811b8216602084015284901b166034820152604881018290524660688201526000908190608801604051602081830303815290604052805190602001209050600061108c826040517b0ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d05199960211b6020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b95945050505050565b6110ad6000805160206133d38339815191523361127f565b6110c95760405162461bcd60e51b815260040161098290612eec565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6111036000805160206133d38339815191523361127f565b61111f5760405162461bcd60e51b815260040161098290612eec565b600c610d1c8282612fc2565b6111436000805160206133d38339815191523361127f565b61115f5760405162461bcd60e51b815260040161098290612eec565b604051632142170760e11b81526001600160a01b038316906342842e0e9061118f90309033908690600401613081565b600060405180830381600087803b1580156111a957600080fd5b505af11580156111bd573d6000803e3d6000fd5b505050505050565b6000806111d183611bfc565b90506001600160a01b03811661084f5760405162461bcd60e51b8152600401610982906130a5565b60006001600160a01b0382166112635760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610982565b506001600160a01b031660009081526003602052604090205490565b6000918252600a602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610de26000805160206133d38339815191528261151b565b60606001805461086490612eb2565b6112e96000805160206133d38339815191523361127f565b6113055760405162461bcd60e51b815260040161098290612eec565b600081900361134e5760405162461bcd60e51b81526020600482015260156024820152743930b934ba34b2b9903632b733ba341032b93937b960591b6044820152606401610982565b600b5461135c9082906130ed565b600b819055610bb510156113825760405162461bcd60e51b815260040161098290613100565b60005b818110156114725760008383838181106113a1576113a1612f17565b90506020020160208101906113b69190613137565b905060018160ff16101580156113d0575060048160ff1611155b61140b5760405162461bcd60e51b815260206004820152600c60248201526b3930b934ba3c9032b93937b960a11b6044820152606401610982565b600d546114199060016130ed565b600d819055611429908690611c17565b600d8054600090815260136020526040808220805460ff191660ff8616179055915491516001600160a01b0388169160008051602061341383398151915291a350600101611385565b50505050565b610d1c338383611d20565b61148d3383611923565b6114a95760405162461bcd60e51b815260040161098290612f2d565b61147284848484611dea565b60606114c082611890565b60006114ca611e1d565b905060008151116114ea5760405180602001604052806000815250610ea5565b806114f484611e2c565b60405160200161150592919061315a565b6040516020818303038152906040529392505050565b61152482610bdb565b61152d81611ae1565b610a238383611b71565b601154600160a01b900460ff166115855760405162461bcd60e51b81526020600482015260126024820152716d696772617465206e6f7420656e61626c6560701b6044820152606401610982565b60008390036115c45760405162461bcd60e51b815260206004820152600b60248201526a3a37b5b2b71032b93937b960a91b6044820152606401610982565b82811461160d5760405162461bcd60e51b815260206004820152601760248201527639b4b3b730ba3ab932b9903632b733ba341032b93937b960491b6044820152606401610982565b60005b838110156117e457600085858381811061162c5761162c612f17565b905060200201359050600084848481811061164957611649612f17565b905060200281019061165b9190613189565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093945061169f925084915033905085610e00565b90508060ff166000036116e65760405162461bcd60e51b815260206004820152600f60248201526e39b4b3b730ba3ab9329032b93937b960891b6044820152606401610982565b610bb5600b54106117095760405162461bcd60e51b815260040161098290613100565b601254604051632142170760e11b81526001600160a01b03909116906342842e0e9061173f90339061dead908890600401613081565b600060405180830381600087803b15801561175957600080fd5b505af115801561176d573d6000803e3d6000fd5b50505050600d54600161178091906130ed565b600d55600b546117919060016130ed565b600b55600d546117a2903390611c17565b600d8054600090815260136020526040808220805460ff191660ff861617905591549151339160008051602061341383398151915291a3505050600101611610565b5050505050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6118316000805160206133d38339815191523361127f565b61184d5760405162461bcd60e51b815260040161098290612eec565b60118054911515600160a01b0260ff60a01b19909216919091179055565b60006001600160e01b03198216637965db0b60e01b148061084f575061084f82611ebe565b61189981611ee3565b610de25760405162461bcd60e51b8152600401610982906130a5565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906118ea826111c5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061192f836111c5565b9050806001600160a01b0316846001600160a01b03161480611956575061195681856117eb565b8061197a5750836001600160a01b031661196f846108e7565b6001600160a01b0316145b949350505050565b826001600160a01b0316611995826111c5565b6001600160a01b0316146119bb5760405162461bcd60e51b8152600401610982906131cf565b6001600160a01b038216611a1d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610982565b611a2a8383836001611f00565b826001600160a01b0316611a3d826111c5565b6001600160a01b031614611a635760405162461bcd60e51b8152600401610982906131cf565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184936000805160206133f383398151915291a4505050565b610de28133612039565b611af5828261127f565b610d1c576000828152600a602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611b2d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611b7b828261127f565b15610d1c576000828152600a602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000806000611be78585612092565b91509150611bf4816120d7565b509392505050565b6000908152600260205260409020546001600160a01b031690565b6001600160a01b038216611c6d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610982565b611c7681611ee3565b15611c935760405162461bcd60e51b815260040161098290613214565b611ca1600083836001611f00565b611caa81611ee3565b15611cc75760405162461bcd60e51b815260040161098290613214565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291906000805160206133f3833981519152908290a45050565b816001600160a01b0316836001600160a01b031603611d7d5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610982565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611df5848484611982565b611e018484848461221c565b6114725760405162461bcd60e51b81526004016109829061324a565b6060600c805461086490612eb2565b60606000611e398361231d565b60010190506000816001600160401b03811115611e5857611e58612a51565b6040519080825280601f01601f191660200182016040528015611e82576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611e8c57509392505050565b60006001600160e01b0319821663780e9d6360e01b148061084f575061084f826123f3565b600080611eef83611bfc565b6001600160a01b0316141592915050565b611f0c84848484612443565b6001811115611f7b5760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610982565b816001600160a01b038516611fd757611fd281600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611ffa565b836001600160a01b0316856001600160a01b031614611ffa57611ffa85826124cb565b6001600160a01b0384166120165761201181612568565b6117e4565b846001600160a01b0316846001600160a01b0316146117e4576117e48482612617565b612043828261127f565b610d1c576120508161265b565b61205b83602061266d565b60405160200161206c92919061329c565b60408051601f198184030181529082905262461bcd60e51b825261098291600401612945565b60008082516041036120c85760208301516040840151606085015160001a6120bc87828585612808565b945094505050506120d0565b506000905060025b9250929050565b60008160048111156120eb576120eb61330b565b036120f35750565b60018160048111156121075761210761330b565b0361214f5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610982565b60028160048111156121635761216361330b565b036121b05760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610982565b60038160048111156121c4576121c461330b565b03610de25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610982565b60006001600160a01b0384163b1561231257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612260903390899088908890600401613321565b6020604051808303816000875af192505050801561229b575060408051601f3d908101601f191682019092526122989181019061335e565b60015b6122f8573d8080156122c9576040519150601f19603f3d011682016040523d82523d6000602084013e6122ce565b606091505b5080516000036122f05760405162461bcd60e51b81526004016109829061324a565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061197a565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061235c5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6904ee2d6d415b85acef8160201b8310612386576904ee2d6d415b85acef8160201b830492506020015b662386f26fc1000083106123a457662386f26fc10000830492506010015b6305f5e10083106123bc576305f5e100830492506008015b61271083106123d057612710830492506004015b606483106123e2576064830492506002015b600a831061084f5760010192915050565b60006001600160e01b031982166380ac58cd60e01b148061242457506001600160e01b03198216635b5e139f60e01b145b8061084f57506301ffc9a760e01b6001600160e01b031983161461084f565b6001811115611472576001600160a01b03841615612489576001600160a01b0384166000908152600360205260408120805483929061248390849061337b565b90915550505b6001600160a01b03831615611472576001600160a01b038316600090815260036020526040812080548392906124c09084906130ed565b909155505050505050565b600060016124d8846111f9565b6124e2919061337b565b600083815260076020526040902054909150808214612535576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061257a9060019061337b565b600083815260096020526040812054600880549394509092849081106125a2576125a2612f17565b9060005260206000200154905080600883815481106125c3576125c3612f17565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806125fb576125fb61338e565b6001900381819060005260206000200160009055905550505050565b6000612622836111f9565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b606061084f6001600160a01b03831660145b6060600061267c8360026133a4565b6126879060026130ed565b6001600160401b0381111561269e5761269e612a51565b6040519080825280601f01601f1916602001820160405280156126c8576020820181803683370190505b509050600360fc1b816000815181106126e3576126e3612f17565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061271257612712612f17565b60200101906001600160f81b031916908160001a90535060006127368460026133a4565b6127419060016130ed565b90505b60018111156127b9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061277557612775612f17565b1a60f81b82828151811061278b5761278b612f17565b60200101906001600160f81b031916908160001a90535060049490941c936127b2816133bb565b9050612744565b508315610ea55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610982565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561283557506000905060036128b9565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612889573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166128b2576000600192509250506128b9565b9150600090505b94509492505050565b6001600160e01b031981168114610de257600080fd5b6000602082840312156128ea57600080fd5b8135610ea5816128c2565b60005b838110156129105781810151838201526020016128f8565b50506000910152565b600081518084526129318160208601602086016128f5565b601f01601f19169290920160200192915050565b602081526000610ea56020830184612919565b60006020828403121561296a57600080fd5b5035919050565b80356001600160a01b038116811461298857600080fd5b919050565b600080604083850312156129a057600080fd5b6129a983612971565b946020939093013593505050565b6000806000806000608086880312156129cf57600080fd5b6129d886612971565b94506129e660208701612971565b93506040860135925060608601356001600160401b0380821115612a0957600080fd5b818801915088601f830112612a1d57600080fd5b813581811115612a2c57600080fd5b896020828501011115612a3e57600080fd5b9699959850939650602001949392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612a8f57612a8f612a51565b604052919050565b60006020808385031215612aaa57600080fd5b82356001600160401b0380821115612ac157600080fd5b818501915085601f830112612ad557600080fd5b813581811115612ae757612ae7612a51565b8060051b9150612af8848301612a67565b8181529183018401918481019088841115612b1257600080fd5b938501935b83851015612b3757612b2885612971565b82529385019390850190612b17565b98975050505050505050565b600080600060608486031215612b5857600080fd5b612b6184612971565b9250612b6f60208501612971565b9150604084013590509250925092565b60008060408385031215612b9257600080fd5b82359150612ba260208401612971565b90509250929050565b60006001600160401b03831115612bc457612bc4612a51565b612bd7601f8401601f1916602001612a67565b9050828152838383011115612beb57600080fd5b828260208301376000602084830101529392505050565b600082601f830112612c1357600080fd5b610ea583833560208501612bab565b600080600060608486031215612c3757600080fd5b83356001600160401b03811115612c4d57600080fd5b612c5986828701612c02565b935050612b6f60208501612971565b600060208284031215612c7a57600080fd5b610ea582612971565b600060208284031215612c9557600080fd5b81356001600160401b03811115612cab57600080fd5b8201601f81018413612cbc57600080fd5b61197a84823560208401612bab565b60008083601f840112612cdd57600080fd5b5081356001600160401b03811115612cf457600080fd5b6020830191508360208260051b85010111156120d057600080fd5b600080600060408486031215612d2457600080fd5b612d2d84612971565b925060208401356001600160401b03811115612d4857600080fd5b612d5486828701612ccb565b9497909650939450505050565b8035801515811461298857600080fd5b60008060408385031215612d8457600080fd5b612d8d83612971565b9150612ba260208401612d61565b60008060008060808587031215612db157600080fd5b612dba85612971565b9350612dc860208601612971565b92506040850135915060608501356001600160401b03811115612dea57600080fd5b612df687828801612c02565b91505092959194509250565b60008060008060408587031215612e1857600080fd5b84356001600160401b0380821115612e2f57600080fd5b612e3b88838901612ccb565b90965094506020870135915080821115612e5457600080fd5b50612e6187828801612ccb565b95989497509550505050565b60008060408385031215612e8057600080fd5b612e8983612971565b9150612ba260208401612971565b600060208284031215612ea957600080fd5b610ea582612d61565b600181811c90821680612ec657607f821691505b602082108103612ee657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601190820152704e6f74206f70657261746f7220726f6c6560781b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b601f821115610a23576000816000526020600020601f850160051c81016020861015612fa35750805b601f850160051c820191505b818110156111bd57828155600101612faf565b81516001600160401b03811115612fdb57612fdb612a51565b612fef81612fe98454612eb2565b84612f7a565b602080601f831160018114613024576000841561300c5750858301515b600019600386901b1c1916600185901b1785556111bd565b600085815260208120601f198616915b8281101561305357888601518255948401946001909101908401613034565b50858210156130715787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b039384168152919092166020820152604081019190915260600190565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561084f5761084f6130d7565b6020808252601f908201527f657863656564656420746f74616c206d6967726174696f6e20616d6f756e7400604082015260600190565b60006020828403121561314957600080fd5b813560ff81168114610ea557600080fd5b6000835161316c8184602088016128f5565b8351908301906131808183602088016128f5565b01949350505050565b6000808335601e198436030181126131a057600080fd5b8301803591506001600160401b038211156131ba57600080fd5b6020019150368190038213156120d057600080fd5b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6020808252601c908201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516132ce8160178501602088016128f5565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516132ff8160288401602088016128f5565b01602801949350505050565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061335490830184612919565b9695505050505050565b60006020828403121561337057600080fd5b8151610ea5816128c2565b8181038181111561084f5761084f6130d7565b634e487b7160e01b600052603160045260246000fd5b808202811582820484141761084f5761084f6130d7565b6000816133ca576133ca6130d7565b50600019019056fe97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885a164736f6c6343000818000a97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929000000000000000000000000ca7c484cbaa83900ab91b6aefa1de0478ba71eb700000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004000000000000000000000000fe16a56da7c0a8db11e18ff424997d002c4d432e000000000000000000000000b66b0e8daa7fc2e60cf1880e024bf90cb0e56fe20000000000000000000000005b37cafbe4bbd7a5cc55c34f229e890823580a0b0000000000000000000000008528a2a6a022f2c5ad456132c234e09dad602ed1

Deployed Bytecode

0x6080604052600436106102225760003560e01c806208525f1461022757806301ffc9a71461026457806306fdde0314610294578063081812fc146102b6578063095ea7b3146102d65780630c1d6826146102f8578063150b7a021461031c57806318160ddd1461036157806322ee82db1461037657806323b872dd14610396578063248a9ca3146103b65780632f2ff15d146103d65780632f745c59146103f657806336568abe146104165780633ccfd60b1461043657806342842e0e1461044b57806348960f0d1461046b5780634cf8a1301461049d5780634e99b800146104bd5780634f6ccce7146104d2578063512c91df146104f257806355e5a2501461051257806355f804b3146105325780635859156f146105525780636088e93a1461056857806361b3de5a146105885780636352211e146105a85780636975ddff146105c857806370a08231146105e85780637e79c25e146106085780639159be411461062957806391d14854146106495780639478941c1461066957806395d89b411461068957806398bdf6f51461069e5780639aa38640146106b45780639c328c4c146106d4578063a217fddf146106f4578063a22cb46514610709578063afb0a36914610729578063b88d4fde14610759578063c87b56dd14610779578063d547741f14610799578063e538c4e3146107b9578063e985e9c5146107cc578063f2daf60d146107ec578063f5b541a61461080c578063fccc28131461082e575b600080fd5b34801561023357600080fd5b50600f54610247906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561027057600080fd5b5061028461027f3660046128d8565b610844565b604051901515815260200161025b565b3480156102a057600080fd5b506102a9610855565b60405161025b9190612945565b3480156102c257600080fd5b506102476102d1366004612958565b6108e7565b3480156102e257600080fd5b506102f66102f136600461298d565b61090e565b005b34801561030457600080fd5b5061030e600b5481565b60405190815260200161025b565b34801561032857600080fd5b506103486103373660046129b7565b630a85bd0160e11b95945050505050565b6040516001600160e01b0319909116815260200161025b565b34801561036d57600080fd5b5060085461030e565b34801561038257600080fd5b506102f6610391366004612a97565b610a28565b3480156103a257600080fd5b506102f66103b1366004612b43565b610baa565b3480156103c257600080fd5b5061030e6103d1366004612958565b610bdb565b3480156103e257600080fd5b506102f66103f1366004612b7f565b610bf0565b34801561040257600080fd5b5061030e61041136600461298d565b610c0c565b34801561042257600080fd5b506102f6610431366004612b7f565b610ca2565b34801561044257600080fd5b506102f6610d20565b34801561045757600080fd5b506102f6610466366004612b43565b610de5565b34801561047757600080fd5b5061048b610486366004612c22565b610e00565b60405160ff909116815260200161025b565b3480156104a957600080fd5b506102f66104b8366004612c68565b610eac565b3480156104c957600080fd5b506102a9610ec4565b3480156104de57600080fd5b5061030e6104ed366004612958565b610f52565b3480156104fe57600080fd5b5061030e61050d36600461298d565b610fe5565b34801561051e57600080fd5b506102f661052d366004612c68565b611095565b34801561053e57600080fd5b506102f661054d366004612c83565b6110eb565b34801561055e57600080fd5b5061030e610bb581565b34801561057457600080fd5b506102f661058336600461298d565b61112b565b34801561059457600080fd5b50601254610247906001600160a01b031681565b3480156105b457600080fd5b506102476105c3366004612958565b6111c5565b3480156105d457600080fd5b50601054610247906001600160a01b031681565b3480156105f457600080fd5b5061030e610603366004612c68565b6111f9565b34801561061457600080fd5b5060115461028490600160a01b900460ff1681565b34801561063557600080fd5b50601154610247906001600160a01b031681565b34801561065557600080fd5b50610284610664366004612b7f565b61127f565b34801561067557600080fd5b506102f6610684366004612c68565b6112aa565b34801561069557600080fd5b506102a96112c2565b3480156106aa57600080fd5b5061030e600d5481565b3480156106c057600080fd5b50600e54610247906001600160a01b031681565b3480156106e057600080fd5b506102f66106ef366004612d0f565b6112d1565b34801561070057600080fd5b5061030e600081565b34801561071557600080fd5b506102f6610724366004612d71565b611478565b34801561073557600080fd5b5061048b610744366004612958565b60136020526000908152604090205460ff1681565b34801561076557600080fd5b506102f6610774366004612d9b565b611483565b34801561078557600080fd5b506102a9610794366004612958565b6114b5565b3480156107a557600080fd5b506102f66107b4366004612b7f565b61151b565b6102f66107c7366004612e02565b611537565b3480156107d857600080fd5b506102846107e7366004612e6d565b6117eb565b3480156107f857600080fd5b506102f6610807366004612e97565b611819565b34801561081857600080fd5b5061030e6000805160206133d383398151915281565b34801561083a57600080fd5b5061024761dead81565b600061084f8261186b565b92915050565b60606000805461086490612eb2565b80601f016020809104026020016040519081016040528092919081815260200182805461089090612eb2565b80156108dd5780601f106108b2576101008083540402835291602001916108dd565b820191906000526020600020905b8154815290600101906020018083116108c057829003601f168201915b5050505050905090565b60006108f282611890565b506000908152600460205260409020546001600160a01b031690565b6000610919826111c5565b9050806001600160a01b0316836001600160a01b03160361098b5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b03821614806109a757506109a781336117eb565b610a195760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610982565b610a2383836118b5565b505050565b610a406000805160206133d38339815191523361127f565b610a5c5760405162461bcd60e51b815260040161098290612eec565b8051600414610aa35760405162461bcd60e51b815260206004820152601360248201527239b4b3b732b9103632b733ba341032b93937b960691b6044820152606401610982565b80600081518110610ab657610ab6612f17565b6020026020010151600e60006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080600181518110610af757610af7612f17565b6020026020010151600f60006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080600281518110610b3857610b38612f17565b6020026020010151601060006101000a8154816001600160a01b0302191690836001600160a01b0316021790555080600381518110610b7957610b79612f17565b6020026020010151601160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555050565b610bb43382611923565b610bd05760405162461bcd60e51b815260040161098290612f2d565b610a23838383611982565b6000908152600a602052604090206001015490565b610bf982610bdb565b610c0281611ae1565b610a238383611aeb565b6000610c17836111f9565b8210610c795760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610982565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6001600160a01b0381163314610d125760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610982565b610d1c8282611b71565b5050565b610d386000805160206133d38339815191523361127f565b610d545760405162461bcd60e51b815260040161098290612eec565b604051600090339047908381818185875af1925050503d8060008114610d96576040519150601f19603f3d011682016040523d82523d6000602084013e610d9b565b606091505b5050905080610de25760405162461bcd60e51b815260206004820152601360248201527215da5d1a191c985dc8195d1a0819985a5b1959606a1b6044820152606401610982565b50565b610a2383838360405180602001604052806000815250611483565b600080610e0d8484610fe5565b90506000610e1b8287611bd8565b600e549091506001600160a01b03808316911603610e3e57600192505050610ea5565b600f546001600160a01b03808316911603610e5e57600292505050610ea5565b6010546001600160a01b03808316911603610e7e57600392505050610ea5565b6011546001600160a01b03808316911603610e9e57600492505050610ea5565b6000925050505b9392505050565b610de26000805160206133d383398151915282610bf0565b600c8054610ed190612eb2565b80601f0160208091040260200160405190810160405280929190818152602001828054610efd90612eb2565b8015610f4a5780601f10610f1f57610100808354040283529160200191610f4a565b820191906000526020600020905b815481529060010190602001808311610f2d57829003601f168201915b505050505081565b6000610f5d60085490565b8210610fc05760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610982565b60088281548110610fd357610fd3612f17565b90600052602060002001549050919050565b6040516001600160601b031930606090811b8216602084015284901b166034820152604881018290524660688201526000908190608801604051602081830303815290604052805190602001209050600061108c826040517b0ca2ba3432b932bab69029b4b3b732b21026b2b9b9b0b3b29d05199960211b6020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b95945050505050565b6110ad6000805160206133d38339815191523361127f565b6110c95760405162461bcd60e51b815260040161098290612eec565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6111036000805160206133d38339815191523361127f565b61111f5760405162461bcd60e51b815260040161098290612eec565b600c610d1c8282612fc2565b6111436000805160206133d38339815191523361127f565b61115f5760405162461bcd60e51b815260040161098290612eec565b604051632142170760e11b81526001600160a01b038316906342842e0e9061118f90309033908690600401613081565b600060405180830381600087803b1580156111a957600080fd5b505af11580156111bd573d6000803e3d6000fd5b505050505050565b6000806111d183611bfc565b90506001600160a01b03811661084f5760405162461bcd60e51b8152600401610982906130a5565b60006001600160a01b0382166112635760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610982565b506001600160a01b031660009081526003602052604090205490565b6000918252600a602090815260408084206001600160a01b0393909316845291905290205460ff1690565b610de26000805160206133d38339815191528261151b565b60606001805461086490612eb2565b6112e96000805160206133d38339815191523361127f565b6113055760405162461bcd60e51b815260040161098290612eec565b600081900361134e5760405162461bcd60e51b81526020600482015260156024820152743930b934ba34b2b9903632b733ba341032b93937b960591b6044820152606401610982565b600b5461135c9082906130ed565b600b819055610bb510156113825760405162461bcd60e51b815260040161098290613100565b60005b818110156114725760008383838181106113a1576113a1612f17565b90506020020160208101906113b69190613137565b905060018160ff16101580156113d0575060048160ff1611155b61140b5760405162461bcd60e51b815260206004820152600c60248201526b3930b934ba3c9032b93937b960a11b6044820152606401610982565b600d546114199060016130ed565b600d819055611429908690611c17565b600d8054600090815260136020526040808220805460ff191660ff8616179055915491516001600160a01b0388169160008051602061341383398151915291a350600101611385565b50505050565b610d1c338383611d20565b61148d3383611923565b6114a95760405162461bcd60e51b815260040161098290612f2d565b61147284848484611dea565b60606114c082611890565b60006114ca611e1d565b905060008151116114ea5760405180602001604052806000815250610ea5565b806114f484611e2c565b60405160200161150592919061315a565b6040516020818303038152906040529392505050565b61152482610bdb565b61152d81611ae1565b610a238383611b71565b601154600160a01b900460ff166115855760405162461bcd60e51b81526020600482015260126024820152716d696772617465206e6f7420656e61626c6560701b6044820152606401610982565b60008390036115c45760405162461bcd60e51b815260206004820152600b60248201526a3a37b5b2b71032b93937b960a91b6044820152606401610982565b82811461160d5760405162461bcd60e51b815260206004820152601760248201527639b4b3b730ba3ab932b9903632b733ba341032b93937b960491b6044820152606401610982565b60005b838110156117e457600085858381811061162c5761162c612f17565b905060200201359050600084848481811061164957611649612f17565b905060200281019061165b9190613189565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093945061169f925084915033905085610e00565b90508060ff166000036116e65760405162461bcd60e51b815260206004820152600f60248201526e39b4b3b730ba3ab9329032b93937b960891b6044820152606401610982565b610bb5600b54106117095760405162461bcd60e51b815260040161098290613100565b601254604051632142170760e11b81526001600160a01b03909116906342842e0e9061173f90339061dead908890600401613081565b600060405180830381600087803b15801561175957600080fd5b505af115801561176d573d6000803e3d6000fd5b50505050600d54600161178091906130ed565b600d55600b546117919060016130ed565b600b55600d546117a2903390611c17565b600d8054600090815260136020526040808220805460ff191660ff861617905591549151339160008051602061341383398151915291a3505050600101611610565b5050505050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6118316000805160206133d38339815191523361127f565b61184d5760405162461bcd60e51b815260040161098290612eec565b60118054911515600160a01b0260ff60a01b19909216919091179055565b60006001600160e01b03198216637965db0b60e01b148061084f575061084f82611ebe565b61189981611ee3565b610de25760405162461bcd60e51b8152600401610982906130a5565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906118ea826111c5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061192f836111c5565b9050806001600160a01b0316846001600160a01b03161480611956575061195681856117eb565b8061197a5750836001600160a01b031661196f846108e7565b6001600160a01b0316145b949350505050565b826001600160a01b0316611995826111c5565b6001600160a01b0316146119bb5760405162461bcd60e51b8152600401610982906131cf565b6001600160a01b038216611a1d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610982565b611a2a8383836001611f00565b826001600160a01b0316611a3d826111c5565b6001600160a01b031614611a635760405162461bcd60e51b8152600401610982906131cf565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184936000805160206133f383398151915291a4505050565b610de28133612039565b611af5828261127f565b610d1c576000828152600a602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611b2d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611b7b828261127f565b15610d1c576000828152600a602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6000806000611be78585612092565b91509150611bf4816120d7565b509392505050565b6000908152600260205260409020546001600160a01b031690565b6001600160a01b038216611c6d5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610982565b611c7681611ee3565b15611c935760405162461bcd60e51b815260040161098290613214565b611ca1600083836001611f00565b611caa81611ee3565b15611cc75760405162461bcd60e51b815260040161098290613214565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291906000805160206133f3833981519152908290a45050565b816001600160a01b0316836001600160a01b031603611d7d5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610982565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611df5848484611982565b611e018484848461221c565b6114725760405162461bcd60e51b81526004016109829061324a565b6060600c805461086490612eb2565b60606000611e398361231d565b60010190506000816001600160401b03811115611e5857611e58612a51565b6040519080825280601f01601f191660200182016040528015611e82576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084611e8c57509392505050565b60006001600160e01b0319821663780e9d6360e01b148061084f575061084f826123f3565b600080611eef83611bfc565b6001600160a01b0316141592915050565b611f0c84848484612443565b6001811115611f7b5760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610982565b816001600160a01b038516611fd757611fd281600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611ffa565b836001600160a01b0316856001600160a01b031614611ffa57611ffa85826124cb565b6001600160a01b0384166120165761201181612568565b6117e4565b846001600160a01b0316846001600160a01b0316146117e4576117e48482612617565b612043828261127f565b610d1c576120508161265b565b61205b83602061266d565b60405160200161206c92919061329c565b60408051601f198184030181529082905262461bcd60e51b825261098291600401612945565b60008082516041036120c85760208301516040840151606085015160001a6120bc87828585612808565b945094505050506120d0565b506000905060025b9250929050565b60008160048111156120eb576120eb61330b565b036120f35750565b60018160048111156121075761210761330b565b0361214f5760405162461bcd60e51b815260206004820152601860248201527745434453413a20696e76616c6964207369676e617475726560401b6044820152606401610982565b60028160048111156121635761216361330b565b036121b05760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610982565b60038160048111156121c4576121c461330b565b03610de25760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610982565b60006001600160a01b0384163b1561231257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612260903390899088908890600401613321565b6020604051808303816000875af192505050801561229b575060408051601f3d908101601f191682019092526122989181019061335e565b60015b6122f8573d8080156122c9576040519150601f19603f3d011682016040523d82523d6000602084013e6122ce565b606091505b5080516000036122f05760405162461bcd60e51b81526004016109829061324a565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061197a565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061235c5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6904ee2d6d415b85acef8160201b8310612386576904ee2d6d415b85acef8160201b830492506020015b662386f26fc1000083106123a457662386f26fc10000830492506010015b6305f5e10083106123bc576305f5e100830492506008015b61271083106123d057612710830492506004015b606483106123e2576064830492506002015b600a831061084f5760010192915050565b60006001600160e01b031982166380ac58cd60e01b148061242457506001600160e01b03198216635b5e139f60e01b145b8061084f57506301ffc9a760e01b6001600160e01b031983161461084f565b6001811115611472576001600160a01b03841615612489576001600160a01b0384166000908152600360205260408120805483929061248390849061337b565b90915550505b6001600160a01b03831615611472576001600160a01b038316600090815260036020526040812080548392906124c09084906130ed565b909155505050505050565b600060016124d8846111f9565b6124e2919061337b565b600083815260076020526040902054909150808214612535576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061257a9060019061337b565b600083815260096020526040812054600880549394509092849081106125a2576125a2612f17565b9060005260206000200154905080600883815481106125c3576125c3612f17565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806125fb576125fb61338e565b6001900381819060005260206000200160009055905550505050565b6000612622836111f9565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b606061084f6001600160a01b03831660145b6060600061267c8360026133a4565b6126879060026130ed565b6001600160401b0381111561269e5761269e612a51565b6040519080825280601f01601f1916602001820160405280156126c8576020820181803683370190505b509050600360fc1b816000815181106126e3576126e3612f17565b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061271257612712612f17565b60200101906001600160f81b031916908160001a90535060006127368460026133a4565b6127419060016130ed565b90505b60018111156127b9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061277557612775612f17565b1a60f81b82828151811061278b5761278b612f17565b60200101906001600160f81b031916908160001a90535060049490941c936127b2816133bb565b9050612744565b508315610ea55760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610982565b6000806fa2a8918ca85bafe22016d0b997e4df60600160ff1b0383111561283557506000905060036128b9565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612889573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166128b2576000600192509250506128b9565b9150600090505b94509492505050565b6001600160e01b031981168114610de257600080fd5b6000602082840312156128ea57600080fd5b8135610ea5816128c2565b60005b838110156129105781810151838201526020016128f8565b50506000910152565b600081518084526129318160208601602086016128f5565b601f01601f19169290920160200192915050565b602081526000610ea56020830184612919565b60006020828403121561296a57600080fd5b5035919050565b80356001600160a01b038116811461298857600080fd5b919050565b600080604083850312156129a057600080fd5b6129a983612971565b946020939093013593505050565b6000806000806000608086880312156129cf57600080fd5b6129d886612971565b94506129e660208701612971565b93506040860135925060608601356001600160401b0380821115612a0957600080fd5b818801915088601f830112612a1d57600080fd5b813581811115612a2c57600080fd5b896020828501011115612a3e57600080fd5b9699959850939650602001949392505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612a8f57612a8f612a51565b604052919050565b60006020808385031215612aaa57600080fd5b82356001600160401b0380821115612ac157600080fd5b818501915085601f830112612ad557600080fd5b813581811115612ae757612ae7612a51565b8060051b9150612af8848301612a67565b8181529183018401918481019088841115612b1257600080fd5b938501935b83851015612b3757612b2885612971565b82529385019390850190612b17565b98975050505050505050565b600080600060608486031215612b5857600080fd5b612b6184612971565b9250612b6f60208501612971565b9150604084013590509250925092565b60008060408385031215612b9257600080fd5b82359150612ba260208401612971565b90509250929050565b60006001600160401b03831115612bc457612bc4612a51565b612bd7601f8401601f1916602001612a67565b9050828152838383011115612beb57600080fd5b828260208301376000602084830101529392505050565b600082601f830112612c1357600080fd5b610ea583833560208501612bab565b600080600060608486031215612c3757600080fd5b83356001600160401b03811115612c4d57600080fd5b612c5986828701612c02565b935050612b6f60208501612971565b600060208284031215612c7a57600080fd5b610ea582612971565b600060208284031215612c9557600080fd5b81356001600160401b03811115612cab57600080fd5b8201601f81018413612cbc57600080fd5b61197a84823560208401612bab565b60008083601f840112612cdd57600080fd5b5081356001600160401b03811115612cf457600080fd5b6020830191508360208260051b85010111156120d057600080fd5b600080600060408486031215612d2457600080fd5b612d2d84612971565b925060208401356001600160401b03811115612d4857600080fd5b612d5486828701612ccb565b9497909650939450505050565b8035801515811461298857600080fd5b60008060408385031215612d8457600080fd5b612d8d83612971565b9150612ba260208401612d61565b60008060008060808587031215612db157600080fd5b612dba85612971565b9350612dc860208601612971565b92506040850135915060608501356001600160401b03811115612dea57600080fd5b612df687828801612c02565b91505092959194509250565b60008060008060408587031215612e1857600080fd5b84356001600160401b0380821115612e2f57600080fd5b612e3b88838901612ccb565b90965094506020870135915080821115612e5457600080fd5b50612e6187828801612ccb565b95989497509550505050565b60008060408385031215612e8057600080fd5b612e8983612971565b9150612ba260208401612971565b600060208284031215612ea957600080fd5b610ea582612d61565b600181811c90821680612ec657607f821691505b602082108103612ee657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601190820152704e6f74206f70657261746f7220726f6c6560781b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b601f821115610a23576000816000526020600020601f850160051c81016020861015612fa35750805b601f850160051c820191505b818110156111bd57828155600101612faf565b81516001600160401b03811115612fdb57612fdb612a51565b612fef81612fe98454612eb2565b84612f7a565b602080601f831160018114613024576000841561300c5750858301515b600019600386901b1c1916600185901b1785556111bd565b600085815260208120601f198616915b8281101561305357888601518255948401946001909101908401613034565b50858210156130715787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b039384168152919092166020820152604081019190915260600190565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561084f5761084f6130d7565b6020808252601f908201527f657863656564656420746f74616c206d6967726174696f6e20616d6f756e7400604082015260600190565b60006020828403121561314957600080fd5b813560ff81168114610ea557600080fd5b6000835161316c8184602088016128f5565b8351908301906131808183602088016128f5565b01949350505050565b6000808335601e198436030181126131a057600080fd5b8301803591506001600160401b038211156131ba57600080fd5b6020019150368190038213156120d057600080fd5b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b6020808252601c908201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b76020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8152600083516132ce8160178501602088016128f5565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516132ff8160288401602088016128f5565b01602801949350505050565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061335490830184612919565b9695505050505050565b60006020828403121561337057600080fd5b8151610ea5816128c2565b8181038181111561084f5761084f6130d7565b634e487b7160e01b600052603160045260246000fd5b808202811582820484141761084f5761084f6130d7565b6000816133ca576133ca6130d7565b50600019019056fe97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885a164736f6c6343000818000a

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

000000000000000000000000ca7c484cbaa83900ab91b6aefa1de0478ba71eb700000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000004000000000000000000000000fe16a56da7c0a8db11e18ff424997d002c4d432e000000000000000000000000b66b0e8daa7fc2e60cf1880e024bf90cb0e56fe20000000000000000000000005b37cafbe4bbd7a5cc55c34f229e890823580a0b0000000000000000000000008528a2a6a022f2c5ad456132c234e09dad602ed1

-----Decoded View---------------
Arg [0] : _nft (address): 0xCa7c484cBAa83900AB91b6aEfA1DE0478BA71EB7
Arg [1] : _signerList (address[]): 0xFE16A56DA7c0a8dB11E18ff424997d002C4d432e,0xb66B0e8dAA7fC2e60CF1880E024bf90CB0E56fE2,0x5B37cAFBe4bBD7A5cC55C34f229e890823580A0b,0x8528a2A6a022f2C5Ad456132C234E09DaD602ED1

-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000ca7c484cbaa83900ab91b6aefa1de0478ba71eb7
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [3] : 000000000000000000000000fe16a56da7c0a8db11e18ff424997d002c4d432e
Arg [4] : 000000000000000000000000b66b0e8daa7fc2e60cf1880e024bf90cb0e56fe2
Arg [5] : 0000000000000000000000005b37cafbe4bbd7a5cc55c34f229e890823580a0b
Arg [6] : 0000000000000000000000008528a2a6a022f2c5ad456132c234e09dad602ed1


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.