false
false
0

Contract Address Details

0x8e36C439cDCb012eC7E4fe96dB54eAccBc85C7Da

Contract Name
Decoder
Creator
0xb80042โ€“1c51ab at 0x4ed369โ€“084eb9
Balance
Loading balance...
Tokens
Fetching tokens...
Transactions
0 Transactions
Transfers
0 Transfers
Gas Used
Fetching gas used...
Last Balance Update
17231923
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
Decoder




Optimization enabled
true
Compiler version
v0.8.9+commit.e5eed63a




Optimization runs
200
EVM Version
default




Verified at
2024-03-22T08:19:57.788591Z

Contract source code

// Sources flattened with hardhat v2.10.1 https://hardhat.org

// File openzeppelin-contracts-upgradeable/proxy/utils/Initializable.sol


// OpenZeppelin Contracts v4.4.0 (proxy/utils/Initializable.sol)

pragma solidity ^0.8.0;

/**
 * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
 * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
 * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
 * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
 *
 * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
 * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
 *
 * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
 * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
 *
 * [CAUTION]
 * ====
 * Avoid leaving a contract uninitialized.
 *
 * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
 * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
 * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
 *
 * [.hljs-theme-light.nopadding]
 * ```
 * /// @custom:oz-upgrades-unsafe-allow constructor
 * constructor() initializer {}
 * ```
 * ====
 */
abstract contract Initializable {
    /**
     * @dev Indicates that the contract has been initialized.
     */
    bool private _initialized;

    /**
     * @dev Indicates that the contract is in the process of being initialized.
     */
    bool private _initializing;

    /**
     * @dev Modifier to protect an initializer function from being invoked twice.
     */
    modifier initializer() {
        require(_initializing || !_initialized, "Initializable: contract is already initialized");

        bool isTopLevelCall = !_initializing;
        if (isTopLevelCall) {
            _initializing = true;
            _initialized = true;
        }

        _;

        if (isTopLevelCall) {
            _initializing = false;
        }
    }
}


// File openzeppelin-contracts-upgradeable/utils/StringsUpgradeable.sol


// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library StringsUpgradeable {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

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


// File openzeppelin-contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol


// OpenZeppelin Contracts v4.4.0 (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

/**
 * @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 ECDSAUpgradeable {
    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) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        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.
            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 if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } 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;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 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", StringsUpgradeable.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 openzeppelin-contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol


// OpenZeppelin Contracts v4.4.0 (utils/cryptography/draft-EIP712.sol)

pragma solidity ^0.8.0;


/**
 * @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 EIP712Upgradeable is Initializable {
    /* solhint-disable var-name-mixedcase */
    bytes32 private _HASHED_NAME;
    bytes32 private _HASHED_VERSION;
    bytes32 private constant _TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)");

    /* 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].
     */
    function __EIP712_init(string memory name, string memory version) internal initializer {
        __EIP712_init_unchained(name, version);
    }

    function __EIP712_init_unchained(string memory name, string memory version) internal initializer {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash());
    }

    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 ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash);
    }

    /**
     * @dev The hash of the name parameter for the EIP712 domain.
     *
     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs
     * are a concern.
     */
    function _EIP712NameHash() internal virtual view returns (bytes32) {
        return _HASHED_NAME;
    }

    /**
     * @dev The hash of the version parameter for the EIP712 domain.
     *
     * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs
     * are a concern.
     */
    function _EIP712VersionHash() internal virtual view returns (bytes32) {
        return _HASHED_VERSION;
    }
    uint256[50] private __gap;
}


// File openzeppelin-contracts-upgradeable/utils/introspection/IERC165Upgradeable.sol


// OpenZeppelin Contracts v4.4.0 (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 IERC165Upgradeable {
    /**
     * @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 openzeppelin-contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol


// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721Upgradeable is IERC165Upgradeable {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) 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 Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

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


// File openzeppelin-contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol


// OpenZeppelin Contracts v4.4.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 IERC721ReceiverUpgradeable {
    /**
     * @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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}


// File openzeppelin-contracts-upgradeable/token/ERC721/extensions/IERC721MetadataUpgradeable.sol


// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
    /**
     * @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 openzeppelin-contracts-upgradeable/utils/AddressUpgradeable.sol


// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library AddressUpgradeable {
    /**
     * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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 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

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}


// File openzeppelin-contracts-upgradeable/utils/ContextUpgradeable.sol


// OpenZeppelin Contracts v4.4.0 (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 ContextUpgradeable is Initializable {
    function __Context_init() internal initializer {
        __Context_init_unchained();
    }

    function __Context_init_unchained() internal initializer {
    }
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
    uint256[50] private __gap;
}


// File openzeppelin-contracts-upgradeable/utils/introspection/ERC165Upgradeable.sol


// OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;


/**
 * @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 ERC165Upgradeable is Initializable, IERC165Upgradeable {
    function __ERC165_init() internal initializer {
        __ERC165_init_unchained();
    }

    function __ERC165_init_unchained() internal initializer {
    }
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165Upgradeable).interfaceId;
    }
    uint256[50] private __gap;
}


// File openzeppelin-contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol


// OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;








/**
 * @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 ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {
    using AddressUpgradeable for address;
    using StringsUpgradeable 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.
     */
    function __ERC721_init(string memory name_, string memory symbol_) internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC721_init_unchained(name_, symbol_);
    }

    function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        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: owner query for nonexistent token");
        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) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        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 overriden 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 = ERC721Upgradeable.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

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

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        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: transfer caller is not 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: transfer caller is not 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) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721Upgradeable.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, 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);
    }

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

    /**
     * @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(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
        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);
    }

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

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {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 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 IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    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 {}
    uint256[44] private __gap;
}


// File openzeppelin-contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol


// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/ERC721Burnable.sol)

pragma solidity ^0.8.0;



/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable {
    function __ERC721Burnable_init() internal initializer {
        __Context_init_unchained();
        __ERC165_init_unchained();
        __ERC721Burnable_init_unchained();
    }

    function __ERC721Burnable_init_unchained() internal initializer {
    }
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }
    uint256[50] private __gap;
}


// File openzeppelin-contracts-upgradeable/access/IAccessControlUpgradeable.sol


// OpenZeppelin Contracts v4.4.0 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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


// File openzeppelin-contracts-upgradeable/access/AccessControlUpgradeable.sol


// OpenZeppelin Contracts v4.4.0 (access/AccessControl.sol)

pragma solidity ^0.8.0;





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

    function __AccessControl_init_unchained() internal initializer {
    }
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

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

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


// File openzeppelin-contracts-upgradeable/security/PausableUpgradeable.sol


// OpenZeppelin Contracts v4.4.0 (security/Pausable.sol)

pragma solidity ^0.8.0;


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

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

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    function __Pausable_init() internal initializer {
        __Context_init_unchained();
        __Pausable_init_unchained();
    }

    function __Pausable_init_unchained() internal initializer {
        _paused = false;
    }

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

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

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

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

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


// File contracts/PlatformSettings.sol


pragma solidity ^0.8.0;



/// @title A platform settings for OTG contracts
/// @notice Admin can use this contract for granting and revoking roles, pause and unpause platform, set new wallets for fee receiving
/// @dev This contract inherits 'Initializable', 'AccessControlUpgradeable', 'PausableUpgradeable' contracts form openzeppelin library
contract PlatformSettings is Initializable, AccessControlUpgradeable, PausableUpgradeable{
    bytes32 public constant SECONDARY_ADMIN_ROLE = keccak256("SECONDARY_ADMIN_ROLE");
    bytes32 public constant BACKEND_ROLE = keccak256("BACKEND_ROLE");
    uint256 public constant gunDecimals = 10**18;
    uint256 public constant PERCENT_DENOMINATOR = 100;

    // address of main admin
    address public initialAdmin;
    // address of financial wallet (withdraws GUNs from contract)
    address payable public financialWallet;

    // percentage that represents validator fee during decoding process
    uint256 public validatorFeePercentageForDecoding;
    // percentage that represents platform fee during decoding process
    uint256 public platformFeePercentageForDecoding;


    bytes32 public constant BRIDGE_ROLE = keccak256("BRIDGE_ROLE");

    /// @notice this event is emitted when new financial wallet is set
    /// @param newWallet address of new financial wallet
    event newFinancialWallet(
        address indexed newWallet
    );


    error InvalidRole(address caller, bytes32 role);

    error IncorrectFeeDistribution();


    error AlreadyHasRole(address account, bytes32 role);


    error AlreadyHasNotRole(address account, bytes32 role);


    /// @notice A disposable function for initializing contract
    /// @param _admin address of initial admin of contract
    /// @dev Grants caller with admin role
    /// @dev Also calls initializers of AccessControl and Pausable contracts.
    /// @dev Sets caller as an initialAdmin and financeWallet(wallet for receiving fees and royalties)
    /// @dev Sets initial fee percentage for decoding process
    function initialize(
        address _admin
    )public initializer{
        __AccessControl_init();
        __Pausable_init_unchained();
        _setupRole(DEFAULT_ADMIN_ROLE, _admin);
        initialAdmin = _admin;
        financialWallet = payable(msg.sender);
        validatorFeePercentageForDecoding = 50;
        platformFeePercentageForDecoding = 50;
    }
// *********************** MODIFIERS *********************************************
    /// @notice verifies if message sender is an admin or secondary admin
    modifier onlyAdmin{
        if(!(hasRole(DEFAULT_ADMIN_ROLE, msg.sender) || hasRole(SECONDARY_ADMIN_ROLE,msg.sender))){
            revert InvalidRole(msg.sender, SECONDARY_ADMIN_ROLE);
        }
        _;
    }

    // *********************** VIEW FUNCTIONS *********************************************
    /// TODO restrict function visibility from view to pure
    function version() public pure returns (uint32){
        //version in format aaa.bbb.ccc => aaa*1E6+bbb*1E3+ccc;
        return uint32(1000001);
    }

// *********************** FUNCTIONS *********************************************
    /// @notice checks account for admin roles
    function isAdmin(address account) public view returns(bool){
        return (hasRole(DEFAULT_ADMIN_ROLE, account)||hasRole(SECONDARY_ADMIN_ROLE, account));
    }

    /// @notice checks account for backend role
    function isBackendRole(address account) public view returns(bool){
        return hasRole(BACKEND_ROLE, account);
    }

    function isBridgeRole(address account) public view returns(bool){
        return hasRole(BRIDGE_ROLE, account);
    }

    /// @notice checks account for admin roles or if platform is not paused
    function isAdminOrNotPaused(address caller) public view returns(bool){
        return(!paused()||hasRole(DEFAULT_ADMIN_ROLE,caller)||hasRole(SECONDARY_ADMIN_ROLE,caller));
    }

    /// TODO check if this function must exist
    /// @notice returns a number, that represents amount of fee, which validator will receive after decoding process
    function getValidatorFeeForDecoding(uint256 _price)public view returns(uint256){
        if((platformFeePercentageForDecoding + validatorFeePercentageForDecoding)!=100){
            revert IncorrectFeeDistribution();
        }
        return (_price* gunDecimals * validatorFeePercentageForDecoding)/PERCENT_DENOMINATOR;
    }

    /// TODO check if this function must exist
    /// @notice returns a number, that represents amount of fee, which financialWallet will receive after decoding process
    function getPlatformFeeForDecoding(uint256 _price)public view returns(uint256){
        if((platformFeePercentageForDecoding + validatorFeePercentageForDecoding)!=100){
            revert IncorrectFeeDistribution();
        }
        return (_price* gunDecimals * platformFeePercentageForDecoding)/PERCENT_DENOMINATOR;
    }
    /// @notice suspends most functions in contracts
    /// @dev Caller must be admin
    function pause() public onlyAdmin{
        _pause();
    }

    /// @notice restores most functions in contracts
    /// @dev Caller must be admin
    function unpause() public onlyAdmin{
        _unpause();
    }

    /// @notice sets new address as a payable financialWallet
    /// @dev caller must be admin, emits 'newFinancialWallet' 
    function setNewFinancialWallet(address _newWalletAddress) public onlyAdmin{
        financialWallet = payable(_newWalletAddress);
        emit newFinancialWallet(_newWalletAddress);
    }

    /// @notice granting secondary admin role to a specific address
    /// @param account address of a specific account 
    function grantSecondaryAdminRole(address account) public onlyRole(DEFAULT_ADMIN_ROLE){
        if(hasRole(SECONDARY_ADMIN_ROLE, account)){
            revert AlreadyHasRole(account, SECONDARY_ADMIN_ROLE); 
        }
        grantRole(SECONDARY_ADMIN_ROLE, account);
    }

    /// @notice revoking secondary admin role from a specific address
    /// @param account address of a specific account
    function revokeSecondaryAdminRole(address account) public onlyRole(DEFAULT_ADMIN_ROLE){
        if(!hasRole(SECONDARY_ADMIN_ROLE, account)){
            revert AlreadyHasNotRole(account, SECONDARY_ADMIN_ROLE); 
        }
        revokeRole(SECONDARY_ADMIN_ROLE, account);
    }

    /// @notice granting backend admin role from a specific address
    /// @param account address of a specific account 
    function grantBackendRole(address account) public onlyRole(DEFAULT_ADMIN_ROLE){
        if(hasRole(BACKEND_ROLE, account)){
            revert AlreadyHasRole(account, BACKEND_ROLE); 
        }
        grantRole(BACKEND_ROLE, account);
    }

    /// @notice revoking backend admin role from a specific address
    /// @param account address of a specific account 
    function revokeBackendRole(address account) public onlyRole(DEFAULT_ADMIN_ROLE){
        if(!hasRole(BACKEND_ROLE, account)){
            revert AlreadyHasNotRole(account, BACKEND_ROLE); 
        }
        revokeRole(BACKEND_ROLE, account);
    }

    function grantBridgeRole(address account) public onlyRole(DEFAULT_ADMIN_ROLE){
        if(hasRole(BRIDGE_ROLE, account)){
            revert AlreadyHasRole(account, BRIDGE_ROLE); 
        }
        grantRole(BRIDGE_ROLE, account);
    }

    function revokeBridgeRole(address account) public onlyRole(DEFAULT_ADMIN_ROLE){
        if(!hasRole(BRIDGE_ROLE, account)){
            revert AlreadyHasNotRole(account, BRIDGE_ROLE); 
        }
        revokeRole(BRIDGE_ROLE, account);
    }

    /// TODO maybe it will be better, to set validatorFeePercentageForDecoding and platformFeePercentageForDecoding with one function
    /// @notice Sets a number, that represents amount of fee, which validator will receive after 
    /// @dev caller must be admin
    function setValidatorFeePercentageForDecoding(uint256 _percentage) public onlyAdmin{
        validatorFeePercentageForDecoding = _percentage;
    }
    
    /// @notice Sets a number, that represents amount of fee, which financialWallet will receive after 
    /// @dev caller must be admin
    function setPlatformFeePercentageForDecoding(uint256 _percentage) public onlyAdmin{
        platformFeePercentageForDecoding = _percentage;
    }

    // TODO DEPRECATED, will be deleted sooner
    function getValidatorFeePercentageForDecoding() external view returns(uint256){
        return(validatorFeePercentageForDecoding);
    }

    // TODO DEPRECATED, will be deleted sooner
    function getPlatformFeePercentageForDecoding() external view returns(uint256){
        return(platformFeePercentageForDecoding);
    }
}


// File contracts/utils/EIP712Custom.sol

// contracts/Market.sol

pragma solidity ^0.8.0;

/// @title Contract for game Item sale
/// @notice User can use this contract for selling and buying game Items
/// @dev this's an upgradeable contract with creating item for sale, selling and unlisting gameItem from sale 
/// @dev Marketplace is inheriting from IMarketplace and EIP712Upgradeable
contract EIP712Custom is EIP712Upgradeable {

    error IncorrectSigner(address signer);

    error DeadlineExpired(uint256 deadline, uint256 currentTimestamp);

}


// File contracts/interfaces/IBattlePass.sol


pragma solidity ^0.8.0;

/// @notice Interface for BattlePassContract
interface IBattlePass{
    /// @notice this event is emitted when user activates BattlePass
    /// @param account owner of BatlePass
    /// @param tokenID token id of specific BattlePass
    event BattlePassActivated(address indexed account, uint256 indexed tokenID);
    /// @notice this event is emitted when user deactivates BattlePass
    /// @param account owner of BatlePass
    /// @param tokenID token id of specific BattlePass
    event BattlePassDeactivated(address indexed account, uint256 indexed tokenID);
    /// @notice this event is emitted when admin mints BattlePass
    /// @param to receiver of new BatlePass
    /// @param tokenID token id of BattlePass
    /// @param rarity rarity(0-4) of BattlePass
    event BattlePassMinted(address indexed to, uint256 indexed tokenID, uint8 rarity);
    /// @notice this event is emitted when admin creates season
    /// @param seasonID id of created season
    /// @param startDate unix time of season beginning
    /// @param duration duration of season in seconds
    event SeasonCreated(uint256 indexed seasonID, uint256 startDate, uint256 duration);
    /// @notice this event is emitted when admin starts current season
    /// @param seasonID id of current season
    event SeasonStarted(uint256 indexed seasonID);


    function version() external view returns (uint32);
    
    /// @notice gets current season id
    /// @return id of current season 
    function getCurrentSeason() external view returns(uint256);
    /// @notice gets mode(activated or deactivated) of specific BattlePass
    /// @param _tokenID token id of specific BattlePass
    /// @return bool mode of specific BattlePass
    function getMode(uint256 _tokenID) external view returns(bool);
    /// @notice gets rarity of specific BattlePass
    /// @param _tokenID token id of specific BattlePass
    /// @return uint8 rarity parameter of specific BattlePass
    function getRarity(uint256 _tokenID) external view returns(uint8);
    /// @notice gets start date(in seconds) of specific season
    /// @param _seasonID token id of specific season
    /// @return uint64 parameter, startDate of specific season
    function getSeasonStartDate(uint256 _seasonID) external view returns(uint64);
    /// @notice gets end date(in seconds) of specific season
    /// @param _seasonID token id of specific season
    /// @return uint64 parameter, endDate of specific season
    function getSeasonEndDate(uint256 _seasonID) external view returns(uint64);
    /// @notice gets duration(in seconds) of specific season
    /// @param _seasonID token id of specific season
    /// @return uint64 parameter, duration of specific season
    function getSeasonDuration(uint256 _seasonID) external view returns(uint64);
}


// File contracts/interfaces/IDataCube.sol


pragma solidity ^0.8.0;

/// @notice Interface for DataCubeContract
interface IDataCube {
    /// @notice this event is emitted when admin mints NFT DataCube
    /// @param to receiver of new DataCube
    /// @param tokenID id of new DataCube
    /// @param quality quality of new DataCube
    /// @param season BattlePass season of new DataCube
    event DataCubeMinted(
        address indexed to,
        uint256 indexed tokenID,
        uint8 quality,
        uint256 season);
    /// @notice this event is emitted when DataCube is burnt
    /// @param DCTokenID id of NFT DataCube
    /// @param DCBackendTokenID if of backend nonNFT DataCube
    event DataCubeBurnt(
        uint256 indexed DCTokenID,
        uint256 DCBackendTokenID);

    /// Deprecated, will be deleted sooner
    event DataCubeMintable(
        bool indexed
    );

    function version() external view returns (uint32);

    /// @notice during decoding, ValidatorLicenseContract calls this function to open DataCube and mint GameItem
    /// @dev data cube will be burned. Emits "Burnt" event. Calls "mintFromCube" function from GameItemContract via IGameItem interface
    /// @param _DCTokenID token id of specific DataCube
    /// @param _VLTokenID token id of specific Validator License
    /// @param _seasonID token id of season
    /// @param _DCQuality DataCube quality
    /// @param _receiver receiver's address of new item
    /// @param _DCBackendTokenID backend token id of specific DataCube
    /// @param _data metadata URL 
    function open(
        uint256 _DCTokenID,
        uint256 _VLTokenID,
        uint256 _seasonID,
        uint8 _DCQuality,
        address _receiver,
        uint256 _DCBackendTokenID,
        string memory _data) external;
    /// @notice gets season of specific DataCube
    /// @return uint256 id of specific DataCube 
    function getCubeSeason(uint256 _tokenID) external view returns(uint256);
    /// @notice gets lever of minting for DataCubes
    /// @return bool parameter, lever is on or not
    function getLeverMintable() external view returns(bool);
    /// @notice gets quality of specific DataCube
    /// @return uint8 quality parameter of specific DataCube 
    function getCubeQuality(uint256 _tokenID) external view  returns(uint8);
    /// @notice gets initial owner of specific DataCube
    /// @return address of initial owner of specific DataCube 
    function getCubeInitialOwner(uint256 _tokenID) external view  returns(address);

    function getFeeDepensOnQuality(uint8 _quality) external view  returns(uint256);
    /// @notice changes state of minting lever for dataCubes
    function changeLeverMintable() external;
    
    function burn(uint256 _tokenID) external;


}


// File contracts/interfaces/IGameItem.sol


pragma solidity ^0.8.0;

/// @notice Interface for GameItemContract
interface IGameItem {
    /// @notice this event is emitted when NFT GameItem is minted
    /// @param to new owner of GameItem
    /// @param tokenID id ow new GameItem
    /// @param quality quality(0-4) of new GameItem
    /// @param seasonID BattlePass season of new GameItem
    /// @param hacker the hacker who minted this item
    event Minted(
        address indexed to,
        uint256 indexed tokenID,
        uint8 quality,
        uint256 seasonID,
        address hacker);

    event MintedForUser(
        address indexed to,
        uint256 indexed tokenID,
        uint8 quality,
        uint256 financialWalletPayment,
        uint256 seasonID,
        address hacker);

    function version() external view returns (uint32);


    /// @notice gets creator's address of specific GameItem
    /// @param _tokenID token id of specific GameItem
    /// @return minter's address 
    function getItemCreator(uint256 _tokenID) external view returns(address);
    /// @notice gets (hacker) address of specific GameItem
    /// @param _tokenID token id of specific GameItem
    /// @return hacker's address 
    function getItemHacker(uint256 _tokenID) external view returns(address);
    /// @notice gets validator's(hacker) address of specific GameItem
    /// @param _tokenID token id of specific GameItem
    /// @return validator's address 
    function getItemValidator(uint256 _tokenID) external view returns(uint256);
    /// @notice gets quality of specific GameItem
    /// @param _tokenID token id of specific GameItem
    /// @return uint8 parameter. quality of GameItem 
    function getItemQuality(uint256 _tokenID) external view returns(uint8);
    /// @notice gets season of specific GameItem
    /// @param _tokenID token id of specific GameItem
    /// @return uint256 parameter. season id
    function getItemSeason(uint256 _tokenID) external view returns(uint256);
    /// @notice gets market state of specific GameItem
    /// @param _tokenID token id of specific GameItem
    /// @return uint8 parameter. Market state of GameItem 
    function getItemState(uint256 _tokenID) external view returns(uint8);
    /// @notice changes market state of specific GameItem
    /// @param _tokenID token id of specific GameItem
    /// @param _state (0-2) new item state
    function changeItemState(uint256 _tokenID, uint8 _state) external;

    /// @notice mints new GameItem
    /// @dev can be called only via DataCubeContract or ValidatorLicenseContract
    /// @dev emits "Minted" event
    /// @param _receiver receiver's address of new GameItem
    /// @param _VLTokenID token id of specific ValidatorLicense
    /// @param _seasonID token id of season
    /// @param _DCQuality quality of new GameItem
    /// @param _metadataURL URL to metadata storage
    function mintFromCube(
        address _receiver, 
        uint256 _VLTokenID, 
        uint256 _seasonID, 
        uint8 _DCQuality, 
        string memory _metadataURL) external;

    /// @notice mints new GameItem
    /// @dev can be called by user, with signature
    /// @dev sends GUNs to this contract address
    /// @param _VLTokenID token id of specific ValidatorLicense
    /// @param _seasonID token id of season
    /// @param _quality quality of new GameItem
    /// @param _price price(in GUNs) od DataCube decoding
    /// @param _metadataURL URL to metadata storage
    /// @param _deadline date of expiring signature(in unix time)
    /// @param _signature signature of signed data by backender
    function mintForUser(
        uint256 _VLTokenID,
        uint256 _seasonID,
        uint8 _quality,
        uint256 _price,
        string memory _metadataURL,
        uint256 _deadline,
        bytes memory _signature) payable external;

    function burn(uint256 _tokenID) external;

    function bridgeBurn(uint256 _tokenID) external;
    
    function bridgeMint(address to, uint256 _tokenID) external;
}


// File contracts/interfaces/IValidatorLicense.sol


pragma solidity ^0.8.0;

/// @notice Interface for ValidatorLicenseContract
interface IValidatorLicense{
    /// @notice this event is emitted when admin mints ValidatorLicense
    /// @param account receiver of ValidatorLicense
    /// @param tokenID id of new ValidatorLicense
    /// @param rarity rarity of new ValidatorLicense
    /// @param activeMode - state of activation switcher
    event ValidatorLicenseMinted(address indexed account, uint256 indexed tokenID, uint8 indexed rarity, bool activeMode);
    /// @notice this event is emitted when hacker activates ValidatorLicense
    /// @param account owner(hacker) of ValidatorLicense
    event ValidatorLicenseActivated(address indexed account, uint256 indexed tokenID);
    /// @notice this event is emitted when hacker deactivates ValidatorLicense
    /// @param account owner(hacker) of ValidatorLicense
    event ValidatorLicenseDeactivated(address indexed account, uint256 indexed tokenID);


    function version() external view returns (uint32);

    /// @notice gets mode(activated or deactivated) of specific ValidatorLicense
    /// @param _tokenID token id of specific ValidatorLicense
    /// @return bool mode of specific ValidatorLicense
    function getLicenseMode(uint256 _tokenID) external view returns(bool);

    /// @notice gets rarity of specific ValidatorLicense
    /// @param _tokenID token id of specific ValidatorLicense
    /// @return uint8 rarity parameter of specific ValidatorLicense
    function getLicenseRarity(uint256 _tokenID) external view returns(uint8);

    function deactivateByLicenseStorage(uint256 _tokenID) external;
  
}


// File contracts/interfaces/ILicenseStorage.sol


pragma solidity ^0.8.0;


interface ILicenseStorage{


    function version() external view returns (uint32);

    /// @notice initializes storage for specific VL, depends on rarity
    /// @param _tokenID token id of specific ValidatorLicense
    /// @param _rarity rarity of ValidatorLicense
    function initializeStorage(uint256 _tokenID, uint8 _rarity) payable external;
    /// @notice withdraws payment from specific VL storage during decoding process
    /// @param _tokenID token id of specific ValidatorLicense
    /// @param _amount amount of GUNs that will be transferred
    /// @param _to payment receiver
    function getPaymentFromLicenseStorage(uint256 _tokenID, uint256 _amount, address payable _to) external payable returns(bool);

    function getStorageCurrentValue(uint256 _tokenID) external view returns(uint256);

    function getStorageThreshold() external view returns(uint256);

}


// File contracts/Decoder.sol


pragma solidity ^0.8.0;












/// @title contract for decode functions 
/// @notice User or admin can decode hex in eight different ways
/// @dev This contract is inherits 'EIP&12Upgradeable' contract from openzeppelin library
/// Abbreviations: DC - DataCube; VL - ValidatorLicense; GI - GameItem
contract Decoder is EIP712Custom {
    uint256 public constant PERCENT_DENOMINATOR = 100;
    // address of PlatformSettings contract
    address public platformSettingsContractAddress;
    // address of ValidatorLicenseContract
    address public validatorLicenseContractAddress;
    // address of DataCubeContract
    address public dataCubeContractAddress;
    // address of GameItemContract
    address public gameItemContractAddress;
    // address of LicenseStorage contract
    address public licenseStorageAddress;



    event NFTCubeDecodedForNFTItemWithVL(uint256 indexed VLTokenID, address indexed receiver, uint256 indexed DCTokenID, uint256 DCBackendTokenID, uint256 validatorFeeFromUser, uint256 platformFee, uint256 validatorFeeFromHackerLicense, uint8 hexQuality);
    event NFTCubeDecodedForNonNFTItemWithVL(uint256 indexed VLTokenID, address indexed receiver, uint256 indexed DCTokenID, uint256 DCBackendTokenID, uint256 validatorFeeFromUser, uint256 platformFee, uint256 validatorFeeFromHackerLicense);
    event CubeDecodedForNFTItemWithVL(uint256 indexed VLTokenID, address indexed receiver, uint256 DCBackendTokenID, uint256 validatorFeeFromUser, uint256 platformFee, uint256 validatorFeeFromHackerLicense);
    event CubeDecodedForNonNFTItemWithVL(uint256 indexed VLTokenID, address indexed receiver, uint256 DCBackendTokenID, uint256 validatorFeeFromUser, uint256 platformFee, uint256 validatorFeeFromHackerLicense);
    event NFTCubeDecodedForNFTItemWithoutVL(address indexed receiver, uint256 DCBackendTokenID, uint256 DCTokenID, uint256 platformFee);
    event NFTCubeDecodedForNonNFTItemWithoutVL(address indexed receiver, uint256 DCBackendTokenID, uint256 DCTokenID, uint256 platformFee);
    event CubeDecodedForNFTItemWithoutVL(address indexed receiver, uint256 DCBackendTokenID, uint256 platformFee);
    event CubeDecodedForNonNFTItemWithoutVL(address indexed receiver, uint256 DCBackendTokenID, uint256 platformFee);
    event CreateItemFromParts(uint256 indexed VLTokenID, address indexed receiver, uint256[4] partsIDs, uint256 validatorFeeFromUser, uint256 platformFee, uint256 validatorFeeFromHackerLicense);

    error ContractsIsPaused();

    error InvalidRole(address caller, bytes32 role);

    error CallerNotOwner(address caller, address owner, uint256 tokenID);

    error InactiveLicense();

    error IncorrectValue(uint256 value, uint256 price);

    error IncorrectFeeDistribution();

    error UnsuccessfulPayment(address from, address to, uint256 amount);



    /// @notice A disposable function for intializing contract
    /// @param _platformSettingsContractAddress address of PlatformSettings contract
    /// @param _validatorLicenseContractAddress address of ValidatorLicenseContract
    /// @param _dataCubeContractAddress address of DataCubeContract
    /// @param _gameItemContractAddress address of GameItemContract
    /// @param _licenseStorageAddress address of LicenseStorage Contract
    /// @dev calls initializer  from EIP712Upgradeable contract
    function initialize(
        address _platformSettingsContractAddress,
        address _validatorLicenseContractAddress,
        address _dataCubeContractAddress,
        address _gameItemContractAddress,
        address _licenseStorageAddress
    ) public initializer {
        __EIP712_init('Decoder','1');
        platformSettingsContractAddress = _platformSettingsContractAddress;
        validatorLicenseContractAddress = _validatorLicenseContractAddress;
        dataCubeContractAddress = _dataCubeContractAddress;
        gameItemContractAddress = _gameItemContractAddress;
        licenseStorageAddress = _licenseStorageAddress;
    }

// *********************** MODIFIERS *********************************************
    /// @notice verifies if switch "_paused" in PlatformSettings contract is off
    modifier whenNotPaused{
        if(PlatformSettings(platformSettingsContractAddress).paused()){
            revert ContractsIsPaused();
        }
        _;
    }

    /// @notice verifies if message sender is an admin or secondary admin
    modifier onlyAdmin{
        if(!(PlatformSettings(platformSettingsContractAddress).hasRole(PlatformSettings(platformSettingsContractAddress).DEFAULT_ADMIN_ROLE(),msg.sender)||PlatformSettings(platformSettingsContractAddress).hasRole(PlatformSettings(platformSettingsContractAddress).SECONDARY_ADMIN_ROLE(),msg.sender))){
            revert InvalidRole(msg.sender, PlatformSettings(platformSettingsContractAddress).SECONDARY_ADMIN_ROLE());
        }
        _;
    }

// *********************** VIEW FUNCTIONS *********************************************
    /// TODO restrict function visibility from view to pure
    function version() public pure returns (uint32){
        //version in format aaa.bbb.ccc => aaa*1E6+bbb*1E3+ccc;
        return uint32(1000002);
    }
// *********************** Decode functions with VLicense *********************************************

    /// @notice Decodes NFT DC and burns it; mints new NFT GI; sends fee to VL owner and financial wallet; withdraws payment from VL storage of GUNs
    /// @dev verifies signer via 'hashTypedDataV4' function from 'EIP712Upgradeable' contract and 'recover' function from 'ECDSAUpgradeable' contract
    /// @dev distributes fee to VL owner and financial wallet via 'call' function
    /// @dev withdraws payment from 'LicenseStorage' contract via function 'getPaymentFromLicenseStorage'
    /// TODO tech debt - requirement from 'LicenseStorage.getPaymentFromLicenseStorage' that checks current value of GUNs in storage must be replaced to this function, before fee distribution
    /// TODO modify LicenseStorage.getPaymentFromLicenseStorage function in order to change amount of fee
    /// @dev calls function 'open' via 'IDataCube' interface
    /// @dev emits 'NFTCubeDecodedForNFTItemWithVL'
    /// @dev Requirements:
    /// @dev    - signer must have backend role from 'PlatformSettings' contract
    /// @dev    - function must be executed earlier than signature expires 
    /// @dev    - parameter season must be the same as NFT DataCube's season
    /// @dev    - caller must be owner of NFT DataCube
    /// @dev    - ValidatorLicense must be activated
    /// @dev    - message value of GUNs must be equal to price(with decimals)
    /// @param _DCTokenID token id of NFT DataCube, that will be opened and burned during decoding process
    /// @param _VLTokenID token id of ValidatorLIcense, that takes part in decoding process
    /// @param _seasonID id of DataCube season
    /// @param _DCQuality quality of DataCube, represents enumeration of rarity 
    /// @param _price price of decoding process for caller
    /// @param _DCBackendTokenID token id of backend nonNFT DataCube
    /// @param _metadataURL link to metadata storage
    /// @param _deadline expire date of signature; unix time used
    /// @param _signature signed typed data 
    function decodeNFTCubeForNFTItemWithVL(
        uint256 _DCTokenID, 
        uint256 _VLTokenID, 
        uint256 _seasonID, 
        uint8 _DCQuality,
        uint256 _price,
        uint256 _DCBackendTokenID,
        string memory _metadataURL,
        uint256 _deadline,
        bytes memory _signature
    ) payable public whenNotPaused{
        // verifying signature
        {
            bytes32 __digest = _hashTypedDataV4(keccak256(
                abi.encode(
                    keccak256("DecodeNFTCubeForNFTItemWithVL(uint256 _DCTokenID,uint256 _VLTokenID,uint256 _seasonID,uint8 _DCQuality,uint256 _price,uint256 _DCBackendTokenID,string _metadataURL,uint256 _deadline)"),
                    _DCTokenID,
                    _VLTokenID,
                    _seasonID,
                    _DCQuality,
                    _price,
                    _DCBackendTokenID,
                    keccak256(bytes(_metadataURL)),
                    _deadline
                )
            ));
            address __signer = ECDSAUpgradeable.recover(__digest,_signature);
            if(!PlatformSettings(platformSettingsContractAddress).isBackendRole(__signer)){
                revert IncorrectSigner(__signer);
            }
        }
        // function must be executed earlier than signature expires  
        IDataCube dataCubeContract = IDataCube(dataCubeContractAddress);
        if(block.timestamp > _deadline){
            revert DeadlineExpired(_deadline, block.timestamp);
        }
        // Checking NFT-DataCube owner
        if(IERC721Upgradeable(dataCubeContractAddress).ownerOf(_DCTokenID) != msg.sender){
            revert CallerNotOwner(msg.sender, IERC721Upgradeable(dataCubeContractAddress).ownerOf(_DCTokenID), _DCTokenID);
        }
        // Checking VL validity
        if(IValidatorLicense(validatorLicenseContractAddress).getLicenseMode(_VLTokenID) != true){
            revert InactiveLicense();
        }
        uint8 hexQuality = dataCubeContract.getCubeQuality(_DCTokenID);
        uint256 licenseStorageFee = dataCubeContract.getFeeDepensOnQuality(hexQuality);
        // Fee distribution
        feeDistribution(_price, _VLTokenID, licenseStorageFee);
        // Opening DC via 'DataCubeContract'
        IDataCube(dataCubeContractAddress).open(
            _DCTokenID,
            _VLTokenID,
            _seasonID,
            _DCQuality,
            msg.sender,
            _DCBackendTokenID,
            _metadataURL);
        
        emit NFTCubeDecodedForNFTItemWithVL(
            _VLTokenID,
            msg.sender,
            _DCTokenID,
            _DCBackendTokenID,
            (_price*PlatformSettings(platformSettingsContractAddress).validatorFeePercentageForDecoding())/PERCENT_DENOMINATOR,
            (_price*PlatformSettings(platformSettingsContractAddress).platformFeePercentageForDecoding())/PERCENT_DENOMINATOR,
            licenseStorageFee,
            hexQuality);
    }


    /// @notice Decodes NFT DC and burns it; emits event about new nonNFT GI; sends fee to VL owner and financial wallet; withdraws payment from VL storage of GUNs
    /// @dev verifies signer via 'hashTypedDataV4' function from 'EIP712Upgradeable' contract and 'recover' function from 'ECDSAUpgradeable' contract
    /// @dev distributes fee to VL owner and financial wallet via 'call' function
    /// @dev withdraws payment from 'LicenseStorage' contract via function 'getPaymentFromLicenseStorage'
    /// TODO tech debt - requirement from 'LicenseStorage.getPaymentFromLicenseStorage' that checks current value of GUNs in storage must be replaced to this function, before fee distribution
    /// TODO modify LicenseStorage.getPaymentFromLicenseStorage function in order to change amount of fee
    /// @dev calls function 'burn' via 'IDataCube' interface
    /// @dev emits 'NFTCubeDecodedForNonNFTItemWithVL'
    /// @dev Requirements:
    /// @dev    - signer must have backend role from 'PlatformSettings' contract
    /// @dev    - function must be executed earlier than signature expires 
    /// @dev    - parameter season must be the same as NFT DataCube's season
    /// @dev    - caller must be owner of NFT DataCube
    /// @dev    - ValidatorLicense must be activated
    /// @dev    - message value of GUNs must be equal to price(with decimals)
    /// @param _DCTokenID token id of NFT DataCube, that will be opened and burned during decoding process
    /// @param _VLTokenID token id of ValidatorLIcense, that takes part in decoding process
    /// @param _seasonID id of DataCube season
    /// @param _DCQuality quality of DataCube, represents enumeration of rarity 
    /// @param _price price of decoding process for caller
    /// @param _DCBackendTokenID token id of backend nonNFT DataCube
    /// @param _deadline expire date of signature; unix time used
    /// @param _signature signed typed data 
    function decodeNFTCubeForNonNFTItemWithVL(
        uint256 _DCTokenID,
        uint256 _VLTokenID,
        uint256 _seasonID,
        uint8 _DCQuality,
        uint256 _price,
        uint256 _DCBackendTokenID,
        uint256 _deadline,
        bytes memory _signature
    ) payable public whenNotPaused{
        // verifying signature
        {
            bytes32 __digest = _hashTypedDataV4(keccak256(
                abi.encode(
                    keccak256("DecodeNFTCubeForNonNFTItemWithVL(uint256 _DCTokenID,uint256 _VLTokenID,uint256 _seasonID,uint8 _DCQuality,uint256 _price,uint256 _DCBackendTokenID,uint256 _deadline)"),
                    _DCTokenID,
                    _VLTokenID,
                    _seasonID,
                    _DCQuality,
                    _price,
                    _DCBackendTokenID,
                    _deadline
                )
            ));
            address __signer = ECDSAUpgradeable.recover(__digest,_signature);
            // require(PlatformSettings(platformSettingsContractAddress).hasRole(PlatformSettings(platformSettingsContractAddress).BACKEND_ROLE(), __signer),"IS3");
            require(PlatformSettings(platformSettingsContractAddress).isBackendRole(__signer),"IS7");
        }
        // function must be executed earlier than signature expires  
        require(block.timestamp<_deadline,"ES7");
        // parameter season must be the same as NFT DataCube's season
        require(_seasonID==IDataCube(dataCubeContractAddress).getCubeSeason(_DCTokenID),"IT4");
        // Checking NFT-DataCube owner
        require(IERC721Upgradeable(dataCubeContractAddress).ownerOf(_DCTokenID)==msg.sender, "IR17");
        // Checking VL validity
        require(
            IValidatorLicense(validatorLicenseContractAddress).getLicenseMode(_VLTokenID)==true ,"IL6");

        uint256 licenseStorageFee = IDataCube(dataCubeContractAddress).getFeeDepensOnQuality(_DCQuality);
        
        // Fee distribution
        {
            // Checking receiver`s balance
            require(msg.value==_price, "IF12");
            uint256 validatorPayment = (_price*PlatformSettings(platformSettingsContractAddress).validatorFeePercentageForDecoding())/PERCENT_DENOMINATOR;
            uint256 platformPayment = (_price*PlatformSettings(platformSettingsContractAddress).platformFeePercentageForDecoding())/PERCENT_DENOMINATOR;
            // Checking fee distribution
            require((validatorPayment+ platformPayment)==_price,"IF13");
            (bool successValidator,) = IERC721Upgradeable(validatorLicenseContractAddress).ownerOf(_VLTokenID).call{value:validatorPayment}("");
            require(successValidator, "TF13");
            (bool successPlatform,) = PlatformSettings(platformSettingsContractAddress).financialWallet().call{value:platformPayment}("");
            require(successPlatform, "TF14");
            // Checking license payment
            bool successfulPayment = ILicenseStorage(licenseStorageAddress).getPaymentFromLicenseStorage(_VLTokenID, licenseStorageFee, PlatformSettings(platformSettingsContractAddress).financialWallet());
            require(successfulPayment, "TF15");
        }
        // Burning DC via 'DataCube'
        IDataCube(dataCubeContractAddress).burn(_DCTokenID);
        
        emit NFTCubeDecodedForNonNFTItemWithVL(
            _VLTokenID,
            msg.sender,
            _DCTokenID,
            _DCBackendTokenID,
            (_price*PlatformSettings(platformSettingsContractAddress).validatorFeePercentageForDecoding())/PERCENT_DENOMINATOR,
            (_price*PlatformSettings(platformSettingsContractAddress).platformFeePercentageForDecoding())/PERCENT_DENOMINATOR,
            licenseStorageFee);
    }


    /// @notice Decodes nonNFT DC; mints new NFT GI; sends fee to VL owner and financial wallet; withdraws payment from VL storage of GUNs
    /// @dev verifies signer via 'hashTypedDataV4' function from 'EIP712Upgradeable' contract and 'recover' function from 'ECDSAUpgradeable' contract
    /// @dev distributes fee to VL owner and financial wallet via 'call' function
    /// @dev withdraws payment from 'LicenseStorage' contract via function 'getPaymentFromLicenseStorage'
    /// TODO tech debt - requirement from 'LicenseStorage.getPaymentFromLicenseStorage' that checks current value of GUNs in storage must be replaced to this function, before fee distribution
    /// TODO modify LicenseStorage.getPaymentFromLicenseStorage function in order to change amount of fee
    /// @dev calls function 'mintFromCube' via 'IGameItem' interface
    /// @dev emits 'CubeDecodedForNFTItemWithVL'
    /// @dev Requirements:
    /// @dev    - signer must have backend role from 'PlatformSettings' contract
    /// @dev    - function must be executed earlier than signature expires 
    /// @dev    - ValidatorLicense must be activated
    /// @dev    - message value of GUNs must be equal to price(with decimals)
    /// @param _VLTokenID token id of ValidatorLIcense, that takes part in decoding process
    /// @param _seasonID id of DataCube season
    /// @param _DCQuality quality of DataCube, represents enumeration of rarity 
    /// @param _price price of decoding process for caller
    /// @param _DCBackendTokenID token id of backend nonNFT DataCube
    /// @param _metadataURL link to metadata storage
    /// @param _deadline expire date of signature; unix time used
    /// @param _signature signed typed data 
    function decodeCubeForNFTItemWithVL(
        uint256 _VLTokenID, 
        uint256 _seasonID, 
        uint8 _DCQuality,
        uint256 _price,
        uint256 _DCBackendTokenID,
        string memory _metadataURL,
        uint256 _deadline,
        bytes memory _signature
    ) payable public whenNotPaused{
        // verifying signature
        {
            bytes32 __digest = _hashTypedDataV4(keccak256(
                abi.encode(
                    keccak256("DecodeCubeForNFTItemWithVL(uint256 _VLTokenID,uint256 _seasonID,uint8 _DCQuality,uint256 _price,uint256 _DCBackendTokenID,string _metadataURL,uint256 _deadline)"),
                    _VLTokenID,
                    _seasonID,
                    _DCQuality,
                    _price,
                    _DCBackendTokenID,
                    keccak256(bytes(_metadataURL)),
                    _deadline
                )
            ));
            address __signer = ECDSAUpgradeable.recover(__digest,_signature);
            // require(PlatformSettings(platformSettingsContractAddress).hasRole(PlatformSettings(platformSettingsContractAddress).BACKEND_ROLE(), __signer),"IS4");
            require(PlatformSettings(platformSettingsContractAddress).isBackendRole(__signer),"IS8");
        }
        // function must be executed earlier than signature expires  
        require(block.timestamp<_deadline,"ES8");
        // Checking VL validity
        require(
            IValidatorLicense(validatorLicenseContractAddress).getLicenseMode(_VLTokenID)==true,"IL7");

        uint256 licenseStorageFee = IDataCube(dataCubeContractAddress).getFeeDepensOnQuality(_DCQuality);
        
        {
            // Checking receiver`s balance 
            require(msg.value==_price, "IF14");
            uint256 validatorPayment = (_price*PlatformSettings(platformSettingsContractAddress).validatorFeePercentageForDecoding())/PERCENT_DENOMINATOR;
            uint256 platformPayment = (_price*PlatformSettings(platformSettingsContractAddress).platformFeePercentageForDecoding())/PERCENT_DENOMINATOR;
            // Checking fee distribution
            require((validatorPayment+ platformPayment)==_price,"IF15");
            (bool successValidator,) = IERC721Upgradeable(validatorLicenseContractAddress).ownerOf(_VLTokenID).call{value:validatorPayment}("");
            require(successValidator, "TF16");
            (bool successPlatform,) = PlatformSettings(platformSettingsContractAddress).financialWallet().call{value:platformPayment}("");
            require(successPlatform, "TF17");
            // Checkiing license payment
            bool successfulPayment = ILicenseStorage(licenseStorageAddress).getPaymentFromLicenseStorage(_VLTokenID, licenseStorageFee, PlatformSettings(platformSettingsContractAddress).financialWallet());
            require(successfulPayment, "TF18");
        }
        // MInt Item directly via 'GameItem' without agent DC Contract
        IGameItem(gameItemContractAddress).mintFromCube(
            msg.sender,
            _VLTokenID,
            _seasonID,
            _DCQuality,
            _metadataURL);
        emit CubeDecodedForNFTItemWithVL(
            _VLTokenID,
            msg.sender,
            _DCBackendTokenID,
            (_price*PlatformSettings(platformSettingsContractAddress).validatorFeePercentageForDecoding())/PERCENT_DENOMINATOR,
            (_price*PlatformSettings(platformSettingsContractAddress).platformFeePercentageForDecoding())/PERCENT_DENOMINATOR,
            licenseStorageFee);
    }


    /// @notice Decodes nonNFT DC; emits event about new nonNFT GI; sends fee to VL owner and financial wallet; withdraws payment from VL storage of GUNs
    /// @dev verifies signer via 'hashTypedDataV4' function from 'EIP712Upgradeable' contract and 'recover' function from 'ECDSAUpgradeable' contract
    /// @dev distributes fee to VL owner and financial wallet via 'call' function
    /// @dev withdraws payment from 'LicenseStorage' contract via function 'getPaymentFromLicenseStorage'
    /// TODO tech debt - requirement from 'LicenseStorage.getPaymentFromLicenseStorage' that checks current value of GUNs in storage must be replaced to this function, before fee distribution
    /// TODO modify LicenseStorage.getPaymentFromLicenseStorage function in order to change amount of fee
    /// @dev emits 'CubeDecodedForNonNFTItemWithVL'
    /// @dev Requirements:
    /// @dev    - signer must have backend role from 'PlatformSettings' contract
    /// @dev    - function must be executed earlier than signature expires 
    /// @dev    - ValidatorLicense must be activated
    /// @dev    - message value of GUNs must be equal to price(with decimals)
    /// @param _VLTokenID token id of ValidatorLIcense, that takes part in decoding process
    /// @param _seasonID id of DataCube season
    /// @param _DCQuality quality of DataCube, represents enumeration of rarity 
    /// @param _price price of decoding process for caller
    /// @param _DCBackendTokenID token id of backend nonNFT DataCube
    /// @param _deadline expire date of signature; unix time used
    /// @param _signature signed typed data 
    function decodeCubeForNonNFTItemWithVL(
        uint256 _VLTokenID, 
        uint256 _seasonID, 
        uint8 _DCQuality,
        uint256 _price,
        uint256 _DCBackendTokenID,
        uint256 _deadline,
        bytes memory _signature
    ) payable public whenNotPaused{
        // verifying signature
        {
            bytes32 __digest = _hashTypedDataV4(keccak256(
                abi.encode(
                    keccak256("DecodeCubeForNonNFTItemWithVL(uint256 _VLTokenID,uint256 _seasonID,uint8 _DCQuality,uint256 _price,uint256 _DCBackendTokenID,uint256 _deadline)"),
                    _VLTokenID,
                    _seasonID,
                    _DCQuality,
                    _price,
                    _DCBackendTokenID,
                    _deadline
                )
            ));
            address __signer = ECDSAUpgradeable.recover(__digest,_signature);
            // require(PlatformSettings(platformSettingsContractAddress).hasRole(PlatformSettings(platformSettingsContractAddress).BACKEND_ROLE(), __signer),"IS5");
            require(PlatformSettings(platformSettingsContractAddress).isBackendRole(__signer),"IS9");
        }
        // function must be executed earlier than signature expires  
        require(block.timestamp<_deadline,"ES9");
        // Checking VL validity
        require(IValidatorLicense(validatorLicenseContractAddress).getLicenseMode(_VLTokenID)==true,"IL8");

        uint256 licenseStorageFee = IDataCube(dataCubeContractAddress).getFeeDepensOnQuality(_DCQuality);
        
        {
            // Checking receiver`s balance 
            require(msg.value==_price, "IF16");
            uint256 validatorPayment = (_price*PlatformSettings(platformSettingsContractAddress).validatorFeePercentageForDecoding())/PERCENT_DENOMINATOR;
            uint256 platformPayment = (_price*PlatformSettings(platformSettingsContractAddress).platformFeePercentageForDecoding())/PERCENT_DENOMINATOR;
            // Checking fee distribution
            require((validatorPayment+ platformPayment)==_price,"IF17");
            (bool successValidator,) = IERC721Upgradeable(validatorLicenseContractAddress).ownerOf(_VLTokenID).call{value:validatorPayment}("");
            require(successValidator, "TF19");
            (bool successPlatform,) = PlatformSettings(platformSettingsContractAddress).financialWallet().call{value:platformPayment}("");
            require(successPlatform, "TF20");
            // Checking license payment
            bool successfulPayment = ILicenseStorage(licenseStorageAddress).getPaymentFromLicenseStorage(_VLTokenID,licenseStorageFee, PlatformSettings(platformSettingsContractAddress).financialWallet());
            require(successfulPayment, "TF21");
        }
        emit CubeDecodedForNonNFTItemWithVL(
            _VLTokenID,
            msg.sender,
            _DCBackendTokenID,
            (_price*PlatformSettings(platformSettingsContractAddress).validatorFeePercentageForDecoding())/PERCENT_DENOMINATOR,
            (_price*PlatformSettings(platformSettingsContractAddress).platformFeePercentageForDecoding())/PERCENT_DENOMINATOR,
            licenseStorageFee);
    }

// *********************** Decode functions without VLicense *********************************************
    /// @notice Decodes NFT DC and burns it; mints new NFT GI; sends fee to financial wallet; withdraws payment from VL storage of GUNs
    /// @dev verifies signer via 'hashTypedDataV4' function from 'EIP712Upgradeable' contract and 'recover' function from 'ECDSAUpgradeable' contract
    /// @dev transfers Guns to financial wallet via 'call' function
    /// @dev calls function 'open' via 'IDataCube' interface
    /// @dev emits 'NFTCubeDecodedForNFTItemWithoutVL'
    /// @dev Requirements:
    /// @dev    - signer must have backend role from 'PlatformSettings' contract
    /// @dev    - function must be executed earlier than signature expires 
    /// @dev    - parameter season must be the same as NFT DataCube's season
    /// @dev    - caller must be owner of NFT DataCube
    /// @dev    - message value of GUNs must be equal to price(with decimals)
    /// @param _DCTokenID token id of NFT DataCube, that will be opened and burned during decoding process
    /// @param _seasonID id of DataCube season
    /// @param _DCQuality quality of DataCube, represents enumeration of rarity 
    /// @param _price price of decoding process for caller
    /// @param _DCBackendTokenID token id of backend nonNFT DataCube
    /// @param _metadataURL link to metadata storage
    /// @param _deadline expire date of signature; unix time used
    /// @param _signature signed typed data 
    function decodeNFTCubeForNFTItemWithoutVL(
        uint256 _DCTokenID, 
        uint256 _seasonID, 
        uint8 _DCQuality,
        uint256 _price,
        uint256 _DCBackendTokenID,
        string memory _metadataURL,
        uint256 _deadline,
        bytes memory _signature
    ) payable public whenNotPaused{
        // verifying signature
        {
            bytes32 __digest = _hashTypedDataV4(keccak256(
                abi.encode(
                    keccak256("DecodeNFTCubeForNFTItemWithoutVL(uint256 _DCTokenID,uint256 _seasonID,uint8 _DCQuality,uint256 _price,uint256 _DCBackendTokenID,string _metadataURL,uint256 _deadline)"),
                    _DCTokenID,
                    _seasonID,
                    _DCQuality,
                    _price,
                    _DCBackendTokenID,
                    keccak256(bytes(_metadataURL)),
                    _deadline
                )
            ));
            address __signer = ECDSAUpgradeable.recover(__digest,_signature);
                // require(PlatformSettings(platformSettingsContractAddress).hasRole(PlatformSettings(platformSettingsContractAddress).BACKEND_ROLE(), __signer),"IS2");
            require(PlatformSettings(platformSettingsContractAddress).isBackendRole(__signer),"IS10");
        }
        // function must be executed earlier than signature expires  
        require(block.timestamp<_deadline,"ES10");
        // parameter season must be the same as NFT DataCube's season
        require(_seasonID==IDataCube(dataCubeContractAddress).getCubeSeason(_DCTokenID),"IT8");
        // Checking NFT-DataCube owner
        require(IERC721Upgradeable(dataCubeContractAddress).ownerOf(_DCTokenID)==msg.sender, "IR18");

        {
            // Checking receiver's balance
            require(msg.value==_price , "IF18");
            // Checking gun transfer
            (bool successPlatformFee,) = PlatformSettings(platformSettingsContractAddress).financialWallet().call{value:_price}("");
            require(successPlatformFee, "TF22");
        }
        // Opening DC via 'DataCubeContract'
        IDataCube(dataCubeContractAddress).open(
            _DCTokenID,
            0,
            _seasonID,
            _DCQuality,
            msg.sender,
            _DCBackendTokenID,
            _metadataURL);
        
        emit NFTCubeDecodedForNFTItemWithoutVL(
            msg.sender,
            _DCTokenID,
            _DCBackendTokenID,
            _price);
    }

    /// @notice Decodes NFT DC and burns it; emits event about new nonNFT GI; sends fee to financial wallet;
    /// @dev verifies signer via 'hashTypedDataV4' function from 'EIP712Upgradeable' contract and 'recover' function from 'ECDSAUpgradeable' contract
    /// @dev transfers GUNs to financial wallet via 'call' function
    /// @dev calls function 'burn' via 'IDataCube' interface
    /// @dev emits 'NFTCubeDecodedForNonNFTItemWithoutVL'
    /// @dev Requirements:
    /// @dev    - signer must have backend role from 'PlatformSettings' contract
    /// @dev    - function must be executed earlier than signature expires 
    /// @dev    - parameter season must be the same as NFT DataCube's season
    /// @dev    - caller must be owner of NFT DataCube
    /// @dev    - message value of GUNs must be equal to price(with decimals)
    /// @param _DCTokenID token id of NFT DataCube, that will be opened and burned during decoding process
    /// @param _seasonID id of DataCube season
    /// @param _DCQuality quality of DataCube, represents enumeration of rarity 
    /// @param _price price of decoding process for caller
    /// @param _DCBackendTokenID token id of backend nonNFT DataCube
    /// @param _deadline expire date of signature; unix time used
    /// @param _signature signed typed data 
    function decodeNFTCubeForNonNFTItemWithoutVL(
        uint256 _DCTokenID,
        uint256 _seasonID,
        uint8 _DCQuality,
        uint256 _price,
        uint256 _DCBackendTokenID,
        uint256 _deadline,
        bytes memory _signature
    ) payable public whenNotPaused{
        // verifying signature
        {
            bytes32 __digest = _hashTypedDataV4(keccak256(
                abi.encode(
                    keccak256("DecodeNFTCubeForNonNFTItemWithoutVL(uint256 _DCTokenID,uint256 _seasonID,uint8 _DCQuality,uint256 _price,uint256 _DCBackendTokenID,uint256 _deadline)"),
                    _DCTokenID,
                    _seasonID,
                    _DCQuality,
                    _price,
                    _DCBackendTokenID,
                    _deadline
                )
            ));
            address __signer = ECDSAUpgradeable.recover(__digest,_signature);
            // require(PlatformSettings(platformSettingsContractAddress).hasRole(PlatformSettings(platformSettingsContractAddress).BACKEND_ROLE(), __signer),"IS3");
            require(PlatformSettings(platformSettingsContractAddress).isBackendRole(__signer),"IS11");
        }
        // function must be executed earlier than signature expires  
        require(block.timestamp<_deadline,"ES11");
        // parameter season must be the same as NFT DataCube's season
        require(_seasonID==IDataCube(dataCubeContractAddress).getCubeSeason(_DCTokenID),"IT9");
        // Checking NFT-DataCube owner
        require(IERC721Upgradeable(dataCubeContractAddress).ownerOf(_DCTokenID)==msg.sender, "IR19");

        {
            // Checking receveir's balance
            require(msg.value==_price , "IF19");
            // Checking gun transfer
            (bool successPlatformFee,) = PlatformSettings(platformSettingsContractAddress).financialWallet().call{value:_price}("");
            require(successPlatformFee, "TF23");
        }
        // Burning DC via 'DataCubeContract'
        IDataCube(dataCubeContractAddress).burn(_DCTokenID);
        
       emit NFTCubeDecodedForNonNFTItemWithoutVL(
            msg.sender,
            _DCTokenID,
            _DCBackendTokenID,
            _price);
    }

    /// @notice Decodes nonNFT DC; mints new NFT GI; sends fee to financial wallet; withdraws payment from VL storage of GUNs
    /// @dev verifies signer via 'hashTypedDataV4' function from 'EIP712Upgradeable' contract and 'recover' function from 'ECDSAUpgradeable' contract
    /// @dev transfers GUNs to financial wallet via 'call' function
    /// @dev calls function 'mintFromCube' via 'IGameItem' interface
    /// @dev emits 'CubeDecodedForNFTItemWithoutVL'
    /// @dev Requirements:
    /// @dev    - signer must have backend role from 'PlatformSettings' contract
    /// @dev    - function must be executed earlier than signature expires 
    /// @dev    - message value of GUNs must be equal to price(with decimals)
    /// @param _seasonID id of DataCube season
    /// @param _DCQuality quality of DataCube, represents enumeration of rarity 
    /// @param _price price of decoding process for caller
    /// @param _DCBackendTokenID token id of backend nonNFT DataCube
    /// @param _metadataURL link to metadata storage
    /// @param _deadline expire date of signature; unix time used
    /// @param _signature signed typed data 
    function decodeCubeForNFTItemWithoutVL(
        uint256 _seasonID, 
        uint8 _DCQuality,
        uint256 _price,
        uint256 _DCBackendTokenID,
        string memory _metadataURL,
        uint256 _deadline,
        bytes memory _signature
    ) payable public whenNotPaused{
        // verifying signature
        {
            bytes32 __digest = _hashTypedDataV4(keccak256(
                abi.encode(
                    keccak256("DecodeCubeForNFTItemWithoutVL(uint256 _seasonID,uint8 _DCQuality,uint256 _price,uint256 _DCBackendTokenID,string _metadataURL,uint256 _deadline)"),
                    _seasonID,
                    _DCQuality,
                    _price,
                    _DCBackendTokenID,
                    keccak256(bytes(_metadataURL)),
                    _deadline
                )
            ));
            address __signer = ECDSAUpgradeable.recover(__digest,_signature);
            // require(PlatformSettings(platformSettingsContractAddress).hasRole(PlatformSettings(platformSettingsContractAddress).BACKEND_ROLE(), __signer),"IS4");
            require(PlatformSettings(platformSettingsContractAddress).isBackendRole(__signer),"IS12");
        }
        // function must be executed earlier than signature expires  
        require(block.timestamp<_deadline,"ES12");
        {
            // Checking receiver's balance
            require(msg.value==_price , "IF20");
            // Checking gun transfer
            (bool successPlatformFee,) = PlatformSettings(platformSettingsContractAddress).financialWallet().call{value:_price}("");
            require(successPlatformFee, "TF24");
        }
        // MInt Item directly without agent DC Contract via 'GameItemContract'
        IGameItem(gameItemContractAddress).mintFromCube(
            msg.sender,
            0,
            _seasonID,
            _DCQuality,
            _metadataURL);
        emit CubeDecodedForNFTItemWithoutVL(
            msg.sender,
            _DCBackendTokenID,
            _price);
    }

    /// @notice Decodes nonNFT DC; emits event about new nonNFT GI; sends fee to financial wallet; withdraws payment from VL storage of GUNs
    /// @dev verifies signer via 'hashTypedDataV4' function from 'EIP712Upgradeable' contract and 'recover' function from 'ECDSAUpgradeable' contract
    /// @dev transfers GUNs to financial wallet via 'call' function
    /// @dev emits 'CubeDecodedForNonNFTItemWithoutVL'
    /// @dev Requirements:
    /// @dev    - signer must have backend role from 'PlatformSettings' contract
    /// @dev    - function must be executed earlier than signature expires 
    /// @dev    - message value of GUNs must be equal to price(with decimals)
    /// @param _seasonID id of DataCube season
    /// @param _DCQuality quality of DataCube, represents enumeration of rarity 
    /// @param _price price of decoding process for caller
    /// @param _DCBackendTokenID token id of backend nonNFT DataCube
    /// @param _deadline expire date of signature; unix time used
    /// @param _signature signed typed data 
    function decodeCubeForNonNFTItemWithoutVL(
        uint256 _seasonID, 
        uint8 _DCQuality,
        uint256 _price,
        uint256 _DCBackendTokenID,
        uint256 _deadline,
        bytes memory _signature
    ) payable public whenNotPaused{
        // verifying signature
        {
            bytes32 __digest = _hashTypedDataV4(keccak256(
                abi.encode(
                    keccak256("DecodeCubeForNonNFTItemWithoutVL(uint256 _seasonID,uint8 _DCQuality,uint256 _price,uint256 _DCBackendTokenID,uint256 _deadline)"),
                    _seasonID,
                    _DCQuality,
                    _price,
                    _DCBackendTokenID,
                    _deadline
                )
            ));
            address __signer = ECDSAUpgradeable.recover(__digest,_signature);
            // require(PlatformSettings(platformSettingsContractAddress).hasRole(PlatformSettings(platformSettingsContractAddress).BACKEND_ROLE(), __signer),"IS5");
            require(PlatformSettings(platformSettingsContractAddress).isBackendRole(__signer),"IS13");
        }
        // function must be executed earlier than signature expires  
        require(block.timestamp<_deadline,"ES13");
        
        {
            // Checking receiver's balance
            require(msg.value==_price , "IF21");
            // Checking gun transfer
            (bool successPlatformFee,) = PlatformSettings(platformSettingsContractAddress).financialWallet().call{value:_price}("");
            require(successPlatformFee, "TF25");

            
        }
        emit CubeDecodedForNonNFTItemWithoutVL(
            msg.sender,
            _DCBackendTokenID,
            _price);
    }

    /// @notice Create item from itemParts; emits event about new GI; sends fee to VL owner and financial wallet; withdraws payment from VL storage of GUNs
    /// @dev verifies signer via 'hashTypedDataV4' function from 'EIP712Upgradeable' contract and 'recover' function from 'ECDSAUpgradeable' contract
    /// @dev distributes fee to VL owner and financial wallet via 'call' function
    /// @dev withdraws payment from 'LicenseStorage' contract via function 'getPaymentFromLicenseStorage'
    /// TODO tech debt - requirement from 'LicenseStorage.getPaymentFromLicenseStorage' that checks current value of GUNs in storage must be replaced to this function, before fee distribution
    /// TODO modify LicenseStorage.getPaymentFromLicenseStorage function in order to change amount of fee
    /// @dev emits 'createItemFromParts'
    /// @dev Requirements:
    /// @dev    - signer must have backend role from 'PlatformSettings' contract
    /// @dev    - function must be executed earlier than signature expires 
    /// @dev    - ValidatorLicense must be activated
    /// @dev    - message value of GUNs must be equal to price(with decimals)
    /// @param _VLTokenID token id of ValidatorLIcense, that takes part in decoding process
    /// @param _seasonID id of DataCube season
    /// @param _partsIDs quality of DataCube, represents enumeration of rarity 
    /// @param _price price of decoding process for caller
    /// @param _metadataURL link to metadata storage
    /// @param _deadline expire date of signature; unix time used
    /// @param _signature signed typed data 
    function createItemFromParts(
        uint256 _VLTokenID,
        uint256 _seasonID, 
        uint256[4] memory _partsIDs,
        uint256 _price,
        string memory _metadataURL,
        uint256 _deadline,
        bytes memory _signature
    ) payable public whenNotPaused{
        // verifying signature
        {
            bytes32 __digest = _hashTypedDataV4(keccak256(
                abi.encode(
                    keccak256("createItemFromParts(uint256 _VLTokenID,uint256 _seasonID,uint256[4] _partsIDs,uint256 _price,string _metadataURL,uint256 _deadline)"),
                    _VLTokenID,
                    _seasonID,
                    keccak256(abi.encodePacked(_partsIDs)),
                    _price,
                    keccak256(bytes(_metadataURL)),
                    _deadline
                )
            ));
            address __signer = ECDSAUpgradeable.recover(__digest,_signature);
            if(!PlatformSettings(platformSettingsContractAddress).isBackendRole(__signer)){
                revert IncorrectSigner(__signer);
            }
        }
        // function must be executed earlier than signature expires  
        if(block.timestamp > _deadline){
            revert DeadlineExpired(_deadline, block.timestamp);
        }
        // Checking VL validity
        if(IValidatorLicense(validatorLicenseContractAddress).getLicenseMode(_VLTokenID) != true){
            revert InactiveLicense();
        }
        uint8 quality = IGameItem(gameItemContractAddress).getItemQuality(_partsIDs[0]);
        
        for(uint256 i = 0; i<4; i++){
            IERC721Upgradeable(gameItemContractAddress).transferFrom(msg.sender, address(this), _partsIDs[i]);
        
            IGameItem(gameItemContractAddress).burn(_partsIDs[i]);
        }

        uint256 licenseStorageFee = IDataCube(dataCubeContractAddress).getFeeDepensOnQuality(quality);
        feeDistribution(_price, _VLTokenID, licenseStorageFee);
        

        IGameItem(gameItemContractAddress).mintFromCube(msg.sender, _VLTokenID, _seasonID, quality, _metadataURL);

        emit CreateItemFromParts(
            _VLTokenID,
            msg.sender,
            _partsIDs,
            (_price*PlatformSettings(platformSettingsContractAddress).validatorFeePercentageForDecoding())/PERCENT_DENOMINATOR,
            (_price*PlatformSettings(platformSettingsContractAddress).platformFeePercentageForDecoding())/PERCENT_DENOMINATOR,
            licenseStorageFee);
    }

    function feeDistribution(uint256 _price, uint256 _VLTokenID, uint256 _licenseStorageFee) internal virtual{
        // Checking receiver`s balance
            if(msg.value != _price){
                revert IncorrectValue(msg.value, _price);
            }
            uint256 validatorPayment = (_price*PlatformSettings(platformSettingsContractAddress).validatorFeePercentageForDecoding())/PERCENT_DENOMINATOR;
            uint256 platformPayment = (_price*PlatformSettings(platformSettingsContractAddress).platformFeePercentageForDecoding())/PERCENT_DENOMINATOR;
            // Checking fee distribution
            if((validatorPayment+ platformPayment)!=_price){
                revert IncorrectFeeDistribution();
            }
            (bool successValidator,) = IERC721Upgradeable(validatorLicenseContractAddress).ownerOf(_VLTokenID).call{value:validatorPayment}("");
            if(!successValidator){
                revert UnsuccessfulPayment(address(this), IERC721Upgradeable(validatorLicenseContractAddress).ownerOf(_VLTokenID), validatorPayment);
            }
            (bool successPlatform,) = PlatformSettings(platformSettingsContractAddress).financialWallet().call{value:platformPayment}("");
            if(!successPlatform){
                revert UnsuccessfulPayment(address(this), PlatformSettings(platformSettingsContractAddress).financialWallet(), platformPayment);
            }
            // Checking license payment
            bool successfulPayment = ILicenseStorage(licenseStorageAddress).getPaymentFromLicenseStorage(_VLTokenID, _licenseStorageFee, PlatformSettings(platformSettingsContractAddress).financialWallet());
            if(!successfulPayment){
                revert UnsuccessfulPayment(licenseStorageAddress, PlatformSettings(platformSettingsContractAddress).financialWallet(), _licenseStorageFee);
            }
    }


}
        

Contract ABI

[{"type":"error","name":"CallerNotOwner","inputs":[{"type":"address","name":"caller","internalType":"address"},{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"tokenID","internalType":"uint256"}]},{"type":"error","name":"ContractsIsPaused","inputs":[]},{"type":"error","name":"DeadlineExpired","inputs":[{"type":"uint256","name":"deadline","internalType":"uint256"},{"type":"uint256","name":"currentTimestamp","internalType":"uint256"}]},{"type":"error","name":"InactiveLicense","inputs":[]},{"type":"error","name":"IncorrectFeeDistribution","inputs":[]},{"type":"error","name":"IncorrectSigner","inputs":[{"type":"address","name":"signer","internalType":"address"}]},{"type":"error","name":"IncorrectValue","inputs":[{"type":"uint256","name":"value","internalType":"uint256"},{"type":"uint256","name":"price","internalType":"uint256"}]},{"type":"error","name":"InvalidRole","inputs":[{"type":"address","name":"caller","internalType":"address"},{"type":"bytes32","name":"role","internalType":"bytes32"}]},{"type":"error","name":"UnsuccessfulPayment","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"event","name":"CreateItemFromParts","inputs":[{"type":"uint256","name":"VLTokenID","internalType":"uint256","indexed":true},{"type":"address","name":"receiver","internalType":"address","indexed":true},{"type":"uint256[4]","name":"partsIDs","internalType":"uint256[4]","indexed":false},{"type":"uint256","name":"validatorFeeFromUser","internalType":"uint256","indexed":false},{"type":"uint256","name":"platformFee","internalType":"uint256","indexed":false},{"type":"uint256","name":"validatorFeeFromHackerLicense","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CubeDecodedForNFTItemWithVL","inputs":[{"type":"uint256","name":"VLTokenID","internalType":"uint256","indexed":true},{"type":"address","name":"receiver","internalType":"address","indexed":true},{"type":"uint256","name":"DCBackendTokenID","internalType":"uint256","indexed":false},{"type":"uint256","name":"validatorFeeFromUser","internalType":"uint256","indexed":false},{"type":"uint256","name":"platformFee","internalType":"uint256","indexed":false},{"type":"uint256","name":"validatorFeeFromHackerLicense","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CubeDecodedForNFTItemWithoutVL","inputs":[{"type":"address","name":"receiver","internalType":"address","indexed":true},{"type":"uint256","name":"DCBackendTokenID","internalType":"uint256","indexed":false},{"type":"uint256","name":"platformFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CubeDecodedForNonNFTItemWithVL","inputs":[{"type":"uint256","name":"VLTokenID","internalType":"uint256","indexed":true},{"type":"address","name":"receiver","internalType":"address","indexed":true},{"type":"uint256","name":"DCBackendTokenID","internalType":"uint256","indexed":false},{"type":"uint256","name":"validatorFeeFromUser","internalType":"uint256","indexed":false},{"type":"uint256","name":"platformFee","internalType":"uint256","indexed":false},{"type":"uint256","name":"validatorFeeFromHackerLicense","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"CubeDecodedForNonNFTItemWithoutVL","inputs":[{"type":"address","name":"receiver","internalType":"address","indexed":true},{"type":"uint256","name":"DCBackendTokenID","internalType":"uint256","indexed":false},{"type":"uint256","name":"platformFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NFTCubeDecodedForNFTItemWithVL","inputs":[{"type":"uint256","name":"VLTokenID","internalType":"uint256","indexed":true},{"type":"address","name":"receiver","internalType":"address","indexed":true},{"type":"uint256","name":"DCTokenID","internalType":"uint256","indexed":true},{"type":"uint256","name":"DCBackendTokenID","internalType":"uint256","indexed":false},{"type":"uint256","name":"validatorFeeFromUser","internalType":"uint256","indexed":false},{"type":"uint256","name":"platformFee","internalType":"uint256","indexed":false},{"type":"uint256","name":"validatorFeeFromHackerLicense","internalType":"uint256","indexed":false},{"type":"uint8","name":"hexQuality","internalType":"uint8","indexed":false}],"anonymous":false},{"type":"event","name":"NFTCubeDecodedForNFTItemWithoutVL","inputs":[{"type":"address","name":"receiver","internalType":"address","indexed":true},{"type":"uint256","name":"DCBackendTokenID","internalType":"uint256","indexed":false},{"type":"uint256","name":"DCTokenID","internalType":"uint256","indexed":false},{"type":"uint256","name":"platformFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NFTCubeDecodedForNonNFTItemWithVL","inputs":[{"type":"uint256","name":"VLTokenID","internalType":"uint256","indexed":true},{"type":"address","name":"receiver","internalType":"address","indexed":true},{"type":"uint256","name":"DCTokenID","internalType":"uint256","indexed":true},{"type":"uint256","name":"DCBackendTokenID","internalType":"uint256","indexed":false},{"type":"uint256","name":"validatorFeeFromUser","internalType":"uint256","indexed":false},{"type":"uint256","name":"platformFee","internalType":"uint256","indexed":false},{"type":"uint256","name":"validatorFeeFromHackerLicense","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"NFTCubeDecodedForNonNFTItemWithoutVL","inputs":[{"type":"address","name":"receiver","internalType":"address","indexed":true},{"type":"uint256","name":"DCBackendTokenID","internalType":"uint256","indexed":false},{"type":"uint256","name":"DCTokenID","internalType":"uint256","indexed":false},{"type":"uint256","name":"platformFee","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"PERCENT_DENOMINATOR","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"createItemFromParts","inputs":[{"type":"uint256","name":"_VLTokenID","internalType":"uint256"},{"type":"uint256","name":"_seasonID","internalType":"uint256"},{"type":"uint256[4]","name":"_partsIDs","internalType":"uint256[4]"},{"type":"uint256","name":"_price","internalType":"uint256"},{"type":"string","name":"_metadataURL","internalType":"string"},{"type":"uint256","name":"_deadline","internalType":"uint256"},{"type":"bytes","name":"_signature","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"dataCubeContractAddress","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"decodeCubeForNFTItemWithVL","inputs":[{"type":"uint256","name":"_VLTokenID","internalType":"uint256"},{"type":"uint256","name":"_seasonID","internalType":"uint256"},{"type":"uint8","name":"_DCQuality","internalType":"uint8"},{"type":"uint256","name":"_price","internalType":"uint256"},{"type":"uint256","name":"_DCBackendTokenID","internalType":"uint256"},{"type":"string","name":"_metadataURL","internalType":"string"},{"type":"uint256","name":"_deadline","internalType":"uint256"},{"type":"bytes","name":"_signature","internalType":"bytes"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"decodeCubeForNFTItemWithoutVL","inputs":[{"type":"uint256","name":"_seasonID","internalType":"uint256"},{"type":"uint8","name":"_DCQuality","internalType":"uint8"},{"type":"uint256","name":"_price","internalType":"uint256"},{"type":"uint256","name":"_DCBackendTokenID","internalType":"uint256"},{"type":"string","name":"_metadataURL","internalType":"string"},{"type":"uint256","name":"_deadline","internalType":"uint256"},{"type":"bytes","name":"_signature","internalType":"bytes"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"decodeCubeForNonNFTItemWithVL","inputs":[{"type":"uint256","name":"_VLTokenID","internalType":"uint256"},{"type":"uint256","name":"_seasonID","internalType":"uint256"},{"type":"uint8","name":"_DCQuality","internalType":"uint8"},{"type":"uint256","name":"_price","internalType":"uint256"},{"type":"uint256","name":"_DCBackendTokenID","internalType":"uint256"},{"type":"uint256","name":"_deadline","internalType":"uint256"},{"type":"bytes","name":"_signature","internalType":"bytes"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"decodeCubeForNonNFTItemWithoutVL","inputs":[{"type":"uint256","name":"_seasonID","internalType":"uint256"},{"type":"uint8","name":"_DCQuality","internalType":"uint8"},{"type":"uint256","name":"_price","internalType":"uint256"},{"type":"uint256","name":"_DCBackendTokenID","internalType":"uint256"},{"type":"uint256","name":"_deadline","internalType":"uint256"},{"type":"bytes","name":"_signature","internalType":"bytes"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"decodeNFTCubeForNFTItemWithVL","inputs":[{"type":"uint256","name":"_DCTokenID","internalType":"uint256"},{"type":"uint256","name":"_VLTokenID","internalType":"uint256"},{"type":"uint256","name":"_seasonID","internalType":"uint256"},{"type":"uint8","name":"_DCQuality","internalType":"uint8"},{"type":"uint256","name":"_price","internalType":"uint256"},{"type":"uint256","name":"_DCBackendTokenID","internalType":"uint256"},{"type":"string","name":"_metadataURL","internalType":"string"},{"type":"uint256","name":"_deadline","internalType":"uint256"},{"type":"bytes","name":"_signature","internalType":"bytes"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"decodeNFTCubeForNFTItemWithoutVL","inputs":[{"type":"uint256","name":"_DCTokenID","internalType":"uint256"},{"type":"uint256","name":"_seasonID","internalType":"uint256"},{"type":"uint8","name":"_DCQuality","internalType":"uint8"},{"type":"uint256","name":"_price","internalType":"uint256"},{"type":"uint256","name":"_DCBackendTokenID","internalType":"uint256"},{"type":"string","name":"_metadataURL","internalType":"string"},{"type":"uint256","name":"_deadline","internalType":"uint256"},{"type":"bytes","name":"_signature","internalType":"bytes"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"decodeNFTCubeForNonNFTItemWithVL","inputs":[{"type":"uint256","name":"_DCTokenID","internalType":"uint256"},{"type":"uint256","name":"_VLTokenID","internalType":"uint256"},{"type":"uint256","name":"_seasonID","internalType":"uint256"},{"type":"uint8","name":"_DCQuality","internalType":"uint8"},{"type":"uint256","name":"_price","internalType":"uint256"},{"type":"uint256","name":"_DCBackendTokenID","internalType":"uint256"},{"type":"uint256","name":"_deadline","internalType":"uint256"},{"type":"bytes","name":"_signature","internalType":"bytes"}]},{"type":"function","stateMutability":"payable","outputs":[],"name":"decodeNFTCubeForNonNFTItemWithoutVL","inputs":[{"type":"uint256","name":"_DCTokenID","internalType":"uint256"},{"type":"uint256","name":"_seasonID","internalType":"uint256"},{"type":"uint8","name":"_DCQuality","internalType":"uint8"},{"type":"uint256","name":"_price","internalType":"uint256"},{"type":"uint256","name":"_DCBackendTokenID","internalType":"uint256"},{"type":"uint256","name":"_deadline","internalType":"uint256"},{"type":"bytes","name":"_signature","internalType":"bytes"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"gameItemContractAddress","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"initialize","inputs":[{"type":"address","name":"_platformSettingsContractAddress","internalType":"address"},{"type":"address","name":"_validatorLicenseContractAddress","internalType":"address"},{"type":"address","name":"_dataCubeContractAddress","internalType":"address"},{"type":"address","name":"_gameItemContractAddress","internalType":"address"},{"type":"address","name":"_licenseStorageAddress","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"licenseStorageAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"platformSettingsContractAddress","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"validatorLicenseContractAddress","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint32","name":"","internalType":"uint32"}],"name":"version","inputs":[]}]
              

Contract Creation Code

0x608060405234801561001057600080fd5b506157b980620000216000396000f3fe6080604052600436106100fe5760003560e01c8063603275111161009557806388abe21f1161006457806388abe21f1461025257806392fc4bfb146102655780639e6c295914610278578063af29e2ec1461029b578063c6a319fa146102ae57600080fd5b806360327511146101ec5780636744be5d146101ff5780636c8d59901461021f57806385cb332d1461023f57600080fd5b80634aaee2db116100d15780634aaee2db1461018857806354fd4d501461019b578063557498a5146101b95780635686f69e146101cc57600080fd5b806308507607146101035780630b800072146101185780631459457a1461012b57806335f0d8861461014b575b600080fd5b610116610111366004614ff1565b6102ce565b005b610116610126366004615071565b610cdd565b34801561013757600080fd5b50610116610146366004615137565b6113bc565b34801561015757600080fd5b5060385461016b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101166101963660046151a8565b6114c5565b3480156101a757600080fd5b50604051620f4242815260200161017f565b6101166101c736600461524f565b611f36565b3480156101d857600080fd5b5060375461016b906001600160a01b031681565b6101166101fa366004614ff1565b612afd565b34801561020b57600080fd5b5060365461016b906001600160a01b031681565b34801561022b57600080fd5b5060395461016b906001600160a01b031681565b61011661024d3660046151a8565b613057565b6101166102603660046152c9565b6135d4565b61011661027336600461533e565b613953565b34801561028457600080fd5b5061028d606481565b60405190815260200161017f565b6101166102a93660046153cc565b613d44565b3480156102ba57600080fd5b5060355461016b906001600160a01b031681565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561031c57600080fd5b505afa158015610330573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103549190615488565b156103725760405163487ea6bb60e11b815260040160405180910390fd5b604080517ffdbc5636040a4e2dd9c3b432938ad68df73a4aa16d45af095b407ca77c99698f60208201529081018890526060810187905260ff8616608082015260a0810185905260c0810184905260e081018390526000906103ee90610100015b604051602081830303815290604052805190602001206143ef565b905060006103fc8284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b15801561044357600080fd5b505afa158015610457573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047b9190615488565b6104b25760405162461bcd60e51b815260206004820152600360248201526249533960e81b60448201526064015b60405180910390fd5b50508142106104e95760405162461bcd60e51b815260206004820152600360248201526245533960e81b60448201526064016104a9565b603654604051632776a4f760e01b8152600481018990526001600160a01b0390911690632776a4f79060240160206040518083038186803b15801561052d57600080fd5b505afa158015610541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105659190615488565b151560011461059c5760405162461bcd60e51b815260206004820152600360248201526209298760eb1b60448201526064016104a9565b603754604051635f6645bb60e11b815260ff871660048201526000916001600160a01b03169063becc8b769060240160206040518083038186803b1580156105e357600080fd5b505afa1580156105f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061b91906154b1565b90508434146106555760405162461bcd60e51b81526004016104a99060208082526004908201526324a3189b60e11b604082015260600190565b60006064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106a757600080fd5b505afa1580156106bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106df91906154b1565b6106e990886154e0565b6106f391906154ff565b905060006064603560009054906101000a90046001600160a01b03166001600160a01b03166398fc3e766040518163ffffffff1660e01b815260040160206040518083038186803b15801561074757600080fd5b505afa15801561075b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077f91906154b1565b61078990896154e0565b61079391906154ff565b9050866107a08284615521565b146107d65760405162461bcd60e51b81526004016104a9906020808252600490820152634946313760e01b604082015260600190565b6036546040516331a9108f60e11b8152600481018c90526000916001600160a01b031690636352211e9060240160206040518083038186803b15801561081b57600080fd5b505afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d806000811461089d576040519150601f19603f3d011682016040523d82523d6000602084013e6108a2565b606091505b50509050806108dc5760405162461bcd60e51b81526004016104a9906020808252600490820152635446313960e01b604082015260600190565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b15801561092157600080fd5b505afa158015610935573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109599190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d80600081146109a3576040519150601f19603f3d011682016040523d82523d6000602084013e6109a8565b606091505b50509050806109e25760405162461bcd60e51b81526004016104a9906020808252600490820152630544632360e41b604082015260600190565b6000603960009054906101000a90046001600160a01b03166001600160a01b0316635ce5b4448e88603560009054906101000a90046001600160a01b03166001600160a01b03166388339f9c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a5857600080fd5b505afa158015610a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a909190615539565b6040516001600160e01b031960e086901b168152600481019390935260248301919091526001600160a01b03166044820152606401602060405180830381600087803b158015610adf57600080fd5b505af1158015610af3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b179190615488565b905080610b4f5760405162461bcd60e51b81526004016104a9906020808252600490820152635446323160e01b604082015260600190565b5050505050336001600160a01b0316887fcffd27a940b02248ffe7fd97f4b806049bb33a4d8a0a8c6bf6a33c4ca3f2f7b7866064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610bd157600080fd5b505afa158015610be5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0991906154b1565b610c13908b6154e0565b610c1d91906154ff565b60355460408051634c7e1f3b60e11b815290516064926001600160a01b0316916398fc3e76916004808301926020929190829003018186803b158015610c6257600080fd5b505afa158015610c76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9a91906154b1565b610ca4908c6154e0565b610cae91906154ff565b604080519384526020840192909252908201526060810185905260800160405180910390a35050505050505050565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d2b57600080fd5b505afa158015610d3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d639190615488565b15610d815760405163487ea6bb60e11b815260040160405180910390fd5b8251602080850191909120604080517f4af6f8c53667f6c79f7f2ca1c9a09fcee62a7ace5796f2d7049c3e6212a893959381019390935282018b9052606082018a90526080820189905260ff881660a083015260c0820187905260e082018690526101008201526101208101839052600090610e0090610140016103d3565b90506000610e0e8284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b158015610e5557600080fd5b505afa158015610e69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8d9190615488565b610eb5576040516333ffff9b60e01b81526001600160a01b03821660048201526024016104a9565b50506037546001600160a01b031642831015610eed576040516302a07ebf60e31b8152600481018490524260248201526044016104a9565b6037546040516331a9108f60e11b8152600481018c905233916001600160a01b031690636352211e9060240160206040518083038186803b158015610f3157600080fd5b505afa158015610f45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f699190615539565b6001600160a01b031614611010576037546040516331a9108f60e11b8152600481018c905233916001600160a01b031690636352211e9060240160206040518083038186803b158015610fbb57600080fd5b505afa158015610fcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff39190615539565b8b60405163f604c2ef60e01b81526004016104a993929190615556565b603654604051632776a4f760e01b8152600481018b90526001600160a01b0390911690632776a4f79060240160206040518083038186803b15801561105457600080fd5b505afa158015611068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108c9190615488565b15156001146110ae576040516309f47f6760e41b815260040160405180910390fd5b60405163629dc9d760e01b8152600481018b90526000906001600160a01b0383169063629dc9d79060240160206040518083038186803b1580156110f157600080fd5b505afa158015611105573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611129919061557a565b604051635f6645bb60e11b815260ff821660048201529091506000906001600160a01b0384169063becc8b769060240160206040518083038186803b15801561117157600080fd5b505afa158015611185573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a991906154b1565b90506111b6888c83614467565b6037546040516340738b7f60e01b81526001600160a01b03909116906340738b7f906111f2908f908f908f908f9033908f908f906004016155e4565b600060405180830381600087803b15801561120c57600080fd5b505af1158015611220573d6000803e3d6000fd5b505050508b336001600160a01b03168c7fbfe95c6d9dffcc2dd1285db389f55174d73aba0ffec4ddfdbaf36015eb530bef8a6064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112a257600080fd5b505afa1580156112b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112da91906154b1565b6112e4908f6154e0565b6112ee91906154ff565b60355460408051634c7e1f3b60e11b815290516064926001600160a01b0316916398fc3e76916004808301926020929190829003018186803b15801561133357600080fd5b505afa158015611347573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136b91906154b1565b8f61137691906154e0565b61138091906154ff565b604080519384526020840192909252908201526060810186905260ff8716608082015260a00160405180910390a4505050505050505050505050565b600054610100900460ff16806113d5575060005460ff16155b6113f15760405162461bcd60e51b81526004016104a990615633565b600054610100900460ff16158015611413576000805461ffff19166101011790555b611455604051806040016040528060078152602001662232b1b7b232b960c91b815250604051806040016040528060018152602001603160f81b815250614a4a565b603580546001600160a01b03199081166001600160a01b03898116919091179092556036805482168884161790556037805482168784161790556038805482168684161790556039805490911691841691909117905580156114bd576000805461ff00191690555b505050505050565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561151357600080fd5b505afa158015611527573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154b9190615488565b156115695760405163487ea6bb60e11b815260040160405180910390fd5b8251602080850191909120604080517fb879e3a2e48146c5264a620bed124132076dde6de9826f29be9ee4b9997258a59381019390935282018a90526060820189905260ff8816608083015260a0820187905260c0820186905260e082015261010081018390526000906115e090610120016103d3565b905060006115ee8284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b15801561163557600080fd5b505afa158015611649573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061166d9190615488565b61169f5760405162461bcd60e51b8152602060048201526003602482015262092a6760eb1b60448201526064016104a9565b50508142106116d65760405162461bcd60e51b815260206004820152600360248201526208aa6760eb1b60448201526064016104a9565b603654604051632776a4f760e01b8152600481018a90526001600160a01b0390911690632776a4f79060240160206040518083038186803b15801561171a57600080fd5b505afa15801561172e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117529190615488565b15156001146117895760405162461bcd60e51b8152602060048201526003602482015262494c3760e81b60448201526064016104a9565b603754604051635f6645bb60e11b815260ff881660048201526000916001600160a01b03169063becc8b769060240160206040518083038186803b1580156117d057600080fd5b505afa1580156117e4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180891906154b1565b90508534146118425760405162461bcd60e51b81526004016104a99060208082526004908201526312518c4d60e21b604082015260600190565b60006064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561189457600080fd5b505afa1580156118a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118cc91906154b1565b6118d690896154e0565b6118e091906154ff565b905060006064603560009054906101000a90046001600160a01b03166001600160a01b03166398fc3e766040518163ffffffff1660e01b815260040160206040518083038186803b15801561193457600080fd5b505afa158015611948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061196c91906154b1565b611976908a6154e0565b61198091906154ff565b90508761198d8284615521565b146119c35760405162461bcd60e51b81526004016104a9906020808252600490820152634946313560e01b604082015260600190565b6036546040516331a9108f60e11b8152600481018d90526000916001600160a01b031690636352211e9060240160206040518083038186803b158015611a0857600080fd5b505afa158015611a1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a409190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d8060008114611a8a576040519150601f19603f3d011682016040523d82523d6000602084013e611a8f565b606091505b5050905080611ac95760405162461bcd60e51b81526004016104a9906020808252600490820152632a23189b60e11b604082015260600190565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b158015611b0e57600080fd5b505afa158015611b22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b469190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d8060008114611b90576040519150601f19603f3d011682016040523d82523d6000602084013e611b95565b606091505b5050905080611bcf5760405162461bcd60e51b81526004016104a9906020808252600490820152635446313760e01b604082015260600190565b6000603960009054906101000a90046001600160a01b03166001600160a01b0316635ce5b4448f88603560009054906101000a90046001600160a01b03166001600160a01b03166388339f9c6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c4557600080fd5b505afa158015611c59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7d9190615539565b6040516001600160e01b031960e086901b168152600481019390935260248301919091526001600160a01b03166044820152606401602060405180830381600087803b158015611ccc57600080fd5b505af1158015611ce0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d049190615488565b905080611d3c5760405162461bcd60e51b81526004016104a9906020808252600490820152630a88c62760e31b604082015260600190565b505060385460405163a869f99360e01b81526001600160a01b03909116935063a869f9939250611d79915033908d908d908d908b90600401615681565b600060405180830381600087803b158015611d9357600080fd5b505af1158015611da7573d6000803e3d6000fd5b50505050336001600160a01b0316897f0d4d0f151d5c27adbb7ebfbc0dff90ecd0853c8f8ff4adf9bf6279ba9d341d1b876064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2857600080fd5b505afa158015611e3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6091906154b1565b611e6a908c6154e0565b611e7491906154ff565b60355460408051634c7e1f3b60e11b815290516064926001600160a01b0316916398fc3e76916004808301926020929190829003018186803b158015611eb957600080fd5b505afa158015611ecd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef191906154b1565b611efb908d6154e0565b611f0591906154ff565b60408051938452602084019290925290820152606081018590526080015b60405180910390a3505050505050505050565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f8457600080fd5b505afa158015611f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fbc9190615488565b15611fda5760405163487ea6bb60e11b815260040160405180910390fd5b604080517fb51b7243c23c37fa6eb0cc676d750592045ed2de6f8e86ed03a36501e776d35f6020820152908101899052606081018890526080810187905260ff861660a082015260c0810185905260e08101849052610100810183905260009061204790610120016103d3565b905060006120558284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b15801561209c57600080fd5b505afa1580156120b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d49190615488565b6121065760405162461bcd60e51b815260206004820152600360248201526249533760e81b60448201526064016104a9565b505081421061213d5760405162461bcd60e51b815260206004820152600360248201526245533760e81b60448201526064016104a9565b6037546040516311fdae6160e11b8152600481018a90526001600160a01b03909116906323fb5cc29060240160206040518083038186803b15801561218157600080fd5b505afa158015612195573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b991906154b1565b86146121ed5760405162461bcd60e51b815260206004820152600360248201526212550d60ea1b60448201526064016104a9565b6037546040516331a9108f60e11b8152600481018a905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561223157600080fd5b505afa158015612245573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122699190615539565b6001600160a01b0316146122a85760405162461bcd60e51b81526004016104a9906020808252600490820152634952313760e01b604082015260600190565b603654604051632776a4f760e01b8152600481018990526001600160a01b0390911690632776a4f79060240160206040518083038186803b1580156122ec57600080fd5b505afa158015612300573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123249190615488565b151560011461235b5760405162461bcd60e51b815260206004820152600360248201526224a61b60e91b60448201526064016104a9565b603754604051635f6645bb60e11b815260ff871660048201526000916001600160a01b03169063becc8b769060240160206040518083038186803b1580156123a257600080fd5b505afa1580156123b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123da91906154b1565b90508434146124145760405162461bcd60e51b81526004016104a99060208082526004908201526324a3189960e11b604082015260600190565b60006064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561246657600080fd5b505afa15801561247a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061249e91906154b1565b6124a890886154e0565b6124b291906154ff565b905060006064603560009054906101000a90046001600160a01b03166001600160a01b03166398fc3e766040518163ffffffff1660e01b815260040160206040518083038186803b15801561250657600080fd5b505afa15801561251a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061253e91906154b1565b61254890896154e0565b61255291906154ff565b90508661255f8284615521565b146125955760405162461bcd60e51b81526004016104a9906020808252600490820152634946313360e01b604082015260600190565b6036546040516331a9108f60e11b8152600481018c90526000916001600160a01b031690636352211e9060240160206040518083038186803b1580156125da57600080fd5b505afa1580156125ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126129190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d806000811461265c576040519150601f19603f3d011682016040523d82523d6000602084013e612661565b606091505b505090508061269b5760405162461bcd60e51b81526004016104a9906020808252600490820152635446313360e01b604082015260600190565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b1580156126e057600080fd5b505afa1580156126f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127189190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d8060008114612762576040519150601f19603f3d011682016040523d82523d6000602084013e612767565b606091505b50509050806127a15760405162461bcd60e51b81526004016104a99060208082526004908201526315118c4d60e21b604082015260600190565b6000603960009054906101000a90046001600160a01b03166001600160a01b0316635ce5b4448e88603560009054906101000a90046001600160a01b03166001600160a01b03166388339f9c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561281757600080fd5b505afa15801561282b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061284f9190615539565b6040516001600160e01b031960e086901b168152600481019390935260248301919091526001600160a01b03166044820152606401602060405180830381600087803b15801561289e57600080fd5b505af11580156128b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128d69190615488565b90508061290e5760405162461bcd60e51b81526004016104a9906020808252600490820152635446313560e01b604082015260600190565b5050603754604051630852cd8d60e31b8152600481018e90526001600160a01b0390911693506342966c6892506024019050600060405180830381600087803b15801561295a57600080fd5b505af115801561296e573d6000803e3d6000fd5b5050505088336001600160a01b0316897f6af1203a766546ad6f96d8d16564588bfff65db3861358bea3b661cbe0203486876064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156129f057600080fd5b505afa158015612a04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a2891906154b1565b612a32908c6154e0565b612a3c91906154ff565b60355460408051634c7e1f3b60e11b815290516064926001600160a01b0316916398fc3e76916004808301926020929190829003018186803b158015612a8157600080fd5b505afa158015612a95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ab991906154b1565b612ac3908d6154e0565b612acd91906154ff565b604080519384526020840192909252908201526060810186905260800160405180910390a4505050505050505050565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b4b57600080fd5b505afa158015612b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b839190615488565b15612ba15760405163487ea6bb60e11b815260040160405180910390fd5b604080517fdc26fa685b21cb5a0853f755a6ef06b74f608a151e1145a7d79a988734ea95ef60208201529081018890526060810187905260ff8616608082015260a0810185905260c0810184905260e08101839052600090612c0690610100016103d3565b90506000612c148284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b158015612c5b57600080fd5b505afa158015612c6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c939190615488565b612cc85760405162461bcd60e51b81526004016104a9906020808252600490820152634953313160e01b604082015260600190565b5050814210612d025760405162461bcd60e51b81526004016104a9906020808252600490820152634553313160e01b604082015260600190565b6037546040516311fdae6160e11b8152600481018990526001600160a01b03909116906323fb5cc29060240160206040518083038186803b158015612d4657600080fd5b505afa158015612d5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d7e91906154b1565b8614612db25760405162461bcd60e51b815260206004820152600360248201526249543960e81b60448201526064016104a9565b6037546040516331a9108f60e11b81526004810189905233916001600160a01b031690636352211e9060240160206040518083038186803b158015612df657600080fd5b505afa158015612e0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e2e9190615539565b6001600160a01b031614612e6d5760405162461bcd60e51b81526004016104a9906020808252600490820152634952313960e01b604082015260600190565b833414612ea55760405162461bcd60e51b81526004016104a9906020808252600490820152634946313960e01b604082015260600190565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b158015612eea57600080fd5b505afa158015612efe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f229190615539565b6001600160a01b03168560405160006040518083038185875af1925050503d8060008114612f6c576040519150601f19603f3d011682016040523d82523d6000602084013e612f71565b606091505b5050905080612fab5760405162461bcd60e51b81526004016104a9906020808252600490820152635446323360e01b604082015260600190565b50603754604051630852cd8d60e31b8152600481018990526001600160a01b03909116906342966c6890602401600060405180830381600087803b158015612ff257600080fd5b505af1158015613006573d6000803e3d6000fd5b5050604080518a8152602081018790529081018790523392507f0cd87a64473d0177af5fc2ecb410ce0811a0591f3d39129b345aea526769008f91506060015b60405180910390a250505050505050565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130a557600080fd5b505afa1580156130b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130dd9190615488565b156130fb5760405163487ea6bb60e11b815260040160405180910390fd5b8251602080850191909120604080517f1dab4487991fd6cb7a68d5f0071383c79d008050dd93bcb26b0f64208416efac9381019390935282018a90526060820189905260ff8816608083015260a0820187905260c0820186905260e0820152610100810183905260009061317290610120016103d3565b905060006131808284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b1580156131c757600080fd5b505afa1580156131db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131ff9190615488565b6132345760405162461bcd60e51b81526004016104a9906020808252600490820152630495331360e41b604082015260600190565b505081421061326e5760405162461bcd60e51b81526004016104a9906020808252600490820152630455331360e41b604082015260600190565b6037546040516311fdae6160e11b8152600481018a90526001600160a01b03909116906323fb5cc29060240160206040518083038186803b1580156132b257600080fd5b505afa1580156132c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132ea91906154b1565b871461331e5760405162461bcd60e51b8152602060048201526003602482015262092a8760eb1b60448201526064016104a9565b6037546040516331a9108f60e11b8152600481018a905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561336257600080fd5b505afa158015613376573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061339a9190615539565b6001600160a01b0316146133d95760405162461bcd60e51b81526004016104a990602080825260049082015263092a462760e31b604082015260600190565b8434146134115760405162461bcd60e51b81526004016104a9906020808252600490820152630928c62760e31b604082015260600190565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b15801561345657600080fd5b505afa15801561346a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061348e9190615539565b6001600160a01b03168660405160006040518083038185875af1925050503d80600081146134d8576040519150601f19603f3d011682016040523d82523d6000602084013e6134dd565b606091505b50509050806135175760405162461bcd60e51b81526004016104a9906020808252600490820152632a23191960e11b604082015260600190565b506037546040516340738b7f60e01b81526001600160a01b03909116906340738b7f90613555908b906000908c908c9033908c908c906004016155e4565b600060405180830381600087803b15801561356f57600080fd5b505af1158015613583573d6000803e3d6000fd5b5050604080518b8152602081018890529081018890523392507f92193e272ce905a8ab4c46797d236878d04fe6a3193ecec43fa0b0f00344a189915060600160405180910390a25050505050505050565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561362257600080fd5b505afa158015613636573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061365a9190615488565b156136785760405163487ea6bb60e11b815260040160405180910390fd5b604080517f90a71a75ab225e2122da8c8b3520fb095219bff0ea0d907dfc224ec2c1e9a670602082015290810187905260ff861660608201526080810185905260a0810184905260c081018390526000906136d59060e0016103d3565b905060006136e38284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b15801561372a57600080fd5b505afa15801561373e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137629190615488565b6137975760405162461bcd60e51b81526004016104a9906020808252600490820152634953313360e01b604082015260600190565b50508142106137d15760405162461bcd60e51b81526004016104a9906020808252600490820152634553313360e01b604082015260600190565b8334146138095760405162461bcd60e51b81526004016104a9906020808252600490820152634946323160e01b604082015260600190565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b15801561384e57600080fd5b505afa158015613862573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138869190615539565b6001600160a01b03168560405160006040518083038185875af1925050503d80600081146138d0576040519150601f19603f3d011682016040523d82523d6000602084013e6138d5565b606091505b505090508061390f5760405162461bcd60e51b81526004016104a9906020808252600490820152635446323560e01b604082015260600190565b50604080518481526020810186905233917fca89495820f00e591d876216a517552dff0c736806752531dad23686db7e26a7910160405180910390a2505050505050565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156139a157600080fd5b505afa1580156139b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d99190615488565b156139f75760405163487ea6bb60e11b815260040160405180910390fd5b8251602080850191909120604080517fb97d55d8332519498c57f7eaf8da80beaf27d360e08da4411c475bc963bf295593810193909352820189905260ff881660608301526080820187905260a0820186905260c082015260e08101839052600090613a6690610100016103d3565b90506000613a748284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b158015613abb57600080fd5b505afa158015613acf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613af39190615488565b613b285760405162461bcd60e51b81526004016104a99060208082526004908201526324a9989960e11b604082015260600190565b5050814210613b625760405162461bcd60e51b81526004016104a99060208082526004908201526322a9989960e11b604082015260600190565b843414613b9a5760405162461bcd60e51b81526004016104a9906020808252600490820152630494632360e41b604082015260600190565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b158015613bdf57600080fd5b505afa158015613bf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c179190615539565b6001600160a01b03168660405160006040518083038185875af1925050503d8060008114613c61576040519150601f19603f3d011682016040523d82523d6000602084013e613c66565b606091505b5050905080613ca05760405162461bcd60e51b81526004016104a99060208082526004908201526315118c8d60e21b604082015260600190565b5060385460405163a869f99360e01b81526001600160a01b039091169063a869f99390613cda9033906000908c908c908a90600401615681565b600060405180830381600087803b158015613cf457600080fd5b505af1158015613d08573d6000803e3d6000fd5b505060408051878152602081018990523393507f9653037de6c888290dd817340ee4d1f8c67e27a63081b61c5449c43a4db14792925001613046565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015613d9257600080fd5b505afa158015613da6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613dca9190615488565b15613de85760405163487ea6bb60e11b815260040160405180910390fd5b6000613e797fc8125d18d04f28e7262209a306bc1d0bee25ed7261d804fee2a621c94838059e898989604051602001613e2191906156c2565b60408051808303601f1901815282825280516020918201208b518c83012091840196909652908201939093526060810191909152608081019290925260a0820188905260c082015260e08101859052610100016103d3565b90506000613e878284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b158015613ece57600080fd5b505afa158015613ee2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f069190615488565b613f2e576040516333ffff9b60e01b81526001600160a01b03821660048201526024016104a9565b505081421115613f5a576040516302a07ebf60e31b8152600481018390524260248201526044016104a9565b603654604051632776a4f760e01b8152600481018990526001600160a01b0390911690632776a4f79060240160206040518083038186803b158015613f9e57600080fd5b505afa158015613fb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fd69190615488565b1515600114613ff8576040516309f47f6760e41b815260040160405180910390fd5b6038548551604051636b0abcb960e11b815260048101919091526000916001600160a01b03169063d61579729060240160206040518083038186803b15801561404057600080fd5b505afa158015614054573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614078919061557a565b905060005b600481101561418d576038546001600160a01b03166323b872dd33308a85600481106140ab576140ab6156f6565b60200201516040518463ffffffff1660e01b81526004016140ce93929190615556565b600060405180830381600087803b1580156140e857600080fd5b505af11580156140fc573d6000803e3d6000fd5b50506038546001600160a01b031691506342966c689050888360048110614125576141256156f6565b60200201516040518263ffffffff1660e01b815260040161414891815260200190565b600060405180830381600087803b15801561416257600080fd5b505af1158015614176573d6000803e3d6000fd5b5050505080806141859061570c565b91505061407d565b50603754604051635f6645bb60e11b815260ff831660048201526000916001600160a01b03169063becc8b769060240160206040518083038186803b1580156141d557600080fd5b505afa1580156141e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061420d91906154b1565b905061421a868a83614467565b60385460405163a869f99360e01b81526001600160a01b039091169063a869f993906142529033908d908d9088908c90600401615681565b600060405180830381600087803b15801561426c57600080fd5b505af1158015614280573d6000803e3d6000fd5b50505050336001600160a01b0316897f53bb613d82455fb8ce57213b03c2b898ddd720f7f7c1650c6c9b94e878f45e13896064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561430157600080fd5b505afa158015614315573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061433991906154b1565b614343908c6154e0565b61434d91906154ff565b60355460408051634c7e1f3b60e11b815290516064926001600160a01b0316916398fc3e76916004808301926020929190829003018186803b15801561439257600080fd5b505afa1580156143a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143ca91906154b1565b6143d4908d6154e0565b6143de91906154ff565b86604051611f239493929190615727565b600061443d6143fc614ac2565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b92915050565b60008060006144528585614b42565b9150915061445f81614bb2565b509392505050565b82341461449057604051635928816d60e11b8152346004820152602481018490526044016104a9565b60006064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156144e257600080fd5b505afa1580156144f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061451a91906154b1565b61452490866154e0565b61452e91906154ff565b905060006064603560009054906101000a90046001600160a01b03166001600160a01b03166398fc3e766040518163ffffffff1660e01b815260040160206040518083038186803b15801561458257600080fd5b505afa158015614596573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145ba91906154b1565b6145c490876154e0565b6145ce91906154ff565b9050846145db8284615521565b146145f957604051635d616c1360e01b815260040160405180910390fd5b6036546040516331a9108f60e11b8152600481018690526000916001600160a01b031690636352211e9060240160206040518083038186803b15801561463e57600080fd5b505afa158015614652573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146769190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d80600081146146c0576040519150601f19603f3d011682016040523d82523d6000602084013e6146c5565b606091505b5050905080614767576036546040516331a9108f60e11b81526004810187905230916001600160a01b031690636352211e9060240160206040518083038186803b15801561471257600080fd5b505afa158015614726573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061474a9190615539565b84604051634eb3d3e160e11b81526004016104a993929190615556565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b1580156147ac57600080fd5b505afa1580156147c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147e49190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d806000811461482e576040519150601f19603f3d011682016040523d82523d6000602084013e614833565b606091505b5050905080614880576035546040805163220ce7e760e21b8152905130926001600160a01b0316916388339f9c916004808301926020929190829003018186803b15801561471257600080fd5b6039546035546040805163220ce7e760e21b815290516000936001600160a01b0390811693635ce5b444938c938c93909216916388339f9c91600480820192602092909190829003018186803b1580156148d957600080fd5b505afa1580156148ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149119190615539565b6040516001600160e01b031960e086901b168152600481019390935260248301919091526001600160a01b03166044820152606401602060405180830381600087803b15801561496057600080fd5b505af1158015614974573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149989190615488565b905080614a40576039546035546040805163220ce7e760e21b815290516001600160a01b0393841693909216916388339f9c91600480820192602092909190829003018186803b1580156149eb57600080fd5b505afa1580156149ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a239190615539565b87604051634eb3d3e160e11b81526004016104a993929190615556565b5050505050505050565b600054610100900460ff1680614a63575060005460ff16155b614a7f5760405162461bcd60e51b81526004016104a990615633565b600054610100900460ff16158015614aa1576000805461ffff19166101011790555b614aab8383614d70565b8015614abd576000805461ff00191690555b505050565b6000614b3d7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f614af160015490565b6002546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b905090565b600080825160411415614b795760208301516040840151606085015160001a614b6d87828585614dfa565b94509450505050614bab565b825160401415614ba35760208301516040840151614b98868383614ee7565b935093505050614bab565b506000905060025b9250929050565b6000816004811115614bc657614bc661576d565b1415614bcf5750565b6001816004811115614be357614be361576d565b1415614c315760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104a9565b6002816004811115614c4557614c4561576d565b1415614c935760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104a9565b6003816004811115614ca757614ca761576d565b1415614d005760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104a9565b6004816004811115614d1457614d1461576d565b1415614d6d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016104a9565b50565b600054610100900460ff1680614d89575060005460ff16155b614da55760405162461bcd60e51b81526004016104a990615633565b600054610100900460ff16158015614dc7576000805461ffff19166101011790555b82516020808501919091208351918401919091206001919091556002558015614abd576000805461ff0019169055505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115614e315750600090506003614ede565b8460ff16601b14158015614e4957508460ff16601c14155b15614e5a5750600090506004614ede565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614eae573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614ed757600060019250925050614ede565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01614f0887828885614dfa565b935093505050935093915050565b60ff81168114614d6d57600080fd5b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715614f5e57614f5e614f25565b60405290565b600082601f830112614f7557600080fd5b813567ffffffffffffffff80821115614f9057614f90614f25565b604051601f8301601f19908116603f01168101908282118183101715614fb857614fb8614f25565b81604052838152866020858801011115614fd157600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600080600060e0888a03121561500c57600080fd5b8735965060208801359550604088013561502581614f16565b9450606088013593506080880135925060a0880135915060c088013567ffffffffffffffff81111561505657600080fd5b6150628a828b01614f64565b91505092959891949750929550565b60008060008060008060008060006101208a8c03121561509057600080fd5b8935985060208a0135975060408a0135965060608a01356150b081614f16565b955060808a0135945060a08a0135935060c08a013567ffffffffffffffff808211156150db57600080fd5b6150e78d838e01614f64565b945060e08c013593506101008c013591508082111561510557600080fd5b506151128c828d01614f64565b9150509295985092959850929598565b6001600160a01b0381168114614d6d57600080fd5b600080600080600060a0868803121561514f57600080fd5b853561515a81615122565b9450602086013561516a81615122565b9350604086013561517a81615122565b9250606086013561518a81615122565b9150608086013561519a81615122565b809150509295509295909350565b600080600080600080600080610100898b0312156151c557600080fd5b883597506020890135965060408901356151de81614f16565b9550606089013594506080890135935060a089013567ffffffffffffffff8082111561520957600080fd5b6152158c838d01614f64565b945060c08b0135935060e08b013591508082111561523257600080fd5b5061523f8b828c01614f64565b9150509295985092959890939650565b600080600080600080600080610100898b03121561526c57600080fd5b883597506020890135965060408901359550606089013561528c81614f16565b94506080890135935060a0890135925060c0890135915060e089013567ffffffffffffffff8111156152bd57600080fd5b61523f8b828c01614f64565b60008060008060008060c087890312156152e257600080fd5b8635955060208701356152f481614f16565b945060408701359350606087013592506080870135915060a087013567ffffffffffffffff81111561532557600080fd5b61533189828a01614f64565b9150509295509295509295565b600080600080600080600060e0888a03121561535957600080fd5b87359650602088013561536b81614f16565b95506040880135945060608801359350608088013567ffffffffffffffff8082111561539657600080fd5b6153a28b838c01614f64565b945060a08a0135935060c08a01359150808211156153bf57600080fd5b506150628a828b01614f64565b6000806000806000806000610140888a0312156153e857600080fd5b87359650602080890135965089605f8a011261540357600080fd5b61540b614f3b565b8060c08b018c81111561541d57600080fd5b60408c015b818110156154395780358452928401928401615422565b50909750359550505060e088013567ffffffffffffffff8082111561545d57600080fd5b6154698b838c01614f64565b94506101008a013593506101208a01359150808211156153bf57600080fd5b60006020828403121561549a57600080fd5b815180151581146154aa57600080fd5b9392505050565b6000602082840312156154c357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156154fa576154fa6154ca565b500290565b60008261551c57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115615534576155346154ca565b500190565b60006020828403121561554b57600080fd5b81516154aa81615122565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006020828403121561558c57600080fd5b81516154aa81614f16565b6000815180845260005b818110156155bd576020818501810151868301820152016155a1565b818111156155cf576000602083870101525b50601f01601f19169290920160200192915050565b87815286602082015285604082015260ff8516606082015260018060a01b03841660808201528260a082015260e060c0820152600061562660e0830184615597565b9998505050505050505050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60018060a01b038616815284602082015283604082015260ff8316606082015260a0608082015260006156b760a0830184615597565b979650505050505050565b60008183825b60048110156156e75781518352602092830192909101906001016156c8565b50505060808201905092915050565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615720576157206154ca565b5060010190565b60e08101818660005b600481101561574f578151835260209283019290910190600101615730565b5050508460808301528360a08301528260c083015295945050505050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212208d7122b0b25d9ee2dc2f6c45f9ab9c308b09feb055505354bd2827a6033f094464736f6c63430008090033

Deployed ByteCode

0x6080604052600436106100fe5760003560e01c8063603275111161009557806388abe21f1161006457806388abe21f1461025257806392fc4bfb146102655780639e6c295914610278578063af29e2ec1461029b578063c6a319fa146102ae57600080fd5b806360327511146101ec5780636744be5d146101ff5780636c8d59901461021f57806385cb332d1461023f57600080fd5b80634aaee2db116100d15780634aaee2db1461018857806354fd4d501461019b578063557498a5146101b95780635686f69e146101cc57600080fd5b806308507607146101035780630b800072146101185780631459457a1461012b57806335f0d8861461014b575b600080fd5b610116610111366004614ff1565b6102ce565b005b610116610126366004615071565b610cdd565b34801561013757600080fd5b50610116610146366004615137565b6113bc565b34801561015757600080fd5b5060385461016b906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b6101166101963660046151a8565b6114c5565b3480156101a757600080fd5b50604051620f4242815260200161017f565b6101166101c736600461524f565b611f36565b3480156101d857600080fd5b5060375461016b906001600160a01b031681565b6101166101fa366004614ff1565b612afd565b34801561020b57600080fd5b5060365461016b906001600160a01b031681565b34801561022b57600080fd5b5060395461016b906001600160a01b031681565b61011661024d3660046151a8565b613057565b6101166102603660046152c9565b6135d4565b61011661027336600461533e565b613953565b34801561028457600080fd5b5061028d606481565b60405190815260200161017f565b6101166102a93660046153cc565b613d44565b3480156102ba57600080fd5b5060355461016b906001600160a01b031681565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561031c57600080fd5b505afa158015610330573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103549190615488565b156103725760405163487ea6bb60e11b815260040160405180910390fd5b604080517ffdbc5636040a4e2dd9c3b432938ad68df73a4aa16d45af095b407ca77c99698f60208201529081018890526060810187905260ff8616608082015260a0810185905260c0810184905260e081018390526000906103ee90610100015b604051602081830303815290604052805190602001206143ef565b905060006103fc8284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b15801561044357600080fd5b505afa158015610457573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047b9190615488565b6104b25760405162461bcd60e51b815260206004820152600360248201526249533960e81b60448201526064015b60405180910390fd5b50508142106104e95760405162461bcd60e51b815260206004820152600360248201526245533960e81b60448201526064016104a9565b603654604051632776a4f760e01b8152600481018990526001600160a01b0390911690632776a4f79060240160206040518083038186803b15801561052d57600080fd5b505afa158015610541573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105659190615488565b151560011461059c5760405162461bcd60e51b815260206004820152600360248201526209298760eb1b60448201526064016104a9565b603754604051635f6645bb60e11b815260ff871660048201526000916001600160a01b03169063becc8b769060240160206040518083038186803b1580156105e357600080fd5b505afa1580156105f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061b91906154b1565b90508434146106555760405162461bcd60e51b81526004016104a99060208082526004908201526324a3189b60e11b604082015260600190565b60006064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156106a757600080fd5b505afa1580156106bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106df91906154b1565b6106e990886154e0565b6106f391906154ff565b905060006064603560009054906101000a90046001600160a01b03166001600160a01b03166398fc3e766040518163ffffffff1660e01b815260040160206040518083038186803b15801561074757600080fd5b505afa15801561075b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077f91906154b1565b61078990896154e0565b61079391906154ff565b9050866107a08284615521565b146107d65760405162461bcd60e51b81526004016104a9906020808252600490820152634946313760e01b604082015260600190565b6036546040516331a9108f60e11b8152600481018c90526000916001600160a01b031690636352211e9060240160206040518083038186803b15801561081b57600080fd5b505afa15801561082f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108539190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d806000811461089d576040519150601f19603f3d011682016040523d82523d6000602084013e6108a2565b606091505b50509050806108dc5760405162461bcd60e51b81526004016104a9906020808252600490820152635446313960e01b604082015260600190565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b15801561092157600080fd5b505afa158015610935573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109599190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d80600081146109a3576040519150601f19603f3d011682016040523d82523d6000602084013e6109a8565b606091505b50509050806109e25760405162461bcd60e51b81526004016104a9906020808252600490820152630544632360e41b604082015260600190565b6000603960009054906101000a90046001600160a01b03166001600160a01b0316635ce5b4448e88603560009054906101000a90046001600160a01b03166001600160a01b03166388339f9c6040518163ffffffff1660e01b815260040160206040518083038186803b158015610a5857600080fd5b505afa158015610a6c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a909190615539565b6040516001600160e01b031960e086901b168152600481019390935260248301919091526001600160a01b03166044820152606401602060405180830381600087803b158015610adf57600080fd5b505af1158015610af3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b179190615488565b905080610b4f5760405162461bcd60e51b81526004016104a9906020808252600490820152635446323160e01b604082015260600190565b5050505050336001600160a01b0316887fcffd27a940b02248ffe7fd97f4b806049bb33a4d8a0a8c6bf6a33c4ca3f2f7b7866064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610bd157600080fd5b505afa158015610be5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0991906154b1565b610c13908b6154e0565b610c1d91906154ff565b60355460408051634c7e1f3b60e11b815290516064926001600160a01b0316916398fc3e76916004808301926020929190829003018186803b158015610c6257600080fd5b505afa158015610c76573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9a91906154b1565b610ca4908c6154e0565b610cae91906154ff565b604080519384526020840192909252908201526060810185905260800160405180910390a35050505050505050565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015610d2b57600080fd5b505afa158015610d3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d639190615488565b15610d815760405163487ea6bb60e11b815260040160405180910390fd5b8251602080850191909120604080517f4af6f8c53667f6c79f7f2ca1c9a09fcee62a7ace5796f2d7049c3e6212a893959381019390935282018b9052606082018a90526080820189905260ff881660a083015260c0820187905260e082018690526101008201526101208101839052600090610e0090610140016103d3565b90506000610e0e8284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b158015610e5557600080fd5b505afa158015610e69573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8d9190615488565b610eb5576040516333ffff9b60e01b81526001600160a01b03821660048201526024016104a9565b50506037546001600160a01b031642831015610eed576040516302a07ebf60e31b8152600481018490524260248201526044016104a9565b6037546040516331a9108f60e11b8152600481018c905233916001600160a01b031690636352211e9060240160206040518083038186803b158015610f3157600080fd5b505afa158015610f45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f699190615539565b6001600160a01b031614611010576037546040516331a9108f60e11b8152600481018c905233916001600160a01b031690636352211e9060240160206040518083038186803b158015610fbb57600080fd5b505afa158015610fcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff39190615539565b8b60405163f604c2ef60e01b81526004016104a993929190615556565b603654604051632776a4f760e01b8152600481018b90526001600160a01b0390911690632776a4f79060240160206040518083038186803b15801561105457600080fd5b505afa158015611068573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061108c9190615488565b15156001146110ae576040516309f47f6760e41b815260040160405180910390fd5b60405163629dc9d760e01b8152600481018b90526000906001600160a01b0383169063629dc9d79060240160206040518083038186803b1580156110f157600080fd5b505afa158015611105573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611129919061557a565b604051635f6645bb60e11b815260ff821660048201529091506000906001600160a01b0384169063becc8b769060240160206040518083038186803b15801561117157600080fd5b505afa158015611185573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a991906154b1565b90506111b6888c83614467565b6037546040516340738b7f60e01b81526001600160a01b03909116906340738b7f906111f2908f908f908f908f9033908f908f906004016155e4565b600060405180830381600087803b15801561120c57600080fd5b505af1158015611220573d6000803e3d6000fd5b505050508b336001600160a01b03168c7fbfe95c6d9dffcc2dd1285db389f55174d73aba0ffec4ddfdbaf36015eb530bef8a6064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156112a257600080fd5b505afa1580156112b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112da91906154b1565b6112e4908f6154e0565b6112ee91906154ff565b60355460408051634c7e1f3b60e11b815290516064926001600160a01b0316916398fc3e76916004808301926020929190829003018186803b15801561133357600080fd5b505afa158015611347573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061136b91906154b1565b8f61137691906154e0565b61138091906154ff565b604080519384526020840192909252908201526060810186905260ff8716608082015260a00160405180910390a4505050505050505050505050565b600054610100900460ff16806113d5575060005460ff16155b6113f15760405162461bcd60e51b81526004016104a990615633565b600054610100900460ff16158015611413576000805461ffff19166101011790555b611455604051806040016040528060078152602001662232b1b7b232b960c91b815250604051806040016040528060018152602001603160f81b815250614a4a565b603580546001600160a01b03199081166001600160a01b03898116919091179092556036805482168884161790556037805482168784161790556038805482168684161790556039805490911691841691909117905580156114bd576000805461ff00191690555b505050505050565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561151357600080fd5b505afa158015611527573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061154b9190615488565b156115695760405163487ea6bb60e11b815260040160405180910390fd5b8251602080850191909120604080517fb879e3a2e48146c5264a620bed124132076dde6de9826f29be9ee4b9997258a59381019390935282018a90526060820189905260ff8816608083015260a0820187905260c0820186905260e082015261010081018390526000906115e090610120016103d3565b905060006115ee8284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b15801561163557600080fd5b505afa158015611649573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061166d9190615488565b61169f5760405162461bcd60e51b8152602060048201526003602482015262092a6760eb1b60448201526064016104a9565b50508142106116d65760405162461bcd60e51b815260206004820152600360248201526208aa6760eb1b60448201526064016104a9565b603654604051632776a4f760e01b8152600481018a90526001600160a01b0390911690632776a4f79060240160206040518083038186803b15801561171a57600080fd5b505afa15801561172e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117529190615488565b15156001146117895760405162461bcd60e51b8152602060048201526003602482015262494c3760e81b60448201526064016104a9565b603754604051635f6645bb60e11b815260ff881660048201526000916001600160a01b03169063becc8b769060240160206040518083038186803b1580156117d057600080fd5b505afa1580156117e4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061180891906154b1565b90508534146118425760405162461bcd60e51b81526004016104a99060208082526004908201526312518c4d60e21b604082015260600190565b60006064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561189457600080fd5b505afa1580156118a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118cc91906154b1565b6118d690896154e0565b6118e091906154ff565b905060006064603560009054906101000a90046001600160a01b03166001600160a01b03166398fc3e766040518163ffffffff1660e01b815260040160206040518083038186803b15801561193457600080fd5b505afa158015611948573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061196c91906154b1565b611976908a6154e0565b61198091906154ff565b90508761198d8284615521565b146119c35760405162461bcd60e51b81526004016104a9906020808252600490820152634946313560e01b604082015260600190565b6036546040516331a9108f60e11b8152600481018d90526000916001600160a01b031690636352211e9060240160206040518083038186803b158015611a0857600080fd5b505afa158015611a1c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a409190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d8060008114611a8a576040519150601f19603f3d011682016040523d82523d6000602084013e611a8f565b606091505b5050905080611ac95760405162461bcd60e51b81526004016104a9906020808252600490820152632a23189b60e11b604082015260600190565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b158015611b0e57600080fd5b505afa158015611b22573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b469190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d8060008114611b90576040519150601f19603f3d011682016040523d82523d6000602084013e611b95565b606091505b5050905080611bcf5760405162461bcd60e51b81526004016104a9906020808252600490820152635446313760e01b604082015260600190565b6000603960009054906101000a90046001600160a01b03166001600160a01b0316635ce5b4448f88603560009054906101000a90046001600160a01b03166001600160a01b03166388339f9c6040518163ffffffff1660e01b815260040160206040518083038186803b158015611c4557600080fd5b505afa158015611c59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c7d9190615539565b6040516001600160e01b031960e086901b168152600481019390935260248301919091526001600160a01b03166044820152606401602060405180830381600087803b158015611ccc57600080fd5b505af1158015611ce0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d049190615488565b905080611d3c5760405162461bcd60e51b81526004016104a9906020808252600490820152630a88c62760e31b604082015260600190565b505060385460405163a869f99360e01b81526001600160a01b03909116935063a869f9939250611d79915033908d908d908d908b90600401615681565b600060405180830381600087803b158015611d9357600080fd5b505af1158015611da7573d6000803e3d6000fd5b50505050336001600160a01b0316897f0d4d0f151d5c27adbb7ebfbc0dff90ecd0853c8f8ff4adf9bf6279ba9d341d1b876064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e2857600080fd5b505afa158015611e3c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e6091906154b1565b611e6a908c6154e0565b611e7491906154ff565b60355460408051634c7e1f3b60e11b815290516064926001600160a01b0316916398fc3e76916004808301926020929190829003018186803b158015611eb957600080fd5b505afa158015611ecd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ef191906154b1565b611efb908d6154e0565b611f0591906154ff565b60408051938452602084019290925290820152606081018590526080015b60405180910390a3505050505050505050565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015611f8457600080fd5b505afa158015611f98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fbc9190615488565b15611fda5760405163487ea6bb60e11b815260040160405180910390fd5b604080517fb51b7243c23c37fa6eb0cc676d750592045ed2de6f8e86ed03a36501e776d35f6020820152908101899052606081018890526080810187905260ff861660a082015260c0810185905260e08101849052610100810183905260009061204790610120016103d3565b905060006120558284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b15801561209c57600080fd5b505afa1580156120b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d49190615488565b6121065760405162461bcd60e51b815260206004820152600360248201526249533760e81b60448201526064016104a9565b505081421061213d5760405162461bcd60e51b815260206004820152600360248201526245533760e81b60448201526064016104a9565b6037546040516311fdae6160e11b8152600481018a90526001600160a01b03909116906323fb5cc29060240160206040518083038186803b15801561218157600080fd5b505afa158015612195573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121b991906154b1565b86146121ed5760405162461bcd60e51b815260206004820152600360248201526212550d60ea1b60448201526064016104a9565b6037546040516331a9108f60e11b8152600481018a905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561223157600080fd5b505afa158015612245573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122699190615539565b6001600160a01b0316146122a85760405162461bcd60e51b81526004016104a9906020808252600490820152634952313760e01b604082015260600190565b603654604051632776a4f760e01b8152600481018990526001600160a01b0390911690632776a4f79060240160206040518083038186803b1580156122ec57600080fd5b505afa158015612300573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123249190615488565b151560011461235b5760405162461bcd60e51b815260206004820152600360248201526224a61b60e91b60448201526064016104a9565b603754604051635f6645bb60e11b815260ff871660048201526000916001600160a01b03169063becc8b769060240160206040518083038186803b1580156123a257600080fd5b505afa1580156123b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123da91906154b1565b90508434146124145760405162461bcd60e51b81526004016104a99060208082526004908201526324a3189960e11b604082015260600190565b60006064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561246657600080fd5b505afa15801561247a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061249e91906154b1565b6124a890886154e0565b6124b291906154ff565b905060006064603560009054906101000a90046001600160a01b03166001600160a01b03166398fc3e766040518163ffffffff1660e01b815260040160206040518083038186803b15801561250657600080fd5b505afa15801561251a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061253e91906154b1565b61254890896154e0565b61255291906154ff565b90508661255f8284615521565b146125955760405162461bcd60e51b81526004016104a9906020808252600490820152634946313360e01b604082015260600190565b6036546040516331a9108f60e11b8152600481018c90526000916001600160a01b031690636352211e9060240160206040518083038186803b1580156125da57600080fd5b505afa1580156125ee573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126129190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d806000811461265c576040519150601f19603f3d011682016040523d82523d6000602084013e612661565b606091505b505090508061269b5760405162461bcd60e51b81526004016104a9906020808252600490820152635446313360e01b604082015260600190565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b1580156126e057600080fd5b505afa1580156126f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127189190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d8060008114612762576040519150601f19603f3d011682016040523d82523d6000602084013e612767565b606091505b50509050806127a15760405162461bcd60e51b81526004016104a99060208082526004908201526315118c4d60e21b604082015260600190565b6000603960009054906101000a90046001600160a01b03166001600160a01b0316635ce5b4448e88603560009054906101000a90046001600160a01b03166001600160a01b03166388339f9c6040518163ffffffff1660e01b815260040160206040518083038186803b15801561281757600080fd5b505afa15801561282b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061284f9190615539565b6040516001600160e01b031960e086901b168152600481019390935260248301919091526001600160a01b03166044820152606401602060405180830381600087803b15801561289e57600080fd5b505af11580156128b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128d69190615488565b90508061290e5760405162461bcd60e51b81526004016104a9906020808252600490820152635446313560e01b604082015260600190565b5050603754604051630852cd8d60e31b8152600481018e90526001600160a01b0390911693506342966c6892506024019050600060405180830381600087803b15801561295a57600080fd5b505af115801561296e573d6000803e3d6000fd5b5050505088336001600160a01b0316897f6af1203a766546ad6f96d8d16564588bfff65db3861358bea3b661cbe0203486876064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156129f057600080fd5b505afa158015612a04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a2891906154b1565b612a32908c6154e0565b612a3c91906154ff565b60355460408051634c7e1f3b60e11b815290516064926001600160a01b0316916398fc3e76916004808301926020929190829003018186803b158015612a8157600080fd5b505afa158015612a95573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ab991906154b1565b612ac3908d6154e0565b612acd91906154ff565b604080519384526020840192909252908201526060810186905260800160405180910390a4505050505050505050565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015612b4b57600080fd5b505afa158015612b5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612b839190615488565b15612ba15760405163487ea6bb60e11b815260040160405180910390fd5b604080517fdc26fa685b21cb5a0853f755a6ef06b74f608a151e1145a7d79a988734ea95ef60208201529081018890526060810187905260ff8616608082015260a0810185905260c0810184905260e08101839052600090612c0690610100016103d3565b90506000612c148284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b158015612c5b57600080fd5b505afa158015612c6f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c939190615488565b612cc85760405162461bcd60e51b81526004016104a9906020808252600490820152634953313160e01b604082015260600190565b5050814210612d025760405162461bcd60e51b81526004016104a9906020808252600490820152634553313160e01b604082015260600190565b6037546040516311fdae6160e11b8152600481018990526001600160a01b03909116906323fb5cc29060240160206040518083038186803b158015612d4657600080fd5b505afa158015612d5a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d7e91906154b1565b8614612db25760405162461bcd60e51b815260206004820152600360248201526249543960e81b60448201526064016104a9565b6037546040516331a9108f60e11b81526004810189905233916001600160a01b031690636352211e9060240160206040518083038186803b158015612df657600080fd5b505afa158015612e0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e2e9190615539565b6001600160a01b031614612e6d5760405162461bcd60e51b81526004016104a9906020808252600490820152634952313960e01b604082015260600190565b833414612ea55760405162461bcd60e51b81526004016104a9906020808252600490820152634946313960e01b604082015260600190565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b158015612eea57600080fd5b505afa158015612efe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f229190615539565b6001600160a01b03168560405160006040518083038185875af1925050503d8060008114612f6c576040519150601f19603f3d011682016040523d82523d6000602084013e612f71565b606091505b5050905080612fab5760405162461bcd60e51b81526004016104a9906020808252600490820152635446323360e01b604082015260600190565b50603754604051630852cd8d60e31b8152600481018990526001600160a01b03909116906342966c6890602401600060405180830381600087803b158015612ff257600080fd5b505af1158015613006573d6000803e3d6000fd5b5050604080518a8152602081018790529081018790523392507f0cd87a64473d0177af5fc2ecb410ce0811a0591f3d39129b345aea526769008f91506060015b60405180910390a250505050505050565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156130a557600080fd5b505afa1580156130b9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130dd9190615488565b156130fb5760405163487ea6bb60e11b815260040160405180910390fd5b8251602080850191909120604080517f1dab4487991fd6cb7a68d5f0071383c79d008050dd93bcb26b0f64208416efac9381019390935282018a90526060820189905260ff8816608083015260a0820187905260c0820186905260e0820152610100810183905260009061317290610120016103d3565b905060006131808284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b1580156131c757600080fd5b505afa1580156131db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906131ff9190615488565b6132345760405162461bcd60e51b81526004016104a9906020808252600490820152630495331360e41b604082015260600190565b505081421061326e5760405162461bcd60e51b81526004016104a9906020808252600490820152630455331360e41b604082015260600190565b6037546040516311fdae6160e11b8152600481018a90526001600160a01b03909116906323fb5cc29060240160206040518083038186803b1580156132b257600080fd5b505afa1580156132c6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906132ea91906154b1565b871461331e5760405162461bcd60e51b8152602060048201526003602482015262092a8760eb1b60448201526064016104a9565b6037546040516331a9108f60e11b8152600481018a905233916001600160a01b031690636352211e9060240160206040518083038186803b15801561336257600080fd5b505afa158015613376573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061339a9190615539565b6001600160a01b0316146133d95760405162461bcd60e51b81526004016104a990602080825260049082015263092a462760e31b604082015260600190565b8434146134115760405162461bcd60e51b81526004016104a9906020808252600490820152630928c62760e31b604082015260600190565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b15801561345657600080fd5b505afa15801561346a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061348e9190615539565b6001600160a01b03168660405160006040518083038185875af1925050503d80600081146134d8576040519150601f19603f3d011682016040523d82523d6000602084013e6134dd565b606091505b50509050806135175760405162461bcd60e51b81526004016104a9906020808252600490820152632a23191960e11b604082015260600190565b506037546040516340738b7f60e01b81526001600160a01b03909116906340738b7f90613555908b906000908c908c9033908c908c906004016155e4565b600060405180830381600087803b15801561356f57600080fd5b505af1158015613583573d6000803e3d6000fd5b5050604080518b8152602081018890529081018890523392507f92193e272ce905a8ab4c46797d236878d04fe6a3193ecec43fa0b0f00344a189915060600160405180910390a25050505050505050565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b15801561362257600080fd5b505afa158015613636573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061365a9190615488565b156136785760405163487ea6bb60e11b815260040160405180910390fd5b604080517f90a71a75ab225e2122da8c8b3520fb095219bff0ea0d907dfc224ec2c1e9a670602082015290810187905260ff861660608201526080810185905260a0810184905260c081018390526000906136d59060e0016103d3565b905060006136e38284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b15801561372a57600080fd5b505afa15801561373e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906137629190615488565b6137975760405162461bcd60e51b81526004016104a9906020808252600490820152634953313360e01b604082015260600190565b50508142106137d15760405162461bcd60e51b81526004016104a9906020808252600490820152634553313360e01b604082015260600190565b8334146138095760405162461bcd60e51b81526004016104a9906020808252600490820152634946323160e01b604082015260600190565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b15801561384e57600080fd5b505afa158015613862573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906138869190615539565b6001600160a01b03168560405160006040518083038185875af1925050503d80600081146138d0576040519150601f19603f3d011682016040523d82523d6000602084013e6138d5565b606091505b505090508061390f5760405162461bcd60e51b81526004016104a9906020808252600490820152635446323560e01b604082015260600190565b50604080518481526020810186905233917fca89495820f00e591d876216a517552dff0c736806752531dad23686db7e26a7910160405180910390a2505050505050565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b1580156139a157600080fd5b505afa1580156139b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139d99190615488565b156139f75760405163487ea6bb60e11b815260040160405180910390fd5b8251602080850191909120604080517fb97d55d8332519498c57f7eaf8da80beaf27d360e08da4411c475bc963bf295593810193909352820189905260ff881660608301526080820187905260a0820186905260c082015260e08101839052600090613a6690610100016103d3565b90506000613a748284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b158015613abb57600080fd5b505afa158015613acf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613af39190615488565b613b285760405162461bcd60e51b81526004016104a99060208082526004908201526324a9989960e11b604082015260600190565b5050814210613b625760405162461bcd60e51b81526004016104a99060208082526004908201526322a9989960e11b604082015260600190565b843414613b9a5760405162461bcd60e51b81526004016104a9906020808252600490820152630494632360e41b604082015260600190565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b158015613bdf57600080fd5b505afa158015613bf3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613c179190615539565b6001600160a01b03168660405160006040518083038185875af1925050503d8060008114613c61576040519150601f19603f3d011682016040523d82523d6000602084013e613c66565b606091505b5050905080613ca05760405162461bcd60e51b81526004016104a99060208082526004908201526315118c8d60e21b604082015260600190565b5060385460405163a869f99360e01b81526001600160a01b039091169063a869f99390613cda9033906000908c908c908a90600401615681565b600060405180830381600087803b158015613cf457600080fd5b505af1158015613d08573d6000803e3d6000fd5b505060408051878152602081018990523393507f9653037de6c888290dd817340ee4d1f8c67e27a63081b61c5449c43a4db14792925001613046565b603560009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b815260040160206040518083038186803b158015613d9257600080fd5b505afa158015613da6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613dca9190615488565b15613de85760405163487ea6bb60e11b815260040160405180910390fd5b6000613e797fc8125d18d04f28e7262209a306bc1d0bee25ed7261d804fee2a621c94838059e898989604051602001613e2191906156c2565b60408051808303601f1901815282825280516020918201208b518c83012091840196909652908201939093526060810191909152608081019290925260a0820188905260c082015260e08101859052610100016103d3565b90506000613e878284614443565b6035546040516310736f8560e01b81526001600160a01b0380841660048301529293509116906310736f859060240160206040518083038186803b158015613ece57600080fd5b505afa158015613ee2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613f069190615488565b613f2e576040516333ffff9b60e01b81526001600160a01b03821660048201526024016104a9565b505081421115613f5a576040516302a07ebf60e31b8152600481018390524260248201526044016104a9565b603654604051632776a4f760e01b8152600481018990526001600160a01b0390911690632776a4f79060240160206040518083038186803b158015613f9e57600080fd5b505afa158015613fb2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613fd69190615488565b1515600114613ff8576040516309f47f6760e41b815260040160405180910390fd5b6038548551604051636b0abcb960e11b815260048101919091526000916001600160a01b03169063d61579729060240160206040518083038186803b15801561404057600080fd5b505afa158015614054573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614078919061557a565b905060005b600481101561418d576038546001600160a01b03166323b872dd33308a85600481106140ab576140ab6156f6565b60200201516040518463ffffffff1660e01b81526004016140ce93929190615556565b600060405180830381600087803b1580156140e857600080fd5b505af11580156140fc573d6000803e3d6000fd5b50506038546001600160a01b031691506342966c689050888360048110614125576141256156f6565b60200201516040518263ffffffff1660e01b815260040161414891815260200190565b600060405180830381600087803b15801561416257600080fd5b505af1158015614176573d6000803e3d6000fd5b5050505080806141859061570c565b91505061407d565b50603754604051635f6645bb60e11b815260ff831660048201526000916001600160a01b03169063becc8b769060240160206040518083038186803b1580156141d557600080fd5b505afa1580156141e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061420d91906154b1565b905061421a868a83614467565b60385460405163a869f99360e01b81526001600160a01b039091169063a869f993906142529033908d908d9088908c90600401615681565b600060405180830381600087803b15801561426c57600080fd5b505af1158015614280573d6000803e3d6000fd5b50505050336001600160a01b0316897f53bb613d82455fb8ce57213b03c2b898ddd720f7f7c1650c6c9b94e878f45e13896064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561430157600080fd5b505afa158015614315573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061433991906154b1565b614343908c6154e0565b61434d91906154ff565b60355460408051634c7e1f3b60e11b815290516064926001600160a01b0316916398fc3e76916004808301926020929190829003018186803b15801561439257600080fd5b505afa1580156143a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906143ca91906154b1565b6143d4908d6154e0565b6143de91906154ff565b86604051611f239493929190615727565b600061443d6143fc614ac2565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b92915050565b60008060006144528585614b42565b9150915061445f81614bb2565b509392505050565b82341461449057604051635928816d60e11b8152346004820152602481018490526044016104a9565b60006064603560009054906101000a90046001600160a01b03166001600160a01b0316633632d5fd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156144e257600080fd5b505afa1580156144f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061451a91906154b1565b61452490866154e0565b61452e91906154ff565b905060006064603560009054906101000a90046001600160a01b03166001600160a01b03166398fc3e766040518163ffffffff1660e01b815260040160206040518083038186803b15801561458257600080fd5b505afa158015614596573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906145ba91906154b1565b6145c490876154e0565b6145ce91906154ff565b9050846145db8284615521565b146145f957604051635d616c1360e01b815260040160405180910390fd5b6036546040516331a9108f60e11b8152600481018690526000916001600160a01b031690636352211e9060240160206040518083038186803b15801561463e57600080fd5b505afa158015614652573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906146769190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d80600081146146c0576040519150601f19603f3d011682016040523d82523d6000602084013e6146c5565b606091505b5050905080614767576036546040516331a9108f60e11b81526004810187905230916001600160a01b031690636352211e9060240160206040518083038186803b15801561471257600080fd5b505afa158015614726573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061474a9190615539565b84604051634eb3d3e160e11b81526004016104a993929190615556565b6035546040805163220ce7e760e21b815290516000926001600160a01b0316916388339f9c916004808301926020929190829003018186803b1580156147ac57600080fd5b505afa1580156147c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906147e49190615539565b6001600160a01b03168360405160006040518083038185875af1925050503d806000811461482e576040519150601f19603f3d011682016040523d82523d6000602084013e614833565b606091505b5050905080614880576035546040805163220ce7e760e21b8152905130926001600160a01b0316916388339f9c916004808301926020929190829003018186803b15801561471257600080fd5b6039546035546040805163220ce7e760e21b815290516000936001600160a01b0390811693635ce5b444938c938c93909216916388339f9c91600480820192602092909190829003018186803b1580156148d957600080fd5b505afa1580156148ed573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149119190615539565b6040516001600160e01b031960e086901b168152600481019390935260248301919091526001600160a01b03166044820152606401602060405180830381600087803b15801561496057600080fd5b505af1158015614974573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906149989190615488565b905080614a40576039546035546040805163220ce7e760e21b815290516001600160a01b0393841693909216916388339f9c91600480820192602092909190829003018186803b1580156149eb57600080fd5b505afa1580156149ff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190614a239190615539565b87604051634eb3d3e160e11b81526004016104a993929190615556565b5050505050505050565b600054610100900460ff1680614a63575060005460ff16155b614a7f5760405162461bcd60e51b81526004016104a990615633565b600054610100900460ff16158015614aa1576000805461ffff19166101011790555b614aab8383614d70565b8015614abd576000805461ff00191690555b505050565b6000614b3d7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f614af160015490565b6002546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b905090565b600080825160411415614b795760208301516040840151606085015160001a614b6d87828585614dfa565b94509450505050614bab565b825160401415614ba35760208301516040840151614b98868383614ee7565b935093505050614bab565b506000905060025b9250929050565b6000816004811115614bc657614bc661576d565b1415614bcf5750565b6001816004811115614be357614be361576d565b1415614c315760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104a9565b6002816004811115614c4557614c4561576d565b1415614c935760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104a9565b6003816004811115614ca757614ca761576d565b1415614d005760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016104a9565b6004816004811115614d1457614d1461576d565b1415614d6d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016104a9565b50565b600054610100900460ff1680614d89575060005460ff16155b614da55760405162461bcd60e51b81526004016104a990615633565b600054610100900460ff16158015614dc7576000805461ffff19166101011790555b82516020808501919091208351918401919091206001919091556002558015614abd576000805461ff0019169055505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115614e315750600090506003614ede565b8460ff16601b14158015614e4957508460ff16601c14155b15614e5a5750600090506004614ede565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015614eae573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116614ed757600060019250925050614ede565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b01614f0887828885614dfa565b935093505050935093915050565b60ff81168114614d6d57600080fd5b634e487b7160e01b600052604160045260246000fd5b6040516080810167ffffffffffffffff81118282101715614f5e57614f5e614f25565b60405290565b600082601f830112614f7557600080fd5b813567ffffffffffffffff80821115614f9057614f90614f25565b604051601f8301601f19908116603f01168101908282118183101715614fb857614fb8614f25565b81604052838152866020858801011115614fd157600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600080600060e0888a03121561500c57600080fd5b8735965060208801359550604088013561502581614f16565b9450606088013593506080880135925060a0880135915060c088013567ffffffffffffffff81111561505657600080fd5b6150628a828b01614f64565b91505092959891949750929550565b60008060008060008060008060006101208a8c03121561509057600080fd5b8935985060208a0135975060408a0135965060608a01356150b081614f16565b955060808a0135945060a08a0135935060c08a013567ffffffffffffffff808211156150db57600080fd5b6150e78d838e01614f64565b945060e08c013593506101008c013591508082111561510557600080fd5b506151128c828d01614f64565b9150509295985092959850929598565b6001600160a01b0381168114614d6d57600080fd5b600080600080600060a0868803121561514f57600080fd5b853561515a81615122565b9450602086013561516a81615122565b9350604086013561517a81615122565b9250606086013561518a81615122565b9150608086013561519a81615122565b809150509295509295909350565b600080600080600080600080610100898b0312156151c557600080fd5b883597506020890135965060408901356151de81614f16565b9550606089013594506080890135935060a089013567ffffffffffffffff8082111561520957600080fd5b6152158c838d01614f64565b945060c08b0135935060e08b013591508082111561523257600080fd5b5061523f8b828c01614f64565b9150509295985092959890939650565b600080600080600080600080610100898b03121561526c57600080fd5b883597506020890135965060408901359550606089013561528c81614f16565b94506080890135935060a0890135925060c0890135915060e089013567ffffffffffffffff8111156152bd57600080fd5b61523f8b828c01614f64565b60008060008060008060c087890312156152e257600080fd5b8635955060208701356152f481614f16565b945060408701359350606087013592506080870135915060a087013567ffffffffffffffff81111561532557600080fd5b61533189828a01614f64565b9150509295509295509295565b600080600080600080600060e0888a03121561535957600080fd5b87359650602088013561536b81614f16565b95506040880135945060608801359350608088013567ffffffffffffffff8082111561539657600080fd5b6153a28b838c01614f64565b945060a08a0135935060c08a01359150808211156153bf57600080fd5b506150628a828b01614f64565b6000806000806000806000610140888a0312156153e857600080fd5b87359650602080890135965089605f8a011261540357600080fd5b61540b614f3b565b8060c08b018c81111561541d57600080fd5b60408c015b818110156154395780358452928401928401615422565b50909750359550505060e088013567ffffffffffffffff8082111561545d57600080fd5b6154698b838c01614f64565b94506101008a013593506101208a01359150808211156153bf57600080fd5b60006020828403121561549a57600080fd5b815180151581146154aa57600080fd5b9392505050565b6000602082840312156154c357600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156154fa576154fa6154ca565b500290565b60008261551c57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115615534576155346154ca565b500190565b60006020828403121561554b57600080fd5b81516154aa81615122565b6001600160a01b039384168152919092166020820152604081019190915260600190565b60006020828403121561558c57600080fd5b81516154aa81614f16565b6000815180845260005b818110156155bd576020818501810151868301820152016155a1565b818111156155cf576000602083870101525b50601f01601f19169290920160200192915050565b87815286602082015285604082015260ff8516606082015260018060a01b03841660808201528260a082015260e060c0820152600061562660e0830184615597565b9998505050505050505050565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b60018060a01b038616815284602082015283604082015260ff8316606082015260a0608082015260006156b760a0830184615597565b979650505050505050565b60008183825b60048110156156e75781518352602092830192909101906001016156c8565b50505060808201905092915050565b634e487b7160e01b600052603260045260246000fd5b6000600019821415615720576157206154ca565b5060010190565b60e08101818660005b600481101561574f578151835260209283019290910190600101615730565b5050508460808301528360a08301528260c083015295945050505050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212208d7122b0b25d9ee2dc2f6c45f9ab9c308b09feb055505354bd2827a6033f094464736f6c63430008090033