Contract Address Details

0x0aCDA31Cf1F301a7Eb8f988D47F708FbA058F8f5

Token
Cronoverse Land Tiles (CLAND)
Creator
0x6be5e7–f62cf5 at 0xd8bb3d–a3fcda
Balance
0 CRO ( )
Tokens
Fetching tokens...
Transactions
4,794 Transactions
Transfers
0 Transfers
Gas Used
490,332,657
Last Balance Update
13961666
Contract name:
Cronoverse




Optimization enabled
true
Compiler version
v0.8.4+commit.c7e474f2




Optimization runs
200
EVM Version
default




Verified at
2022-04-10T09:07:10.524493Z

Constructor Arguments

68747470733a2f2f697066732e696f2f697066732f516d57395375536a4745576f7150506a3167327a7a31424e6e6b716f434231635748736d6e537855556a5a4e4a330000000000000000000000007a3cdb2364f92369a602cae81167d0679087e6a30000000000000000000000000c67b99315f218f770a27a05d3a35f5ce430b63a

Arg [0] (address) : 0x2e696f2f697066732f516d57395375536a474557
Arg [1] (address) : 0x4e6e6b716f434231635748736d6e537855556a5a

              

Contract source code

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

// File @openzeppelin/contracts/utils/[email protected]


// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

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

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

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

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

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


// File contracts/SafeMathLite.sol


pragma solidity ^0.8.4;
library SafeMathLite{

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }
}


// File contracts/SafePct.sol


pragma solidity ^0.8.4;

/**
 * @dev Compute percentages safely without phantom overflows.
 *
 * Intermediate operations can overflow even when the result will always
 * fit into computed type. Developers usually
 * assume that overflows raise errors. `SafePct` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 *
 * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
 * all math on `uint256` and `int256` and then downcasting.
 */

library SafePct {
    using SafeMathLite for uint256;
    /**
     * Requirements:
     *
     * - intermediate operations must revert on overflow
     */
    function mulDiv(uint256 x, uint256 y, uint256 z) internal pure returns (uint256) {
        require(z > 0, "Division by zero");

        if (x == 0) return 0;
        uint256 xy = x * y;
        if (xy / x == y) { // no overflow happened - same as in SafeMath mul
            return xy / z;
        }

        //slither-disable-next-line divide-before-multiply
        uint256 a = x / z;
        uint256 b = x % z; // x = a * z + b

        //slither-disable-next-line divide-before-multiply
        uint256 c = y / z;
        uint256 d = y % z; // y = c * z + d

        return (a.mul(c).mul(z)).add(a.mul(d)).add(b.mul(c)).add(b.mul(d).div(z));
    }


}


// File @openzeppelin/contracts/utils/introspection/[email protected]


// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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


// File @openzeppelin/contracts/token/ERC1155/[email protected]


// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}


// File @openzeppelin/contracts/token/ERC1155/[email protected]


// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}


// File @openzeppelin/contracts/token/ERC1155/extensions/[email protected]


// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}


// File @openzeppelin/contracts/utils/[email protected]


// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

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

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

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

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

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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


// File @openzeppelin/contracts/utils/[email protected]


// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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


// File @openzeppelin/contracts/utils/introspection/[email protected]


// OpenZeppelin Contracts v4.4.1 (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 ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}


// File @openzeppelin/contracts/token/ERC1155/[email protected]


// OpenZeppelin Contracts v4.4.1 (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;






/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

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

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data);

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

        emit TransferSingle(operator, from, to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

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

        emit TransferBatch(operator, from, to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, _asSingletonArray(id), _asSingletonArray(amount), data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), _asSingletonArray(id), _asSingletonArray(amount), "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);
    }

    /**
     * @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, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}


// File @openzeppelin/contracts/token/ERC721/[email protected]


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

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, 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/token/ERC721/[email protected]


// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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


// File @openzeppelin/contracts/token/ERC721/extensions/[email protected]


// OpenZeppelin Contracts v4.4.1 (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 IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}


// File @openzeppelin/contracts/utils/[email protected]


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

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    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/token/ERC721/[email protected]


// OpenZeppelin Contracts (last updated v4.5.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 ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: 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 = ERC721.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 = ERC721.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);

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

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

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


// File @openzeppelin/contracts/token/ERC721/extensions/[email protected]


// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

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

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

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


// File @openzeppelin/contracts/token/ERC721/extensions/[email protected]


// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;


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

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

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

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

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

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

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

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

    /**
     * @dev 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` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * 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 override {
        super._beforeTokenTransfer(from, to, tokenId);

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

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

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

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

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

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

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

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

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

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

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

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

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


// File @openzeppelin/contracts/access/[email protected]


// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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


// File @openzeppelin/contracts/utils/escrow/[email protected]


// OpenZeppelin Contracts v4.4.1 (utils/escrow/Escrow.sol)

pragma solidity ^0.8.0;


/**
 * @title Escrow
 * @dev Base escrow contract, holds funds designated for a payee until they
 * withdraw them.
 *
 * Intended usage: This contract (and derived escrow contracts) should be a
 * standalone contract, that only interacts with the contract that instantiated
 * it. That way, it is guaranteed that all Ether will be handled according to
 * the `Escrow` rules, and there is no need to check for payable functions or
 * transfers in the inheritance tree. The contract that uses the escrow as its
 * payment method should be its owner, and provide public methods redirecting
 * to the escrow's deposit and withdraw.
 */
contract Escrow is Ownable {
    using Address for address payable;

    event Deposited(address indexed payee, uint256 weiAmount);
    event Withdrawn(address indexed payee, uint256 weiAmount);

    mapping(address => uint256) private _deposits;

    function depositsOf(address payee) public view returns (uint256) {
        return _deposits[payee];
    }

    /**
     * @dev Stores the sent amount as credit to be withdrawn.
     * @param payee The destination address of the funds.
     */
    function deposit(address payee) public payable virtual onlyOwner {
        uint256 amount = msg.value;
        _deposits[payee] += amount;
        emit Deposited(payee, amount);
    }

    /**
     * @dev Withdraw accumulated balance for a payee, forwarding all gas to the
     * recipient.
     *
     * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
     * Make sure you trust the recipient, or are either following the
     * checks-effects-interactions pattern or using {ReentrancyGuard}.
     *
     * @param payee The address whose funds will be withdrawn and transferred to.
     */
    function withdraw(address payable payee) public virtual onlyOwner {
        uint256 payment = _deposits[payee];

        _deposits[payee] = 0;

        payee.sendValue(payment);

        emit Withdrawn(payee, payment);
    }
}


// File @openzeppelin/contracts/security/[email protected]


// OpenZeppelin Contracts v4.4.1 (security/PullPayment.sol)

pragma solidity ^0.8.0;

/**
 * @dev Simple implementation of a
 * https://consensys.github.io/smart-contract-best-practices/recommendations/#favor-pull-over-push-for-external-calls[pull-payment]
 * strategy, where the paying contract doesn't interact directly with the
 * receiver account, which must withdraw its payments itself.
 *
 * Pull-payments are often considered the best practice when it comes to sending
 * Ether, security-wise. It prevents recipients from blocking execution, and
 * eliminates reentrancy concerns.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 *
 * To use, derive from the `PullPayment` contract, and use {_asyncTransfer}
 * instead of Solidity's `transfer` function. Payees can query their due
 * payments with {payments}, and retrieve them with {withdrawPayments}.
 */
abstract contract PullPayment {
    Escrow private immutable _escrow;

    constructor() {
        _escrow = new Escrow();
    }

    /**
     * @dev Withdraw accumulated payments, forwarding all gas to the recipient.
     *
     * Note that _any_ account can call this function, not just the `payee`.
     * This means that contracts unaware of the `PullPayment` protocol can still
     * receive funds this way, by having a separate account call
     * {withdrawPayments}.
     *
     * WARNING: Forwarding all gas opens the door to reentrancy vulnerabilities.
     * Make sure you trust the recipient, or are either following the
     * checks-effects-interactions pattern or using {ReentrancyGuard}.
     *
     * @param payee Whose payments will be withdrawn.
     */
    function withdrawPayments(address payable payee) public virtual {
        _escrow.withdraw(payee);
    }

    /**
     * @dev Returns the payments owed to an address.
     * @param dest The creditor's address.
     */
    function payments(address dest) public view returns (uint256) {
        return _escrow.depositsOf(dest);
    }

    /**
     * @dev Called by the payer to store the sent amount as credit to be pulled.
     * Funds sent in this way are stored in an intermediate {Escrow} contract, so
     * there is no danger of them being spent before withdrawal.
     *
     * @param dest The destination address of the funds.
     * @param amount The amount to transfer.
     */
    function _asyncTransfer(address dest, uint256 amount) internal virtual {
        _escrow.deposit{value: amount}(dest);
    }
}


// File @openzeppelin/contracts/security/[email protected]


// OpenZeppelin Contracts v4.4.1 (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 Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

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

    bool private _paused;

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

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


// File @openzeppelin/contracts/security/[email protected]


// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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


// File contracts/NewBaseDrop.sol


pragma solidity ^0.8.4;
abstract contract Market {
    function isMember(address user) public view virtual returns (bool);
    function addToEscrow(address _address) external virtual payable;
}
abstract contract BaseDrop is ERC721Enumerable, Ownable, PullPayment, Pausable, ReentrancyGuard {
    using Address for address payable;
   
    address public artist;
    uint128 constant internal SCALE = 10000;
    uint128 internal fee = 2500;
    uint16[] internal order;
    address public marketContract;

    function isMember(address _address) public view returns (bool) {
        return Market(marketContract).isMember(_address);
    }

    function payDirect(uint256 amount) internal {
        Market(marketContract).addToEscrow{value: amount}(artist);
    }

    function withdrawPayments(address payable payee) public virtual override nonReentrant{
        super.withdrawPayments(payee);
    }

    // The following functions are overrides required by Solidity.
    function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override {
        super._beforeTokenTransfer(from, to, tokenId);
    }

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

    function withdraw() public virtual onlyOwner{
        payable(msg.sender).sendValue(address(this).balance);
    }

    function pause() public onlyOwner{
        _pause();
    }

    function unpause() public onlyOwner{
        _unpause();
    }
}


// File contracts/oldDrops/Cronoverse.sol


pragma solidity ^0.8.4;
// import "../interfaces/IDrop.sol";

interface IDrop {
    struct Info {
        uint256[3] regularCost;
        uint256[3] memberCost;
        uint256[3] whitelistCost;
        uint256[3] maxMintPerWallet;
        uint256 maxMintPresale;
        uint256 maxSupply;
        uint256 totalSupply;
        uint256 maxMintPerAddress;
        uint256 maxMintPerTx;
    }
    
    function mintCost(address _minter, uint256 id) external view returns(uint256);
    function canMint(address _minter) external view returns (uint256);
    function mint(uint256 _amount) external payable;
    function maxSupply() external view returns (uint256);
    function getInfo() external view returns (Info memory);
}

contract Cronoverse is IDrop, BaseDrop {
    using Counters for Counters.Counter;
    using SafePct for uint256;
    using SafeMathLite for uint256;

    uint256[3] private whitelistPrice = [670 ether, 870 ether, 1225 ether];
    uint256[3] private memberPrice = [670 ether, 870 ether, 1225 ether];
    uint256[3] private regularPrice = [695 ether, 895 ether, 1250 ether];
    uint256[3] private MAX_PER_WALLET = [16, 4, 4];
    uint256 private MAX_PRESALE_USER = 4;
    uint128 constant MAX_TOKENS = 1208;
    uint128 constant MAX_MINTAMOUNT = 1;
    mapping(address => bool) whitelist;
    mapping(address => mapping(uint256 => uint256)) walletBalance;
    string baseURI =
        "https://ipfs.io/ipfs/QmW9SuSjGEWoqPPj1g2zz1BNnkqoCB1cWHsmnSxUUjZNJ3";
    uint256 public preSaleTimeStamp = 1649613600; // "4/10/2022 6:00:00 PM GMT"
    uint256 public pubSaleTimeStamp = 1649617200; // "4/10/2022 7:00:00 PM GMT"

    uint256[] private mintedIds;
    
    constructor(address _marketAddress, address _artist) ERC721("Cronoverse Land Tiles", "CLAND") {
        marketContract = _marketAddress;
        artist = _artist;
        fee = 1000;
    }

    function mintCost(address _minter, uint256 id) external override view returns(uint256) {
        require(id <= 1208 , "Invalid ID");
        uint8 tileType = getTileType(id);
        if (isWhiteList(_minter)) {
            return whitelistPrice[tileType];
        } else if (isMember(_minter)) {
            return memberPrice[tileType];
        } else {
            return regularPrice[tileType];
        }
    }

    function isWhiteList(address _address) public view returns (bool) {
        return whitelist[_address];
    }

    function addWhiteList(address[] calldata _addresses) public onlyOwner {
        uint len = _addresses.length;
        for(uint i = 0; i < len; i ++) {
            whitelist[_addresses[i]] = true;
        }        
    }
    
    function addWhiteListAddress(address _address) public onlyOwner {
        whitelist[_address] = true;
    }

    function removeWhiteList(address _address) public onlyOwner {
        if (whitelist[_address]) {
            delete whitelist[_address];
        }
    }

    function getInfo() public override view returns (Info memory) {
        Info memory allInfo;
        allInfo.regularCost = regularPrice;
        allInfo.memberCost = memberPrice;
        allInfo.whitelistCost = whitelistPrice;
        allInfo.maxMintPerWallet = MAX_PER_WALLET;
        allInfo.maxMintPresale = MAX_PRESALE_USER;
        allInfo.maxSupply = MAX_TOKENS;
        allInfo.totalSupply = super.totalSupply();
        allInfo.maxMintPerTx = MAX_MINTAMOUNT;

        return allInfo;
    }
    
    function isOnPresale() public view returns (bool) {
        if (
            block.timestamp >= preSaleTimeStamp &&
            block.timestamp < pubSaleTimeStamp
        ) return true;
        else return false;
    }

    function isOnPublicSale() public view returns (bool) {
        if (block.timestamp >= pubSaleTimeStamp) return true;
        else return false;
    }

    function setSaleTimeStamp(uint256 _preSaleTimeStamp) external onlyOwner {
        preSaleTimeStamp = _preSaleTimeStamp;
        pubSaleTimeStamp = _preSaleTimeStamp + 3600;
    }

    function setMarketAddress(address _newMarketAddress) external onlyOwner {
        marketContract = _newMarketAddress;
    }

    function setArtistAddress(address _newArtistAddress) external onlyOwner {
        artist = _newArtistAddress;
    }

    function setCost(uint256[3] memory _cost, bool isMember) external onlyOwner {
        if (isMember) {
            memberPrice = _cost;
        } else {
            regularPrice = _cost;
        }
    }

    function setWhitelistPrice(uint256[3] memory _cost) external onlyOwner {
        whitelistPrice = _cost;
    }

    function setBaseURI(string memory _baseURI) external onlyOwner {
        baseURI = _baseURI;
    }

    function mint(uint256 id) external override payable whenNotPaused {
        uint256 totalMinted = totalSupply(); 
        require(totalMinted < MAX_TOKENS, "Sold out");
        require(id <= MAX_TOKENS && id >= 1, "Token ID Invalid!");    
        uint256 price;
        uint8 tileType = getTileType(id);
        if (isWhiteList(msg.sender)) {
            price = whitelistPrice[tileType];
        } else if(isMember(msg.sender)){
            price = memberPrice[tileType];
        } else {
            price = regularPrice[tileType]; 
        }
        
        require(msg.value >= price, "not enough funds");
        require(
            walletBalance[msg.sender][tileType] < MAX_PER_WALLET[tileType],
            "Wallet balance exceeds"
        );
        if (isOnPresale()) {
            require(isWhiteList(msg.sender), "Not on whitelist");
            require(
                walletBalance[msg.sender][0] +
                    walletBalance[msg.sender][1] +
                    walletBalance[msg.sender][2] <
                    MAX_PRESALE_USER,
                "Presale balance exceeds"
            );
        } else {
            require(isOnPublicSale(), "Sale not started yet");
        }

        _safeMint(msg.sender, id);
        walletBalance[msg.sender][tileType]++;
        mintedIds.push(id);
        uint256 amountFee = price.mulDiv(fee, SCALE); 
        payDirect(price - amountFee);
    }

    function getMintedIds() public view returns (uint256[] memory) {
        return mintedIds;
    }
    
    function tokenURI(uint _tokenId) public view virtual override returns (string memory) {
      require(_exists(_tokenId),"ERC721Metadata: URI query for nonexistent token");

      string memory _tokenURI = string(abi.encodePacked(baseURI, "/", Strings.toString(_tokenId), ".json"));

      return _tokenURI;
    }

    function maxSupply() external override pure returns (uint256) {
        return MAX_TOKENS;
    }

    function canMint(address) external override view returns (uint256) {
        if (isOnPresale()) {
            if (!isWhiteList(msg.sender)) return 0; // "Not on whitelist"
            if (
                walletBalance[msg.sender][0] +
                walletBalance[msg.sender][1] +
                walletBalance[msg.sender][2] <
                MAX_PRESALE_USER
            )
                return MAX_PRESALE_USER - (
                    walletBalance[msg.sender][0] +
                    walletBalance[msg.sender][1] +
                    walletBalance[msg.sender][2]
                );
            else return 0;                         // "wallet balance exceeds MAX_PRESALE_USER
        } else if (isOnPublicSale()) {
            return (
                MAX_PER_WALLET[0] - walletBalance[msg.sender][0] +
                MAX_PER_WALLET[1] - walletBalance[msg.sender][1] +
                MAX_PER_WALLET[2] - walletBalance[msg.sender][2]
            );
        }
        else return 0;                             // "Sale not started yet"
    }

    function getTileType(uint256 tokenId) public pure returns (uint8) {
        if ((tokenId >= 1 && tokenId <= 156) || (tokenId >= 1001 && tokenId <= 1208))
            return 0;
        if ((tokenId >= 329 && tokenId <= 348) ||
            (tokenId >= 381 && tokenId <= 400) || (tokenId >= 433 && tokenId <= 436)
            || (tokenId >= 469 && tokenId <= 472) || (tokenId >= 505 && tokenId <= 508)
            || (tokenId >= 541 && tokenId <= 544) || (tokenId >= 577 && tokenId <= 580)
            || (tokenId >= 613 && tokenId <= 616) || (tokenId >= 649 && tokenId <= 652)
            || (tokenId >= 685 && tokenId <= 688) || (tokenId >= 721 && tokenId <= 724)
            || (tokenId >= 757 && tokenId <= 776) || (tokenId >= 809 && tokenId <= 828)
        ) return 2;

        if ((tokenId >= 168 && tokenId <= 197) ||
            (tokenId >= 220 && tokenId <= 249) || (tokenId >= 272 && tokenId <= 301)
            || (tokenId >= 324 && tokenId <= 328) || (tokenId >= 349 && tokenId <= 353)
            || (tokenId >= 376 && tokenId <= 380) || (tokenId >= 401 && tokenId <= 405)
            || (tokenId >= 428 && tokenId <= 432) || (tokenId >= 437 && tokenId <= 441)
            || (tokenId >= 464 && tokenId <= 468) || (tokenId >= 473 && tokenId <= 477)
            || (tokenId >= 500 && tokenId <= 504) || (tokenId >= 509 && tokenId <= 513)
            || (tokenId >= 536 && tokenId <= 540) || (tokenId >= 545 && tokenId <= 549)
            || (tokenId >= 572 && tokenId <= 576) || (tokenId >= 581 && tokenId <= 585)
            || (tokenId >= 608 && tokenId <= 612) || (tokenId >= 617 && tokenId <= 621)
            || (tokenId >= 644 && tokenId <= 648) || (tokenId >= 653 && tokenId <= 657)
            || (tokenId >= 680 && tokenId <= 684) || (tokenId >= 689 && tokenId <= 693)
            || (tokenId >= 716 && tokenId <= 720) || (tokenId >= 725 && tokenId <= 729)
            || (tokenId >= 752 && tokenId <= 756) || (tokenId >= 777 && tokenId <= 781)
            || (tokenId >= 804 && tokenId <= 808) || (tokenId >= 829 && tokenId <= 833)
            || (tokenId >= 856 && tokenId <= 885) || (tokenId >= 908 && tokenId <= 937)
            || (tokenId >= 960 && tokenId <= 989)
        ) return 1;
        return 0;
    }
}
        

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_marketAddress","internalType":"address"},{"type":"address","name":"_artist","internalType":"address"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"approved","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"ApprovalForAll","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"operator","internalType":"address","indexed":true},{"type":"bool","name":"approved","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"Paused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"tokenId","internalType":"uint256","indexed":true}],"anonymous":false},{"type":"event","name":"Unpaused","inputs":[{"type":"address","name":"account","internalType":"address","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addWhiteList","inputs":[{"type":"address[]","name":"_addresses","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addWhiteListAddress","inputs":[{"type":"address","name":"_address","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"approve","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"artist","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"canMint","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getApproved","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple","name":"","internalType":"struct IDrop.Info","components":[{"type":"uint256[3]","name":"regularCost","internalType":"uint256[3]"},{"type":"uint256[3]","name":"memberCost","internalType":"uint256[3]"},{"type":"uint256[3]","name":"whitelistCost","internalType":"uint256[3]"},{"type":"uint256[3]","name":"maxMintPerWallet","internalType":"uint256[3]"},{"type":"uint256","name":"maxMintPresale","internalType":"uint256"},{"type":"uint256","name":"maxSupply","internalType":"uint256"},{"type":"uint256","name":"totalSupply","internalType":"uint256"},{"type":"uint256","name":"maxMintPerAddress","internalType":"uint256"},{"type":"uint256","name":"maxMintPerTx","internalType":"uint256"}]}],"name":"getInfo","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256[]","name":"","internalType":"uint256[]"}],"name":"getMintedIds","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"getTileType","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isApprovedForAll","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isMember","inputs":[{"type":"address","name":"_address","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isOnPresale","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isOnPublicSale","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isWhiteList","inputs":[{"type":"address","name":"_address","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"marketContract","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"maxSupply","inputs":[]},{"type":"function","stateMutability":"payable","outputs":[],"name":"mint","inputs":[{"type":"uint256","name":"id","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"mintCost","inputs":[{"type":"address","name":"_minter","internalType":"address"},{"type":"uint256","name":"id","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ownerOf","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"pause","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"paused","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"payments","inputs":[{"type":"address","name":"dest","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"preSaleTimeStamp","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"pubSaleTimeStamp","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeWhiteList","inputs":[{"type":"address","name":"_address","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"bytes","name":"_data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setApprovalForAll","inputs":[{"type":"address","name":"operator","internalType":"address"},{"type":"bool","name":"approved","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setArtistAddress","inputs":[{"type":"address","name":"_newArtistAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBaseURI","inputs":[{"type":"string","name":"_baseURI","internalType":"string"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setCost","inputs":[{"type":"uint256[3]","name":"_cost","internalType":"uint256[3]"},{"type":"bool","name":"isMember","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setMarketAddress","inputs":[{"type":"address","name":"_newMarketAddress","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setSaleTimeStamp","inputs":[{"type":"uint256","name":"_preSaleTimeStamp","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setWhitelistPrice","inputs":[{"type":"uint256[3]","name":"_cost","internalType":"uint256[3]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenByIndex","inputs":[{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"tokenOfOwnerByIndex","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"uint256","name":"index","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"tokenURI","inputs":[{"type":"uint256","name":"_tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"unpause","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdraw","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawPayments","inputs":[{"type":"address","name":"payee","internalType":"address payable"}]}]
            

Contract Creation Code

0x600d80546001600160801b0319166109c41790556101006040526824521e2a3017b8000060a0908152682f29ace68addd8000060c0526842684a41abfd84000060e0526200005290601090600362000308565b50604080516060810182526824521e2a3017b800008152682f29ace68addd8000060208201526842684a41abfd840000918101919091526200009990601390600362000308565b50604080516060810182526825ad1001bb707c000081526830849ebe16369c000060208201526843c33c19375648000091810191909152620000e090601690600362000308565b506040805160608101825260108152600460208201819052918101919091526200010f90601990600362000356565b506004601c55604051806080016040528060438152602001620045966043913980516200014591601f916020909101906200038c565b506362531b2060205563625329306021553480156200016357600080fd5b50604051620045d9380380620045d983398101604081905262000186916200044b565b604080518082018252601581527f43726f6e6f7665727365204c616e642054696c6573000000000000000000000060208083019182528351808501909452600584526410d310539160da1b908401528151919291620001e8916000916200038c565b508051620001fe9060019060208401906200038c565b5050506200021b62000215620002b260201b60201c565b620002b6565b604051620002299062000409565b604051809103906000f08015801562000246573d6000803e3d6000fd5b506001600160601b031960609190911b16608052600a805460ff60a01b191690556001600b55600f80546001600160a01b039384166001600160a01b031991821617909155600c8054929093169116179055600d80546001600160801b0319166103e8179055620004bf565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b826003810192821562000344579160200282015b828111156200034457825182906001600160481b03169055916020019190600101906200031c565b506200035292915062000417565b5090565b826003810192821562000344579160200282015b8281111562000344578251829060ff169055916020019190600101906200036a565b8280546200039a9062000482565b90600052602060002090601f016020900481019282620003be576000855562000344565b82601f10620003d957805160ff191683800117855562000344565b8280016001018555821562000344579182015b8281111562000344578251825591602001919060010190620003ec565b6105ef8062003fa783390190565b5b8082111562000352576000815560010162000418565b80516001600160a01b03811681146200044657600080fd5b919050565b600080604083850312156200045e578182fd5b62000469836200042e565b915062000479602084016200042e565b90509250929050565b600181811c908216806200049757607f821691505b60208210811415620004b957634e487b7160e01b600052602260045260246000fd5b50919050565b60805160601c613ac2620004e560003960008181611fed01526124bb0152613ac26000f3fe6080604052600436106102ae5760003560e01c8063693c606211610175578063a230c524116100dc578063d960517811610095578063e985e9c51161006f578063e985e9c51461081d578063f2fde38b14610866578063f99031a714610886578063fae92612146108a657600080fd5b8063d9605178146107b5578063e042161f146107cb578063e2982c21146107fd57600080fd5b8063a230c52414610700578063b88d4fde14610720578063c2ba474414610740578063c87b56dd14610760578063d2d8638714610780578063d5abeb01146107a057600080fd5b80638da5cb5b1161012e5780638da5cb5b1461065a57806395d89b4114610678578063a0712d681461068d578063a1794bcd146106a0578063a22cb465146106c0578063a22e4faa146106e057600080fd5b8063693c6062146105ae57806370a08231146105d0578063715018a6146105f05780637e6f7ede146106055780638164c309146106255780638456cb591461064557600080fd5b80633f4ba83a116102195780634f6ccce7116101d25780634f6ccce7146104ed57806355f804b31461050d5780635a9b0b891461052d5780635c975abb1461054f5780635e1045ec1461056e5780636352211e1461058e57600080fd5b80633f4ba83a1461044357806342842e0e146104585780634364f1cf1461047857806343bc16121461049857806343d4eaf5146104b857806349babaa3146104cd57600080fd5b80631d306b2d1161026b5780631d306b2d146103985780632042e5c2146103ae57806323b872dd146103ce5780632f745c59146103ee57806331b3eb941461040e5780633ccfd60b1461042e57600080fd5b806301ffc9a7146102b357806306fdde03146102e8578063070638e61461030a578063081812fc1461031f578063095ea7b31461035757806318160ddd14610379575b600080fd5b3480156102bf57600080fd5b506102d36102ce36600461353f565b6108c6565b60405190151581526020015b60405180910390f35b3480156102f457600080fd5b506102fd6108d7565b6040516102df91906137a3565b34801561031657600080fd5b506102d3610969565b34801561032b57600080fd5b5061033f61033a3660046135bd565b61098f565b6040516001600160a01b0390911681526020016102df565b34801561036357600080fd5b50610377610372366004613441565b610a29565b005b34801561038557600080fd5b506008545b6040519081526020016102df565b3480156103a457600080fd5b5061038a60205481565b3480156103ba57600080fd5b506103776103c9366004613303565b610b3f565b3480156103da57600080fd5b506103776103e9366004613357565b610bae565b3480156103fa57600080fd5b5061038a610409366004613441565b610bdf565b34801561041a57600080fd5b50610377610429366004613303565b610c75565b34801561043a57600080fd5b50610377610cde565b34801561044f57600080fd5b50610377610d14565b34801561046457600080fd5b50610377610473366004613357565b610d46565b34801561048457600080fd5b5061038a610493366004613441565b610d61565b3480156104a457600080fd5b50600c5461033f906001600160a01b031681565b3480156104c457600080fd5b506102d3610e41565b3480156104d957600080fd5b506103776104e83660046134dc565b610e52565b3480156104f957600080fd5b5061038a6105083660046135bd565b610e8d565b34801561051957600080fd5b50610377610528366004613577565b610f2e565b34801561053957600080fd5b50610542610f6b565b6040516102df919061388e565b34801561055b57600080fd5b50600a54600160a01b900460ff166102d3565b34801561057a57600080fd5b5061037761058936600461346c565b61106c565b34801561059a57600080fd5b5061033f6105a93660046135bd565b61111d565b3480156105ba57600080fd5b506105c3611194565b6040516102df919061375f565b3480156105dc57600080fd5b5061038a6105eb366004613303565b6111eb565b3480156105fc57600080fd5b50610377611272565b34801561061157600080fd5b506103776106203660046134f7565b6112a6565b34801561063157600080fd5b50610377610640366004613303565b6112f0565b34801561065157600080fd5b5061037761133e565b34801561066657600080fd5b50600a546001600160a01b031661033f565b34801561068457600080fd5b506102fd611370565b61037761069b3660046135bd565b61137f565b3480156106ac57600080fd5b50600f5461033f906001600160a01b031681565b3480156106cc57600080fd5b506103776106db366004613414565b6117b9565b3480156106ec57600080fd5b506103776106fb366004613303565b6117c4565b34801561070c57600080fd5b506102d361071b366004613303565b611810565b34801561072c57600080fd5b5061037761073b366004613397565b61188e565b34801561074c57600080fd5b5061038a61075b366004613303565b6118c0565b34801561076c57600080fd5b506102fd61077b3660046135bd565b6119ff565b34801561078c57600080fd5b5061037761079b3660046135bd565b611ab3565b3480156107ac57600080fd5b506104b861038a565b3480156107c157600080fd5b5061038a60215481565b3480156107d757600080fd5b506107eb6107e63660046135bd565b611af4565b60405160ff90911681526020016102df565b34801561080957600080fd5b5061038a610818366004613303565b611fcb565b34801561082957600080fd5b506102d361083836600461331f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561087257600080fd5b50610377610881366004613303565b612069565b34801561089257600080fd5b506102d36108a1366004613303565b612101565b3480156108b257600080fd5b506103776108c1366004613303565b61211f565b60006108d18261216b565b92915050565b6060600080546108e6906139a7565b80601f0160208091040260200160405190810160405280929190818152602001828054610912906139a7565b801561095f5780601f106109345761010080835404028352916020019161095f565b820191906000526020600020905b81548152906001019060200180831161094257829003601f168201915b5050505050905090565b6000602054421015801561097e575060215442105b156109895750600190565b50600090565b6000818152600260205260408120546001600160a01b0316610a0d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a348261111d565b9050806001600160a01b0316836001600160a01b03161415610aa25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a04565b336001600160a01b0382161480610abe5750610abe8133610838565b610b305760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a04565b610b3a8383612190565b505050565b600a546001600160a01b03163314610b695760405162461bcd60e51b8152600401610a0490613808565b6001600160a01b0381166000908152601d602052604090205460ff1615610bab576001600160a01b0381166000908152601d60205260409020805460ff191690555b50565b610bb833826121fe565b610bd45760405162461bcd60e51b8152600401610a049061383d565b610b3a8383836122f5565b6000610bea836111eb565b8210610c4c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a04565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6002600b541415610cc85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a04565b6002600b55610cd68161249c565b506001600b55565b600a546001600160a01b03163314610d085760405162461bcd60e51b8152600401610a0490613808565b610d123347612513565b565b600a546001600160a01b03163314610d3e5760405162461bcd60e51b8152600401610a0490613808565b610d1261262c565b610b3a8383836040518060200160405280600081525061188e565b60006104b8821115610da25760405162461bcd60e51b815260206004820152600a602482015269125b9d985b1a5908125160b21b6044820152606401610a04565b6000610dad83611af4565b9050610db884612101565b15610deb5760108160ff1660038110610de157634e487b7160e01b600052603260045260246000fd5b01549150506108d1565b610df484611810565b15610e1d5760138160ff1660038110610de157634e487b7160e01b600052603260045260246000fd5b60168160ff1660038110610de157634e487b7160e01b600052603260045260246000fd5b600060215442106109895750600190565b600a546001600160a01b03163314610e7c5760405162461bcd60e51b8152600401610a0490613808565b610e8960108260036130d2565b5050565b6000610e9860085490565b8210610efb5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a04565b60088281548110610f1c57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600a546001600160a01b03163314610f585760405162461bcd60e51b8152600401610a0490613808565b8051610e8990601f906020840190613110565b610f73613183565b610f7b613183565b6040805160608101918290529060169060039082845b815481526020019060010190808311610f915750505091835250506040805160608101918290529060139060039082845b815481526020019060010190808311610fc257505050505060208201526040805160608101918290529060109060039082845b815481526020019060010190808311610ff5575050505050604082810191909152805160608101918290529060199060039082845b81548152602001906001019080831161102a5750505050506060820152601c5460808201526104b860a082015260085460c08201526001610100820152919050565b600a546001600160a01b031633146110965760405162461bcd60e51b8152600401610a0490613808565b8060005b81811015611117576001601d60008686858181106110c857634e487b7160e01b600052603260045260246000fd5b90506020020160208101906110dd9190613303565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061110f816139e2565b91505061109a565b50505050565b6000818152600260205260408120546001600160a01b0316806108d15760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a04565b6060602280548060200260200160405190810160405280929190818152602001828054801561095f57602002820191906000526020600020905b8154815260200190600101908083116111ce575050505050905090565b60006001600160a01b0382166112565760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a04565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b0316331461129c5760405162461bcd60e51b8152600401610a0490613808565b610d1260006126c9565b600a546001600160a01b031633146112d05760405162461bcd60e51b8152600401610a0490613808565b80156112e357610b3a60138360036130d2565b610b3a60168360036130d2565b600a546001600160a01b0316331461131a5760405162461bcd60e51b8152600401610a0490613808565b6001600160a01b03166000908152601d60205260409020805460ff19166001179055565b600a546001600160a01b031633146113685760405162461bcd60e51b8152600401610a0490613808565b610d1261271b565b6060600180546108e6906139a7565b600a54600160a01b900460ff16156113cc5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610a04565b60006113d760085490565b90506104b881106114155760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b6044820152606401610a04565b6104b88211801590611428575060018210155b6114685760405162461bcd60e51b8152602060048201526011602482015270546f6b656e20494420496e76616c69642160781b6044820152606401610a04565b60008061147484611af4565b905061147f33612101565b156114b15760108160ff16600381106114a857634e487b7160e01b600052603260045260246000fd5b0154915061150c565b6114ba33611810565b156114e35760138160ff16600381106114a857634e487b7160e01b600052603260045260246000fd5b60168160ff166003811061150757634e487b7160e01b600052603260045260246000fd5b015491505b8134101561154f5760405162461bcd60e51b815260206004820152601060248201526f6e6f7420656e6f7567682066756e647360801b6044820152606401610a04565b60198160ff166003811061157357634e487b7160e01b600052603260045260246000fd5b0154336000908152601e6020908152604080832060ff86168452909152902054106115d95760405162461bcd60e51b815260206004820152601660248201527557616c6c65742062616c616e6365206578636565647360501b6044820152606401610a04565b6115e1610969565b156116c4576115ef33612101565b61162e5760405162461bcd60e51b815260206004820152601060248201526f139bdd081bdb881dda1a5d195b1a5cdd60821b6044820152606401610a04565b601c54336000908152601e602090815260408083206002845290915280822054600183528183205483805291909220546116689190613919565b6116729190613919565b106116bf5760405162461bcd60e51b815260206004820152601760248201527f50726573616c652062616c616e636520657863656564730000000000000000006044820152606401610a04565b61170f565b6116cc610e41565b61170f5760405162461bcd60e51b815260206004820152601460248201527314d85b19481b9bdd081cdd185c9d1959081e595d60621b6044820152606401610a04565b61171933856127a3565b336000908152601e6020908152604080832060ff851684529091528120805491611742836139e2565b90915550506022805460018101825560009182527f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e51001859055600d5461179e9084906fffffffffffffffffffffffffffffffff166127106127bd565b90506117b26117ad8285613964565b6128d1565b5050505050565b610e89338383612937565b600a546001600160a01b031633146117ee5760405162461bcd60e51b8152600401610a0490613808565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b600f5460405163288c314960e21b81526001600160a01b038381166004830152600092169063a230c5249060240160206040518083038186803b15801561185657600080fd5b505afa15801561186a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d19190613523565b61189833836121fe565b6118b45760405162461bcd60e51b8152600401610a049061383d565b61111784848484612a06565b60006118ca610969565b15611984576118d833612101565b6118e457506000919050565b601c54336000908152601e6020908152604080832060028452909152808220546001835281832054838052919092205461191e9190613919565b6119289190613919565b101561197c57336000908152601e602090815260408083206002845290915280822054600183528183205483805291909220546119659190613919565b61196f9190613919565b601c546108d19190613964565b506000919050565b61198c610e41565b1561197c57336000908152601e602090815260408083206002845290915280822054601b546001845282842054601a5485805293909420546019549294919391926119d79190613964565b6119e19190613919565b6119eb9190613964565b6119f59190613919565b6108d19190613964565b6000818152600260205260409020546060906001600160a01b0316611a7e5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a04565b6000601f611a8b84612a39565b604051602001611a9c929190613658565b60408051601f198184030181529190529392505050565b600a546001600160a01b03163314611add5760405162461bcd60e51b8152600401610a0490613808565b6020819055611aee81610e10613919565b60215550565b600060018210158015611b085750609c8211155b80611b2257506103e98210158015611b2257506104b88211155b15611b2f57506000919050565b6101498210158015611b43575061015c8211155b80611b5d575061017d8210158015611b5d57506101908211155b80611b7757506101b18210158015611b7757506101b48211155b80611b9157506101d58210158015611b9157506101d88211155b80611bab57506101f98210158015611bab57506101fc8211155b80611bc5575061021d8210158015611bc557506102208211155b80611bdf57506102418210158015611bdf57506102448211155b80611bf957506102658210158015611bf957506102688211155b80611c1357506102898210158015611c13575061028c8211155b80611c2d57506102ad8210158015611c2d57506102b08211155b80611c4757506102d18210158015611c4757506102d48211155b80611c6157506102f58210158015611c6157506103088211155b80611c7b57506103298210158015611c7b575061033c8211155b15611c8857506002919050565b60a88210158015611c9a575060c58211155b80611cb2575060dc8210158015611cb2575060f98211155b80611ccc57506101108210158015611ccc575061012d8211155b80611ce657506101448210158015611ce657506101488211155b80611d00575061015d8210158015611d0057506101618211155b80611d1a57506101788210158015611d1a575061017c8211155b80611d3457506101918210158015611d3457506101958211155b80611d4e57506101ac8210158015611d4e57506101b08211155b80611d6857506101b58210158015611d6857506101b98211155b80611d8257506101d08210158015611d8257506101d48211155b80611d9c57506101d98210158015611d9c57506101dd8211155b80611db657506101f48210158015611db657506101f88211155b80611dd057506101fd8210158015611dd057506102018211155b80611dea57506102188210158015611dea575061021c8211155b80611e0457506102218210158015611e0457506102258211155b80611e1e575061023c8210158015611e1e57506102408211155b80611e3857506102458210158015611e3857506102498211155b80611e5257506102608210158015611e5257506102648211155b80611e6c57506102698210158015611e6c575061026d8211155b80611e8657506102848210158015611e8657506102888211155b80611ea0575061028d8210158015611ea057506102918211155b80611eba57506102a88210158015611eba57506102ac8211155b80611ed457506102b18210158015611ed457506102b58211155b80611eee57506102cc8210158015611eee57506102d08211155b80611f0857506102d58210158015611f0857506102d98211155b80611f2257506102f08210158015611f2257506102f48211155b80611f3c57506103098210158015611f3c575061030d8211155b80611f5657506103248210158015611f5657506103288211155b80611f70575061033d8210158015611f7057506103418211155b80611f8a57506103588210158015611f8a57506103758211155b80611fa4575061038c8210158015611fa457506103a98211155b80611fbe57506103c08210158015611fbe57506103dd8211155b1561197c57506001919050565b6040516371d4ed8d60e11b81526001600160a01b0382811660048301526000917f00000000000000000000000000000000000000000000000000000000000000009091169063e3a9db1a9060240160206040518083038186803b15801561203157600080fd5b505afa158015612045573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d191906135d5565b600a546001600160a01b031633146120935760405162461bcd60e51b8152600401610a0490613808565b6001600160a01b0381166120f85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a04565b610bab816126c9565b6001600160a01b03166000908152601d602052604090205460ff1690565b600a546001600160a01b031633146121495760405162461bcd60e51b8152600401610a0490613808565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b0319821663780e9d6360e01b14806108d157506108d182612b53565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906121c58261111d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166122775760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a04565b60006122828361111d565b9050806001600160a01b0316846001600160a01b031614806122bd5750836001600160a01b03166122b28461098f565b6001600160a01b0316145b806122ed57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166123088261111d565b6001600160a01b03161461236c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610a04565b6001600160a01b0382166123ce5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a04565b6123d9838383612ba3565b6123e4600082612190565b6001600160a01b038316600090815260036020526040812080546001929061240d908490613964565b90915550506001600160a01b038216600090815260036020526040812080546001929061243b908490613919565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6040516351cff8d960e01b81526001600160a01b0382811660048301527f000000000000000000000000000000000000000000000000000000000000000016906351cff8d990602401600060405180830381600087803b1580156124ff57600080fd5b505af11580156117b2573d6000803e3d6000fd5b804710156125635760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a04565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146125b0576040519150601f19603f3d011682016040523d82523d6000602084013e6125b5565b606091505b5050905080610b3a5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a04565b600a54600160a01b900460ff1661267c5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a04565b600a805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a54600160a01b900460ff16156127685760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610a04565b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126ac3390565b610e89828260405180602001604052806000815250612bae565b60008082116128015760405162461bcd60e51b815260206004820152601060248201526f4469766973696f6e206279207a65726f60801b6044820152606401610a04565b8361280e575060006128ca565b600061281a8486613945565b9050836128278683613931565b141561283f576128378382613931565b9150506128ca565b600061284b8487613931565b9050600061285985886139fd565b905060006128678688613931565b9050600061287587896139fd565b90506128c261288e886128888685612be1565b90612bed565b6128bc61289b8686612be1565b6128bc6128a88987612be1565b6128bc8d6128b68c8b612be1565b90612be1565b90612bf9565b955050505050505b9392505050565b600f54600c54604051634065da6360e01b81526001600160a01b039182166004820152911690634065da639083906024016000604051808303818588803b15801561291b57600080fd5b505af115801561292f573d6000803e3d6000fd5b505050505050565b816001600160a01b0316836001600160a01b031614156129995760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a04565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612a118484846122f5565b612a1d84848484612c05565b6111175760405162461bcd60e51b8152600401610a04906137b6565b606081612a5d5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612a875780612a71816139e2565b9150612a809050600a83613931565b9150612a61565b60008167ffffffffffffffff811115612ab057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612ada576020820181803683370190505b5090505b84156122ed57612aef600183613964565b9150612afc600a866139fd565b612b07906030613919565b60f81b818381518110612b2a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612b4c600a86613931565b9450612ade565b60006001600160e01b031982166380ac58cd60e01b1480612b8457506001600160e01b03198216635b5e139f60e01b145b806108d157506301ffc9a760e01b6001600160e01b03198316146108d1565b610b3a838383612d12565b612bb88383612dca565b612bc56000848484612c05565b610b3a5760405162461bcd60e51b8152600401610a04906137b6565b60006128ca8284613945565b60006128ca8284613931565b60006128ca8284613919565b60006001600160a01b0384163b15612d0757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612c49903390899088908890600401613722565b602060405180830381600087803b158015612c6357600080fd5b505af1925050508015612c93575060408051601f3d908101601f19168201909252612c909181019061355b565b60015b612ced573d808015612cc1576040519150601f19603f3d011682016040523d82523d6000602084013e612cc6565b606091505b508051612ce55760405162461bcd60e51b8152600401610a04906137b6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506122ed565b506001949350505050565b6001600160a01b038316612d6d57612d6881600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612d90565b816001600160a01b0316836001600160a01b031614612d9057612d908382612f18565b6001600160a01b038216612da757610b3a81612fb5565b826001600160a01b0316826001600160a01b031614610b3a57610b3a828261308e565b6001600160a01b038216612e205760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a04565b6000818152600260205260409020546001600160a01b031615612e855760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a04565b612e9160008383612ba3565b6001600160a01b0382166000908152600360205260408120805460019290612eba908490613919565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001612f25846111eb565b612f2f9190613964565b600083815260076020526040902054909150808214612f82576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612fc790600190613964565b60008381526009602052604081205460088054939450909284908110612ffd57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061302c57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061307257634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000613099836111eb565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b8260038101928215613100579160200282015b828111156131005782518255916020019190600101906130e5565b5061310c9291506131e7565b5090565b82805461311c906139a7565b90600052602060002090601f01602090048101928261313e5760008555613100565b82601f1061315757805160ff1916838001178555613100565b8280016001018555821561310057918201828111156131005782518255916020019190600101906130e5565b6040518061012001604052806131976131fc565b81526020016131a46131fc565b81526020016131b16131fc565b81526020016131be6131fc565b815260200160008152602001600081526020016000815260200160008152602001600081525090565b5b8082111561310c57600081556001016131e8565b60405180606001604052806003906020820280368337509192915050565b600067ffffffffffffffff8084111561323557613235613a3d565b604051601f8501601f19908116603f0116810190828211818310171561325d5761325d613a3d565b8160405280935085815286868601111561327657600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126132a0578081fd5b6040516060810181811067ffffffffffffffff821117156132c3576132c3613a3d565b6040528083606081018610156132d7578384fd5b835b60038110156132f85781358352602092830192909101906001016132d9565b509195945050505050565b600060208284031215613314578081fd5b81356128ca81613a53565b60008060408385031215613331578081fd5b823561333c81613a53565b9150602083013561334c81613a53565b809150509250929050565b60008060006060848603121561336b578081fd5b833561337681613a53565b9250602084013561338681613a53565b929592945050506040919091013590565b600080600080608085870312156133ac578081fd5b84356133b781613a53565b935060208501356133c781613a53565b925060408501359150606085013567ffffffffffffffff8111156133e9578182fd5b8501601f810187136133f9578182fd5b6134088782356020840161321a565b91505092959194509250565b60008060408385031215613426578182fd5b823561343181613a53565b9150602083013561334c81613a68565b60008060408385031215613453578182fd5b823561345e81613a53565b946020939093013593505050565b6000806020838503121561347e578182fd5b823567ffffffffffffffff80821115613495578384fd5b818501915085601f8301126134a8578384fd5b8135818111156134b6578485fd5b8660208260051b85010111156134ca578485fd5b60209290920196919550909350505050565b6000606082840312156134ed578081fd5b6128ca8383613290565b60008060808385031215613509578182fd5b6135138484613290565b9150606083013561334c81613a68565b600060208284031215613534578081fd5b81516128ca81613a68565b600060208284031215613550578081fd5b81356128ca81613a76565b60006020828403121561356c578081fd5b81516128ca81613a76565b600060208284031215613588578081fd5b813567ffffffffffffffff81111561359e578182fd5b8201601f810184136135ae578182fd5b6122ed8482356020840161321a565b6000602082840312156135ce578081fd5b5035919050565b6000602082840312156135e6578081fd5b5051919050565b8060005b60038110156111175781518452602093840193909101906001016135f1565b6000815180845261362881602086016020860161397b565b601f01601f19169290920160200192915050565b6000815161364e81856020860161397b565b9290920192915050565b600080845482600182811c91508083168061367457607f831692505b602080841082141561369457634e487b7160e01b87526022600452602487fd5b8180156136a857600181146136b9576136e5565b60ff198616895284890196506136e5565b60008b815260209020885b868110156136dd5781548b8201529085019083016136c4565b505084890196505b50505050505061371961370861370283602f60f81b815260010190565b8661363c565b64173539b7b760d91b815260050190565b95945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061375590830184613610565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156137975783518352928401929184019160010161377b565b50909695505050505050565b6020815260006128ca6020830184613610565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000610220820190506138a28284516135ed565b60208301516138b460608401826135ed565b5060408301516138c760c08401826135ed565b5060608301516138db6101208401826135ed565b50608083015161018083015260a08301516101a083015260c08301516101c083015260e08301516101e0830152610100909201516102009091015290565b6000821982111561392c5761392c613a11565b500190565b60008261394057613940613a27565b500490565b600081600019048311821515161561395f5761395f613a11565b500290565b60008282101561397657613976613a11565b500390565b60005b8381101561399657818101518382015260200161397e565b838111156111175750506000910152565b600181811c908216806139bb57607f821691505b602082108114156139dc57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156139f6576139f6613a11565b5060010190565b600082613a0c57613a0c613a27565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610bab57600080fd5b8015158114610bab57600080fd5b6001600160e01b031981168114610bab57600080fdfea26469706673582212208b0b7dd5b96dfc34ebf6881fdd5f27b7dd4e762613bdfb3f785763cbfffc720864736f6c63430008040033608060405234801561001057600080fd5b5061001a3361001f565b61006f565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6105718061007e6000396000f3fe6080604052600436106100555760003560e01c806351cff8d91461005a578063715018a61461007c5780638da5cb5b14610091578063e3a9db1a146100be578063f2fde38b14610102578063f340fa0114610122575b600080fd5b34801561006657600080fd5b5061007a6100753660046104aa565b610135565b005b34801561008857600080fd5b5061007a6101d7565b34801561009d57600080fd5b506000546040516001600160a01b0390911681526020015b60405180910390f35b3480156100ca57600080fd5b506100f46100d93660046104aa565b6001600160a01b031660009081526001602052604090205490565b6040519081526020016100b5565b34801561010e57600080fd5b5061007a61011d3660046104aa565b61020d565b61007a6101303660046104aa565b6102a8565b6000546001600160a01b031633146101685760405162461bcd60e51b815260040161015f906104cd565b60405180910390fd5b6001600160a01b0381166000818152600160205260408120805491905590610190908261033c565b816001600160a01b03167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5826040516101cb91815260200190565b60405180910390a25050565b6000546001600160a01b031633146102015760405162461bcd60e51b815260040161015f906104cd565b61020b600061045a565b565b6000546001600160a01b031633146102375760405162461bcd60e51b815260040161015f906104cd565b6001600160a01b03811661029c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161015f565b6102a58161045a565b50565b6000546001600160a01b031633146102d25760405162461bcd60e51b815260040161015f906104cd565b6001600160a01b0381166000908152600160205260408120805434928392916102fc908490610502565b90915550506040518181526001600160a01b038316907f2da466a7b24304f47e87fa2e1e5a81b9831ce54fec19055ce277ca2f39ba42c4906020016101cb565b8047101561038c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161015f565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146103d9576040519150601f19603f3d011682016040523d82523d6000602084013e6103de565b606091505b50509050806104555760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161015f565b505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000602082840312156104bb578081fd5b81356104c681610526565b9392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000821982111561052157634e487b7160e01b81526011600452602481fd5b500190565b6001600160a01b03811681146102a557600080fdfea264697066735822122097aaf8330e2b679c3d08b05923d025844a488ff53c65b2f148c20b20172688e864736f6c6343000804003368747470733a2f2f697066732e696f2f697066732f516d57395375536a4745576f7150506a3167327a7a31424e6e6b716f434231635748736d6e537855556a5a4e4a330000000000000000000000007a3cdb2364f92369a602cae81167d0679087e6a30000000000000000000000000c67b99315f218f770a27a05d3a35f5ce430b63a

Deployed ByteCode

0x6080604052600436106102ae5760003560e01c8063693c606211610175578063a230c524116100dc578063d960517811610095578063e985e9c51161006f578063e985e9c51461081d578063f2fde38b14610866578063f99031a714610886578063fae92612146108a657600080fd5b8063d9605178146107b5578063e042161f146107cb578063e2982c21146107fd57600080fd5b8063a230c52414610700578063b88d4fde14610720578063c2ba474414610740578063c87b56dd14610760578063d2d8638714610780578063d5abeb01146107a057600080fd5b80638da5cb5b1161012e5780638da5cb5b1461065a57806395d89b4114610678578063a0712d681461068d578063a1794bcd146106a0578063a22cb465146106c0578063a22e4faa146106e057600080fd5b8063693c6062146105ae57806370a08231146105d0578063715018a6146105f05780637e6f7ede146106055780638164c309146106255780638456cb591461064557600080fd5b80633f4ba83a116102195780634f6ccce7116101d25780634f6ccce7146104ed57806355f804b31461050d5780635a9b0b891461052d5780635c975abb1461054f5780635e1045ec1461056e5780636352211e1461058e57600080fd5b80633f4ba83a1461044357806342842e0e146104585780634364f1cf1461047857806343bc16121461049857806343d4eaf5146104b857806349babaa3146104cd57600080fd5b80631d306b2d1161026b5780631d306b2d146103985780632042e5c2146103ae57806323b872dd146103ce5780632f745c59146103ee57806331b3eb941461040e5780633ccfd60b1461042e57600080fd5b806301ffc9a7146102b357806306fdde03146102e8578063070638e61461030a578063081812fc1461031f578063095ea7b31461035757806318160ddd14610379575b600080fd5b3480156102bf57600080fd5b506102d36102ce36600461353f565b6108c6565b60405190151581526020015b60405180910390f35b3480156102f457600080fd5b506102fd6108d7565b6040516102df91906137a3565b34801561031657600080fd5b506102d3610969565b34801561032b57600080fd5b5061033f61033a3660046135bd565b61098f565b6040516001600160a01b0390911681526020016102df565b34801561036357600080fd5b50610377610372366004613441565b610a29565b005b34801561038557600080fd5b506008545b6040519081526020016102df565b3480156103a457600080fd5b5061038a60205481565b3480156103ba57600080fd5b506103776103c9366004613303565b610b3f565b3480156103da57600080fd5b506103776103e9366004613357565b610bae565b3480156103fa57600080fd5b5061038a610409366004613441565b610bdf565b34801561041a57600080fd5b50610377610429366004613303565b610c75565b34801561043a57600080fd5b50610377610cde565b34801561044f57600080fd5b50610377610d14565b34801561046457600080fd5b50610377610473366004613357565b610d46565b34801561048457600080fd5b5061038a610493366004613441565b610d61565b3480156104a457600080fd5b50600c5461033f906001600160a01b031681565b3480156104c457600080fd5b506102d3610e41565b3480156104d957600080fd5b506103776104e83660046134dc565b610e52565b3480156104f957600080fd5b5061038a6105083660046135bd565b610e8d565b34801561051957600080fd5b50610377610528366004613577565b610f2e565b34801561053957600080fd5b50610542610f6b565b6040516102df919061388e565b34801561055b57600080fd5b50600a54600160a01b900460ff166102d3565b34801561057a57600080fd5b5061037761058936600461346c565b61106c565b34801561059a57600080fd5b5061033f6105a93660046135bd565b61111d565b3480156105ba57600080fd5b506105c3611194565b6040516102df919061375f565b3480156105dc57600080fd5b5061038a6105eb366004613303565b6111eb565b3480156105fc57600080fd5b50610377611272565b34801561061157600080fd5b506103776106203660046134f7565b6112a6565b34801561063157600080fd5b50610377610640366004613303565b6112f0565b34801561065157600080fd5b5061037761133e565b34801561066657600080fd5b50600a546001600160a01b031661033f565b34801561068457600080fd5b506102fd611370565b61037761069b3660046135bd565b61137f565b3480156106ac57600080fd5b50600f5461033f906001600160a01b031681565b3480156106cc57600080fd5b506103776106db366004613414565b6117b9565b3480156106ec57600080fd5b506103776106fb366004613303565b6117c4565b34801561070c57600080fd5b506102d361071b366004613303565b611810565b34801561072c57600080fd5b5061037761073b366004613397565b61188e565b34801561074c57600080fd5b5061038a61075b366004613303565b6118c0565b34801561076c57600080fd5b506102fd61077b3660046135bd565b6119ff565b34801561078c57600080fd5b5061037761079b3660046135bd565b611ab3565b3480156107ac57600080fd5b506104b861038a565b3480156107c157600080fd5b5061038a60215481565b3480156107d757600080fd5b506107eb6107e63660046135bd565b611af4565b60405160ff90911681526020016102df565b34801561080957600080fd5b5061038a610818366004613303565b611fcb565b34801561082957600080fd5b506102d361083836600461331f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561087257600080fd5b50610377610881366004613303565b612069565b34801561089257600080fd5b506102d36108a1366004613303565b612101565b3480156108b257600080fd5b506103776108c1366004613303565b61211f565b60006108d18261216b565b92915050565b6060600080546108e6906139a7565b80601f0160208091040260200160405190810160405280929190818152602001828054610912906139a7565b801561095f5780601f106109345761010080835404028352916020019161095f565b820191906000526020600020905b81548152906001019060200180831161094257829003601f168201915b5050505050905090565b6000602054421015801561097e575060215442105b156109895750600190565b50600090565b6000818152600260205260408120546001600160a01b0316610a0d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a348261111d565b9050806001600160a01b0316836001600160a01b03161415610aa25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a04565b336001600160a01b0382161480610abe5750610abe8133610838565b610b305760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a04565b610b3a8383612190565b505050565b600a546001600160a01b03163314610b695760405162461bcd60e51b8152600401610a0490613808565b6001600160a01b0381166000908152601d602052604090205460ff1615610bab576001600160a01b0381166000908152601d60205260409020805460ff191690555b50565b610bb833826121fe565b610bd45760405162461bcd60e51b8152600401610a049061383d565b610b3a8383836122f5565b6000610bea836111eb565b8210610c4c5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a04565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6002600b541415610cc85760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a04565b6002600b55610cd68161249c565b506001600b55565b600a546001600160a01b03163314610d085760405162461bcd60e51b8152600401610a0490613808565b610d123347612513565b565b600a546001600160a01b03163314610d3e5760405162461bcd60e51b8152600401610a0490613808565b610d1261262c565b610b3a8383836040518060200160405280600081525061188e565b60006104b8821115610da25760405162461bcd60e51b815260206004820152600a602482015269125b9d985b1a5908125160b21b6044820152606401610a04565b6000610dad83611af4565b9050610db884612101565b15610deb5760108160ff1660038110610de157634e487b7160e01b600052603260045260246000fd5b01549150506108d1565b610df484611810565b15610e1d5760138160ff1660038110610de157634e487b7160e01b600052603260045260246000fd5b60168160ff1660038110610de157634e487b7160e01b600052603260045260246000fd5b600060215442106109895750600190565b600a546001600160a01b03163314610e7c5760405162461bcd60e51b8152600401610a0490613808565b610e8960108260036130d2565b5050565b6000610e9860085490565b8210610efb5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a04565b60088281548110610f1c57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600a546001600160a01b03163314610f585760405162461bcd60e51b8152600401610a0490613808565b8051610e8990601f906020840190613110565b610f73613183565b610f7b613183565b6040805160608101918290529060169060039082845b815481526020019060010190808311610f915750505091835250506040805160608101918290529060139060039082845b815481526020019060010190808311610fc257505050505060208201526040805160608101918290529060109060039082845b815481526020019060010190808311610ff5575050505050604082810191909152805160608101918290529060199060039082845b81548152602001906001019080831161102a5750505050506060820152601c5460808201526104b860a082015260085460c08201526001610100820152919050565b600a546001600160a01b031633146110965760405162461bcd60e51b8152600401610a0490613808565b8060005b81811015611117576001601d60008686858181106110c857634e487b7160e01b600052603260045260246000fd5b90506020020160208101906110dd9190613303565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061110f816139e2565b91505061109a565b50505050565b6000818152600260205260408120546001600160a01b0316806108d15760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a04565b6060602280548060200260200160405190810160405280929190818152602001828054801561095f57602002820191906000526020600020905b8154815260200190600101908083116111ce575050505050905090565b60006001600160a01b0382166112565760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a04565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b0316331461129c5760405162461bcd60e51b8152600401610a0490613808565b610d1260006126c9565b600a546001600160a01b031633146112d05760405162461bcd60e51b8152600401610a0490613808565b80156112e357610b3a60138360036130d2565b610b3a60168360036130d2565b600a546001600160a01b0316331461131a5760405162461bcd60e51b8152600401610a0490613808565b6001600160a01b03166000908152601d60205260409020805460ff19166001179055565b600a546001600160a01b031633146113685760405162461bcd60e51b8152600401610a0490613808565b610d1261271b565b6060600180546108e6906139a7565b600a54600160a01b900460ff16156113cc5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610a04565b60006113d760085490565b90506104b881106114155760405162461bcd60e51b815260206004820152600860248201526714dbdb19081bdd5d60c21b6044820152606401610a04565b6104b88211801590611428575060018210155b6114685760405162461bcd60e51b8152602060048201526011602482015270546f6b656e20494420496e76616c69642160781b6044820152606401610a04565b60008061147484611af4565b905061147f33612101565b156114b15760108160ff16600381106114a857634e487b7160e01b600052603260045260246000fd5b0154915061150c565b6114ba33611810565b156114e35760138160ff16600381106114a857634e487b7160e01b600052603260045260246000fd5b60168160ff166003811061150757634e487b7160e01b600052603260045260246000fd5b015491505b8134101561154f5760405162461bcd60e51b815260206004820152601060248201526f6e6f7420656e6f7567682066756e647360801b6044820152606401610a04565b60198160ff166003811061157357634e487b7160e01b600052603260045260246000fd5b0154336000908152601e6020908152604080832060ff86168452909152902054106115d95760405162461bcd60e51b815260206004820152601660248201527557616c6c65742062616c616e6365206578636565647360501b6044820152606401610a04565b6115e1610969565b156116c4576115ef33612101565b61162e5760405162461bcd60e51b815260206004820152601060248201526f139bdd081bdb881dda1a5d195b1a5cdd60821b6044820152606401610a04565b601c54336000908152601e602090815260408083206002845290915280822054600183528183205483805291909220546116689190613919565b6116729190613919565b106116bf5760405162461bcd60e51b815260206004820152601760248201527f50726573616c652062616c616e636520657863656564730000000000000000006044820152606401610a04565b61170f565b6116cc610e41565b61170f5760405162461bcd60e51b815260206004820152601460248201527314d85b19481b9bdd081cdd185c9d1959081e595d60621b6044820152606401610a04565b61171933856127a3565b336000908152601e6020908152604080832060ff851684529091528120805491611742836139e2565b90915550506022805460018101825560009182527f61035b26e3e9eee00e0d72fd1ee8ddca6894550dca6916ea2ac6baa90d11e51001859055600d5461179e9084906fffffffffffffffffffffffffffffffff166127106127bd565b90506117b26117ad8285613964565b6128d1565b5050505050565b610e89338383612937565b600a546001600160a01b031633146117ee5760405162461bcd60e51b8152600401610a0490613808565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b600f5460405163288c314960e21b81526001600160a01b038381166004830152600092169063a230c5249060240160206040518083038186803b15801561185657600080fd5b505afa15801561186a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d19190613523565b61189833836121fe565b6118b45760405162461bcd60e51b8152600401610a049061383d565b61111784848484612a06565b60006118ca610969565b15611984576118d833612101565b6118e457506000919050565b601c54336000908152601e6020908152604080832060028452909152808220546001835281832054838052919092205461191e9190613919565b6119289190613919565b101561197c57336000908152601e602090815260408083206002845290915280822054600183528183205483805291909220546119659190613919565b61196f9190613919565b601c546108d19190613964565b506000919050565b61198c610e41565b1561197c57336000908152601e602090815260408083206002845290915280822054601b546001845282842054601a5485805293909420546019549294919391926119d79190613964565b6119e19190613919565b6119eb9190613964565b6119f59190613919565b6108d19190613964565b6000818152600260205260409020546060906001600160a01b0316611a7e5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a04565b6000601f611a8b84612a39565b604051602001611a9c929190613658565b60408051601f198184030181529190529392505050565b600a546001600160a01b03163314611add5760405162461bcd60e51b8152600401610a0490613808565b6020819055611aee81610e10613919565b60215550565b600060018210158015611b085750609c8211155b80611b2257506103e98210158015611b2257506104b88211155b15611b2f57506000919050565b6101498210158015611b43575061015c8211155b80611b5d575061017d8210158015611b5d57506101908211155b80611b7757506101b18210158015611b7757506101b48211155b80611b9157506101d58210158015611b9157506101d88211155b80611bab57506101f98210158015611bab57506101fc8211155b80611bc5575061021d8210158015611bc557506102208211155b80611bdf57506102418210158015611bdf57506102448211155b80611bf957506102658210158015611bf957506102688211155b80611c1357506102898210158015611c13575061028c8211155b80611c2d57506102ad8210158015611c2d57506102b08211155b80611c4757506102d18210158015611c4757506102d48211155b80611c6157506102f58210158015611c6157506103088211155b80611c7b57506103298210158015611c7b575061033c8211155b15611c8857506002919050565b60a88210158015611c9a575060c58211155b80611cb2575060dc8210158015611cb2575060f98211155b80611ccc57506101108210158015611ccc575061012d8211155b80611ce657506101448210158015611ce657506101488211155b80611d00575061015d8210158015611d0057506101618211155b80611d1a57506101788210158015611d1a575061017c8211155b80611d3457506101918210158015611d3457506101958211155b80611d4e57506101ac8210158015611d4e57506101b08211155b80611d6857506101b58210158015611d6857506101b98211155b80611d8257506101d08210158015611d8257506101d48211155b80611d9c57506101d98210158015611d9c57506101dd8211155b80611db657506101f48210158015611db657506101f88211155b80611dd057506101fd8210158015611dd057506102018211155b80611dea57506102188210158015611dea575061021c8211155b80611e0457506102218210158015611e0457506102258211155b80611e1e575061023c8210158015611e1e57506102408211155b80611e3857506102458210158015611e3857506102498211155b80611e5257506102608210158015611e5257506102648211155b80611e6c57506102698210158015611e6c575061026d8211155b80611e8657506102848210158015611e8657506102888211155b80611ea0575061028d8210158015611ea057506102918211155b80611eba57506102a88210158015611eba57506102ac8211155b80611ed457506102b18210158015611ed457506102b58211155b80611eee57506102cc8210158015611eee57506102d08211155b80611f0857506102d58210158015611f0857506102d98211155b80611f2257506102f08210158015611f2257506102f48211155b80611f3c57506103098210158015611f3c575061030d8211155b80611f5657506103248210158015611f5657506103288211155b80611f70575061033d8210158015611f7057506103418211155b80611f8a57506103588210158015611f8a57506103758211155b80611fa4575061038c8210158015611fa457506103a98211155b80611fbe57506103c08210158015611fbe57506103dd8211155b1561197c57506001919050565b6040516371d4ed8d60e11b81526001600160a01b0382811660048301526000917f0000000000000000000000003910f5c06a5dc155701118c159837dc489820e889091169063e3a9db1a9060240160206040518083038186803b15801561203157600080fd5b505afa158015612045573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d191906135d5565b600a546001600160a01b031633146120935760405162461bcd60e51b8152600401610a0490613808565b6001600160a01b0381166120f85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a04565b610bab816126c9565b6001600160a01b03166000908152601d602052604090205460ff1690565b600a546001600160a01b031633146121495760405162461bcd60e51b8152600401610a0490613808565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b0319821663780e9d6360e01b14806108d157506108d182612b53565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906121c58261111d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166122775760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a04565b60006122828361111d565b9050806001600160a01b0316846001600160a01b031614806122bd5750836001600160a01b03166122b28461098f565b6001600160a01b0316145b806122ed57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166123088261111d565b6001600160a01b03161461236c5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610a04565b6001600160a01b0382166123ce5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a04565b6123d9838383612ba3565b6123e4600082612190565b6001600160a01b038316600090815260036020526040812080546001929061240d908490613964565b90915550506001600160a01b038216600090815260036020526040812080546001929061243b908490613919565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6040516351cff8d960e01b81526001600160a01b0382811660048301527f0000000000000000000000003910f5c06a5dc155701118c159837dc489820e8816906351cff8d990602401600060405180830381600087803b1580156124ff57600080fd5b505af11580156117b2573d6000803e3d6000fd5b804710156125635760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a04565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146125b0576040519150601f19603f3d011682016040523d82523d6000602084013e6125b5565b606091505b5050905080610b3a5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a04565b600a54600160a01b900460ff1661267c5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a04565b600a805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600a54600160a01b900460ff16156127685760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610a04565b600a805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586126ac3390565b610e89828260405180602001604052806000815250612bae565b60008082116128015760405162461bcd60e51b815260206004820152601060248201526f4469766973696f6e206279207a65726f60801b6044820152606401610a04565b8361280e575060006128ca565b600061281a8486613945565b9050836128278683613931565b141561283f576128378382613931565b9150506128ca565b600061284b8487613931565b9050600061285985886139fd565b905060006128678688613931565b9050600061287587896139fd565b90506128c261288e886128888685612be1565b90612bed565b6128bc61289b8686612be1565b6128bc6128a88987612be1565b6128bc8d6128b68c8b612be1565b90612be1565b90612bf9565b955050505050505b9392505050565b600f54600c54604051634065da6360e01b81526001600160a01b039182166004820152911690634065da639083906024016000604051808303818588803b15801561291b57600080fd5b505af115801561292f573d6000803e3d6000fd5b505050505050565b816001600160a01b0316836001600160a01b031614156129995760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a04565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612a118484846122f5565b612a1d84848484612c05565b6111175760405162461bcd60e51b8152600401610a04906137b6565b606081612a5d5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612a875780612a71816139e2565b9150612a809050600a83613931565b9150612a61565b60008167ffffffffffffffff811115612ab057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612ada576020820181803683370190505b5090505b84156122ed57612aef600183613964565b9150612afc600a866139fd565b612b07906030613919565b60f81b818381518110612b2a57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612b4c600a86613931565b9450612ade565b60006001600160e01b031982166380ac58cd60e01b1480612b8457506001600160e01b03198216635b5e139f60e01b145b806108d157506301ffc9a760e01b6001600160e01b03198316146108d1565b610b3a838383612d12565b612bb88383612dca565b612bc56000848484612c05565b610b3a5760405162461bcd60e51b8152600401610a04906137b6565b60006128ca8284613945565b60006128ca8284613931565b60006128ca8284613919565b60006001600160a01b0384163b15612d0757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612c49903390899088908890600401613722565b602060405180830381600087803b158015612c6357600080fd5b505af1925050508015612c93575060408051601f3d908101601f19168201909252612c909181019061355b565b60015b612ced573d808015612cc1576040519150601f19603f3d011682016040523d82523d6000602084013e612cc6565b606091505b508051612ce55760405162461bcd60e51b8152600401610a04906137b6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506122ed565b506001949350505050565b6001600160a01b038316612d6d57612d6881600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612d90565b816001600160a01b0316836001600160a01b031614612d9057612d908382612f18565b6001600160a01b038216612da757610b3a81612fb5565b826001600160a01b0316826001600160a01b031614610b3a57610b3a828261308e565b6001600160a01b038216612e205760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a04565b6000818152600260205260409020546001600160a01b031615612e855760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a04565b612e9160008383612ba3565b6001600160a01b0382166000908152600360205260408120805460019290612eba908490613919565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001612f25846111eb565b612f2f9190613964565b600083815260076020526040902054909150808214612f82576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612fc790600190613964565b60008381526009602052604081205460088054939450909284908110612ffd57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061302c57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061307257634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000613099836111eb565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b8260038101928215613100579160200282015b828111156131005782518255916020019190600101906130e5565b5061310c9291506131e7565b5090565b82805461311c906139a7565b90600052602060002090601f01602090048101928261313e5760008555613100565b82601f1061315757805160ff1916838001178555613100565b8280016001018555821561310057918201828111156131005782518255916020019190600101906130e5565b6040518061012001604052806131976131fc565b81526020016131a46131fc565b81526020016131b16131fc565b81526020016131be6131fc565b815260200160008152602001600081526020016000815260200160008152602001600081525090565b5b8082111561310c57600081556001016131e8565b60405180606001604052806003906020820280368337509192915050565b600067ffffffffffffffff8084111561323557613235613a3d565b604051601f8501601f19908116603f0116810190828211818310171561325d5761325d613a3d565b8160405280935085815286868601111561327657600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126132a0578081fd5b6040516060810181811067ffffffffffffffff821117156132c3576132c3613a3d565b6040528083606081018610156132d7578384fd5b835b60038110156132f85781358352602092830192909101906001016132d9565b509195945050505050565b600060208284031215613314578081fd5b81356128ca81613a53565b60008060408385031215613331578081fd5b823561333c81613a53565b9150602083013561334c81613a53565b809150509250929050565b60008060006060848603121561336b578081fd5b833561337681613a53565b9250602084013561338681613a53565b929592945050506040919091013590565b600080600080608085870312156133ac578081fd5b84356133b781613a53565b935060208501356133c781613a53565b925060408501359150606085013567ffffffffffffffff8111156133e9578182fd5b8501601f810187136133f9578182fd5b6134088782356020840161321a565b91505092959194509250565b60008060408385031215613426578182fd5b823561343181613a53565b9150602083013561334c81613a68565b60008060408385031215613453578182fd5b823561345e81613a53565b946020939093013593505050565b6000806020838503121561347e578182fd5b823567ffffffffffffffff80821115613495578384fd5b818501915085601f8301126134a8578384fd5b8135818111156134b6578485fd5b8660208260051b85010111156134ca578485fd5b60209290920196919550909350505050565b6000606082840312156134ed578081fd5b6128ca8383613290565b60008060808385031215613509578182fd5b6135138484613290565b9150606083013561334c81613a68565b600060208284031215613534578081fd5b81516128ca81613a68565b600060208284031215613550578081fd5b81356128ca81613a76565b60006020828403121561356c578081fd5b81516128ca81613a76565b600060208284031215613588578081fd5b813567ffffffffffffffff81111561359e578182fd5b8201601f810184136135ae578182fd5b6122ed8482356020840161321a565b6000602082840312156135ce578081fd5b5035919050565b6000602082840312156135e6578081fd5b5051919050565b8060005b60038110156111175781518452602093840193909101906001016135f1565b6000815180845261362881602086016020860161397b565b601f01601f19169290920160200192915050565b6000815161364e81856020860161397b565b9290920192915050565b600080845482600182811c91508083168061367457607f831692505b602080841082141561369457634e487b7160e01b87526022600452602487fd5b8180156136a857600181146136b9576136e5565b60ff198616895284890196506136e5565b60008b815260209020885b868110156136dd5781548b8201529085019083016136c4565b505084890196505b50505050505061371961370861370283602f60f81b815260010190565b8661363c565b64173539b7b760d91b815260050190565b95945050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061375590830184613610565b9695505050505050565b6020808252825182820181905260009190848201906040850190845b818110156137975783518352928401929184019160010161377b565b50909695505050505050565b6020815260006128ca6020830184613610565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000610220820190506138a28284516135ed565b60208301516138b460608401826135ed565b5060408301516138c760c08401826135ed565b5060608301516138db6101208401826135ed565b50608083015161018083015260a08301516101a083015260c08301516101c083015260e08301516101e0830152610100909201516102009091015290565b6000821982111561392c5761392c613a11565b500190565b60008261394057613940613a27565b500490565b600081600019048311821515161561395f5761395f613a11565b500290565b60008282101561397657613976613a11565b500390565b60005b8381101561399657818101518382015260200161397e565b838111156111175750506000910152565b600181811c908216806139bb57607f821691505b602082108114156139dc57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156139f6576139f6613a11565b5060010190565b600082613a0c57613a0c613a27565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610bab57600080fd5b8015158114610bab57600080fd5b6001600160e01b031981168114610bab57600080fdfea26469706673582212208b0b7dd5b96dfc34ebf6881fdd5f27b7dd4e762613bdfb3f785763cbfffc720864736f6c63430008040033