ETH Price: $3,916.06 (+0.12%)

Token

EcoID (EcoID)
 

Overview

Max Total Supply

0 EcoID

Holders

1,837

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
2 EcoID
0x4BdB5645fC52e5ABc219CA26257DCD9138F9dE82
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:
EcoID

Compiler Version
v0.8.16+commit.07a7930e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 17 : EcoID.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./Base64.sol";

/**
 * This is the EcoNFT for verifying an arbitraty claim.
 */
contract EcoID is ERC721("EcoID", "EcoID"), EIP712("EcoID", "1") {
    /**
     * Use for signarture recovery and verification on minting of EcoID
     */
    using ECDSA for bytes32;

    /**
     * Use for tracking the nonces on signatures
     */
    using Counters for Counters.Counter;

    /**
     * The static web url for the nft
     */
    string public constant NFT_EXTERNAL_URL = "https://eco.org/eco-id";

    /**
     * The static description for the nft
     */
    string public constant NFT_DESCRIPTION =
        "Eco IDs are fully decentralized and permissionless identity primitives designed to be simple, versatile and immutable. They are intended to serve as a basic foundation to bootstrap increasingly-complex and custom reputation and governance systems.";

    /**
     * The static image url for all the nft's
     */
    string public constant NFT_IMAGE_URL =
        "https://ipfs.io/ipfs/QmWZFvb88KDos7BYyf52btxPuEEifZN7i5CA2YfC3azS8J";

    /**
     * The static url for contract-level metadata
     */
    string public constant CONTRACT_LEVEL_METADATA_URL =
        "https://ipfs.io/ipfs/QmZ7vpY34jdmDyn8otBMzvX7omn6NWTfdxVFr8RMuAAVPZ";

    /**
     * The default pagination limit for the tokenURI meta that reads from the claim verifiers array
     */
    uint256 public constant META_LIMIT = 50;

    /**
     * The length of a substring for the name field of an nft
     */
    uint256 public constant SUB_NAME_LENGTH = 10;

    /**
     * The hash of the register function signature for the recipient
     */
    bytes32 private constant REGISTER_APPROVE_TYPEHASH =
        keccak256(
            "Register(string claim,uint256 feeAmount,bool revocable,address recipient,address verifier,uint256 deadline,uint256 nonce)"
        );

    /**
     * The hash of the register function signature for the verifier
     */
    bytes32 private constant REGISTER_VERIFIER_TYPEHASH =
        keccak256(
            "Register(string claim,uint256 feeAmount,bool revocable,address recipient,uint256 deadline,uint256 nonce)"
        );

    /**
     * The hash of the register function signature
     */
    bytes32 private constant UNREGISTER_TYPEHASH =
        keccak256(
            "Unregister(string claim,address recipient,address verifier,uint256 deadline,uint256 nonce)"
        );

    /**
     * Event for when the constructor has finished
     */
    event InitializeEcoID();

    /**
     * Event for when a claim is verified for a recipient
     */
    event RegisterClaim(
        string claim,
        uint256 feeAmount,
        bool revocable,
        address indexed recipient,
        address indexed verifier
    );

    /**
     * Event for when a claim is unregistered by the verifier
     */
    event UnregisterClaim(
        string claim,
        address indexed recipient,
        address indexed verifier
    );

    /**
     * Event for when an EcoNFT is minted
     */
    event Mint(address indexed recipient, string claim, uint256 tokenID);

    /**
     * Error for when the deadline for a signature has passed
     */
    error DeadlineExpired();

    /**
     * Error for when the approval signature during registration is invalid
     */
    error InvalidRegistrationApproveSignature();

    /**
     * Error for when the verifier signature during registration is invalid
     */
    error InvalidRegistrationVerifierSignature();

    /**
     * Error for when a registration with the same verifier is attempted on a claim a second time
     */
    error DuplicateVerifier(address verifier);

    /**
     * Error for when a claim has not been verified or doesn't exist for a user
     */
    error UnverifiedClaim();

    /**
     * Error for when trying to deregister a claim that is not revocable
     */
    error UnrevocableClaim();

    /**
     * Error for when trying to deregister and the verifier signature is invalid
     */
    error InvalidVerifierSignature();

    /**
     * Error for when a user trys to mint an NFT for a claim that already has a minted NFT
     */
    error NftAlreadyMinted(uint256 tokenID);

    /**
     * Error for when trying to reference an NFT token that doesn't exist
     */
    error NonExistantToken();

    /**
     * Error for when the fee payment for registration fails
     */
    error FeePaymentFailed();

    /**
     * Error for when trying to register an empty claim
     */
    error EmptyClaim();

    /**
     * Structure for storing a verified claim
     */
    struct VerifiedClaim {
        string claim;
        uint256 tokenID;
        VerifierRecord[] verifiers;
        mapping(address => bool) verifierMap;
    }

    /**
     * Structure for the verifier record
     */
    struct VerifierRecord {
        address verifier;
        bool revocable;
    }

    /**
     * Structure for storing the relation between a tokenID and the address and claim
     * that they are linked to
     */
    struct TokenClaim {
        address recipient;
        string claim;
    }

    /**
     * Stores the last token index minted
     */
    uint256 public _tokenIDIndex = 1;

    /**
     * Mapping the user address with all claims they have
     */
    mapping(address => mapping(string => VerifiedClaim)) public _verifiedClaims;

    /**
     * Mapping the tokenID of minted tokens with the claim they represent. Necessary as we can't fetch the claim
     * directly from the _verifiedClaims for a given tokenID
     */
    mapping(uint256 => TokenClaim) public _tokenClaimIDs;

    /**
     * The mapping that store the current nonce for claim
     */
    mapping(string => Counters.Counter) private _nonces;

    /**
     * The token contract that is used for fee payments to the minter address
     */
    ERC20 public immutable _token;

    /**
     * Constructor that sets the ERC20 and emits an initialization event
     *
     * @param token the erc20 that is used to pay for registrations
     */
    constructor(ERC20 token) {
        _token = token;

        emit InitializeEcoID();
    }

    /**
     * Check if the claim has been verified by the given verifier for the given address
     *
     * @param recipient the address of the associated claim
     * @param claim the claim that should be verified
     * @param verifier the address of the verifier for the claim on the recipient address
     *
     * @return true if the claim is verified, false otherwise
     */
    function isClaimVerified(
        address recipient,
        string calldata claim,
        address verifier
    ) external view returns (bool) {
        return _verifiedClaims[recipient][claim].verifierMap[verifier];
    }

    /**
     * Registers a claim by an approved verifier to the recipient of that claim.
     *
     * @param claim the claim that is beign verified
     * @param feeAmount the fee the recipient is paying the verifier for the verification
     * @param revocable true if the verifier can revoke their verification of the claim in the future
     * @param recipient the address of the recipient of the registered claim
     * @param verifier the address that is verifying the claim
     * @param approveSig signature that proves that the recipient has approved the verifier to register a claim
     * @param verifySig signature that we are validating comes from the verifier address
     */
    function register(
        string calldata claim,
        uint256 feeAmount,
        bool revocable,
        address recipient,
        address verifier,
        uint256 deadline,
        bytes calldata approveSig,
        bytes calldata verifySig
    ) external _validClaim(claim) {
        if (deadline < block.timestamp) {
            revert DeadlineExpired();
        }
        uint256 nonce = _useNonce(claim);
        if (
            !_verifyRegistrationApprove(
                claim,
                feeAmount,
                revocable,
                recipient,
                verifier,
                deadline,
                nonce,
                approveSig
            )
        ) {
            revert InvalidRegistrationApproveSignature();
        }

        if (
            !_verifyRegistrationVerify(
                claim,
                feeAmount,
                revocable,
                recipient,
                verifier,
                deadline,
                nonce,
                verifySig
            )
        ) {
            revert InvalidRegistrationVerifierSignature();
        }

        VerifiedClaim storage vclaim = _verifiedClaims[recipient][claim];
        if (vclaim.verifierMap[verifier]) {
            revert DuplicateVerifier({verifier: verifier});
        }
        vclaim.claim = claim;
        vclaim.verifiers.push(VerifierRecord(verifier, revocable));
        vclaim.verifierMap[verifier] = true;

        if (feeAmount > 0) {
            if (!_token.transferFrom(recipient, verifier, feeAmount)) {
                revert FeePaymentFailed();
            }
        }

        emit RegisterClaim(claim, feeAmount, revocable, recipient, verifier);
    }

    /**
     * Revokes a claim that has been made by the verifier if it was revocable
     *
     * @param claim the claim that was verified
     * @param recipient the address of the recipient of the registered claim
     * @param verifier the address that had verified the claim
     * @param deadline the deadline in milliseconds from epoch that the signature expires
     * @param verifySig signature that we are validating comes from the verifier address
     */
    function unregister(
        string calldata claim,
        address recipient,
        address verifier,
        uint256 deadline,
        bytes calldata verifySig
    ) external _validClaim(claim) {
        if (deadline < block.timestamp) {
            revert DeadlineExpired();
        }
        VerifiedClaim storage vclaim = _verifiedClaims[recipient][claim];
        if (!vclaim.verifierMap[verifier]) {
            revert UnverifiedClaim();
        }

        VerifierRecord storage record = _getVerifierRecord(
            verifier,
            vclaim.verifiers
        );

        if (!record.revocable) {
            revert UnrevocableClaim();
        }

        if (
            !_verifyUnregistration(
                claim,
                recipient,
                verifier,
                deadline,
                _useNonce(claim),
                verifySig
            )
        ) {
            revert InvalidVerifierSignature();
        }

        vclaim.verifierMap[verifier] = false;
        _removeVerifierRecord(verifier, vclaim.verifiers);

        emit UnregisterClaim(claim, recipient, verifier);
    }

    /**
     * Mints the nft token for the claim
     *
     * @param recipient the address of the recipient for the nft
     * @param claim the claim that is being associated to the nft
     *
     * @return tokenID the ID of the nft
     */
    function mintNFT(address recipient, string memory claim)
        external
        returns (uint256 tokenID)
    {
        VerifiedClaim storage vclaim = _verifiedClaims[recipient][claim];
        if (vclaim.verifiers.length == 0) {
            revert UnverifiedClaim();
        }

        if (vclaim.tokenID != 0) {
            revert NftAlreadyMinted({tokenID: vclaim.tokenID});
        }

        tokenID = _tokenIDIndex++;

        vclaim.tokenID = tokenID;
        _tokenClaimIDs[tokenID] = TokenClaim(recipient, claim);
        _safeMint(recipient, tokenID);

        emit Mint(recipient, claim, tokenID);
    }

    /**
     * Constructs and returns the ERC-721 schema metadata as a json object.
     * Calls a pagination for the verifier array that limits to 50.
     * See tokenURICursor if you need to paginate the metadata past that number
     *
     * @param tokenID the id of the nft
     *
     * @return the metadata as a json object
     */
    function tokenURI(uint256 tokenID)
        public
        view
        override
        returns (string memory)
    {
        return tokenURICursor(tokenID, 0, META_LIMIT);
    }

    /**
     * Returns the current nonce for a given claim
     *
     * @param claim the claim to fetch the nonce for
     *
     * @return the nonce
     */
    function nonces(string memory claim) public view returns (uint256) {
        return _nonces[claim].current();
    }

    /**
     * Makes the _domainSeparatorV4() function externally callable for signature generation
     */
    function DOMAIN_SEPARATOR() external view returns (bytes32) {
        return _domainSeparatorV4();
    }

    /**
     * Constructs and returns the metadata ERC-721 schema json for the NFT.
     * Uses regular cursor pagination in case the verifiers array for the claim is large.
     *
     * @param tokenID the id of the nft
     * @param cursor the pagination cursor for the verifiers array
     * @param limit  the pagination limit for the verifiers array
     *
     * @return meta the metadata as a json array
     */
    function tokenURICursor(
        uint256 tokenID,
        uint256 cursor,
        uint256 limit
    ) public view virtual returns (string memory meta) {
        if (!_exists(tokenID)) {
            revert NonExistantToken();
        }

        TokenClaim storage tokenClaim = _tokenClaimIDs[tokenID];
        VerifiedClaim storage vclaim = _verifiedClaims[tokenClaim.recipient][
            tokenClaim.claim
        ];

        string memory claim = vclaim.claim;
        string memory nameFrag = _getStringSize(claim) > SUB_NAME_LENGTH
            ? string.concat(_substring(claim, 0, SUB_NAME_LENGTH), "...")
            : claim;
        bool hasVerifiers = vclaim.verifiers.length > 0;
        string memory metadataName = string.concat("Eco ID - ", nameFrag);

        meta = _metaPrefix(vclaim.claim, metadataName, hasVerifiers);
        string memory closing = hasVerifiers ? '"}]}' : "]}";
        meta = string.concat(
            meta,
            _metaVerifierArray(vclaim.verifiers, cursor, limit),
            closing
        );

        string memory base = "data:application/json;base64,";
        string memory base64EncodedMeta = Base64.encode(
            bytes(string(abi.encodePacked(meta)))
        );

        meta = string(abi.encodePacked(base, base64EncodedMeta));
    }

    /**
     * Constructs the first portion of the nft metadata
     *
     * @param claim the claim
     * @param name the name of the nft
     * @param hasVerifiers whether the nft has any verifiers
     * @return meta the partially constructed json
     */
    function _metaPrefix(
        string storage claim,
        string memory name,
        bool hasVerifiers
    ) internal pure returns (string memory meta) {
        meta = "{";
        meta = string.concat(
            meta,
            '"description":',
            '"',
            NFT_DESCRIPTION,
            '",'
        );
        meta = string.concat(
            meta,
            '"external_url":',
            '"',
            NFT_EXTERNAL_URL,
            '",'
        );
        meta = string.concat(meta, '"image":', '"', NFT_IMAGE_URL, '",');
        meta = string.concat(meta, '"name":"', name, '",');
        string memory closing = hasVerifiers ? '"},' : '"}';
        meta = string.concat(
            meta,
            '"attributes":[{"trait_type":"Data","value":"',
            claim,
            closing
        );
    }

    /**
     * Constructs the verifier address array portion of the nft metadata
     *
     * @param verifiers the claim being verified
     * @param cursor the pagination cursor for the verifiers array
     * @param limit  the pagination limit for the verifiers array
     *
     * @return meta the partially constructed json
     */
    function _metaVerifierArray(
        VerifierRecord[] storage verifiers,
        uint256 cursor,
        uint256 limit
    ) internal view returns (string memory meta) {
        if (verifiers.length == 0) {
            return meta;
        }
        //get the ending position
        uint256 readEnd = cursor + limit;
        uint256 vl = verifiers.length;
        uint256 end = vl <= readEnd ? vl : readEnd;

        uint256 lastPoint = end - 1;
        for (uint256 i = cursor; i < end; i++) {
            string memory addr = Strings.toHexString(
                uint256(uint160(verifiers[i].verifier)),
                20
            );
            string memory revocable = verifiers[i].revocable ? "true" : "false";

            if (i < lastPoint) {
                meta = string.concat(
                    meta,
                    '{"trait_type":"Verifier","value":"',
                    addr,
                    '","revocable":"',
                    revocable,
                    '"},'
                );
            } else {
                meta = string.concat(
                    meta,
                    '{"trait_type":"Verifier","value": "',
                    addr,
                    '","revocable":"',
                    revocable
                );
            }
        }
    }

    /**
     * Verifies the signature supplied grants the verifier approval by the recipient to modify their claim
     *
     * @param claim the claim being verified
     * @param feeAmount the cost paid to the verifier by the recipient
     * @param revocable true if the verifier can revoke their verification of the claim in the future
     * @param recipient the address of the recipient of a registration
     * @param verifier  the address of the verifying agent
     * @param deadline the deadline in milliseconds from epoch that the signature expires
     * @param approveSig signature that we are validating grants the verifier permission to register the claim to the recipient
     *
     * @return true if the signature is valid, false otherwise
     */
    function _verifyRegistrationApprove(
        string calldata claim,
        uint256 feeAmount,
        bool revocable,
        address recipient,
        address verifier,
        uint256 deadline,
        uint256 nonce,
        bytes calldata approveSig
    ) internal view returns (bool) {
        bytes32 hash = _getApproveHash(
            claim,
            feeAmount,
            revocable,
            recipient,
            verifier,
            deadline,
            nonce
        );
        return hash.recover(approveSig) == recipient;
    }

    /**
     * Verifies the signature supplied belongs to the verifier for a certain claim.
     *
     * @param claim the claim being verified
     * @param feeAmount the cost paid to the verifier by the recipient
     * @param revocable true if the verifier can revoke their verification of the claim in the future
     * @param recipient the address of the recipient of a registration
     * @param verifier  the address of the verifying agent
     * @param deadline the deadline in milliseconds from epoch that the signature expires
     * @param verifierSig signature that we are validating comes from the verifier
     *
     * @return true if the signature is valid, false otherwise
     */
    function _verifyRegistrationVerify(
        string calldata claim,
        uint256 feeAmount,
        bool revocable,
        address recipient,
        address verifier,
        uint256 deadline,
        uint256 nonce,
        bytes calldata verifierSig
    ) internal view returns (bool) {
        bytes32 hash = _getVerificationHash(
            claim,
            feeAmount,
            revocable,
            recipient,
            deadline,
            nonce
        );
        return hash.recover(verifierSig) == verifier;
    }

    /**
     * Verifies the signature supplied belongs to the verifier for the claim.
     *
     * @param claim the claim that was verified
     * @param recipient  the address of the recipient
     * @param verifier  the address of the verifying agent
     * @param deadline the deadline in milliseconds from epoch that the signature expires
     * @param nonce the nonce for the signatures for this claim registration
     * @param signature signature that we are validating comes from the verifier
     * @return true if the signature is valid, false otherwise
     */
    function _verifyUnregistration(
        string calldata claim,
        address recipient,
        address verifier,
        uint256 deadline,
        uint256 nonce,
        bytes calldata signature
    ) internal view returns (bool) {
        bytes32 hash = _getUnregistrationHash(
            claim,
            recipient,
            verifier,
            deadline,
            nonce
        );
        return hash.recover(signature) == verifier;
    }

    /**
     * @dev Disables the transferFrom and safeTransferFrom calls in the parent contract bounding this token to
     * the original address that it was minted for
     */
    function _isApprovedOrOwner(address, uint256)
        internal
        pure
        override
        returns (bool)
    {
        return false;
    }

    /**
     * Hashes the input parameters for the approval signature verification
     *
     * @param claim the claim being attested to
     * @param feeAmount the cost paid to the verifier by the recipient
     * @param revocable true if the verifier can revoke their verification of the claim in the future
     * @param recipient the address of the user that is having a claim registered
     * @param verifier the address of the verifier of the claim
     * @param deadline the deadline in milliseconds from epoch that the signature expires
     * @param nonce the nonce for the signatures for this claim registration
     */
    function _getApproveHash(
        string calldata claim,
        uint256 feeAmount,
        bool revocable,
        address recipient,
        address verifier,
        uint256 deadline,
        uint256 nonce
    ) private view returns (bytes32) {
        return
            _hashTypedDataV4(
                keccak256(
                    abi.encode(
                        REGISTER_APPROVE_TYPEHASH,
                        keccak256(bytes(claim)),
                        feeAmount,
                        revocable,
                        recipient,
                        verifier,
                        deadline,
                        nonce
                    )
                )
            );
    }

    /**
     * Hashes the input parameters for the registration signature verification
     *
     * @param claim the claim being attested to
     * @param feeAmount the cost to register the claim the recipient is willing to pay
     * @param revocable true if the verifier can revoke their verification of the claim in the future
     * @param recipient the address of the user that is having a claim registered
     * @param deadline the deadline in milliseconds from epoch that the signature expires
     * @param nonce the nonce for the signatures for this claim registration
     */
    function _getVerificationHash(
        string calldata claim,
        uint256 feeAmount,
        bool revocable,
        address recipient,
        uint256 deadline,
        uint256 nonce
    ) private view returns (bytes32) {
        return
            _hashTypedDataV4(
                keccak256(
                    abi.encode(
                        REGISTER_VERIFIER_TYPEHASH,
                        keccak256(bytes(claim)),
                        feeAmount,
                        revocable,
                        recipient,
                        deadline,
                        nonce
                    )
                )
            );
    }

    /**
     * Hashes the input parameters for the unregistration signature verification
     *
     * @param claim the claim that was verified
     * @param recipient the address of the user that owns that claim
     * @param verifier  the address of the verifying agent
     * @param deadline the deadline in milliseconds from epoch that the signature expires
     * @param nonce the nonce for the signatures for this claim registration
     */
    function _getUnregistrationHash(
        string calldata claim,
        address recipient,
        address verifier,
        uint256 deadline,
        uint256 nonce
    ) private view returns (bytes32) {
        return
            _hashTypedDataV4(
                keccak256(
                    abi.encode(
                        UNREGISTER_TYPEHASH,
                        keccak256(bytes(claim)),
                        recipient,
                        verifier,
                        deadline,
                        nonce
                    )
                )
            );
    }

    /**
     * Checks that the claim is not empty
     *
     * @param claim the claim to check
     */
    modifier _validClaim(string memory claim) {
        if (bytes(claim).length == 0) {
            revert EmptyClaim();
        }
        _;
    }

    /**
     * Finds the verifier record in the array and returns it, or reverts
     *
     * @param verifier the verified address to search for
     * @param verifierRecords the verifier records array
     */
    function _getVerifierRecord(
        address verifier,
        VerifierRecord[] storage verifierRecords
    ) internal view returns (VerifierRecord storage) {
        for (uint256 i = 0; i < verifierRecords.length; i++) {
            if (verifierRecords[i].verifier == verifier) {
                return verifierRecords[i];
            }
        }
        //should never get here
        revert("invalid verifier");
    }

    /**
     * Removes a verifier from the verifiers array, does not preserve order
     *
     * @param verifier the verifier to remove from the array
     * @param verifierRecords the verifier records array
     */
    function _removeVerifierRecord(
        address verifier,
        VerifierRecord[] storage verifierRecords
    ) internal {
        for (uint256 i = 0; i < verifierRecords.length; i++) {
            if (verifierRecords[i].verifier == verifier) {
                verifierRecords[i] = verifierRecords[
                    verifierRecords.length - 1
                ];
                verifierRecords.pop();
                return;
            }
        }
    }

    /**
     * Returns a substring of the input argument
     */
    function _substring(
        string memory str,
        uint256 startIndex,
        uint256 endIndex
    ) private pure returns (string memory) {
        bytes memory strBytes = bytes(str);
        bytes memory result = new bytes(endIndex - startIndex);
        for (uint256 i = startIndex; i < endIndex; i++) {
            result[i - startIndex] = strBytes[i];
        }
        return string(result);
    }

    /**
     * Returns the size of a string in bytes
     *
     * @param str string to check
     */
    function _getStringSize(string memory str) internal pure returns (uint256) {
        return bytes(str).length;
    }

    /**
     * Returns the current nonce for a claim and automatically increament it
     *
     * @param claim the claim to get and increment the nonce for
     *
     * @return current current nonce before incrementing
     */
    function _useNonce(string memory claim) internal returns (uint256 current) {
        Counters.Counter storage nonce = _nonces[claim];
        current = nonce.current();
        nonce.increment();
    }

    /**
     * Function for reading NFT-level metadata
     *
     * Designed to match the OpenSea specification
     */
    function contractURI() public pure returns (string memory) {
        return CONTRACT_LEVEL_METADATA_URL;
    }
}

File 2 of 17 : Base64.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.16;

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides a function for encoding some bytes in base64
library Base64 {
    string internal constant TABLE =
        "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

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

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

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

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

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

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

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

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

            // run over the input, 3 bytes at a time
            for {

            } lt(dataPtr, endPtr) {

            } {
                dataPtr := add(dataPtr, 3)

                // read 3 bytes
                let input := mload(dataPtr)

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

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

        return result;
    }
}

File 3 of 17 : 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 4 of 17 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 = _owners[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 nor 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 nor 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 nor 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 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 _owners[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);

        _balances[to] += 1;
        _owners[tokenId] = to;

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

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

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

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

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

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

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

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

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @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.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {}
}

File 5 of 17 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 6 of 17 : draft-EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;
    address private immutable _CACHED_THIS;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _CACHED_THIS = address(this);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

File 7 of 17 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

File 8 of 17 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

pragma solidity ^0.8.0;

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 11 of 17 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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 functionCall(target, data, "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");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(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) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason 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 {
            // 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 12 of 17 : 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 13 of 17 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 14 of 17 : 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 15 of 17 : 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 16 of 17 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 17 of 17 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract ERC20","name":"token","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"DeadlineExpired","type":"error"},{"inputs":[{"internalType":"address","name":"verifier","type":"address"}],"name":"DuplicateVerifier","type":"error"},{"inputs":[],"name":"EmptyClaim","type":"error"},{"inputs":[],"name":"FeePaymentFailed","type":"error"},{"inputs":[],"name":"InvalidRegistrationApproveSignature","type":"error"},{"inputs":[],"name":"InvalidRegistrationVerifierSignature","type":"error"},{"inputs":[],"name":"InvalidVerifierSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"NftAlreadyMinted","type":"error"},{"inputs":[],"name":"NonExistantToken","type":"error"},{"inputs":[],"name":"UnrevocableClaim","type":"error"},{"inputs":[],"name":"UnverifiedClaim","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":[],"name":"InitializeEcoID","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"string","name":"claim","type":"string"},{"indexed":false,"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"claim","type":"string"},{"indexed":false,"internalType":"uint256","name":"feeAmount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"revocable","type":"bool"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"address","name":"verifier","type":"address"}],"name":"RegisterClaim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"claim","type":"string"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":true,"internalType":"address","name":"verifier","type":"address"}],"name":"UnregisterClaim","type":"event"},{"inputs":[],"name":"CONTRACT_LEVEL_METADATA_URL","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"META_LIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFT_DESCRIPTION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFT_EXTERNAL_URL","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NFT_IMAGE_URL","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUB_NAME_LENGTH","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_token","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_tokenClaimIDs","outputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"string","name":"claim","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_tokenIDIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"string","name":"","type":"string"}],"name":"_verifiedClaims","outputs":[{"internalType":"string","name":"claim","type":"string"},{"internalType":"uint256","name":"tokenID","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"string","name":"claim","type":"string"},{"internalType":"address","name":"verifier","type":"address"}],"name":"isClaimVerified","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"string","name":"claim","type":"string"}],"name":"mintNFT","outputs":[{"internalType":"uint256","name":"tokenID","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"claim","type":"string"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"claim","type":"string"},{"internalType":"uint256","name":"feeAmount","type":"uint256"},{"internalType":"bool","name":"revocable","type":"bool"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"verifier","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"approveSig","type":"bytes"},{"internalType":"bytes","name":"verifySig","type":"bytes"}],"name":"register","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenID","type":"uint256"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"tokenURICursor","outputs":[{"internalType":"string","name":"meta","type":"string"}],"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":"string","name":"claim","type":"string"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"verifier","type":"address"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"verifySig","type":"bytes"}],"name":"unregister","outputs":[],"stateMutability":"nonpayable","type":"function"}]

610160346200048f57601f62003fe738819003828101601f199081168501946001600160401b0394939092858711848810176200047957808492604098895283396020938491810103126200048f5751926001600160a01b03841684036200048f578551926200006f8462000494565b600593848152818101641158dbd25160da1b91828252895196620000938862000494565b60019586895285890194603160f81b86528c5198620000b28a62000494565b838a5281888b01528d5191620000c88362000494565b8483528883015289518d8111620004795760009a8b548b81811c911680156200046e575b8b8210146200045a5790818684931162000406575b508a908d8784116001146200039b57926200038f575b5050600019600383901b1c1916908a1b178a555b8151938d85116200037b578954908a82811c9216801562000370575b8a8310146200035c5790849392918695821162000304575b505088928411600114620002a35750899262000297575b5050600019600383901b1c191690861b1785555b51902094519020908460e052610100978289524660a0528051918201927f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f968785528284015260608301524660808301523060a083015260a0825260c08201978289109089111762000283578790525190206080523060c0526101209283526006556101409283527fe6725695a129cfaf28b0652f8b422e9be79d340c2b23b79b804064d20f386b439084a1613b369384620004b18539608051846125ca015260a05184612685015260c0518461259b015260e051846126190152518361263f015251826125f60152518181816118d40152611f2d0152f35b634e487b7160e01b85526041600452602485fd5b01519050388062000176565b898b52888b208a9590939291168b5b8a828210620002ed5750508411620002d3575b505050811b0185556200018a565b015160001960f88460031b161c19169055388080620002c5565b8385015186558c97909501949384019301620002b2565b9091929394508a8c52898c209085808801821c8301938c891062000352575b9188978e9397969594929701901c01915b8281106200034357506200015f565b8d81558796508c910162000334565b9350829362000323565b634e487b7160e01b8c52602260045260248cfd5b91607f169162000147565b634e487b7160e01b8b52604160045260248bfd5b01519050388062000117565b9190858e95168380528d80852094905b828210620003e55750508411620003cb575b505050811b018a556200012b565b015160001960f88460031b161c19169055388080620003bd565b91929395968291958786015181550195019301908e95949392918e620003ab565b9091508c80528a8d2086808501891c8201928d861062000450575b8594939101891c909101908d908f5b838210620004415750505062000101565b81558594508e91018f62000430565b9250819262000421565b634e487b7160e01b8d52602260045260248dfd5b90607f1690620000ec565b634e487b7160e01b600052604160045260246000fd5b600080fd5b604081019081106001600160401b03821117620004795760405256fe60806040526004361015610013575b600080fd5b60003560e01c806301ffc9a71461027657806306fdde031461026d578063081812fc14610264578063095ea7b31461025b5780630f551895146102525780631c3038611461024957806323b872dd146102405780633644e5151461023757806342842e0e1461022e5780634b2ff1441461022557806356fc0ca21461021c5780636271473b146102135780636352211e1461020a57806370a08231146102015780638f90b4771461019557806395d89b41146101f85780639c933bf1146101ef578063a22cb465146101e6578063a70d9c2a146101dd578063a86c9b2b146101d4578063a9cf1e1e146101cb578063b0fcd0c4146101c2578063b24fce88146101b9578063b88d4fde146101b0578063c389e6b5146101a7578063c87b56dd1461019e578063e8a3d48514610195578063e985e9c51461018c578063eacabe1414610183578063ecd0c0c31461017a5763fa557e0b1461017257600080fd5b61000e6118f8565b5061000e6118b3565b5061000e61177b565b5061000e611724565b5061000e610d6c565b5061000e611691565b5061000e611644565b5061000e611528565b5061000e6114e3565b5061000e61127e565b5061000e611228565b5061000e61112d565b5061000e610fcc565b5061000e610eda565b5061000e610ebd565b5061000e610e17565b5061000e610cb7565b5061000e610c87565b5061000e610c6a565b5061000e610ba0565b5061000e610b0b565b5061000e610a9e565b5061000e610a7a565b5061000e610a61565b5061000e6109fb565b5061000e610698565b5061000e610588565b5061000e6104bc565b5061000e6103d8565b5061000e6102a9565b7fffffffff0000000000000000000000000000000000000000000000000000000081160361000e57565b503461000e57602036600319011261000e5760207fffffffff000000000000000000000000000000000000000000000000000000006004356102ea8161027f565b167f80ac58cd000000000000000000000000000000000000000000000000000000008114908115610352575b8115610328575b506040519015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150143861031d565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150610316565b60005b83811061038f5750506000910152565b818101518382015260200161037f565b906020916103b88151809281855285808601910161037c565b601f01601f1916010190565b9060206103d592818152019061039f565b90565b503461000e576000806003193601126104b957604051908080546103fb8161114a565b8085529160019180831690811561048f5750600114610435575b61043185610425818703826108e8565b604051918291826103c4565b0390f35b80809450527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b82841061047757505050810160200161042582610431610415565b8054602085870181019190915290930192810161045c565b8695506104319693506020925061042594915060ff191682840152151560051b8201019293610415565b80fd5b503461000e57602036600319011261000e576004356104f96104f48260005260026020526001600160a01b0360406000205416151590565b611917565b600052600460205260206001600160a01b0360406000205416604051908152f35b600435906001600160a01b038216820361000e57565b606435906001600160a01b038216820361000e57565b608435906001600160a01b038216820361000e57565b604435906001600160a01b038216820361000e57565b602435906001600160a01b038216820361000e57565b503461000e57604036600319011261000e576105a261051a565b6024356105ae81611962565b916001600160a01b03808416809183161461062e576105e0936105db9133149081156105e2575b50611984565b611b37565b005b61062891506106219061060933916001600160a01b03166000526005602052604060002090565b906001600160a01b0316600052602052604060002090565b5460ff1690565b386105d5565b608460405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152fd5b503461000e57606036600319011261000e576004356106d46106d08260005260026020526001600160a01b0360406000205416151590565b1590565b61080d576107e56104256107bc61079d6107346106fe610431966000526008602052604060002090565b600161072d61071483546001600160a01b031690565b6001600160a01b03166000526007602052604060002090565b910161272e565b61077161077761074383611184565b600a8151116000146108085761075b61076091613a76565b61274b565b60028401938454151593849261279f565b90612daf565b90156107f75761079761078861282c565b925b60443590602435906131a3565b90612865565b6107eb6107d56107ab6128b9565b9260405194859160208301906115c5565b03936107d0601f19958681018352826108e8565b612a1b565b60405195869360208501906115c5565b906115c5565b039081018352826108e8565b6107976108026127f3565b9261078a565b610760565b60046040517f31efff51000000000000000000000000000000000000000000000000000000008152fd5b50634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761086a57604052565b610872610837565b604052565b6080810190811067ffffffffffffffff82111761086a57604052565b6020810190811067ffffffffffffffff82111761086a57604052565b610120810190811067ffffffffffffffff82111761086a57604052565b60c0810190811067ffffffffffffffff82111761086a57604052565b90601f8019910116810190811067ffffffffffffffff82111761086a57604052565b604051906109178261084e565b565b60209067ffffffffffffffff8111610937575b601f01601f19160190565b61093f610837565b61092c565b604051906020820182811067ffffffffffffffff821117610969575b60405260008252565b610971610837565b610960565b6040519061098382610877565b604382527f53384a00000000000000000000000000000000000000000000000000000000006060837f68747470733a2f2f697066732e696f2f697066732f516d575a46766238384b4460208201527f6f73374259796635326274785075454569665a4e37693543413259664333617a60408201520152565b503461000e57600036600319011261000e57610431610a18610976565b60405191829160208352602083019061039f565b606090600319011261000e576001600160a01b0390600435828116810361000e5791602435908116810361000e579060443590565b3461000e57610a6f36610a2c565b5050506109176119f5565b503461000e57600036600319011261000e576020610a96612591565b604051908152f35b3461000e57610aac36610a2c565b5050506000604051610abd81610893565b526109176119f5565b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020838186019501011161000e57565b8015150361000e57565b6044359061091782610af4565b503461000e5761010036600319011261000e5767ffffffffffffffff60043581811161000e57610b3f903690600401610ac6565b90610b48610afe565b91610b51610530565b610b59610546565b9160c43586811161000e57610b72903690600401610ac6565b93909260e43597881161000e57610b906105e0983690600401610ac6565b97909660a4359460243591611d8b565b503461000e57606036600319011261000e57610bba61051a565b6024359067ffffffffffffffff821161000e57610c2560ff916003610c0c610be86020963690600401610ac6565b6001600160a01b03610bf861055c565b951660005260078852604060002091611d72565b01906001600160a01b0316600052602052604060002090565b54166040519015158152f35b60405190610c3e8261084e565b601682527f68747470733a2f2f65636f2e6f72672f65636f2d6964000000000000000000006020830152565b503461000e57600036600319011261000e57610431610a18610c31565b503461000e57602036600319011261000e576020610ca6600435611962565b6001600160a01b0360405191168152f35b503461000e57602036600319011261000e576001600160a01b03610cd961051a565b168015610d02576000526003602052610431604060002054604051918291829190602083019252565b608460405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152fd5b503461000e57600036600319011261000e57610431604051610d8d81610877565b604381527f68747470733a2f2f697066732e696f2f697066732f516d5a3776705933346a6460208201527f6d44796e386f74424d7a7658376f6d6e364e575466647856467238524d75414160408201527f56505a0000000000000000000000000000000000000000000000000000000000606082015260405191829160208352602083019061039f565b503461000e576000806003193601126104b95760405190806001805491610e3d8361114a565b8086529282811690811561048f5750600114610e635761043185610425818703826108e8565b92508083527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828410610ea557505050810160200161042582610431610415565b80546020858701810191909152909301928101610e8a565b503461000e57600036600319011261000e576020604051600a8152f35b503461000e57604036600319011261000e57610ef461051a565b602435610f0081610af4565b6001600160a01b03821691823314610f885781610f40610f51923360005260056020526040600020906001600160a01b0316600052602052604060002090565b9060ff801983541691151516179055565b604051901515815233907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319080602081015b0390a3005b606460405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152fd5b503461000e57600036600319011261000e57602060405160328152f35b60405190610ff6826108af565b60f782527f616e6420676f7665726e616e63652073797374656d732e000000000000000000610100837f45636f20494473206172652066756c6c7920646563656e7472616c697a65642060208201527f616e64207065726d697373696f6e6c657373206964656e74697479207072696d60408201527f6974697665732064657369676e656420746f2062652073696d706c652c20766560608201527f72736174696c6520616e6420696d6d757461626c652e2054686579206172652060808201527f696e74656e64656420746f207365727665206173206120626173696320666f7560a08201527f6e646174696f6e20746f20626f6f74737472617020696e6372656173696e676c60c08201527f792d636f6d706c657820616e6420637573746f6d2072657075746174696f6e2060e08201520152565b503461000e57600036600319011261000e57610431610a18610fe9565b90600182811c9216801561117a575b602083101461116457565b634e487b7160e01b600052602260045260246000fd5b91607f1691611159565b90604051918260008254926111988461114a565b90818452600194858116908160001461120557506001146111c2575b5050610917925003836108e8565b9093915060005260209081600020936000915b8183106111ed575050610917935082010138806111b4565b855488840185015294850194879450918301916111d5565b91505061091794506020925060ff191682840152151560051b82010138806111b4565b503461000e57602036600319011261000e576004356000526008602052604060002061126160016001600160a01b038354169201611184565b90610431604051928392835260406020840152604083019061039f565b503461000e5760a036600319011261000e5767ffffffffffffffff6004803582811161000e576112b19036908301610ac6565b90916112bb610572565b936112c461055c565b916064359160843590811161000e576112e09036908301610ac6565b6112ee929192368789611491565b5115611481574284106114715761132261131b896001600160a01b03166000526007602052604060002090565b8789611d72565b92600384019361134b6106d06106218988906001600160a01b0316600052602052604060002090565b611461576002019461136d6106d0611363888a613897565b5460a01c60ff1690565b61143857916106d0918961139794898d8c61139161138c368388611491565b613aeb565b946137ae565b611410575082916113ed6113e37fe7485580c64d6de0e6843d2d684ac5f367466fbd1c45452b2380ccb0ef23af8a96956113f394906001600160a01b0316600052602052604060002090565b805460ff19169055565b82613966565b610f836040519283926001600160a01b03809116971695836122e9565b6040517f0574e985000000000000000000000000000000000000000000000000000000008152fd5b836040517fca209704000000000000000000000000000000000000000000000000000000008152fd5b83604051633bbc695560e21b8152fd5b50604051631ab7da6b60e01b8152fd5b5060405163da80cc7360e01b8152fd5b92919261149d82610919565b916114ab60405193846108e8565b82948184528183011161000e578281602093846000960137010152565b9080601f8301121561000e578160206103d593359101611491565b503461000e57602036600319011261000e5760043567ffffffffffffffff811161000e5761151f61151a60209236906004016114c8565b6115dc565b54604051908152f35b3461000e57608036600319011261000e5761154161051a565b5061154a610572565b5060643567ffffffffffffffff811161000e573660238201121561000e5761157c903690602481600401359101611491565b506109176119f5565b90604060031983011261000e576004356001600160a01b038116810361000e57916024359067ffffffffffffffff821161000e576103d5916004016114c8565b906115d86020928281519485920161037c565b0190565b60206115f591816040519382858094519384920161037c565b8101600981520301902090565b60209061161c92826040519483868095519384920161037c565b82019081520301902090565b92919061163f60209160408652604086019061039f565b930152565b503461000e576116736001600160a01b0361165e36611585565b91166000526007602052604060002090611602565b600161167e82611184565b9101549061043160405192839283611628565b503461000e57602036600319011261000e576004356116c96106d08260005260026020526001600160a01b0360406000205416151590565b61080d576107e56104256107bc61079d6116f36106fe610431966000526008602052604060002090565b61077161170261074383611184565b90156117195761079761171361282c565b926130ce565b6107976117136127f3565b503461000e57604036600319011261000e57602060ff610c2561174561051a565b6001600160a01b03611755610572565b9116600052600584526040600020906001600160a01b0316600052602052604060002090565b503461000e5761178a36611585565b6117b06117aa836001600160a01b03166000526007602052604060002090565b82611602565b6002810154156118a2576001019081548061186f57507fec4de1eef14af3ae5d77facf1ed7a9d3d50f6285573ee0ec155fc11217fc34426001600160a01b03610431946006548095611809611804836122fa565b600655565b5561184061181561090a565b6001600160a01b038316815285602082015261183b876000526008602052604060002090565b612312565b61184a858261241f565b61185c85604051938493169583611628565b0390a26040519081529081906020820190565b6040517f198647a00000000000000000000000000000000000000000000000000000000081526004810191909152602490fd5b6004604051633bbc695560e21b8152fd5b503461000e57600036600319011261000e5760206040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168152f35b503461000e57600036600319011261000e576020600654604051908152f35b1561191e57565b606460405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152fd5b60005260026020526001600160a01b03604060002054166103d5811515611917565b1561198b57565b608460405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152fd5b50608460405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152fd5b15611a6757565b60405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b50634e487b7160e01b600052601160045260246000fd5b600019810191908211611af857565b610917611ad2565b9060018201809211611af857565b9060028201809211611af857565b9060208201809211611af857565b91908201809211611af857565b816000526004602052611b71816040600020906001600160a01b031673ffffffffffffffffffffffffffffffffffffffff19825416179055565b6001600160a01b0380611b8384611962565b169116907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256000604051a4565b9081602091031261000e57516103d58161027f565b6103d593926001600160a01b03608093168252600060208301526040820152816060820152019061039f565b506040513d6000823e3d90fd5b3d15611c29573d90611c0f82610919565b91611c1d60405193846108e8565b82523d6000602084013e565b606090565b909190803b15611d6a57611c816020916001600160a01b039360006040519586809581947f150b7a02000000000000000000000000000000000000000000000000000000009a8b84523360048501611bc5565b0393165af160009181611d3a575b50611d1457611c9c611bfe565b80519081611d0f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000161490565b611d5c91925060203d8111611d63575b611d5481836108e8565b810190611bb0565b9038611c8f565b503d611d4a565b505050600190565b6020919283604051948593843782019081520301902090565b98909693999194959297611da036898c611491565b511561206857428410612057576106d0611dd49189968c878f8c908f8d611dcc61138c8f369089611491565b9d8e966133a0565b61202d57611deb936106d093878c8b898c8f6136e9565b61200357611e16611e0f876001600160a01b03166000526007602052604060002090565b8487611d72565b6003810190611e3b6106218584906001600160a01b0316600052602052604060002090565b611fc95783611e889261060983611e56898c611e7b976120e4565b6002611e6061090a565b6001600160a01b0386168152918b15156020840152016121f7565b805460ff19166001179055565b80611ed3575b7fa86933f16b8c4813c2c4d5eec0ce857a43493a4c101d75a72875bb0c7adb37a593611ece916040519485946001600160a01b03809116991697856122c3565b0390a3565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b03808816600483015283166024820152604481018290526020818060648101038160006001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000165af1908115611fbc575b600091611f8e575b50611e8e5760046040517ff0e492a3000000000000000000000000000000000000000000000000000000008152fd5b611faf915060203d8111611fb5575b611fa781836108e8565b81019061228d565b38611f5f565b503d611f9d565b611fc4611bf1565b611f57565b6040517f74e26d120000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602490fd5b60046040517fc5248083000000000000000000000000000000000000000000000000000000008152fd5b60046040517f9c06bbce000000000000000000000000000000000000000000000000000000008152fd5b6004604051631ab7da6b60e01b8152fd5b600460405163da80cc7360e01b8152fd5b50634e487b7160e01b600052600060045260246000fd5b90601f811161209e57505050565b600091825260208220906020601f850160051c830194106120da575b601f0160051c01915b8281106120cf57505050565b8181556001016120c3565b90925082906120ba565b90929167ffffffffffffffff81116121ad575b61210b81612105845461114a565b84612090565b6000601f8211600114612145578192939460009261213a575b50508160011b916000199060031b1c1916179055565b013590503880612124565b601f1982169461215a84600052602060002090565b91805b87811061219557508360019596971061217b575b505050811b019055565b0135600019600384901b60f8161c19169055388080612171565b9092602060018192868601358155019401910161215d565b6121b5610837565b6120f7565b50634e487b7160e01b600052603260045260246000fd5b80548210156121ea575b60005260206000200190600090565b6121f26121ba565b6121db565b9060206122216109179380549068010000000000000000821015612280575b6001820181556121d1565b929092612273575b80518354929091015160ff60a01b90151560a01b167fffffffffffffffffffffff0000000000000000000000000000000000000000009092166001600160a01b0390911617179055565b61227b612079565b612229565b612288610837565b612216565b9081602091031261000e57516103d581610af4565b908060209392818452848401376000828201840152601f01601f1916010190565b929493906122dc906040936060865260608601916122a2565b9460208401521515910152565b9160206103d59381815201916122a2565b600190600019811461230a570190565b6115d8611ad2565b8151815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03919091161781556001809101916020809101519081519167ffffffffffffffff8311612412575b6123708361236a875461114a565b87612090565b81601f84116001146123a9575092829391839260009461239e575b50501b916000199060031b1c1916179055565b01519250388061238b565b919083601f1981166123c088600052602060002090565b946000905b888383106123f857505050106123df57505050811b019055565b015160001960f88460031b161c19169055388080612171565b8587015188559096019594850194879350908101906123c5565b61241a610837565b61235c565b9060405161242c81610893565b600081526001600160a01b03831691821561254d576124618160005260026020526001600160a01b0360406000205416151590565b6125095783816125049461248b610917976001600160a01b03166000526003602052604060002090565b6124958154611b00565b90556124d7836124af846000526002602052604060002090565b906001600160a01b031673ffffffffffffffffffffffffffffffffffffffff19825416179055565b60007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef81604051a4611c2e565b611a60565b606460405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152fd5b606460405162461bcd60e51b815260206004820152602060248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016301480612682575b156125ec577f000000000000000000000000000000000000000000000000000000000000000090565b60405160208101907f000000000000000000000000000000000000000000000000000000000000000082527f000000000000000000000000000000000000000000000000000000000000000060408201527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260a0815261267c816108cc565b51902090565b507f000000000000000000000000000000000000000000000000000000000000000046146125c3565b6000929181546126ba8161114a565b9260019180831690811561271357506001146126d7575b50505050565b90919293945060005260209081600020906000915b85831061270257505050500190388080806126d1565b8054858401529183019181016126ec565b60ff19168452505050811515909102019150388080806126d1565b60209061274192604051938480936126ab565b9081520301902090565b9061091760236040518461276982965180926020808601910161037c565b81017f2e2e2e000000000000000000000000000000000000000000000000000000000060208201520360038101855201836108e8565b90610917602960405180947f45636f204944202d20000000000000000000000000000000000000000000000060208301526127e3815180926020868601910161037c565b81010360098101855201836108e8565b604051906128008261084e565b600282527f5d7d0000000000000000000000000000000000000000000000000000000000006020830152565b604051906128398261084e565b600482527f227d5d7d000000000000000000000000000000000000000000000000000000006020830152565b6109179193929360405194859183516128868160209687808801910161037c565b830161289a8251809387808501910161037c565b016128ad8251809386808501910161037c565b010380855201836108e8565b604051906128c68261084e565b601d82527f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000006020830152565b604051906060820182811067ffffffffffffffff821117612963575b604052604082527f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f6040837f4142434445464748494a4b4c4d4e4f505152535455565758595a61626364656660208201520152565b61296b610837565b61290e565b7f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81116001166129a1575b60021b90565b6129a9611ad2565b61299b565b604051906060820182811067ffffffffffffffff8211176129dc575b604052602a8252604082602036910137565b6129e4610837565b6129ca565b906129f382610919565b612a0060405191826108e8565b8281528092612a11601f1991610919565b0190602036910137565b805115612b3a57612a2a6128f2565b612a46612a41612a3a8451611b0e565b6003900490565b612970565b91612a58612a5384611b1c565b6129e9565b92835280815182019060208501935b828210612ade57505050600390510680600114612ab357600214612a89575090565b7f3d0000000000000000000000000000000000000000000000000000000000000090600019015290565b507f3d3d00000000000000000000000000000000000000000000000000000000000090600119015290565b90919360049060038094019384516001603f81818460121c16880101519260f893841b8652828282600c1c1689010151841b8387015282828260061c1689010151841b60028701521686010151901b9082015201939190612a67565b506103d5610944565b6032610917919392936040519481612b6587935180926020808701910161037c565b82017f2265787465726e616c5f75726c223a00000000000000000000000000000000006020820152601160f91b602f820152612bab82518093602060308501910161037c565b0161088b60f21b60308201520360128101855201836108e8565b602b610917919392936040519481612be787935180926020808701910161037c565b82017f22696d616765223a0000000000000000000000000000000000000000000000006020820152601160f91b6028820152612c2d82518093602060298501910161037c565b0161088b60f21b602982015203600b8101855201836108e8565b602a610917919392936040519481612c6987935180926020808701910161037c565b82017f226e616d65223a220000000000000000000000000000000000000000000000006020820152612ca582518093602060288501910161037c565b0161088b60f21b602882015203600a8101855201836108e8565b60405190612ccc8261084e565b600282527f227d0000000000000000000000000000000000000000000000000000000000006020830152565b60405190612d058261084e565b6003825262089f4b60ea1b6020830152565b6020604c9493612da0612d93610917956040519886612d3f8b9851809289808c01910161037c565b87017f2261747472696275746573223a5b7b2274726169745f74797065223a22446174878201527f61222c2276616c7565223a220000000000000000000000000000000000000000604082015201906126ab565b918281519485920161037c565b0103601f1981018452836108e8565b612e996103d59392612e94612e86612e18612e786031604051612dd18161084e565b60018152602081017f7b000000000000000000000000000000000000000000000000000000000000008152612e04610fe9565b90604051958693518092602086019061037c565b82017f226465736372697074696f6e223a0000000000000000000000000000000000006020820152601160f91b602e820152612e5e825180936020602f8501910161037c565b0161088b60f21b602f8201520360118101845201826108e8565b612e80610c31565b90612b43565b612e8e610976565b90612bc5565b612c47565b9115612ead57612ea7612cf8565b91612d17565b612ea7612cbf565b60405190612ec28261084e565b600582527f66616c73650000000000000000000000000000000000000000000000000000006020830152565b60405190612efb8261084e565b600482527f74727565000000000000000000000000000000000000000000000000000000006020830152565b6052906109179294936040519582612f4988945180926020808801910161037c565b83017f7b2274726169745f74797065223a225665726966696572222c2276616c75652260208201527f3a202200000000000000000000000000000000000000000000000000000000006040820152612fab82518093602060438501910161037c565b017f222c227265766f6361626c65223a2200000000000000000000000000000000006043820152612fe5825180936020878501910161037c565b010360328101855201836108e8565b605490610917929493604051958261301688945180926020808801910161037c565b83017f7b2274726169745f74797065223a225665726966696572222c2276616c75652260208201527f3a22000000000000000000000000000000000000000000000000000000000000604082015261307882518093602060428501910161037c565b017f222c227265766f6361626c65223a22000000000000000000000000000000000060428201526130b382518093602060518501910161037c565b0162089f4b60ea1b60518201520360348101855201836108e8565b906060918054801561319f5760328111613197575b6130ec81611ae9565b6000925b8284106130fd5750505050565b909192946131789061313a61313561312961312961311b8b886121d1565b50546001600160a01b031690565b6001600160a01b031690565b6132e5565b61315261314789866121d1565b505460a01c60ff1690565b156131895761315f612eee565b905b858910156131805761317292612ff4565b956122fa565b9291906130f0565b61317292612f27565b613191612eb5565b90613161565b5060326130e3565b5050565b92919060609380549283156126d1576131bc9083611b2a565b60009390808211613257575091905b6131d483611ae9565b91935b8385106131e5575050505050565b90919293956132379061320461313561312961312961311b8c896121d1565b6132116131478a876121d1565b156132495761321e612eee565b905b868a10156132405761323192612ff4565b966122fa565b939291906131d7565b61323192612f27565b613251612eb5565b90613220565b905091906131cb565b90602091805182101561327257010190565b61327a6121ba565b010190565b801561328d575b6000190190565b613295611ad2565b613286565b156132a157565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b6132ed6129ae565b90815115613393575b603060208301538151600190811015613386575b90607860218401536029915b80831161332957506103d591501561329a565b90807f3031323334353637383961626364656600000000000000000000000000000000600f61337293166010811015613379575b1a6133688587613260565b5360041c9261327f565b9190613316565b6133816121ba565b61335d565b61338e6121ba565b61330a565b61339b6121ba565b6132f6565b916134559761344d976133c161343f95613447989c97959d999d3691611491565b60208151910120936040519360208501957fd592e25e89e493feb1c2e5e235b302997d8e3cabec1a37b4ff23a5967887ec26875260408601526060850152151560808401526001600160a01b0380809c169c8d60a08601521660c084015260e083015261010090818301528152613437816108af565b51902061384b565b923691611491565b906135fb565b91909161347a565b161490565b6005111561346457565b634e487b7160e01b600052602160045260246000fd5b6134838161345a565b8061348b5750565b6134948161345a565b600181036134e15760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b6134ea8161345a565b600281036135375760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b6135408161345a565b600381036135985760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b806135a460049261345a565b146135ab57565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608490fd5b90604181511460001461362957613625916020820151906060604084015193015160001a90613633565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116136dd5760ff16601b811415806136d2575b6136c6579160809493916020936040519384528484015260408301526060820152600093849182805260015afa156136b9575b81516001600160a01b038116156136b3579190565b50600190565b6136c1611bf1565b61369e565b50505050600090600490565b50601c81141561366b565b50505050600090600390565b926137929596989261379a9a95986137096134479661343f953691611491565b60208151910120926040519260208401947f799be5bb05379995b02bf17ba94686d3dfed3dd5e54dba2f0e230a9acf48e072865260408501526060840152151560808301526001600160a01b039a8b809b1660a084015260c083015260e082015260e08152610100810181811067ffffffffffffffff8211176137a1575b60405251902061384b565b94909461347a565b1691161490565b6137a9610837565b613787565b61345595613447936137cc61343f9361344d989b979a953691611491565b60208151910120916040519160208301937f9eacf97babb44a432a52c1157cd6f0c3e91062648f8853a5b7e586dbfdeb3d06855260408401526001600160a01b039a8b8092166060850152169a8b608084015260a083015260c082015260c0815260e0810181811067ffffffffffffffff8211176137a1576040525190205b613853612591565b906040519060208201927f19010000000000000000000000000000000000000000000000000000000000008452602283015260428201526042815261267c81610877565b9060005b81548110156138df576138ae81836121d1565b50546001600160a01b038481169116146138d0576138cb906122fa565b61389b565b906138db92506121d1565b5090565b606460405162461bcd60e51b815260206004820152601060248201527f696e76616c6964207665726966696572000000000000000000000000000000006044820152fd5b80548015613950576000190190600061393c83836121d1565b613944575555565b61394c612079565b5555565b634e487b7160e01b600052603160045260246000fd5b9060005b8154808210156126d15761397e82846121d1565b50906001600160a01b0380925416828616146139a457505061399f906122fa565b61396a565b61091794506139c36139cb916000198101908111613a69575b856121d1565b5092846121d1565b919091613a5c575b8282036139e3575b505050613923565b82613a1960ff92613a5495541684906001600160a01b031673ffffffffffffffffffffffffffffffffffffffff19825416179055565b5460a01c167fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff60ff60a01b835492151560a01b169116179055565b3880806139db565b613a64612079565b6139d3565b613a71611ad2565b6139bd565b60405190613a838261084e565b600a9081835260203681850137600090815b838110613aa3575050505090565b807fff00000000000000000000000000000000000000000000000000000000000000613ad2613ae69385613260565b5116841a613ae08288613260565b536122fa565b613a95565b613af4906115dc565b9081549160018301905556fea2646970667358221220233a1cd2525fb8e7252a2f1916abe1ac40eff3556e386823c31ecc3a0aec0fd164736f6c634300081000330000000000000000000000008dbf9a4c99580fc7fd4024ee08f3994420035727

Deployed Bytecode

0x60806040526004361015610013575b600080fd5b60003560e01c806301ffc9a71461027657806306fdde031461026d578063081812fc14610264578063095ea7b31461025b5780630f551895146102525780631c3038611461024957806323b872dd146102405780633644e5151461023757806342842e0e1461022e5780634b2ff1441461022557806356fc0ca21461021c5780636271473b146102135780636352211e1461020a57806370a08231146102015780638f90b4771461019557806395d89b41146101f85780639c933bf1146101ef578063a22cb465146101e6578063a70d9c2a146101dd578063a86c9b2b146101d4578063a9cf1e1e146101cb578063b0fcd0c4146101c2578063b24fce88146101b9578063b88d4fde146101b0578063c389e6b5146101a7578063c87b56dd1461019e578063e8a3d48514610195578063e985e9c51461018c578063eacabe1414610183578063ecd0c0c31461017a5763fa557e0b1461017257600080fd5b61000e6118f8565b5061000e6118b3565b5061000e61177b565b5061000e611724565b5061000e610d6c565b5061000e611691565b5061000e611644565b5061000e611528565b5061000e6114e3565b5061000e61127e565b5061000e611228565b5061000e61112d565b5061000e610fcc565b5061000e610eda565b5061000e610ebd565b5061000e610e17565b5061000e610cb7565b5061000e610c87565b5061000e610c6a565b5061000e610ba0565b5061000e610b0b565b5061000e610a9e565b5061000e610a7a565b5061000e610a61565b5061000e6109fb565b5061000e610698565b5061000e610588565b5061000e6104bc565b5061000e6103d8565b5061000e6102a9565b7fffffffff0000000000000000000000000000000000000000000000000000000081160361000e57565b503461000e57602036600319011261000e5760207fffffffff000000000000000000000000000000000000000000000000000000006004356102ea8161027f565b167f80ac58cd000000000000000000000000000000000000000000000000000000008114908115610352575b8115610328575b506040519015158152f35b7f01ffc9a7000000000000000000000000000000000000000000000000000000009150143861031d565b7f5b5e139f0000000000000000000000000000000000000000000000000000000081149150610316565b60005b83811061038f5750506000910152565b818101518382015260200161037f565b906020916103b88151809281855285808601910161037c565b601f01601f1916010190565b9060206103d592818152019061039f565b90565b503461000e576000806003193601126104b957604051908080546103fb8161114a565b8085529160019180831690811561048f5750600114610435575b61043185610425818703826108e8565b604051918291826103c4565b0390f35b80809450527f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b82841061047757505050810160200161042582610431610415565b8054602085870181019190915290930192810161045c565b8695506104319693506020925061042594915060ff191682840152151560051b8201019293610415565b80fd5b503461000e57602036600319011261000e576004356104f96104f48260005260026020526001600160a01b0360406000205416151590565b611917565b600052600460205260206001600160a01b0360406000205416604051908152f35b600435906001600160a01b038216820361000e57565b606435906001600160a01b038216820361000e57565b608435906001600160a01b038216820361000e57565b604435906001600160a01b038216820361000e57565b602435906001600160a01b038216820361000e57565b503461000e57604036600319011261000e576105a261051a565b6024356105ae81611962565b916001600160a01b03808416809183161461062e576105e0936105db9133149081156105e2575b50611984565b611b37565b005b61062891506106219061060933916001600160a01b03166000526005602052604060002090565b906001600160a01b0316600052602052604060002090565b5460ff1690565b386105d5565b608460405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152fd5b503461000e57606036600319011261000e576004356106d46106d08260005260026020526001600160a01b0360406000205416151590565b1590565b61080d576107e56104256107bc61079d6107346106fe610431966000526008602052604060002090565b600161072d61071483546001600160a01b031690565b6001600160a01b03166000526007602052604060002090565b910161272e565b61077161077761074383611184565b600a8151116000146108085761075b61076091613a76565b61274b565b60028401938454151593849261279f565b90612daf565b90156107f75761079761078861282c565b925b60443590602435906131a3565b90612865565b6107eb6107d56107ab6128b9565b9260405194859160208301906115c5565b03936107d0601f19958681018352826108e8565b612a1b565b60405195869360208501906115c5565b906115c5565b039081018352826108e8565b6107976108026127f3565b9261078a565b610760565b60046040517f31efff51000000000000000000000000000000000000000000000000000000008152fd5b50634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761086a57604052565b610872610837565b604052565b6080810190811067ffffffffffffffff82111761086a57604052565b6020810190811067ffffffffffffffff82111761086a57604052565b610120810190811067ffffffffffffffff82111761086a57604052565b60c0810190811067ffffffffffffffff82111761086a57604052565b90601f8019910116810190811067ffffffffffffffff82111761086a57604052565b604051906109178261084e565b565b60209067ffffffffffffffff8111610937575b601f01601f19160190565b61093f610837565b61092c565b604051906020820182811067ffffffffffffffff821117610969575b60405260008252565b610971610837565b610960565b6040519061098382610877565b604382527f53384a00000000000000000000000000000000000000000000000000000000006060837f68747470733a2f2f697066732e696f2f697066732f516d575a46766238384b4460208201527f6f73374259796635326274785075454569665a4e37693543413259664333617a60408201520152565b503461000e57600036600319011261000e57610431610a18610976565b60405191829160208352602083019061039f565b606090600319011261000e576001600160a01b0390600435828116810361000e5791602435908116810361000e579060443590565b3461000e57610a6f36610a2c565b5050506109176119f5565b503461000e57600036600319011261000e576020610a96612591565b604051908152f35b3461000e57610aac36610a2c565b5050506000604051610abd81610893565b526109176119f5565b9181601f8401121561000e5782359167ffffffffffffffff831161000e576020838186019501011161000e57565b8015150361000e57565b6044359061091782610af4565b503461000e5761010036600319011261000e5767ffffffffffffffff60043581811161000e57610b3f903690600401610ac6565b90610b48610afe565b91610b51610530565b610b59610546565b9160c43586811161000e57610b72903690600401610ac6565b93909260e43597881161000e57610b906105e0983690600401610ac6565b97909660a4359460243591611d8b565b503461000e57606036600319011261000e57610bba61051a565b6024359067ffffffffffffffff821161000e57610c2560ff916003610c0c610be86020963690600401610ac6565b6001600160a01b03610bf861055c565b951660005260078852604060002091611d72565b01906001600160a01b0316600052602052604060002090565b54166040519015158152f35b60405190610c3e8261084e565b601682527f68747470733a2f2f65636f2e6f72672f65636f2d6964000000000000000000006020830152565b503461000e57600036600319011261000e57610431610a18610c31565b503461000e57602036600319011261000e576020610ca6600435611962565b6001600160a01b0360405191168152f35b503461000e57602036600319011261000e576001600160a01b03610cd961051a565b168015610d02576000526003602052610431604060002054604051918291829190602083019252565b608460405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152fd5b503461000e57600036600319011261000e57610431604051610d8d81610877565b604381527f68747470733a2f2f697066732e696f2f697066732f516d5a3776705933346a6460208201527f6d44796e386f74424d7a7658376f6d6e364e575466647856467238524d75414160408201527f56505a0000000000000000000000000000000000000000000000000000000000606082015260405191829160208352602083019061039f565b503461000e576000806003193601126104b95760405190806001805491610e3d8361114a565b8086529282811690811561048f5750600114610e635761043185610425818703826108e8565b92508083527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b828410610ea557505050810160200161042582610431610415565b80546020858701810191909152909301928101610e8a565b503461000e57600036600319011261000e576020604051600a8152f35b503461000e57604036600319011261000e57610ef461051a565b602435610f0081610af4565b6001600160a01b03821691823314610f885781610f40610f51923360005260056020526040600020906001600160a01b0316600052602052604060002090565b9060ff801983541691151516179055565b604051901515815233907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319080602081015b0390a3005b606460405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152fd5b503461000e57600036600319011261000e57602060405160328152f35b60405190610ff6826108af565b60f782527f616e6420676f7665726e616e63652073797374656d732e000000000000000000610100837f45636f20494473206172652066756c6c7920646563656e7472616c697a65642060208201527f616e64207065726d697373696f6e6c657373206964656e74697479207072696d60408201527f6974697665732064657369676e656420746f2062652073696d706c652c20766560608201527f72736174696c6520616e6420696d6d757461626c652e2054686579206172652060808201527f696e74656e64656420746f207365727665206173206120626173696320666f7560a08201527f6e646174696f6e20746f20626f6f74737472617020696e6372656173696e676c60c08201527f792d636f6d706c657820616e6420637573746f6d2072657075746174696f6e2060e08201520152565b503461000e57600036600319011261000e57610431610a18610fe9565b90600182811c9216801561117a575b602083101461116457565b634e487b7160e01b600052602260045260246000fd5b91607f1691611159565b90604051918260008254926111988461114a565b90818452600194858116908160001461120557506001146111c2575b5050610917925003836108e8565b9093915060005260209081600020936000915b8183106111ed575050610917935082010138806111b4565b855488840185015294850194879450918301916111d5565b91505061091794506020925060ff191682840152151560051b82010138806111b4565b503461000e57602036600319011261000e576004356000526008602052604060002061126160016001600160a01b038354169201611184565b90610431604051928392835260406020840152604083019061039f565b503461000e5760a036600319011261000e5767ffffffffffffffff6004803582811161000e576112b19036908301610ac6565b90916112bb610572565b936112c461055c565b916064359160843590811161000e576112e09036908301610ac6565b6112ee929192368789611491565b5115611481574284106114715761132261131b896001600160a01b03166000526007602052604060002090565b8789611d72565b92600384019361134b6106d06106218988906001600160a01b0316600052602052604060002090565b611461576002019461136d6106d0611363888a613897565b5460a01c60ff1690565b61143857916106d0918961139794898d8c61139161138c368388611491565b613aeb565b946137ae565b611410575082916113ed6113e37fe7485580c64d6de0e6843d2d684ac5f367466fbd1c45452b2380ccb0ef23af8a96956113f394906001600160a01b0316600052602052604060002090565b805460ff19169055565b82613966565b610f836040519283926001600160a01b03809116971695836122e9565b6040517f0574e985000000000000000000000000000000000000000000000000000000008152fd5b836040517fca209704000000000000000000000000000000000000000000000000000000008152fd5b83604051633bbc695560e21b8152fd5b50604051631ab7da6b60e01b8152fd5b5060405163da80cc7360e01b8152fd5b92919261149d82610919565b916114ab60405193846108e8565b82948184528183011161000e578281602093846000960137010152565b9080601f8301121561000e578160206103d593359101611491565b503461000e57602036600319011261000e5760043567ffffffffffffffff811161000e5761151f61151a60209236906004016114c8565b6115dc565b54604051908152f35b3461000e57608036600319011261000e5761154161051a565b5061154a610572565b5060643567ffffffffffffffff811161000e573660238201121561000e5761157c903690602481600401359101611491565b506109176119f5565b90604060031983011261000e576004356001600160a01b038116810361000e57916024359067ffffffffffffffff821161000e576103d5916004016114c8565b906115d86020928281519485920161037c565b0190565b60206115f591816040519382858094519384920161037c565b8101600981520301902090565b60209061161c92826040519483868095519384920161037c565b82019081520301902090565b92919061163f60209160408652604086019061039f565b930152565b503461000e576116736001600160a01b0361165e36611585565b91166000526007602052604060002090611602565b600161167e82611184565b9101549061043160405192839283611628565b503461000e57602036600319011261000e576004356116c96106d08260005260026020526001600160a01b0360406000205416151590565b61080d576107e56104256107bc61079d6116f36106fe610431966000526008602052604060002090565b61077161170261074383611184565b90156117195761079761171361282c565b926130ce565b6107976117136127f3565b503461000e57604036600319011261000e57602060ff610c2561174561051a565b6001600160a01b03611755610572565b9116600052600584526040600020906001600160a01b0316600052602052604060002090565b503461000e5761178a36611585565b6117b06117aa836001600160a01b03166000526007602052604060002090565b82611602565b6002810154156118a2576001019081548061186f57507fec4de1eef14af3ae5d77facf1ed7a9d3d50f6285573ee0ec155fc11217fc34426001600160a01b03610431946006548095611809611804836122fa565b600655565b5561184061181561090a565b6001600160a01b038316815285602082015261183b876000526008602052604060002090565b612312565b61184a858261241f565b61185c85604051938493169583611628565b0390a26040519081529081906020820190565b6040517f198647a00000000000000000000000000000000000000000000000000000000081526004810191909152602490fd5b6004604051633bbc695560e21b8152fd5b503461000e57600036600319011261000e5760206040516001600160a01b037f0000000000000000000000008dbf9a4c99580fc7fd4024ee08f3994420035727168152f35b503461000e57600036600319011261000e576020600654604051908152f35b1561191e57565b606460405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152fd5b60005260026020526001600160a01b03604060002054166103d5811515611917565b1561198b57565b608460405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152fd5b50608460405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f7665640000000000000000000000000000000000006064820152fd5b15611a6757565b60405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b50634e487b7160e01b600052601160045260246000fd5b600019810191908211611af857565b610917611ad2565b9060018201809211611af857565b9060028201809211611af857565b9060208201809211611af857565b91908201809211611af857565b816000526004602052611b71816040600020906001600160a01b031673ffffffffffffffffffffffffffffffffffffffff19825416179055565b6001600160a01b0380611b8384611962565b169116907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9256000604051a4565b9081602091031261000e57516103d58161027f565b6103d593926001600160a01b03608093168252600060208301526040820152816060820152019061039f565b506040513d6000823e3d90fd5b3d15611c29573d90611c0f82610919565b91611c1d60405193846108e8565b82523d6000602084013e565b606090565b909190803b15611d6a57611c816020916001600160a01b039360006040519586809581947f150b7a02000000000000000000000000000000000000000000000000000000009a8b84523360048501611bc5565b0393165af160009181611d3a575b50611d1457611c9c611bfe565b80519081611d0f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000161490565b611d5c91925060203d8111611d63575b611d5481836108e8565b810190611bb0565b9038611c8f565b503d611d4a565b505050600190565b6020919283604051948593843782019081520301902090565b98909693999194959297611da036898c611491565b511561206857428410612057576106d0611dd49189968c878f8c908f8d611dcc61138c8f369089611491565b9d8e966133a0565b61202d57611deb936106d093878c8b898c8f6136e9565b61200357611e16611e0f876001600160a01b03166000526007602052604060002090565b8487611d72565b6003810190611e3b6106218584906001600160a01b0316600052602052604060002090565b611fc95783611e889261060983611e56898c611e7b976120e4565b6002611e6061090a565b6001600160a01b0386168152918b15156020840152016121f7565b805460ff19166001179055565b80611ed3575b7fa86933f16b8c4813c2c4d5eec0ce857a43493a4c101d75a72875bb0c7adb37a593611ece916040519485946001600160a01b03809116991697856122c3565b0390a3565b6040517f23b872dd0000000000000000000000000000000000000000000000000000000081526001600160a01b03808816600483015283166024820152604481018290526020818060648101038160006001600160a01b037f0000000000000000000000008dbf9a4c99580fc7fd4024ee08f3994420035727165af1908115611fbc575b600091611f8e575b50611e8e5760046040517ff0e492a3000000000000000000000000000000000000000000000000000000008152fd5b611faf915060203d8111611fb5575b611fa781836108e8565b81019061228d565b38611f5f565b503d611f9d565b611fc4611bf1565b611f57565b6040517f74e26d120000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602490fd5b60046040517fc5248083000000000000000000000000000000000000000000000000000000008152fd5b60046040517f9c06bbce000000000000000000000000000000000000000000000000000000008152fd5b6004604051631ab7da6b60e01b8152fd5b600460405163da80cc7360e01b8152fd5b50634e487b7160e01b600052600060045260246000fd5b90601f811161209e57505050565b600091825260208220906020601f850160051c830194106120da575b601f0160051c01915b8281106120cf57505050565b8181556001016120c3565b90925082906120ba565b90929167ffffffffffffffff81116121ad575b61210b81612105845461114a565b84612090565b6000601f8211600114612145578192939460009261213a575b50508160011b916000199060031b1c1916179055565b013590503880612124565b601f1982169461215a84600052602060002090565b91805b87811061219557508360019596971061217b575b505050811b019055565b0135600019600384901b60f8161c19169055388080612171565b9092602060018192868601358155019401910161215d565b6121b5610837565b6120f7565b50634e487b7160e01b600052603260045260246000fd5b80548210156121ea575b60005260206000200190600090565b6121f26121ba565b6121db565b9060206122216109179380549068010000000000000000821015612280575b6001820181556121d1565b929092612273575b80518354929091015160ff60a01b90151560a01b167fffffffffffffffffffffff0000000000000000000000000000000000000000009092166001600160a01b0390911617179055565b61227b612079565b612229565b612288610837565b612216565b9081602091031261000e57516103d581610af4565b908060209392818452848401376000828201840152601f01601f1916010190565b929493906122dc906040936060865260608601916122a2565b9460208401521515910152565b9160206103d59381815201916122a2565b600190600019811461230a570190565b6115d8611ad2565b8151815473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03919091161781556001809101916020809101519081519167ffffffffffffffff8311612412575b6123708361236a875461114a565b87612090565b81601f84116001146123a9575092829391839260009461239e575b50501b916000199060031b1c1916179055565b01519250388061238b565b919083601f1981166123c088600052602060002090565b946000905b888383106123f857505050106123df57505050811b019055565b015160001960f88460031b161c19169055388080612171565b8587015188559096019594850194879350908101906123c5565b61241a610837565b61235c565b9060405161242c81610893565b600081526001600160a01b03831691821561254d576124618160005260026020526001600160a01b0360406000205416151590565b6125095783816125049461248b610917976001600160a01b03166000526003602052604060002090565b6124958154611b00565b90556124d7836124af846000526002602052604060002090565b906001600160a01b031673ffffffffffffffffffffffffffffffffffffffff19825416179055565b60007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef81604051a4611c2e565b611a60565b606460405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152fd5b606460405162461bcd60e51b815260206004820152602060248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b6001600160a01b037f0000000000000000000000005bc2fa9426e882710d055c1a60f8cc93a31edc5816301480612682575b156125ec577fa4a8ea8c6583a51f3e2f4fa8d71191c39851ae65ca62d986c621524ff23b85cb90565b60405160208101907f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f82527fd5dcdb0eade3cdff3984004756a6325e58c7e0d9ccdac24dd61fce8d6c19e28160408201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260a0815261267c816108cc565b51902090565b507f000000000000000000000000000000000000000000000000000000000000000146146125c3565b6000929181546126ba8161114a565b9260019180831690811561271357506001146126d7575b50505050565b90919293945060005260209081600020906000915b85831061270257505050500190388080806126d1565b8054858401529183019181016126ec565b60ff19168452505050811515909102019150388080806126d1565b60209061274192604051938480936126ab565b9081520301902090565b9061091760236040518461276982965180926020808601910161037c565b81017f2e2e2e000000000000000000000000000000000000000000000000000000000060208201520360038101855201836108e8565b90610917602960405180947f45636f204944202d20000000000000000000000000000000000000000000000060208301526127e3815180926020868601910161037c565b81010360098101855201836108e8565b604051906128008261084e565b600282527f5d7d0000000000000000000000000000000000000000000000000000000000006020830152565b604051906128398261084e565b600482527f227d5d7d000000000000000000000000000000000000000000000000000000006020830152565b6109179193929360405194859183516128868160209687808801910161037c565b830161289a8251809387808501910161037c565b016128ad8251809386808501910161037c565b010380855201836108e8565b604051906128c68261084e565b601d82527f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000006020830152565b604051906060820182811067ffffffffffffffff821117612963575b604052604082527f6768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f6040837f4142434445464748494a4b4c4d4e4f505152535455565758595a61626364656660208201520152565b61296b610837565b61290e565b7f3fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81116001166129a1575b60021b90565b6129a9611ad2565b61299b565b604051906060820182811067ffffffffffffffff8211176129dc575b604052602a8252604082602036910137565b6129e4610837565b6129ca565b906129f382610919565b612a0060405191826108e8565b8281528092612a11601f1991610919565b0190602036910137565b805115612b3a57612a2a6128f2565b612a46612a41612a3a8451611b0e565b6003900490565b612970565b91612a58612a5384611b1c565b6129e9565b92835280815182019060208501935b828210612ade57505050600390510680600114612ab357600214612a89575090565b7f3d0000000000000000000000000000000000000000000000000000000000000090600019015290565b507f3d3d00000000000000000000000000000000000000000000000000000000000090600119015290565b90919360049060038094019384516001603f81818460121c16880101519260f893841b8652828282600c1c1689010151841b8387015282828260061c1689010151841b60028701521686010151901b9082015201939190612a67565b506103d5610944565b6032610917919392936040519481612b6587935180926020808701910161037c565b82017f2265787465726e616c5f75726c223a00000000000000000000000000000000006020820152601160f91b602f820152612bab82518093602060308501910161037c565b0161088b60f21b60308201520360128101855201836108e8565b602b610917919392936040519481612be787935180926020808701910161037c565b82017f22696d616765223a0000000000000000000000000000000000000000000000006020820152601160f91b6028820152612c2d82518093602060298501910161037c565b0161088b60f21b602982015203600b8101855201836108e8565b602a610917919392936040519481612c6987935180926020808701910161037c565b82017f226e616d65223a220000000000000000000000000000000000000000000000006020820152612ca582518093602060288501910161037c565b0161088b60f21b602882015203600a8101855201836108e8565b60405190612ccc8261084e565b600282527f227d0000000000000000000000000000000000000000000000000000000000006020830152565b60405190612d058261084e565b6003825262089f4b60ea1b6020830152565b6020604c9493612da0612d93610917956040519886612d3f8b9851809289808c01910161037c565b87017f2261747472696275746573223a5b7b2274726169745f74797065223a22446174878201527f61222c2276616c7565223a220000000000000000000000000000000000000000604082015201906126ab565b918281519485920161037c565b0103601f1981018452836108e8565b612e996103d59392612e94612e86612e18612e786031604051612dd18161084e565b60018152602081017f7b000000000000000000000000000000000000000000000000000000000000008152612e04610fe9565b90604051958693518092602086019061037c565b82017f226465736372697074696f6e223a0000000000000000000000000000000000006020820152601160f91b602e820152612e5e825180936020602f8501910161037c565b0161088b60f21b602f8201520360118101845201826108e8565b612e80610c31565b90612b43565b612e8e610976565b90612bc5565b612c47565b9115612ead57612ea7612cf8565b91612d17565b612ea7612cbf565b60405190612ec28261084e565b600582527f66616c73650000000000000000000000000000000000000000000000000000006020830152565b60405190612efb8261084e565b600482527f74727565000000000000000000000000000000000000000000000000000000006020830152565b6052906109179294936040519582612f4988945180926020808801910161037c565b83017f7b2274726169745f74797065223a225665726966696572222c2276616c75652260208201527f3a202200000000000000000000000000000000000000000000000000000000006040820152612fab82518093602060438501910161037c565b017f222c227265766f6361626c65223a2200000000000000000000000000000000006043820152612fe5825180936020878501910161037c565b010360328101855201836108e8565b605490610917929493604051958261301688945180926020808801910161037c565b83017f7b2274726169745f74797065223a225665726966696572222c2276616c75652260208201527f3a22000000000000000000000000000000000000000000000000000000000000604082015261307882518093602060428501910161037c565b017f222c227265766f6361626c65223a22000000000000000000000000000000000060428201526130b382518093602060518501910161037c565b0162089f4b60ea1b60518201520360348101855201836108e8565b906060918054801561319f5760328111613197575b6130ec81611ae9565b6000925b8284106130fd5750505050565b909192946131789061313a61313561312961312961311b8b886121d1565b50546001600160a01b031690565b6001600160a01b031690565b6132e5565b61315261314789866121d1565b505460a01c60ff1690565b156131895761315f612eee565b905b858910156131805761317292612ff4565b956122fa565b9291906130f0565b61317292612f27565b613191612eb5565b90613161565b5060326130e3565b5050565b92919060609380549283156126d1576131bc9083611b2a565b60009390808211613257575091905b6131d483611ae9565b91935b8385106131e5575050505050565b90919293956132379061320461313561312961312961311b8c896121d1565b6132116131478a876121d1565b156132495761321e612eee565b905b868a10156132405761323192612ff4565b966122fa565b939291906131d7565b61323192612f27565b613251612eb5565b90613220565b905091906131cb565b90602091805182101561327257010190565b61327a6121ba565b010190565b801561328d575b6000190190565b613295611ad2565b613286565b156132a157565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b6132ed6129ae565b90815115613393575b603060208301538151600190811015613386575b90607860218401536029915b80831161332957506103d591501561329a565b90807f3031323334353637383961626364656600000000000000000000000000000000600f61337293166010811015613379575b1a6133688587613260565b5360041c9261327f565b9190613316565b6133816121ba565b61335d565b61338e6121ba565b61330a565b61339b6121ba565b6132f6565b916134559761344d976133c161343f95613447989c97959d999d3691611491565b60208151910120936040519360208501957fd592e25e89e493feb1c2e5e235b302997d8e3cabec1a37b4ff23a5967887ec26875260408601526060850152151560808401526001600160a01b0380809c169c8d60a08601521660c084015260e083015261010090818301528152613437816108af565b51902061384b565b923691611491565b906135fb565b91909161347a565b161490565b6005111561346457565b634e487b7160e01b600052602160045260246000fd5b6134838161345a565b8061348b5750565b6134948161345a565b600181036134e15760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606490fd5b6134ea8161345a565b600281036135375760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606490fd5b6135408161345a565b600381036135985760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608490fd5b806135a460049261345a565b146135ab57565b60405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608490fd5b90604181511460001461362957613625916020820151906060604084015193015160001a90613633565b9091565b5050600090600290565b9291907f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083116136dd5760ff16601b811415806136d2575b6136c6579160809493916020936040519384528484015260408301526060820152600093849182805260015afa156136b9575b81516001600160a01b038116156136b3579190565b50600190565b6136c1611bf1565b61369e565b50505050600090600490565b50601c81141561366b565b50505050600090600390565b926137929596989261379a9a95986137096134479661343f953691611491565b60208151910120926040519260208401947f799be5bb05379995b02bf17ba94686d3dfed3dd5e54dba2f0e230a9acf48e072865260408501526060840152151560808301526001600160a01b039a8b809b1660a084015260c083015260e082015260e08152610100810181811067ffffffffffffffff8211176137a1575b60405251902061384b565b94909461347a565b1691161490565b6137a9610837565b613787565b61345595613447936137cc61343f9361344d989b979a953691611491565b60208151910120916040519160208301937f9eacf97babb44a432a52c1157cd6f0c3e91062648f8853a5b7e586dbfdeb3d06855260408401526001600160a01b039a8b8092166060850152169a8b608084015260a083015260c082015260c0815260e0810181811067ffffffffffffffff8211176137a1576040525190205b613853612591565b906040519060208201927f19010000000000000000000000000000000000000000000000000000000000008452602283015260428201526042815261267c81610877565b9060005b81548110156138df576138ae81836121d1565b50546001600160a01b038481169116146138d0576138cb906122fa565b61389b565b906138db92506121d1565b5090565b606460405162461bcd60e51b815260206004820152601060248201527f696e76616c6964207665726966696572000000000000000000000000000000006044820152fd5b80548015613950576000190190600061393c83836121d1565b613944575555565b61394c612079565b5555565b634e487b7160e01b600052603160045260246000fd5b9060005b8154808210156126d15761397e82846121d1565b50906001600160a01b0380925416828616146139a457505061399f906122fa565b61396a565b61091794506139c36139cb916000198101908111613a69575b856121d1565b5092846121d1565b919091613a5c575b8282036139e3575b505050613923565b82613a1960ff92613a5495541684906001600160a01b031673ffffffffffffffffffffffffffffffffffffffff19825416179055565b5460a01c167fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff60ff60a01b835492151560a01b169116179055565b3880806139db565b613a64612079565b6139d3565b613a71611ad2565b6139bd565b60405190613a838261084e565b600a9081835260203681850137600090815b838110613aa3575050505090565b807fff00000000000000000000000000000000000000000000000000000000000000613ad2613ae69385613260565b5116841a613ae08288613260565b536122fa565b613a95565b613af4906115dc565b9081549160018301905556fea2646970667358221220233a1cd2525fb8e7252a2f1916abe1ac40eff3556e386823c31ecc3a0aec0fd164736f6c63430008100033

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

0000000000000000000000008dbf9a4c99580fc7fd4024ee08f3994420035727

-----Decoded View---------------
Arg [0] : token (address): 0x8dBF9A4c99580fC7Fd4024ee08f3994420035727

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000008dbf9a4c99580fc7fd4024ee08f3994420035727


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.