ETH Price: $3,030.99 (-7.69%)

Token

PlanetMan (PlanetMan)
 

Overview

Max Total Supply

1,018 PlanetMan

Holders

998

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 PlanetMan
0x6116aC86985A47D2F9e26ad35b47e1aB242f0c42
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
PlanetMan

Compiler Version
v0.8.13+commit.abaa5c0e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 21 : PlanetMan.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/Strings.sol";


import {DefaultOperatorFilterer} from "./opensea/DefaultOperatorFilterer.sol";

contract PlanetMan is ERC721, ERC721Holder, DefaultOperatorFilterer, AccessControl, Ownable, Pausable, ReentrancyGuard {
    using Counters for Counters.Counter;

    /**
     * @notice Admin role
     */
    bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE");

    /**
     * @notice Mint open status
     */
    bool public mintOpen = false;

    /**
     * @notice MerkleRoot of whitelist address
     */
    bytes32 public whitelistMerkleRoot;

    /**
     * @notice Whitelist is open or not
     */
    bool public whitelistOpen = false;

    /**
     * @notice MerkleRoot of each batch ipfs image's cids
     */
    mapping(uint256 => bytes32) public cidMerkleRoots;

    /**
     * @notice Counter of tokenId
    */
    Counters.Counter private _tokenIdCounter;

    /**
     * @notice maximum limit, 0 means unlimited
     */
    uint256 public mintMaximumLimit = 1000;

    /**
     * @notice Token baseURI
     */
    string public baseURI = "https://api.planetman.io/token/planetman/";

    /**
     * @notice SetTokenURI is available or not
     */
    bool public ableSetTokenURI = true;

    /**
     * @dev Record of already-minted wallet
     */
    mapping(address => bool) public walletMint;

    /**
     * @dev Record of already-used CIDs
     */
    mapping(string => bool) public usedCIDs;

    /**
     * @dev CIDs bind to token
     */
    mapping(uint256 => string[]) public tokenCIDs;

    /**
     * @dev Current cid index of tokenCIDs
     */
    mapping(uint256 => uint256) public tokenCIDIndex;

    /**
     * @dev Wallet bind to PlanetMan
     */
    mapping(address => uint256) public walletToToken;

    /**
     * @dev PlanetMan bind to wallet
     */
    mapping(uint256 => address) public tokenToWallet;

    /**
     * @dev SocialCredits of tokenId
     */
    mapping(uint256 => uint256) public socialCredits;

    /**
     * @dev Total socialCredits newly added
     */
    uint256 public newTotalSocialCredits;

    /**
     * @dev Total socialCredits of all tokens
     */
    uint256 public allTotalSocialCredits;

    /**
     * @notice MerkleRoot of socialCredits
     */
    bytes32 public socialCreditsMerkleRoot;

    // Events

    event MintPlanetMan(
        address indexed holder,
        uint256 tokenId,
        uint256 timestamp
    );

    event SetBaseURI(
        string baseURI
    );

    event SetTokenURI(
        uint256 tokenId,
        string cid,
        string interest
    );

    event BindWallet(
        uint256 tokenId,
        address wallet
    );

    event UnbindWallet(
        uint256 tokenId,
        address wallet
    );

    event SubmitSocialCredit(
        uint256 tokenId,
        uint256 socialCredit
    );

    event SetCidMerkleRoots(
        uint256 batch,
        bytes32 merkleRoot
    );

    event SetWhitelistMerkleRoot(
        bytes32 merkleRoot
    );

    event SetTotalSocialCredits(
        uint256 newTotalSocialCredits,
        uint256 allTotalSocialCredits,
        uint256 timestamp
    );

    modifier onlyOwnerOrAdmin() {
        require(owner() == _msgSender() || hasRole(ADMIN_ROLE, _msgSender()), "PlanetMan: caller is not owner or administrator");
        _;
    }

    constructor(
        string memory name,
        string memory symbol,
        address[] memory admins
    ) payable ERC721(name, symbol) {

        _setRoleAdmin(ADMIN_ROLE, DEFAULT_ADMIN_ROLE);
        _setupRole(DEFAULT_ADMIN_ROLE, _msgSender());

        for (uint256 i = 0; i < admins.length; i++) {
            _grantRole(ADMIN_ROLE, admins[i]);
        }
    }


    /**
     * @notice Mint PlanetMan token
     * @param cid ipfs cid of the token image
     * @param batch batch number of each batch image's merkleRoot
     * @param whitelistProof whitelist leaf of the merkleProof
     * @param cidProof cid leaf of the merkleProof
     * @param interest interest bind to token
     */
    function mintPlanetMan(string memory cid, uint256 batch, bytes32[] calldata whitelistProof, bytes32[] calldata cidProof, string memory interest) public nonReentrant whenNotPaused {
        require(mintOpen, "PlanetMan: mint is not open");
        require(bytes(cid).length != 0, "PlanetMan: CID is empty");
        require(!usedCIDs[cid], "PlanetMan: image unavailable");
        require(!walletMint[_msgSender()], "PlanetMan: limited one token per wallet");

        bytes32 cidHash = keccak256(abi.encodePacked(cid));

        require(merkleTreeVerify(cidMerkleRoots[batch], cidHash, cidProof), "PlanetMan: invalid PlanetMan image");
        if (mintMaximumLimit != 0) {
            require(totalSupply() < mintMaximumLimit, "PlanetMan: current minting process is over");
        }
        if (whitelistOpen) {
            require(merkleTreeVerify(whitelistMerkleRoot, _toBytes32(msg.sender), whitelistProof), "PlanetMan: you are not in the whitelist");
        }

        _tokenIdCounter.increment();
        uint256 tokenId = _tokenIdCounter.current();
        _safeMint(_msgSender(), tokenId);

        _setTokenURI(tokenId, cid, interest);

        // bind the token to the minter's wallet if not bind
        if (walletToToken[_msgSender()] == 0) {
            _bindWallet(tokenId, _msgSender());
        }

        // Initial social credits of 100
        socialCredits[tokenId] = 100;

        walletMint[_msgSender()] = true;

        emit MintPlanetMan(_msgSender(), tokenId, block.timestamp);
    }

    /**
     * @notice Convert address to bytes32
     * @param addr eth address
     */
    function _toBytes32(address addr) pure internal returns (bytes32) {
        return bytes32(uint256(uint160(addr)));
    }


    function totalSupply() public view returns (uint256) {
        return _tokenIdCounter.current();
    }


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

        emit SetBaseURI(baseURI_);
    }


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


    /**
     * @dev set tokenURI with interest
     * @param tokenId id of the token
     * @param cid ipfs cid of the PlanetMan image
     * @param batch batch number of each batch image's merkleRoot
     * @param cidProof cid leaf of the merkleProof
     * @param interest interest bind to token
     */
    function setTokenURI(uint256 tokenId, string memory cid, uint256 batch, bytes32[] calldata cidProof, string memory interest) public {
        require(ableSetTokenURI, "PlanetMan: PlanetMan customization is closed");
        require(ownerOf(tokenId) == _msgSender(), "PlanetMan: only owner");

        bytes32 cidHash = keccak256(abi.encodePacked(cid));

        require(merkleTreeVerify(cidMerkleRoots[batch], cidHash, cidProof), "PlanetMan: invalid PlanetMan image");

        _setTokenURI(tokenId, cid, interest);
    }


    function _setTokenURI(uint256 tokenId, string memory cid, string memory interest) internal {
        // if cid is used, check whether it is bind to the token or not
        if (usedCIDs[cid]) {
            string[] memory _tokenCIDs = tokenCIDs[tokenId];
            bool approved = false;
            uint256 length = _tokenCIDs.length;
            uint256 index;
            for (index = 0; index < length; index++) {
                if (keccak256(abi.encodePacked(cid)) == keccak256(abi.encodePacked(_tokenCIDs[index]))) {
                    approved = true;
                    break;
                }
            }
            require(approved, "PlanetMan: cid has been used");
            tokenCIDIndex[tokenId] = index;
        } else {
            usedCIDs[cid] = true;
            tokenCIDs[tokenId].push(cid);
            tokenCIDIndex[tokenId] = tokenCIDs[tokenId].length - 1;
        }

        emit SetTokenURI(tokenId, cid, interest);
    }

    /**
     * @notice merkle tree verify
     */
    function merkleTreeVerify(bytes32 root, bytes32 leaf, bytes32[] memory proof) public pure returns (bool){
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = keccak256(abi.encodePacked(computedHash, proofElement));
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = keccak256(abi.encodePacked(proofElement, computedHash));
            }
        }
        // Check if the computed hash (root) is equal to the provided root
        return computedHash == root;
    }

    /**
     * @dev submit social credits
     */
    function submitSocialCredit(uint256 tokenId, uint256 socialCredit, bytes32[] calldata socialCreditProof) external onlyOwnerOrAdmin {
        require(socialCredit > 0, "PlanetMan: invalid socialCredit(zero)");
        require(_exists(tokenId), "PlanetMan: nonexistent token");

        string memory tokenSocialCredit = string.concat(Strings.toString(tokenId), "#", Strings.toString(socialCredit));
        bytes32 socialCreditHash = keccak256(abi.encodePacked(tokenSocialCredit));

        require(merkleTreeVerify(socialCreditsMerkleRoot, socialCreditHash, socialCreditProof), "PlanetMan: invalid socialCredit");

        socialCredits[tokenId] = socialCredit;

        emit SubmitSocialCredit(tokenId, socialCredit);
    }


    /**
     * @dev Bind wallet to token, limited one binded token per wallet
     */
    function bindWallet(uint256 tokenId) public {
        require(_exists(tokenId), "PlanetMan: nonexistent token");
        require(ownerOf(tokenId) == _msgSender(), "PlanetMan: only owner");

        // unbind wallet from the current token
        _unbindWallet(_msgSender());

        _bindWallet(tokenId, _msgSender());
    }

    function _bindWallet(uint256 tokenId, address to) internal {
        walletToToken[to] = tokenId;
        tokenToWallet[tokenId] = to;

        emit BindWallet(tokenId, to);
    }

    /**
     * @dev unbind wallet from the token
     */
    function _unbindWallet(address wallet) internal {
        uint256 beforeTokenId = walletToToken[wallet];
        if (beforeTokenId != 0) {
            delete walletToToken[wallet];
            delete tokenToWallet[beforeTokenId];

            emit UnbindWallet(beforeTokenId, wallet);
        }
    }


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


    /*
     * @dev After transfer, unbind wallet from the current token and bind the token to the receiver's wallet
     */
    function _afterTokenTransfer(address from, address to, uint256 firstTokenId, uint256 batchSize) internal override(ERC721) {
        // if transfer via mint, DO NOT unbind wallet from the token
        if (from != address(0)) {
            // unbind wallet from the current token
            _unbindWallet(from);
            // bind the token to the receiver's wallet if not bind
            if (walletToToken[to] == 0) {
                _bindWallet(firstTokenId, to);
            }
        }
        super._afterTokenTransfer(from, to, firstTokenId, batchSize);
    }

    /*
     * @dev royalty
     */
    function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
        super.setApprovalForAll(operator, approved);
    }

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

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

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

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


    function setWhitelistMerkleRoot(bytes32 _whitelistMerkleRoot) external onlyOwnerOrAdmin {
        whitelistMerkleRoot = _whitelistMerkleRoot;

        emit SetWhitelistMerkleRoot(_whitelistMerkleRoot);
    }


    function setWhitelistOpen(bool _whitelistOpen) external onlyOwnerOrAdmin {
        whitelistOpen = _whitelistOpen;
    }

    function setCidMerkleRoots(uint256 batch, bytes32 _cidMerkleRoots) external onlyOwnerOrAdmin {
        cidMerkleRoots[batch] = _cidMerkleRoots;

        emit SetCidMerkleRoots(batch, _cidMerkleRoots);
    }

    function setSocialCreditsMerkleRoot(bytes32 _socialCreditsMerkleRoot) external onlyOwnerOrAdmin {
        socialCreditsMerkleRoot = _socialCreditsMerkleRoot;
    }

    function setMintMaximumLimit(uint256 _mintMaximumLimit) external onlyOwnerOrAdmin {
        mintMaximumLimit = _mintMaximumLimit;
    }

    function setAbleSetTokenURI(bool _ableSetTokenURI) external onlyOwnerOrAdmin {
        ableSetTokenURI = _ableSetTokenURI;
    }

    function setTotalSocialCredits(uint256 _newTotalSocialCredits, uint256 _allTotalSocialCredits) external onlyOwnerOrAdmin {
        newTotalSocialCredits = _newTotalSocialCredits;
        allTotalSocialCredits = _allTotalSocialCredits;

        emit SetTotalSocialCredits(newTotalSocialCredits, allTotalSocialCredits, block.timestamp);
    }

    function setMintOpen(bool _mintOpen) public onlyOwner {
        mintOpen = _mintOpen;
    }


    function withdraw() payable public onlyOwner {
        (bool sent,) = payable(msg.sender).call{value : address(this).balance}("");
        require(sent, "PlanetMan: Failed to withdraw");
    }

    function pause() external onlyOwner {
        super._pause();
    }


    function unpause() external onlyOwner {
        super._unpause();
    }

}

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

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

File 5 of 21 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 6 of 21 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 7 of 21 : 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 8 of 21 : 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 9 of 21 : 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 10 of 21 : 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 11 of 21 : ERC721Holder.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/utils/ERC721Holder.sol)

pragma solidity ^0.8.0;

import "../IERC721Receiver.sol";

/**
 * @dev Implementation of the {IERC721Receiver} interface.
 *
 * Accepts all token transfers.
 * Make sure the contract is able to use its token with {IERC721-safeTransferFrom}, {IERC721-approve} or {IERC721-setApprovalForAll}.
 */
contract ERC721Holder is IERC721Receiver {
    /**
     * @dev See {IERC721Receiver-onERC721Received}.
     *
     * Always returns `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address,
        address,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC721Received.selector;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

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

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

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

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

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

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

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

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

/**
 * @title  OperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 */
abstract contract OperatorFilterer {
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);

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

    modifier onlyAllowedOperator(address from) virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            // Allow spending tokens from addresses with balance
            // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
            // from an EOA.
            if (from == msg.sender) {
                _;
                return;
            }
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), msg.sender)) {
                revert OperatorNotAllowed(msg.sender);
            }
        }
        _;
    }

    modifier onlyAllowedOperatorApproval(address operator) virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
        _;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"address[]","name":"admins","type":"address[]"}],"stateMutability":"payable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"wallet","type":"address"}],"name":"BindWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"holder","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"MintPlanetMan","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"SetBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"batch","type":"uint256"},{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"SetCidMerkleRoots","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"cid","type":"string"},{"indexed":false,"internalType":"string","name":"interest","type":"string"}],"name":"SetTokenURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newTotalSocialCredits","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"allTotalSocialCredits","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"SetTotalSocialCredits","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"name":"SetWhitelistMerkleRoot","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"socialCredit","type":"uint256"}],"name":"SubmitSocialCredit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"wallet","type":"address"}],"name":"UnbindWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ableSetTokenURI","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"allTotalSocialCredits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","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":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"bindWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"cidMerkleRoots","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"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":"bytes32","name":"root","type":"bytes32"},{"internalType":"bytes32","name":"leaf","type":"bytes32"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"merkleTreeVerify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"mintMaximumLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"cid","type":"string"},{"internalType":"uint256","name":"batch","type":"uint256"},{"internalType":"bytes32[]","name":"whitelistProof","type":"bytes32[]"},{"internalType":"bytes32[]","name":"cidProof","type":"bytes32[]"},{"internalType":"string","name":"interest","type":"string"}],"name":"mintPlanetMan","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newTotalSocialCredits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"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":"bool","name":"_ableSetTokenURI","type":"bool"}],"name":"setAbleSetTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"batch","type":"uint256"},{"internalType":"bytes32","name":"_cidMerkleRoots","type":"bytes32"}],"name":"setCidMerkleRoots","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_mintMaximumLimit","type":"uint256"}],"name":"setMintMaximumLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_mintOpen","type":"bool"}],"name":"setMintOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_socialCreditsMerkleRoot","type":"bytes32"}],"name":"setSocialCreditsMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"cid","type":"string"},{"internalType":"uint256","name":"batch","type":"uint256"},{"internalType":"bytes32[]","name":"cidProof","type":"bytes32[]"},{"internalType":"string","name":"interest","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newTotalSocialCredits","type":"uint256"},{"internalType":"uint256","name":"_allTotalSocialCredits","type":"uint256"}],"name":"setTotalSocialCredits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_whitelistMerkleRoot","type":"bytes32"}],"name":"setWhitelistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_whitelistOpen","type":"bool"}],"name":"setWhitelistOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"socialCredits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"socialCreditsMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"socialCredit","type":"uint256"},{"internalType":"bytes32[]","name":"socialCreditProof","type":"bytes32[]"}],"name":"submitSocialCredit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenCIDIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenCIDs","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenToWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"usedCIDs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"walletMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"walletToToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]

6009805460ff19908116909155600b805490911690556103e8600e5560e060405260296080818152906200483860a03980516200004591600f9160209091019062000407565b506010805460ff19166001179055604051620048613881900390819083398101604081905262000075916200058b565b733cc6cdda760b79bafa08df41ecfa224f810dceb6600184848160009080519060200190620000a692919062000407565b508051620000bc90600190602084019062000407565b5050506daaeb6d7670e522a718067333cd4e3b15620002045780156200015257604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200013357600080fd5b505af115801562000148573d6000803e3d6000fd5b5050505062000204565b6001600160a01b03821615620001a35760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000118565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b158015620001ea57600080fd5b505af1158015620001ff573d6000803e3d6000fd5b505050505b5062000212905033620002b6565b6007805460ff60a01b1916905560016008556200024060008051602062004818833981519152600062000308565b6200024d60003362000353565b60005b8151811015620002ac576200029760008051602062004818833981519152838381518110620002835762000283620006a2565b60200260200101516200036360201b60201c565b80620002a381620006b8565b91505062000250565b505050506200071c565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600082815260066020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6200035f828262000363565b5050565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff166200035f5760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620003c33390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b8280546200041590620006e0565b90600052602060002090601f01602090048101928262000439576000855562000484565b82601f106200045457805160ff191683800117855562000484565b8280016001018555821562000484579182015b828111156200048457825182559160200191906001019062000467565b506200049292915062000496565b5090565b5b8082111562000492576000815560010162000497565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715620004ee57620004ee620004ad565b604052919050565b600082601f8301126200050857600080fd5b81516001600160401b03811115620005245762000524620004ad565b60206200053a601f8301601f19168201620004c3565b82815285828487010111156200054f57600080fd5b60005b838110156200056f57858101830151828201840152820162000552565b83811115620005815760008385840101525b5095945050505050565b600080600060608486031215620005a157600080fd5b83516001600160401b0380821115620005b957600080fd5b620005c787838801620004f6565b9450602091508186015181811115620005df57600080fd5b620005ed88828901620004f6565b9450506040860151818111156200060357600080fd5b8601601f810188136200061557600080fd5b8051828111156200062a576200062a620004ad565b8060051b92506200063d848401620004c3565b818152928201840192848101908a8511156200065857600080fd5b928501925b848410156200069257835192506001600160a01b0383168314620006815760008081fd5b82825292850192908501906200065d565b8096505050505050509250925092565b634e487b7160e01b600052603260045260246000fd5b600060018201620006d957634e487b7160e01b600052601160045260246000fd5b5060010190565b600181811c90821680620006f557607f821691505b6020821081036200071657634e487b7160e01b600052602260045260246000fd5b50919050565b6140ec806200072c6000396000f3fe6080604052600436106103a25760003560e01c806369061d0e116101e7578063a99e66901161010d578063c87b56dd116100a0578063e985e9c51161006f578063e985e9c514610afc578063f2fde38b14610b45578063f8004d3114610b65578063fc2b0c2614610b8557600080fd5b8063c87b56dd14610a82578063cce316f014610aa2578063d547741f14610ac2578063dae00ead14610ae257600080fd5b8063b88d4fde116100dc578063b88d4fde14610a02578063ba11438d14610a22578063bd32fb6614610a42578063c72978ca14610a6257600080fd5b8063a99e669014610972578063aa98e0c614610992578063ae5f6a8d146109a8578063b67a66b9146109d557600080fd5b80638da5cb5b116101855780639df1dbf8116101545780639df1dbf8146108ec578063a217fddf14610927578063a22cb4651461093c578063a62c1b3c1461095c57600080fd5b80638da5cb5b1461087957806391d14854146108975780639313295a146108b757806395d89b41146108d757600080fd5b8063715018a6116101c1578063715018a61461081357806375b238fc146108285780637db3aecc1461084a5780638456cb591461086457600080fd5b806369061d0e146107a85780636c0360eb146107de57806370a08231146107f357600080fd5b8063248a9ca3116102cc5780633f4ba83a1161026a57806355f804b31161023957806355f804b31461072957806358163ad2146107495780635c975abb146107695780636352211e1461078857600080fd5b80633f4ba83a146106a557806341f43434146106ba57806342842e0e146106dc5780635078d30f146106fc57600080fd5b8063269d849c116102a6578063269d849c146106475780632f2ff15d1461065d57806336568abe1461067d5780633ccfd60b1461069d57600080fd5b8063248a9ca3146105dd57806324bbd0491461060d57806325d05dc61461062757600080fd5b8063150b7a02116103445780631d442cb7116103135780631d442cb7146105715780631e118ee6146105875780631ff280bb146105a757806323b872dd146105bd57600080fd5b8063150b7a02146104e357806318160ddd1461051c5780631997074f146105315780631a9392e11461055157600080fd5b806306fdde031161038057806306fdde0314610437578063081812fc14610459578063095ea7b3146104915780631056ae31146104b357600080fd5b806301ffc9a7146103a757806303a1b24e146103dc578063043c412514610417575b600080fd5b3480156103b357600080fd5b506103c76103c236600461365b565b610ba5565b60405190151581526020015b60405180910390f35b3480156103e857600080fd5b506104096103f7366004613694565b60156020526000908152604090205481565b6040519081526020016103d3565b34801561042357600080fd5b506103c76104323660046136f6565b610bb6565b34801561044357600080fd5b5061044c610c65565b6040516103d39190613809565b34801561046557600080fd5b5061047961047436600461381c565b610cf7565b6040516001600160a01b0390911681526020016103d3565b34801561049d57600080fd5b506104b16104ac366004613835565b610d1e565b005b3480156104bf57600080fd5b506103c76104ce366004613694565b60116020526000908152604090205460ff1681565b3480156104ef57600080fd5b506105036104fe3660046138b7565b610dec565b6040516001600160e01b031990911681526020016103d3565b34801561052857600080fd5b50610409610dfd565b34801561053d57600080fd5b506104b161054c36600461399f565b610e0d565b34801561055d57600080fd5b506104b161056c366004613a4d565b610f78565b34801561057d57600080fd5b50610409601a5481565b34801561059357600080fd5b506104b16105a2366004613a6a565b610fd3565b3480156105b357600080fd5b5061040960185481565b3480156105c957600080fd5b506104b16105d8366004613b2c565b6113d9565b3480156105e957600080fd5b506104096105f836600461381c565b60009081526006602052604090206001015490565b34801561061957600080fd5b506009546103c79060ff1681565b34801561063357600080fd5b506104b1610642366004613b68565b6114b2565b34801561065357600080fd5b50610409600e5481565b34801561066957600080fd5b506104b1610678366004613bbb565b6116fc565b34801561068957600080fd5b506104b1610698366004613bbb565b611721565b6104b161179f565b3480156106b157600080fd5b506104b1611842565b3480156106c657600080fd5b506104796daaeb6d7670e522a718067333cd4e81565b3480156106e857600080fd5b506104b16106f7366004613b2c565b611854565b34801561070857600080fd5b5061040961071736600461381c565b60176020526000908152604090205481565b34801561073557600080fd5b506104b1610744366004613be7565b611922565b34801561075557600080fd5b506104b1610764366004613c1c565b611978565b34801561077557600080fd5b50600754600160a01b900460ff166103c7565b34801561079457600080fd5b506104796107a336600461381c565b611a10565b3480156107b457600080fd5b506104796107c336600461381c565b6016602052600090815260409020546001600160a01b031681565b3480156107ea57600080fd5b5061044c611a70565b3480156107ff57600080fd5b5061040961080e366004613694565b611afe565b34801561081f57600080fd5b506104b1611b84565b34801561083457600080fd5b5061040960008051602061409783398151915281565b34801561085657600080fd5b50600b546103c79060ff1681565b34801561087057600080fd5b506104b1611b96565b34801561088557600080fd5b506007546001600160a01b0316610479565b3480156108a357600080fd5b506103c76108b2366004613bbb565b611ba6565b3480156108c357600080fd5b506104b16108d2366004613c1c565b611bd1565b3480156108e357600080fd5b5061044c611c63565b3480156108f857600080fd5b506103c7610907366004613be7565b805160208183018101805160128252928201919093012091525460ff1681565b34801561093357600080fd5b50610409600081565b34801561094857600080fd5b506104b1610957366004613c3e565b611c72565b34801561096857600080fd5b5061040960195481565b34801561097e57600080fd5b506104b161098d36600461381c565b611d36565b34801561099e57600080fd5b50610409600a5481565b3480156109b457600080fd5b506104096109c336600461381c565b600c6020526000908152604090205481565b3480156109e157600080fd5b506104096109f036600461381c565b60146020526000908152604090205481565b348015610a0e57600080fd5b506104b1610a1d3660046138b7565b611d83565b348015610a2e57600080fd5b506104b1610a3d36600461381c565b611e5f565b348015610a4e57600080fd5b506104b1610a5d36600461381c565b611eac565b348015610a6e57600080fd5b506104b1610a7d36600461381c565b611f29565b348015610a8e57600080fd5b5061044c610a9d36600461381c565b611ff8565b348015610aae57600080fd5b506104b1610abd366004613a4d565b61205f565b348015610ace57600080fd5b506104b1610add366004613bbb565b6120ba565b348015610aee57600080fd5b506010546103c79060ff1681565b348015610b0857600080fd5b506103c7610b17366004613c75565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610b5157600080fd5b506104b1610b60366004613694565b6120df565b348015610b7157600080fd5b506104b1610b80366004613a4d565b612155565b348015610b9157600080fd5b5061044c610ba0366004613c1c565b612170565b6000610bb0826121a8565b92915050565b600082815b8351811015610c5a576000848281518110610bd857610bd8613c9f565b60200260200101519050808311610c1a576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250610c47565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080610c5281613ccb565b915050610bbb565b509093149392505050565b606060008054610c7490613ce4565b80601f0160208091040260200160405190810160405280929190818152602001828054610ca090613ce4565b8015610ced5780601f10610cc257610100808354040283529160200191610ced565b820191906000526020600020905b815481529060010190602001808311610cd057829003601f168201915b5050505050905090565b6000610d02826121cd565b506000908152600460205260409020546001600160a01b031690565b816daaeb6d7670e522a718067333cd4e3b15610ddd57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610d8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db09190613d1e565b610ddd57604051633b79c77360e21b81526001600160a01b03821660048201526024015b60405180910390fd5b610de7838361222c565b505050565b630a85bd0160e11b5b949350505050565b6000610e08600d5490565b905090565b60105460ff16610e745760405162461bcd60e51b815260206004820152602c60248201527f506c616e65744d616e3a20506c616e65744d616e20637573746f6d697a61746960448201526b1bdb881a5cc818db1bdcd95960a21b6064820152608401610dd4565b33610e7e87611a10565b6001600160a01b031614610ecc5760405162461bcd60e51b8152602060048201526015602482015274283630b732ba26b0b71d1037b7363c9037bbb732b960591b6044820152606401610dd4565b600085604051602001610edf9190613d3b565b604051602081830303815290604052805190602001209050610f48600c60008781526020019081526020016000205482868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610bb692505050565b610f645760405162461bcd60e51b8152600401610dd490613d57565b610f6f87878461233c565b50505050505050565b6007546001600160a01b0316331480610fa45750610fa460008051602061409783398151915233611ba6565b610fc05760405162461bcd60e51b8152600401610dd490613d99565b6010805460ff1916911515919091179055565b610fdb61260d565b610fe3612666565b60095460ff166110355760405162461bcd60e51b815260206004820152601b60248201527f506c616e65744d616e3a206d696e74206973206e6f74206f70656e00000000006044820152606401610dd4565b86516000036110865760405162461bcd60e51b815260206004820152601760248201527f506c616e65744d616e3a2043494420697320656d7074790000000000000000006044820152606401610dd4565b6012876040516110969190613d3b565b9081526040519081900360200190205460ff16156110f65760405162461bcd60e51b815260206004820152601c60248201527f506c616e65744d616e3a20696d61676520756e617661696c61626c65000000006044820152606401610dd4565b3360009081526011602052604090205460ff16156111665760405162461bcd60e51b815260206004820152602760248201527f506c616e65744d616e3a206c696d69746564206f6e6520746f6b656e20706572604482015266081dd85b1b195d60ca1b6064820152608401610dd4565b6000876040516020016111799190613d3b565b6040516020818303038152906040528051906020012090506111e2600c60008981526020019081526020016000205482868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610bb692505050565b6111fe5760405162461bcd60e51b8152600401610dd490613d57565b600e541561127157600e54611211610dfd565b106112715760405162461bcd60e51b815260206004820152602a60248201527f506c616e65744d616e3a2063757272656e74206d696e74696e672070726f636560448201526939b99034b99037bb32b960b11b6064820152608401610dd4565b600b5460ff161561131957600a546112bd9033888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610bb692505050565b6113195760405162461bcd60e51b815260206004820152602760248201527f506c616e65744d616e3a20796f7520617265206e6f7420696e207468652077686044820152661a5d195b1a5cdd60ca1b6064820152608401610dd4565b611327600d80546001019055565b6000611332600d5490565b905061133e33826126b3565b611349818a8561233c565b3360009081526015602052604081205490036113695761136981336126cd565b600081815260176020908152604080832060649055338084526011835292819020805460ff19166001179055805184815242928101929092527faa1a427925f2dc9cbe222c6ecc56b980070fc55ab5f3401c99892e8ee3458c39910160405180910390a25050610f6f6001600855565b826daaeb6d7670e522a718067333cd4e3b156114a157336001600160a01b0382160361140f5761140a84848461273a565b6114ac565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561145e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114829190613d1e565b6114a157604051633b79c77360e21b8152336004820152602401610dd4565b6114ac84848461273a565b50505050565b6007546001600160a01b03163314806114de57506114de60008051602061409783398151915233611ba6565b6114fa5760405162461bcd60e51b8152600401610dd490613d99565b600083116115585760405162461bcd60e51b815260206004820152602560248201527f506c616e65744d616e3a20696e76616c696420736f6369616c437265646974286044820152647a65726f2960d81b6064820152608401610dd4565b6000848152600260205260409020546001600160a01b03166115bc5760405162461bcd60e51b815260206004820152601c60248201527f506c616e65744d616e3a206e6f6e6578697374656e7420746f6b656e000000006044820152606401610dd4565b60006115c78561276b565b6115d08561276b565b6040516020016115e1929190613de8565b60405160208183030381529060405290506000816040516020016116059190613d3b565b60405160208183030381529060405280519060200120905061165d601a5482868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610bb692505050565b6116a95760405162461bcd60e51b815260206004820152601f60248201527f506c616e65744d616e3a20696e76616c696420736f6369616c437265646974006044820152606401610dd4565b60008681526017602090815260409182902087905581518881529081018790527ffedfb74cd9b7ed7be56c98c800762c3853e1a71560b94a337fc9115c355a7bd0910160405180910390a1505050505050565b600082815260066020526040902060010154611717816127fe565b610de78383612808565b6001600160a01b03811633146117915760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610dd4565b61179b828261288e565b5050565b6117a76128f5565b604051600090339047908381818185875af1925050503d80600081146117e9576040519150601f19603f3d011682016040523d82523d6000602084013e6117ee565b606091505b505090508061183f5760405162461bcd60e51b815260206004820152601d60248201527f506c616e65744d616e3a204661696c656420746f2077697468647261770000006044820152606401610dd4565b50565b61184a6128f5565b61185261294f565b565b826daaeb6d7670e522a718067333cd4e3b1561191757336001600160a01b038216036118855761140a8484846129a4565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156118d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f89190613d1e565b61191757604051633b79c77360e21b8152336004820152602401610dd4565b6114ac8484846129a4565b61192a6128f5565b805161193d90600f9060208401906135ac565b507f23c8c9488efebfd474e85a7956de6f39b17c7ab88502d42a623db2d8e382bbaa8160405161196d9190613809565b60405180910390a150565b6007546001600160a01b03163314806119a457506119a460008051602061409783398151915233611ba6565b6119c05760405162461bcd60e51b8152600401610dd490613d99565b6000828152600c602090815260409182902083905581518481529081018390527f9c3740a943efaab1111e5c3524409b5f8b46ae0cfd553942f62c2e490bd213f891015b60405180910390a15050565b6000818152600260205260408120546001600160a01b031680610bb05760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610dd4565b600f8054611a7d90613ce4565b80601f0160208091040260200160405190810160405280929190818152602001828054611aa990613ce4565b8015611af65780601f10611acb57610100808354040283529160200191611af6565b820191906000526020600020905b815481529060010190602001808311611ad957829003601f168201915b505050505081565b60006001600160a01b038216611b685760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610dd4565b506001600160a01b031660009081526003602052604090205490565b611b8c6128f5565b61185260006129bf565b611b9e6128f5565b611852612a11565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6007546001600160a01b0316331480611bfd5750611bfd60008051602061409783398151915233611ba6565b611c195760405162461bcd60e51b8152600401610dd490613d99565b60188290556019819055604080518381526020810183905242918101919091527fb5ad150efae7389a80fc6db7c2e6925667f1c0a369a2f9a45df51d2c787fd42090606001611a04565b606060018054610c7490613ce4565b816daaeb6d7670e522a718067333cd4e3b15611d2c57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611ce0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d049190613d1e565b611d2c57604051633b79c77360e21b81526001600160a01b0382166004820152602401610dd4565b610de78383612a54565b6007546001600160a01b0316331480611d625750611d6260008051602061409783398151915233611ba6565b611d7e5760405162461bcd60e51b8152600401610dd490613d99565b600e55565b836daaeb6d7670e522a718067333cd4e3b15611e4c57336001600160a01b03821603611dba57611db585858585612a5f565b611e58565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611e09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2d9190613d1e565b611e4c57604051633b79c77360e21b8152336004820152602401610dd4565b611e5885858585612a5f565b5050505050565b6007546001600160a01b0316331480611e8b5750611e8b60008051602061409783398151915233611ba6565b611ea75760405162461bcd60e51b8152600401610dd490613d99565b601a55565b6007546001600160a01b0316331480611ed85750611ed860008051602061409783398151915233611ba6565b611ef45760405162461bcd60e51b8152600401610dd490613d99565b600a8190556040518181527f632b0f6532084e9afddeadf7a5c751a706e124066b1419275caa8c025ae44e619060200161196d565b6000818152600260205260409020546001600160a01b0316611f8d5760405162461bcd60e51b815260206004820152601c60248201527f506c616e65744d616e3a206e6f6e6578697374656e7420746f6b656e000000006044820152606401610dd4565b33611f9782611a10565b6001600160a01b031614611fe55760405162461bcd60e51b8152602060048201526015602482015274283630b732ba26b0b71d1037b7363c9037bbb732b960591b6044820152606401610dd4565b611fee33612a91565b61183f81336126cd565b6060612003826121cd565b600061200d612b1b565b9050600081511161202d5760405180602001604052806000815250612058565b806120378461276b565b604051602001612048929190613e24565b6040516020818303038152906040525b9392505050565b6007546001600160a01b031633148061208b575061208b60008051602061409783398151915233611ba6565b6120a75760405162461bcd60e51b8152600401610dd490613d99565b600b805460ff1916911515919091179055565b6000828152600660205260409020600101546120d5816127fe565b610de7838361288e565b6120e76128f5565b6001600160a01b03811661214c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610dd4565b61183f816129bf565b61215d6128f5565b6009805460ff1916911515919091179055565b6013602052816000526040600020818154811061218c57600080fd5b90600052602060002001600091509150508054611a7d90613ce4565b60006001600160e01b03198216637965db0b60e01b1480610bb05750610bb082612b2a565b6000818152600260205260409020546001600160a01b031661183f5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610dd4565b600061223782611a10565b9050806001600160a01b0316836001600160a01b0316036122a45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610dd4565b336001600160a01b03821614806122c057506122c08133610b17565b6123325760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610dd4565b610de78383612b7a565b60128260405161234c9190613d3b565b9081526040519081900360200190205460ff161561254057600083815260136020908152604080832080548251818502810185019093528083529192909190849084015b8282101561243c5783829060005260206000200180546123af90613ce4565b80601f01602080910402602001604051908101604052809291908181526020018280546123db90613ce4565b80156124285780601f106123fd57610100808354040283529160200191612428565b820191906000526020600020905b81548152906001019060200180831161240b57829003601f168201915b505050505081526020019060010190612390565b5050505090506000808251905060005b818110156124db5783818151811061246657612466613c9f565b602002602001015160405160200161247e9190613d3b565b60405160208183030381529060405280519060200120866040516020016124a59190613d3b565b60405160208183030381529060405280519060200120036124c957600192506124db565b806124d381613ccb565b91505061244c565b826125285760405162461bcd60e51b815260206004820152601c60248201527f506c616e65744d616e3a2063696420686173206265656e2075736564000000006044820152606401610dd4565b600087815260146020526040902055506125cd915050565b60016012836040516125529190613d3b565b9081526040805160209281900383019020805460ff19169315159390931790925560008581526013825291822080546001810182559083529181902084516125a19391909101918501906135ac565b506000838152601360205260409020546125bd90600190613e53565b6000848152601460205260409020555b7faa425fdd80303549e5f891d43e81f503f03bc88d66e218ac44f385682ce6fe0b83838360405161260093929190613e6a565b60405180910390a1505050565b60026008540361265f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610dd4565b6002600855565b600754600160a01b900460ff16156118525760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610dd4565b61179b828260405180602001604052806000815250612be8565b6001600160a01b0381166000818152601560209081526040808320869055858352601682529182902080546001600160a01b031916841790558151858152908101929092527f47a179ec4c8deebddd2c367b6a639fd51c8e2cc4abef3aa5632a8eb45d59f1929101611a04565b6127443382612c1b565b6127605760405162461bcd60e51b8152600401610dd490613e9f565b610de7838383612c99565b6060600061277883612e12565b600101905060008167ffffffffffffffff811115612798576127986136af565b6040519080825280601f01601f1916602001820160405280156127c2576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846127cc57509392505050565b61183f8133612eea565b6128128282611ba6565b61179b5760008281526006602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561284a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6128988282611ba6565b1561179b5760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6007546001600160a01b031633146118525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610dd4565b612957612f43565b6007805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610de783838360405180602001604052806000815250611d83565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612a19612666565b6007805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586129873390565b61179b338383612f93565b612a693383612c1b565b612a855760405162461bcd60e51b8152600401610dd490613e9f565b6114ac84848484613061565b6001600160a01b038116600090815260156020526040902054801561179b576001600160a01b0382166000818152601560209081526040808320839055848352601682529182902080546001600160a01b03191690558151848152908101929092527f97141d363b028ec4869c42bf20f4938502ab1a1a170be06c39d5477d4096d5f19101611a04565b6060600f8054610c7490613ce4565b60006001600160e01b031982166380ac58cd60e01b1480612b5b57506001600160e01b03198216635b5e139f60e01b145b80610bb057506301ffc9a760e01b6001600160e01b0319831614610bb0565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612baf82611a10565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b612bf28383613094565b612bff6000848484613237565b610de75760405162461bcd60e51b8152600401610dd490613eec565b600080612c2783611a10565b9050806001600160a01b0316846001600160a01b03161480612c6e57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80610df55750836001600160a01b0316612c8784610cf7565b6001600160a01b031614949350505050565b826001600160a01b0316612cac82611a10565b6001600160a01b031614612cd25760405162461bcd60e51b8152600401610dd490613f3e565b6001600160a01b038216612d345760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610dd4565b612d418383836001613335565b826001600160a01b0316612d5482611a10565b6001600160a01b031614612d7a5760405162461bcd60e51b8152600401610dd490613f3e565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610de783838360016133bd565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612e515772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612e7d576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612e9b57662386f26fc10000830492506010015b6305f5e1008310612eb3576305f5e100830492506008015b6127108310612ec757612710830492506004015b60648310612ed9576064830492506002015b600a8310610bb05760010192915050565b612ef48282611ba6565b61179b57612f01816133fe565b612f0c836020613410565b604051602001612f1d929190613f83565b60408051601f198184030181529082905262461bcd60e51b8252610dd491600401613809565b600754600160a01b900460ff166118525760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610dd4565b816001600160a01b0316836001600160a01b031603612ff45760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610dd4565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61306c848484612c99565b61307884848484613237565b6114ac5760405162461bcd60e51b8152600401610dd490613eec565b6001600160a01b0382166130ea5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610dd4565b6000818152600260205260409020546001600160a01b03161561314f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610dd4565b61315d600083836001613335565b6000818152600260205260409020546001600160a01b0316156131c25760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610dd4565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461179b6000838360016133bd565b60006001600160a01b0384163b1561332d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061327b903390899088908890600401613ff8565b6020604051808303816000875af19250505080156132b6575060408051601f3d908101601f191682019092526132b39181019061402b565b60015b613313573d8080156132e4576040519150601f19603f3d011682016040523d82523d6000602084013e6132e9565b606091505b50805160000361330b5760405162461bcd60e51b8152600401610dd490613eec565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610df5565b506001610df5565b60018111156114ac576001600160a01b0384161561337b576001600160a01b03841660009081526003602052604081208054839290613375908490613e53565b90915550505b6001600160a01b038316156114ac576001600160a01b038316600090815260036020526040812080548392906133b2908490614048565b909155505050505050565b6001600160a01b0384161561140a576133d584612a91565b6001600160a01b038316600090815260156020526040812054900361140a5761140a82846126cd565b6060610bb06001600160a01b03831660145b6060600061341f836002614060565b61342a906002614048565b67ffffffffffffffff811115613442576134426136af565b6040519080825280601f01601f19166020018201604052801561346c576020820181803683370190505b509050600360fc1b8160008151811061348757613487613c9f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106134b6576134b6613c9f565b60200101906001600160f81b031916908160001a90535060006134da846002614060565b6134e5906001614048565b90505b600181111561355d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061351957613519613c9f565b1a60f81b82828151811061352f5761352f613c9f565b60200101906001600160f81b031916908160001a90535060049490941c936135568161407f565b90506134e8565b5083156120585760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610dd4565b8280546135b890613ce4565b90600052602060002090601f0160209004810192826135da5760008555613620565b82601f106135f357805160ff1916838001178555613620565b82800160010185558215613620579182015b82811115613620578251825591602001919060010190613605565b5061362c929150613630565b5090565b5b8082111561362c5760008155600101613631565b6001600160e01b03198116811461183f57600080fd5b60006020828403121561366d57600080fd5b813561205881613645565b80356001600160a01b038116811461368f57600080fd5b919050565b6000602082840312156136a657600080fd5b61205882613678565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156136ee576136ee6136af565b604052919050565b60008060006060848603121561370b57600080fd5b833592506020808501359250604085013567ffffffffffffffff8082111561373257600080fd5b818701915087601f83011261374657600080fd5b813581811115613758576137586136af565b8060051b91506137698483016136c5565b818152918301840191848101908a84111561378357600080fd5b938501935b838510156137a157843582529385019390850190613788565b8096505050505050509250925092565b60005b838110156137cc5781810151838201526020016137b4565b838111156114ac5750506000910152565b600081518084526137f58160208601602086016137b1565b601f01601f19169290920160200192915050565b60208152600061205860208301846137dd565b60006020828403121561382e57600080fd5b5035919050565b6000806040838503121561384857600080fd5b61385183613678565b946020939093013593505050565b600067ffffffffffffffff831115613879576138796136af565b61388c601f8401601f19166020016136c5565b90508281528383830111156138a057600080fd5b828260208301376000602084830101529392505050565b600080600080608085870312156138cd57600080fd5b6138d685613678565b93506138e460208601613678565b925060408501359150606085013567ffffffffffffffff81111561390757600080fd5b8501601f8101871361391857600080fd5b6139278782356020840161385f565b91505092959194509250565b600082601f83011261394457600080fd5b6120588383356020850161385f565b60008083601f84011261396557600080fd5b50813567ffffffffffffffff81111561397d57600080fd5b6020830191508360208260051b850101111561399857600080fd5b9250929050565b60008060008060008060a087890312156139b857600080fd5b86359550602087013567ffffffffffffffff808211156139d757600080fd5b6139e38a838b01613933565b9650604089013595506060890135915080821115613a0057600080fd5b613a0c8a838b01613953565b90955093506080890135915080821115613a2557600080fd5b50613a3289828a01613933565b9150509295509295509295565b801515811461183f57600080fd5b600060208284031215613a5f57600080fd5b813561205881613a3f565b600080600080600080600060a0888a031215613a8557600080fd5b873567ffffffffffffffff80821115613a9d57600080fd5b613aa98b838c01613933565b985060208a0135975060408a0135915080821115613ac657600080fd5b613ad28b838c01613953565b909750955060608a0135915080821115613aeb57600080fd5b613af78b838c01613953565b909550935060808a0135915080821115613b1057600080fd5b50613b1d8a828b01613933565b91505092959891949750929550565b600080600060608486031215613b4157600080fd5b613b4a84613678565b9250613b5860208501613678565b9150604084013590509250925092565b60008060008060608587031215613b7e57600080fd5b8435935060208501359250604085013567ffffffffffffffff811115613ba357600080fd5b613baf87828801613953565b95989497509550505050565b60008060408385031215613bce57600080fd5b82359150613bde60208401613678565b90509250929050565b600060208284031215613bf957600080fd5b813567ffffffffffffffff811115613c1057600080fd5b610df584828501613933565b60008060408385031215613c2f57600080fd5b50508035926020909101359150565b60008060408385031215613c5157600080fd5b613c5a83613678565b91506020830135613c6a81613a3f565b809150509250929050565b60008060408385031215613c8857600080fd5b613c9183613678565b9150613bde60208401613678565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613cdd57613cdd613cb5565b5060010190565b600181811c90821680613cf857607f821691505b602082108103613d1857634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215613d3057600080fd5b815161205881613a3f565b60008251613d4d8184602087016137b1565b9190910192915050565b60208082526022908201527f506c616e65744d616e3a20696e76616c696420506c616e65744d616e20696d61604082015261676560f01b606082015260800190565b6020808252602f908201527f506c616e65744d616e3a2063616c6c6572206973206e6f74206f776e6572206f60408201526e391030b236b4b734b9ba3930ba37b960891b606082015260800190565b60008351613dfa8184602088016137b1565b602360f81b9083019081528351613e188160018401602088016137b1565b01600101949350505050565b60008351613e368184602088016137b1565b835190830190613e4a8183602088016137b1565b01949350505050565b600082821015613e6557613e65613cb5565b500390565b838152606060208201526000613e8360608301856137dd565b8281036040840152613e9581856137dd565b9695505050505050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613fbb8160178501602088016137b1565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613fec8160288401602088016137b1565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613e95908301846137dd565b60006020828403121561403d57600080fd5b815161205881613645565b6000821982111561405b5761405b613cb5565b500190565b600081600019048311821515161561407a5761407a613cb5565b500290565b60008161408e5761408e613cb5565b50600019019056fea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220af8b9cf9579ef90199117c68c8c3ee5c77cf1ab134dc9ff3d7cedf93f283e0d664736f6c634300080d0033a49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c2177568747470733a2f2f6170692e706c616e65746d616e2e696f2f746f6b656e2f706c616e65746d616e2f000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000009506c616e65744d616e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009506c616e65744d616e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000fe7755299ffa15e451494d276de8061454920ab8000000000000000000000000a88949689d8a835b4a7b182d1ef6ac420a66fe6000000000000000000000000000056aff95b8b46eca059c622a891e095792dd47000000000000000000000000a5e48b248388a0641156fe917ff91a06e58ec241

Deployed Bytecode

0x6080604052600436106103a25760003560e01c806369061d0e116101e7578063a99e66901161010d578063c87b56dd116100a0578063e985e9c51161006f578063e985e9c514610afc578063f2fde38b14610b45578063f8004d3114610b65578063fc2b0c2614610b8557600080fd5b8063c87b56dd14610a82578063cce316f014610aa2578063d547741f14610ac2578063dae00ead14610ae257600080fd5b8063b88d4fde116100dc578063b88d4fde14610a02578063ba11438d14610a22578063bd32fb6614610a42578063c72978ca14610a6257600080fd5b8063a99e669014610972578063aa98e0c614610992578063ae5f6a8d146109a8578063b67a66b9146109d557600080fd5b80638da5cb5b116101855780639df1dbf8116101545780639df1dbf8146108ec578063a217fddf14610927578063a22cb4651461093c578063a62c1b3c1461095c57600080fd5b80638da5cb5b1461087957806391d14854146108975780639313295a146108b757806395d89b41146108d757600080fd5b8063715018a6116101c1578063715018a61461081357806375b238fc146108285780637db3aecc1461084a5780638456cb591461086457600080fd5b806369061d0e146107a85780636c0360eb146107de57806370a08231146107f357600080fd5b8063248a9ca3116102cc5780633f4ba83a1161026a57806355f804b31161023957806355f804b31461072957806358163ad2146107495780635c975abb146107695780636352211e1461078857600080fd5b80633f4ba83a146106a557806341f43434146106ba57806342842e0e146106dc5780635078d30f146106fc57600080fd5b8063269d849c116102a6578063269d849c146106475780632f2ff15d1461065d57806336568abe1461067d5780633ccfd60b1461069d57600080fd5b8063248a9ca3146105dd57806324bbd0491461060d57806325d05dc61461062757600080fd5b8063150b7a02116103445780631d442cb7116103135780631d442cb7146105715780631e118ee6146105875780631ff280bb146105a757806323b872dd146105bd57600080fd5b8063150b7a02146104e357806318160ddd1461051c5780631997074f146105315780631a9392e11461055157600080fd5b806306fdde031161038057806306fdde0314610437578063081812fc14610459578063095ea7b3146104915780631056ae31146104b357600080fd5b806301ffc9a7146103a757806303a1b24e146103dc578063043c412514610417575b600080fd5b3480156103b357600080fd5b506103c76103c236600461365b565b610ba5565b60405190151581526020015b60405180910390f35b3480156103e857600080fd5b506104096103f7366004613694565b60156020526000908152604090205481565b6040519081526020016103d3565b34801561042357600080fd5b506103c76104323660046136f6565b610bb6565b34801561044357600080fd5b5061044c610c65565b6040516103d39190613809565b34801561046557600080fd5b5061047961047436600461381c565b610cf7565b6040516001600160a01b0390911681526020016103d3565b34801561049d57600080fd5b506104b16104ac366004613835565b610d1e565b005b3480156104bf57600080fd5b506103c76104ce366004613694565b60116020526000908152604090205460ff1681565b3480156104ef57600080fd5b506105036104fe3660046138b7565b610dec565b6040516001600160e01b031990911681526020016103d3565b34801561052857600080fd5b50610409610dfd565b34801561053d57600080fd5b506104b161054c36600461399f565b610e0d565b34801561055d57600080fd5b506104b161056c366004613a4d565b610f78565b34801561057d57600080fd5b50610409601a5481565b34801561059357600080fd5b506104b16105a2366004613a6a565b610fd3565b3480156105b357600080fd5b5061040960185481565b3480156105c957600080fd5b506104b16105d8366004613b2c565b6113d9565b3480156105e957600080fd5b506104096105f836600461381c565b60009081526006602052604090206001015490565b34801561061957600080fd5b506009546103c79060ff1681565b34801561063357600080fd5b506104b1610642366004613b68565b6114b2565b34801561065357600080fd5b50610409600e5481565b34801561066957600080fd5b506104b1610678366004613bbb565b6116fc565b34801561068957600080fd5b506104b1610698366004613bbb565b611721565b6104b161179f565b3480156106b157600080fd5b506104b1611842565b3480156106c657600080fd5b506104796daaeb6d7670e522a718067333cd4e81565b3480156106e857600080fd5b506104b16106f7366004613b2c565b611854565b34801561070857600080fd5b5061040961071736600461381c565b60176020526000908152604090205481565b34801561073557600080fd5b506104b1610744366004613be7565b611922565b34801561075557600080fd5b506104b1610764366004613c1c565b611978565b34801561077557600080fd5b50600754600160a01b900460ff166103c7565b34801561079457600080fd5b506104796107a336600461381c565b611a10565b3480156107b457600080fd5b506104796107c336600461381c565b6016602052600090815260409020546001600160a01b031681565b3480156107ea57600080fd5b5061044c611a70565b3480156107ff57600080fd5b5061040961080e366004613694565b611afe565b34801561081f57600080fd5b506104b1611b84565b34801561083457600080fd5b5061040960008051602061409783398151915281565b34801561085657600080fd5b50600b546103c79060ff1681565b34801561087057600080fd5b506104b1611b96565b34801561088557600080fd5b506007546001600160a01b0316610479565b3480156108a357600080fd5b506103c76108b2366004613bbb565b611ba6565b3480156108c357600080fd5b506104b16108d2366004613c1c565b611bd1565b3480156108e357600080fd5b5061044c611c63565b3480156108f857600080fd5b506103c7610907366004613be7565b805160208183018101805160128252928201919093012091525460ff1681565b34801561093357600080fd5b50610409600081565b34801561094857600080fd5b506104b1610957366004613c3e565b611c72565b34801561096857600080fd5b5061040960195481565b34801561097e57600080fd5b506104b161098d36600461381c565b611d36565b34801561099e57600080fd5b50610409600a5481565b3480156109b457600080fd5b506104096109c336600461381c565b600c6020526000908152604090205481565b3480156109e157600080fd5b506104096109f036600461381c565b60146020526000908152604090205481565b348015610a0e57600080fd5b506104b1610a1d3660046138b7565b611d83565b348015610a2e57600080fd5b506104b1610a3d36600461381c565b611e5f565b348015610a4e57600080fd5b506104b1610a5d36600461381c565b611eac565b348015610a6e57600080fd5b506104b1610a7d36600461381c565b611f29565b348015610a8e57600080fd5b5061044c610a9d36600461381c565b611ff8565b348015610aae57600080fd5b506104b1610abd366004613a4d565b61205f565b348015610ace57600080fd5b506104b1610add366004613bbb565b6120ba565b348015610aee57600080fd5b506010546103c79060ff1681565b348015610b0857600080fd5b506103c7610b17366004613c75565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610b5157600080fd5b506104b1610b60366004613694565b6120df565b348015610b7157600080fd5b506104b1610b80366004613a4d565b612155565b348015610b9157600080fd5b5061044c610ba0366004613c1c565b612170565b6000610bb0826121a8565b92915050565b600082815b8351811015610c5a576000848281518110610bd857610bd8613c9f565b60200260200101519050808311610c1a576040805160208101859052908101829052606001604051602081830303815290604052805190602001209250610c47565b60408051602081018390529081018490526060016040516020818303038152906040528051906020012092505b5080610c5281613ccb565b915050610bbb565b509093149392505050565b606060008054610c7490613ce4565b80601f0160208091040260200160405190810160405280929190818152602001828054610ca090613ce4565b8015610ced5780601f10610cc257610100808354040283529160200191610ced565b820191906000526020600020905b815481529060010190602001808311610cd057829003601f168201915b5050505050905090565b6000610d02826121cd565b506000908152600460205260409020546001600160a01b031690565b816daaeb6d7670e522a718067333cd4e3b15610ddd57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015610d8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610db09190613d1e565b610ddd57604051633b79c77360e21b81526001600160a01b03821660048201526024015b60405180910390fd5b610de7838361222c565b505050565b630a85bd0160e11b5b949350505050565b6000610e08600d5490565b905090565b60105460ff16610e745760405162461bcd60e51b815260206004820152602c60248201527f506c616e65744d616e3a20506c616e65744d616e20637573746f6d697a61746960448201526b1bdb881a5cc818db1bdcd95960a21b6064820152608401610dd4565b33610e7e87611a10565b6001600160a01b031614610ecc5760405162461bcd60e51b8152602060048201526015602482015274283630b732ba26b0b71d1037b7363c9037bbb732b960591b6044820152606401610dd4565b600085604051602001610edf9190613d3b565b604051602081830303815290604052805190602001209050610f48600c60008781526020019081526020016000205482868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610bb692505050565b610f645760405162461bcd60e51b8152600401610dd490613d57565b610f6f87878461233c565b50505050505050565b6007546001600160a01b0316331480610fa45750610fa460008051602061409783398151915233611ba6565b610fc05760405162461bcd60e51b8152600401610dd490613d99565b6010805460ff1916911515919091179055565b610fdb61260d565b610fe3612666565b60095460ff166110355760405162461bcd60e51b815260206004820152601b60248201527f506c616e65744d616e3a206d696e74206973206e6f74206f70656e00000000006044820152606401610dd4565b86516000036110865760405162461bcd60e51b815260206004820152601760248201527f506c616e65744d616e3a2043494420697320656d7074790000000000000000006044820152606401610dd4565b6012876040516110969190613d3b565b9081526040519081900360200190205460ff16156110f65760405162461bcd60e51b815260206004820152601c60248201527f506c616e65744d616e3a20696d61676520756e617661696c61626c65000000006044820152606401610dd4565b3360009081526011602052604090205460ff16156111665760405162461bcd60e51b815260206004820152602760248201527f506c616e65744d616e3a206c696d69746564206f6e6520746f6b656e20706572604482015266081dd85b1b195d60ca1b6064820152608401610dd4565b6000876040516020016111799190613d3b565b6040516020818303038152906040528051906020012090506111e2600c60008981526020019081526020016000205482868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610bb692505050565b6111fe5760405162461bcd60e51b8152600401610dd490613d57565b600e541561127157600e54611211610dfd565b106112715760405162461bcd60e51b815260206004820152602a60248201527f506c616e65744d616e3a2063757272656e74206d696e74696e672070726f636560448201526939b99034b99037bb32b960b11b6064820152608401610dd4565b600b5460ff161561131957600a546112bd9033888880806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610bb692505050565b6113195760405162461bcd60e51b815260206004820152602760248201527f506c616e65744d616e3a20796f7520617265206e6f7420696e207468652077686044820152661a5d195b1a5cdd60ca1b6064820152608401610dd4565b611327600d80546001019055565b6000611332600d5490565b905061133e33826126b3565b611349818a8561233c565b3360009081526015602052604081205490036113695761136981336126cd565b600081815260176020908152604080832060649055338084526011835292819020805460ff19166001179055805184815242928101929092527faa1a427925f2dc9cbe222c6ecc56b980070fc55ab5f3401c99892e8ee3458c39910160405180910390a25050610f6f6001600855565b826daaeb6d7670e522a718067333cd4e3b156114a157336001600160a01b0382160361140f5761140a84848461273a565b6114ac565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa15801561145e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114829190613d1e565b6114a157604051633b79c77360e21b8152336004820152602401610dd4565b6114ac84848461273a565b50505050565b6007546001600160a01b03163314806114de57506114de60008051602061409783398151915233611ba6565b6114fa5760405162461bcd60e51b8152600401610dd490613d99565b600083116115585760405162461bcd60e51b815260206004820152602560248201527f506c616e65744d616e3a20696e76616c696420736f6369616c437265646974286044820152647a65726f2960d81b6064820152608401610dd4565b6000848152600260205260409020546001600160a01b03166115bc5760405162461bcd60e51b815260206004820152601c60248201527f506c616e65744d616e3a206e6f6e6578697374656e7420746f6b656e000000006044820152606401610dd4565b60006115c78561276b565b6115d08561276b565b6040516020016115e1929190613de8565b60405160208183030381529060405290506000816040516020016116059190613d3b565b60405160208183030381529060405280519060200120905061165d601a5482868680806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610bb692505050565b6116a95760405162461bcd60e51b815260206004820152601f60248201527f506c616e65744d616e3a20696e76616c696420736f6369616c437265646974006044820152606401610dd4565b60008681526017602090815260409182902087905581518881529081018790527ffedfb74cd9b7ed7be56c98c800762c3853e1a71560b94a337fc9115c355a7bd0910160405180910390a1505050505050565b600082815260066020526040902060010154611717816127fe565b610de78383612808565b6001600160a01b03811633146117915760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610dd4565b61179b828261288e565b5050565b6117a76128f5565b604051600090339047908381818185875af1925050503d80600081146117e9576040519150601f19603f3d011682016040523d82523d6000602084013e6117ee565b606091505b505090508061183f5760405162461bcd60e51b815260206004820152601d60248201527f506c616e65744d616e3a204661696c656420746f2077697468647261770000006044820152606401610dd4565b50565b61184a6128f5565b61185261294f565b565b826daaeb6d7670e522a718067333cd4e3b1561191757336001600160a01b038216036118855761140a8484846129a4565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa1580156118d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f89190613d1e565b61191757604051633b79c77360e21b8152336004820152602401610dd4565b6114ac8484846129a4565b61192a6128f5565b805161193d90600f9060208401906135ac565b507f23c8c9488efebfd474e85a7956de6f39b17c7ab88502d42a623db2d8e382bbaa8160405161196d9190613809565b60405180910390a150565b6007546001600160a01b03163314806119a457506119a460008051602061409783398151915233611ba6565b6119c05760405162461bcd60e51b8152600401610dd490613d99565b6000828152600c602090815260409182902083905581518481529081018390527f9c3740a943efaab1111e5c3524409b5f8b46ae0cfd553942f62c2e490bd213f891015b60405180910390a15050565b6000818152600260205260408120546001600160a01b031680610bb05760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610dd4565b600f8054611a7d90613ce4565b80601f0160208091040260200160405190810160405280929190818152602001828054611aa990613ce4565b8015611af65780601f10611acb57610100808354040283529160200191611af6565b820191906000526020600020905b815481529060010190602001808311611ad957829003601f168201915b505050505081565b60006001600160a01b038216611b685760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610dd4565b506001600160a01b031660009081526003602052604090205490565b611b8c6128f5565b61185260006129bf565b611b9e6128f5565b611852612a11565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6007546001600160a01b0316331480611bfd5750611bfd60008051602061409783398151915233611ba6565b611c195760405162461bcd60e51b8152600401610dd490613d99565b60188290556019819055604080518381526020810183905242918101919091527fb5ad150efae7389a80fc6db7c2e6925667f1c0a369a2f9a45df51d2c787fd42090606001611a04565b606060018054610c7490613ce4565b816daaeb6d7670e522a718067333cd4e3b15611d2c57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611ce0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d049190613d1e565b611d2c57604051633b79c77360e21b81526001600160a01b0382166004820152602401610dd4565b610de78383612a54565b6007546001600160a01b0316331480611d625750611d6260008051602061409783398151915233611ba6565b611d7e5760405162461bcd60e51b8152600401610dd490613d99565b600e55565b836daaeb6d7670e522a718067333cd4e3b15611e4c57336001600160a01b03821603611dba57611db585858585612a5f565b611e58565b604051633185c44d60e21b81523060048201523360248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611e09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2d9190613d1e565b611e4c57604051633b79c77360e21b8152336004820152602401610dd4565b611e5885858585612a5f565b5050505050565b6007546001600160a01b0316331480611e8b5750611e8b60008051602061409783398151915233611ba6565b611ea75760405162461bcd60e51b8152600401610dd490613d99565b601a55565b6007546001600160a01b0316331480611ed85750611ed860008051602061409783398151915233611ba6565b611ef45760405162461bcd60e51b8152600401610dd490613d99565b600a8190556040518181527f632b0f6532084e9afddeadf7a5c751a706e124066b1419275caa8c025ae44e619060200161196d565b6000818152600260205260409020546001600160a01b0316611f8d5760405162461bcd60e51b815260206004820152601c60248201527f506c616e65744d616e3a206e6f6e6578697374656e7420746f6b656e000000006044820152606401610dd4565b33611f9782611a10565b6001600160a01b031614611fe55760405162461bcd60e51b8152602060048201526015602482015274283630b732ba26b0b71d1037b7363c9037bbb732b960591b6044820152606401610dd4565b611fee33612a91565b61183f81336126cd565b6060612003826121cd565b600061200d612b1b565b9050600081511161202d5760405180602001604052806000815250612058565b806120378461276b565b604051602001612048929190613e24565b6040516020818303038152906040525b9392505050565b6007546001600160a01b031633148061208b575061208b60008051602061409783398151915233611ba6565b6120a75760405162461bcd60e51b8152600401610dd490613d99565b600b805460ff1916911515919091179055565b6000828152600660205260409020600101546120d5816127fe565b610de7838361288e565b6120e76128f5565b6001600160a01b03811661214c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610dd4565b61183f816129bf565b61215d6128f5565b6009805460ff1916911515919091179055565b6013602052816000526040600020818154811061218c57600080fd5b90600052602060002001600091509150508054611a7d90613ce4565b60006001600160e01b03198216637965db0b60e01b1480610bb05750610bb082612b2a565b6000818152600260205260409020546001600160a01b031661183f5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610dd4565b600061223782611a10565b9050806001600160a01b0316836001600160a01b0316036122a45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610dd4565b336001600160a01b03821614806122c057506122c08133610b17565b6123325760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610dd4565b610de78383612b7a565b60128260405161234c9190613d3b565b9081526040519081900360200190205460ff161561254057600083815260136020908152604080832080548251818502810185019093528083529192909190849084015b8282101561243c5783829060005260206000200180546123af90613ce4565b80601f01602080910402602001604051908101604052809291908181526020018280546123db90613ce4565b80156124285780601f106123fd57610100808354040283529160200191612428565b820191906000526020600020905b81548152906001019060200180831161240b57829003601f168201915b505050505081526020019060010190612390565b5050505090506000808251905060005b818110156124db5783818151811061246657612466613c9f565b602002602001015160405160200161247e9190613d3b565b60405160208183030381529060405280519060200120866040516020016124a59190613d3b565b60405160208183030381529060405280519060200120036124c957600192506124db565b806124d381613ccb565b91505061244c565b826125285760405162461bcd60e51b815260206004820152601c60248201527f506c616e65744d616e3a2063696420686173206265656e2075736564000000006044820152606401610dd4565b600087815260146020526040902055506125cd915050565b60016012836040516125529190613d3b565b9081526040805160209281900383019020805460ff19169315159390931790925560008581526013825291822080546001810182559083529181902084516125a19391909101918501906135ac565b506000838152601360205260409020546125bd90600190613e53565b6000848152601460205260409020555b7faa425fdd80303549e5f891d43e81f503f03bc88d66e218ac44f385682ce6fe0b83838360405161260093929190613e6a565b60405180910390a1505050565b60026008540361265f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610dd4565b6002600855565b600754600160a01b900460ff16156118525760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610dd4565b61179b828260405180602001604052806000815250612be8565b6001600160a01b0381166000818152601560209081526040808320869055858352601682529182902080546001600160a01b031916841790558151858152908101929092527f47a179ec4c8deebddd2c367b6a639fd51c8e2cc4abef3aa5632a8eb45d59f1929101611a04565b6127443382612c1b565b6127605760405162461bcd60e51b8152600401610dd490613e9f565b610de7838383612c99565b6060600061277883612e12565b600101905060008167ffffffffffffffff811115612798576127986136af565b6040519080825280601f01601f1916602001820160405280156127c2576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a85049450846127cc57509392505050565b61183f8133612eea565b6128128282611ba6565b61179b5760008281526006602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561284a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6128988282611ba6565b1561179b5760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6007546001600160a01b031633146118525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610dd4565b612957612f43565b6007805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610de783838360405180602001604052806000815250611d83565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612a19612666565b6007805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586129873390565b61179b338383612f93565b612a693383612c1b565b612a855760405162461bcd60e51b8152600401610dd490613e9f565b6114ac84848484613061565b6001600160a01b038116600090815260156020526040902054801561179b576001600160a01b0382166000818152601560209081526040808320839055848352601682529182902080546001600160a01b03191690558151848152908101929092527f97141d363b028ec4869c42bf20f4938502ab1a1a170be06c39d5477d4096d5f19101611a04565b6060600f8054610c7490613ce4565b60006001600160e01b031982166380ac58cd60e01b1480612b5b57506001600160e01b03198216635b5e139f60e01b145b80610bb057506301ffc9a760e01b6001600160e01b0319831614610bb0565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612baf82611a10565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b612bf28383613094565b612bff6000848484613237565b610de75760405162461bcd60e51b8152600401610dd490613eec565b600080612c2783611a10565b9050806001600160a01b0316846001600160a01b03161480612c6e57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80610df55750836001600160a01b0316612c8784610cf7565b6001600160a01b031614949350505050565b826001600160a01b0316612cac82611a10565b6001600160a01b031614612cd25760405162461bcd60e51b8152600401610dd490613f3e565b6001600160a01b038216612d345760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610dd4565b612d418383836001613335565b826001600160a01b0316612d5482611a10565b6001600160a01b031614612d7a5760405162461bcd60e51b8152600401610dd490613f3e565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610de783838360016133bd565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b8310612e515772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310612e7d576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612e9b57662386f26fc10000830492506010015b6305f5e1008310612eb3576305f5e100830492506008015b6127108310612ec757612710830492506004015b60648310612ed9576064830492506002015b600a8310610bb05760010192915050565b612ef48282611ba6565b61179b57612f01816133fe565b612f0c836020613410565b604051602001612f1d929190613f83565b60408051601f198184030181529082905262461bcd60e51b8252610dd491600401613809565b600754600160a01b900460ff166118525760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610dd4565b816001600160a01b0316836001600160a01b031603612ff45760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610dd4565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61306c848484612c99565b61307884848484613237565b6114ac5760405162461bcd60e51b8152600401610dd490613eec565b6001600160a01b0382166130ea5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610dd4565b6000818152600260205260409020546001600160a01b03161561314f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610dd4565b61315d600083836001613335565b6000818152600260205260409020546001600160a01b0316156131c25760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610dd4565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461179b6000838360016133bd565b60006001600160a01b0384163b1561332d57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061327b903390899088908890600401613ff8565b6020604051808303816000875af19250505080156132b6575060408051601f3d908101601f191682019092526132b39181019061402b565b60015b613313573d8080156132e4576040519150601f19603f3d011682016040523d82523d6000602084013e6132e9565b606091505b50805160000361330b5760405162461bcd60e51b8152600401610dd490613eec565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610df5565b506001610df5565b60018111156114ac576001600160a01b0384161561337b576001600160a01b03841660009081526003602052604081208054839290613375908490613e53565b90915550505b6001600160a01b038316156114ac576001600160a01b038316600090815260036020526040812080548392906133b2908490614048565b909155505050505050565b6001600160a01b0384161561140a576133d584612a91565b6001600160a01b038316600090815260156020526040812054900361140a5761140a82846126cd565b6060610bb06001600160a01b03831660145b6060600061341f836002614060565b61342a906002614048565b67ffffffffffffffff811115613442576134426136af565b6040519080825280601f01601f19166020018201604052801561346c576020820181803683370190505b509050600360fc1b8160008151811061348757613487613c9f565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106134b6576134b6613c9f565b60200101906001600160f81b031916908160001a90535060006134da846002614060565b6134e5906001614048565b90505b600181111561355d576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061351957613519613c9f565b1a60f81b82828151811061352f5761352f613c9f565b60200101906001600160f81b031916908160001a90535060049490941c936135568161407f565b90506134e8565b5083156120585760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610dd4565b8280546135b890613ce4565b90600052602060002090601f0160209004810192826135da5760008555613620565b82601f106135f357805160ff1916838001178555613620565b82800160010185558215613620579182015b82811115613620578251825591602001919060010190613605565b5061362c929150613630565b5090565b5b8082111561362c5760008155600101613631565b6001600160e01b03198116811461183f57600080fd5b60006020828403121561366d57600080fd5b813561205881613645565b80356001600160a01b038116811461368f57600080fd5b919050565b6000602082840312156136a657600080fd5b61205882613678565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156136ee576136ee6136af565b604052919050565b60008060006060848603121561370b57600080fd5b833592506020808501359250604085013567ffffffffffffffff8082111561373257600080fd5b818701915087601f83011261374657600080fd5b813581811115613758576137586136af565b8060051b91506137698483016136c5565b818152918301840191848101908a84111561378357600080fd5b938501935b838510156137a157843582529385019390850190613788565b8096505050505050509250925092565b60005b838110156137cc5781810151838201526020016137b4565b838111156114ac5750506000910152565b600081518084526137f58160208601602086016137b1565b601f01601f19169290920160200192915050565b60208152600061205860208301846137dd565b60006020828403121561382e57600080fd5b5035919050565b6000806040838503121561384857600080fd5b61385183613678565b946020939093013593505050565b600067ffffffffffffffff831115613879576138796136af565b61388c601f8401601f19166020016136c5565b90508281528383830111156138a057600080fd5b828260208301376000602084830101529392505050565b600080600080608085870312156138cd57600080fd5b6138d685613678565b93506138e460208601613678565b925060408501359150606085013567ffffffffffffffff81111561390757600080fd5b8501601f8101871361391857600080fd5b6139278782356020840161385f565b91505092959194509250565b600082601f83011261394457600080fd5b6120588383356020850161385f565b60008083601f84011261396557600080fd5b50813567ffffffffffffffff81111561397d57600080fd5b6020830191508360208260051b850101111561399857600080fd5b9250929050565b60008060008060008060a087890312156139b857600080fd5b86359550602087013567ffffffffffffffff808211156139d757600080fd5b6139e38a838b01613933565b9650604089013595506060890135915080821115613a0057600080fd5b613a0c8a838b01613953565b90955093506080890135915080821115613a2557600080fd5b50613a3289828a01613933565b9150509295509295509295565b801515811461183f57600080fd5b600060208284031215613a5f57600080fd5b813561205881613a3f565b600080600080600080600060a0888a031215613a8557600080fd5b873567ffffffffffffffff80821115613a9d57600080fd5b613aa98b838c01613933565b985060208a0135975060408a0135915080821115613ac657600080fd5b613ad28b838c01613953565b909750955060608a0135915080821115613aeb57600080fd5b613af78b838c01613953565b909550935060808a0135915080821115613b1057600080fd5b50613b1d8a828b01613933565b91505092959891949750929550565b600080600060608486031215613b4157600080fd5b613b4a84613678565b9250613b5860208501613678565b9150604084013590509250925092565b60008060008060608587031215613b7e57600080fd5b8435935060208501359250604085013567ffffffffffffffff811115613ba357600080fd5b613baf87828801613953565b95989497509550505050565b60008060408385031215613bce57600080fd5b82359150613bde60208401613678565b90509250929050565b600060208284031215613bf957600080fd5b813567ffffffffffffffff811115613c1057600080fd5b610df584828501613933565b60008060408385031215613c2f57600080fd5b50508035926020909101359150565b60008060408385031215613c5157600080fd5b613c5a83613678565b91506020830135613c6a81613a3f565b809150509250929050565b60008060408385031215613c8857600080fd5b613c9183613678565b9150613bde60208401613678565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201613cdd57613cdd613cb5565b5060010190565b600181811c90821680613cf857607f821691505b602082108103613d1857634e487b7160e01b600052602260045260246000fd5b50919050565b600060208284031215613d3057600080fd5b815161205881613a3f565b60008251613d4d8184602087016137b1565b9190910192915050565b60208082526022908201527f506c616e65744d616e3a20696e76616c696420506c616e65744d616e20696d61604082015261676560f01b606082015260800190565b6020808252602f908201527f506c616e65744d616e3a2063616c6c6572206973206e6f74206f776e6572206f60408201526e391030b236b4b734b9ba3930ba37b960891b606082015260800190565b60008351613dfa8184602088016137b1565b602360f81b9083019081528351613e188160018401602088016137b1565b01600101949350505050565b60008351613e368184602088016137b1565b835190830190613e4a8183602088016137b1565b01949350505050565b600082821015613e6557613e65613cb5565b500390565b838152606060208201526000613e8360608301856137dd565b8281036040840152613e9581856137dd565b9695505050505050565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351613fbb8160178501602088016137b1565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351613fec8160288401602088016137b1565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613e95908301846137dd565b60006020828403121561403d57600080fd5b815161205881613645565b6000821982111561405b5761405b613cb5565b500190565b600081600019048311821515161561407a5761407a613cb5565b500290565b60008161408e5761408e613cb5565b50600019019056fea49807205ce4d355092ef5a8a18f56e8913cf4a201fbe287825b095693c21775a2646970667358221220af8b9cf9579ef90199117c68c8c3ee5c77cf1ab134dc9ff3d7cedf93f283e0d664736f6c634300080d0033

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

000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000009506c616e65744d616e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009506c616e65744d616e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000fe7755299ffa15e451494d276de8061454920ab8000000000000000000000000a88949689d8a835b4a7b182d1ef6ac420a66fe6000000000000000000000000000056aff95b8b46eca059c622a891e095792dd47000000000000000000000000a5e48b248388a0641156fe917ff91a06e58ec241

-----Decoded View---------------
Arg [0] : name (string): PlanetMan
Arg [1] : symbol (string): PlanetMan
Arg [2] : admins (address[]): 0xFE7755299ffA15E451494d276De8061454920ab8,0xa88949689d8A835B4a7b182D1eF6aC420a66fe60,0x00056aFf95b8B46ecA059c622a891E095792Dd47,0xa5E48B248388a0641156fe917Ff91a06e58EC241

-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [4] : 506c616e65744d616e0000000000000000000000000000000000000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [6] : 506c616e65744d616e0000000000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [8] : 000000000000000000000000fe7755299ffa15e451494d276de8061454920ab8
Arg [9] : 000000000000000000000000a88949689d8a835b4a7b182d1ef6ac420a66fe60
Arg [10] : 00000000000000000000000000056aff95b8b46eca059c622a891e095792dd47
Arg [11] : 000000000000000000000000a5e48b248388a0641156fe917ff91a06e58ec241


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

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