Address io1gcyw7u2vsprhwyz5w46qnsdy2880345l4hvqd3

Contract Overview

Balance:
1,650 IOTX

IOTX Value:
$ 99.504899

Token:
Txn Hash
Block
From
To
Value [Txn Fee]
69a5911362a015e2488a1f0d678f1644e9464434f115d89102fbd8632bd4876c 29479832 2024-04-14 21:19:50 +0000 UTC 11 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
161682ae3abc95b5d1e0a5023a1b24177566a7aa732e3ca87cdae5f01b30ee9e 29479817 2024-04-14 21:18:35 +0000 UTC 11 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
f7d12024f6cf358eb0bfb99c1670b19464aea0897eec11a53c5ee682104a0c6a 29479806 2024-04-14 21:17:40 +0000 UTC 11 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
1b935370606d2da42dc5f0552defcd94e8342b83eb215b5057e5b17f02fd591e 29479792 2024-04-14 21:16:30 +0000 UTC 11 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
0b33efd09706a3d13f10eb893458c4d804f1937e782c49be228ebe885f9d1cec 29358357 2024-04-07 20:25:00 +0000 UTC 19 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 150 IOTX 0.611817
fa73c29ff86e495b53f74ce1aff2a272e61b36276ebf28889c0d38490cfa59a8 29358301 2024-04-07 20:20:20 +0000 UTC 19 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 150 IOTX 0.607893
672a42b1e1628d985e47a497396758610bd19fee5557c82457f40ccd17536ec9 29358187 2024-04-07 20:10:50 +0000 UTC 19 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 150 IOTX 0.611817
8447ced34e646033bae6f0c256b83c9980c9c3f0702f70ac3ff53b04f81b05f2 29358157 2024-04-07 20:08:20 +0000 UTC 19 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 150 IOTX 0.605931
0378e277a81ced7b6ae3497fc9c96bd32c853acfc50e734952c59f30178ea6c2 29306397 2024-04-04 20:11:55 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
35d14897f0e296a85828ec5f8e3600dc3c5e75ce1df43489dfea11c350475e06 29306385 2024-04-04 20:10:55 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
b00e6e1d111b52ef041f20d64270611b5d48019edbfc318a31c677e030f5a20a 29306367 2024-04-04 20:09:25 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.199288
a0cc07e9c19e383aa97c96eb2059846a8be54f349d704a8252f1319669d902f2 29306357 2024-04-04 20:08:35 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.199288
276dabe19fdd0f1541ba6d776aaf431edc08c1c8d750ee6dd92a4aa3e0df9945 29306348 2024-04-04 20:07:50 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
3b6867ba2d03d356104cee0a984141f90fa39636d8783a740da57c3ac5546342 29306337 2024-04-04 20:06:55 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
1e5ade7f9ad16de3360ec27f2f7282782e1976afcadcca4c068c6fbbd2728df0 29306325 2024-04-04 20:05:55 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
738132fee6ed56a579e0dd5e5119648fdfbd1e2e46c7e96278f3eb73804b96f4 29306309 2024-04-04 20:04:35 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
8dfaad3b222006d9c694041b96f2f10b400e769aac4edf1cc619dc97c3b4cd2a 29306285 2024-04-04 20:02:35 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
370affde1716ba85eb6b22165b7a3a857e91f89bb5d5b400565d0374c04cdf51 29306228 2024-04-04 19:57:50 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
c22f2d3d0761d6455c487c90957c49facab2fa195c9784eeb38b26aa19edf37c 29306210 2024-04-04 19:56:20 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
d1c1f2c8e770700ad1f23e4c43e1433801a93769a8a33741cf6f075bcea9a689 29306185 2024-04-04 19:54:15 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
373699c35b211bff415f251324065723e9223c92d756604aeafa8b946ef42fd5 29298134 2024-04-04 08:43:20 +0000 UTC 22 days ago io1lrcezuw5hfv2tapgsrpy80s36p27uctdtvk2ff  IN    Contract: Web3Domains 150 IOTX 0.40097
d886750fa78a2875ee1024b16c7936539eb363003c5e41ac899109b5d807a133 29290237 2024-04-03 21:45:15 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 150 IOTX 0.605931
c6bebadfe4d90debf2b2ef744383711ae9c9f27ae28351ef184d8e045d45de8a 29290164 2024-04-03 21:39:10 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.198179
b63f1175a71a7e964178b036017750b15dd854ed48ad0437dcfec8116d076c41 29290084 2024-04-03 21:32:30 +0000 UTC 22 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 0 IOTX 0.087992
3f122f3f95d98927f7675925c1cf6760f4f6bf4bc6c65006181eba53afcd250d 29187051 2024-03-28 22:04:20 +0000 UTC 28 days ago io1wgf0qf4wuguvxhduyqaze5kkymma8t5hatxmtg  IN    Contract: Web3Domains 150 IOTX 1.108549
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Web3Domains

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

// SPDX-License-Identifier: MIT

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;
    }
}

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());
    }
}

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

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

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

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);
}


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;
    }
}


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;
    }
}

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);
    }
}



pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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() {
        _setOwner(_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 {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

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;
}

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);
}

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 tokenId);

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


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 {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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);
    }

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

    /**
     * @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 of token that is not own");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

pragma solidity ^0.8.0;

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();
    }
}

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);
}


library Roles {
    struct Role {
        mapping (address => bool) bearer;
    }

    /**
     * @dev Give an account access to this role.
     */
    function add(Role storage role, address account) internal {
        require(!has(role, account), "Roles: account already has role");
        role.bearer[account] = true;
    }

    /**
     * @dev Remove an account's access to this role.
     */
    function remove(Role storage role, address account) internal {
        require(has(role, account), "Roles: account does not have role");
        role.bearer[account] = false;
    }

    /**
     * @dev Check if an account has this role.
     * @return bool
     */
    function has(Role storage role, address account) internal view returns (bool) {
        require(account != address(0), "Roles: account is the zero address");
        return role.bearer[account];
    }
}

contract AdminControl is Ownable {

    using Roles for Roles.Role;

    Roles.Role private _controllerRoles;


    modifier onlyMinterController() {
      require (
        hasRole(msg.sender), 
        "AdminControl: sender must has minting role"
      );
      _;
    }

    modifier onlyMinter() {
      require (
        hasRole(msg.sender), 
        "AdminControl: sender must has minting role"
      );
      _;
    }

    constructor() {
      _grantRole(msg.sender);
    }

    function grantMinterRole (address account) public  onlyOwner {
      _grantRole(account);
    }

    function revokeMinterRole (address account) public  onlyOwner {
      _revokeRole(account);
    }

    function hasRole(address account) public view returns (bool) {
      return _controllerRoles.has(account);
    }
    
    function _grantRole (address account) internal {
      _controllerRoles.add(account);
    }

    function _revokeRole (address account) internal {
      _controllerRoles.remove(account);
    }

}



library StringUtil {

    /**
     * @dev Return the count of the dot "." in a string
    */
    function dotCount(string memory s) internal pure returns (uint) {
        s; // Don't warn about unused variables
        // Starting here means the LSB will be the byte we care about
        uint ptr;
        uint end;
        assembly {
            ptr := add(s, 1)
            end := add(mload(s), ptr)
        }
        uint num = 0;
        uint len = 0;
        for (len; ptr < end; len++) {
            uint8 b;
            assembly { b := and(mload(ptr), 0xFF) }
            if (b == 0x2e) {
                num += 1;
            }
            ptr += 1;
        }
        return num;
    }
	
	function toLower(string memory str) internal pure returns (string memory) {
        bytes memory bStr = bytes(str);
        bytes memory bLower = new bytes(bStr.length);
        for (uint i = 0; i < bStr.length; i++) {
            // Uppercase character...
            if ((uint8(bStr[i]) >= 65) && (uint8(bStr[i]) <= 90)) {
                // So we add 32 to make it lowercase
                bLower[i] = bytes1(uint8(bStr[i]) + 32);
            } else {
                bLower[i] = bStr[i];
            }
        }
        return string(bLower);
    }
	
	function toHash(string memory _s) internal pure returns (bytes32) {
        return keccak256(abi.encode(_s));
    }

    function isEmpty(string memory _s) internal pure returns (bool) {
        return bytes(_s).length == 0;
    }
	
	 function compare(string memory _a, string memory _b) internal pure returns (int) {
        bytes memory a = bytes(_a);
        bytes memory b = bytes(_b);
        uint minLength = a.length;
        if (b.length < minLength) minLength = b.length;
        //@todo unroll the loop into increments of 32 and do full 32 byte comparisons
        for (uint i = 0; i < minLength; i ++)
            if (a[i] < b[i])
                return -1;
            else if (a[i] > b[i])
                return 1;
        if (a.length < b.length)
            return -1;
        else if (a.length > b.length)
            return 1;
        else
            return 0;
    }
    /// @dev Compares two strings and returns true iff they are equal.
    function equal(string memory _a, string memory _b) internal pure returns (bool) {
        return compare(_a, _b) == 0;
    }
    /// @dev Finds the index of the first occurrence of _needle in _haystack
    function indexOf(string memory _haystack, string memory _needle) internal pure returns (int)
    {
    	bytes memory h = bytes(_haystack);
    	bytes memory n = bytes(_needle);
    	if(h.length < 1 || n.length < 1 || (n.length > h.length)) 
    		return -1;
    	else if(h.length > (2**128 -1)) // since we have to be able to return -1 (if the char isn't found or input error), this function must return an "int" type with a max length of (2^128 - 1)
    		return -1;									
    	else
    	{
    		uint subindex = 0;
    		for (uint i = 0; i < h.length; i ++)
    		{
    			if (h[i] == n[0]) // found the first char of b
    			{
    				subindex = 1;
    				while(subindex < n.length && (i + subindex) < h.length && h[i + subindex] == n[subindex]) // search until the chars don't match or until we reach the end of a or b
    				{
    					subindex++;
    				}	
    				if(subindex == n.length)
    					return int(i);
    			}
    		}
    		return -1;
    	}	
    }
	
	
}

library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

pragma solidity ^0.8.0;

abstract contract KeyStorage {
    mapping(uint256 => string) private _keys;

    function getKey(uint256 keyHash) public view returns (string memory) {
        return _keys[keyHash];
    }

    function getKeys(uint256[] calldata hashes) public view returns (string[] memory values) {
        values = new string[](hashes.length);
        for (uint256 i = 0; i < hashes.length; i++) {
            values[i] = getKey(hashes[i]);
        }
    }

    function addKey(string memory key) external {
        _addKey(uint256(keccak256(abi.encodePacked(key))), key);
    }

    function _existsKey(uint256 keyHash) internal view returns (bool) {
        return bytes(_keys[keyHash]).length > 0;
    }

    function _addKey(uint256 keyHash, string memory key) internal {
        if (!_existsKey(keyHash)) {
            _keys[keyHash] = key;
        }
    }
}

pragma solidity ^0.8.0;

interface IRecordReader {
    /**
     * @dev Function to get record.
     * @param key The key to query the value of.
     * @param tokenId The token id to fetch.
     * @return The value string.
     */
    function get(string calldata key, uint256 tokenId) external view returns (string memory);

    /**
     * @dev Function to get multiple record.
     * @param keys The keys to query the value of.
     * @param tokenId The token id to fetch.
     * @return The values.
     */
    function getMany(string[] calldata keys, uint256 tokenId) external view returns (string[] memory);

    /**
     * @dev Function get value by provied key hash.
     * @param keyHash The key to query the value of.
     * @param tokenId The token id to set.
     */
    function getByHash(uint256 keyHash, uint256 tokenId) external view returns (string memory key, string memory value);

    /**
     * @dev Function get values by provied key hashes.
     * @param keyHashes The key to query the value of.
     * @param tokenId The token id to set.
     */
    function getManyByHash(uint256[] calldata keyHashes, uint256 tokenId)
        external
        view
        returns (string[] memory keys, string[] memory values);
}

pragma solidity ^0.8.0;


interface IRecordStorage is IRecordReader {
    event Set(uint256 indexed tokenId, string indexed keyIndex, string indexed valueIndex, string key, string value);

    event NewKey(uint256 indexed tokenId, string indexed keyIndex, string key);

    event ResetRecords(uint256 indexed tokenId);

    /**
     * @dev Set record by key
     * @param key The key set the value of
     * @param value The value to set key to
     * @param tokenId ERC-721 token id to set
     */
    function set(
        string calldata key,
        string calldata value,
        uint256 tokenId
    ) external;

    /**
     * @dev Set records by keys
     * @param keys The keys set the values of
     * @param values Records values
     * @param tokenId ERC-721 token id of the domain
     */
    function setMany(
        string[] memory keys,
        string[] memory values,
        uint256 tokenId
    ) external;

    /**
     * @dev Set record by key hash
     * @param keyHash The key hash set the value of
     * @param value The value to set key to
     * @param tokenId ERC-721 token id to set
     */
    function setByHash(
        uint256 keyHash,
        string calldata value,
        uint256 tokenId
    ) external;

    /**
     * @dev Set records by key hashes
     * @param keyHashes The key hashes set the values of
     * @param values Records values
     * @param tokenId ERC-721 token id of the domain
     */
    function setManyByHash(
        uint256[] calldata keyHashes,
        string[] calldata values,
        uint256 tokenId
    ) external;

    /**
     * @dev Reset all domain records and set new ones
     * @param keys New record keys
     * @param values New record values
     * @param tokenId ERC-721 token id of the domain
     */
    function reconfigure(
        string[] memory keys,
        string[] memory values,
        uint256 tokenId
    ) external;

    /**
     * @dev Function to reset all existing records on a domain.
     * @param tokenId ERC-721 token id to set.
     */
    function reset(uint256 tokenId) external;
}

pragma solidity ^0.8.0;


abstract contract RecordStorage is KeyStorage, IRecordStorage {
    /// @dev mapping of presetIds to keyIds to values
    mapping(uint256 => mapping(uint256 => string)) internal _records;

    /// @dev mapping of tokenIds to presetIds
    mapping(uint256 => uint256) internal _tokenPresets;

    function get(string calldata key, uint256 tokenId) external view override returns (string memory value) {
        value = _get(key, tokenId);
    }

    function getMany(string[] calldata keys, uint256 tokenId) external view override returns (string[] memory values) {
        values = new string[](keys.length);
        for (uint256 i = 0; i < keys.length; i++) {
            values[i] = _get(keys[i], tokenId);
        }
    }

    function getByHash(uint256 keyHash, uint256 tokenId)
        external
        view
        override
        returns (string memory key, string memory value)
    {
        (key, value) = _getByHash(keyHash, tokenId);
    }

    function getManyByHash(uint256[] calldata keyHashes, uint256 tokenId)
        external
        view
        override
        returns (string[] memory keys, string[] memory values)
    {
        keys = new string[](keyHashes.length);
        values = new string[](keyHashes.length);
        for (uint256 i = 0; i < keyHashes.length; i++) {
            (keys[i], values[i]) = _getByHash(keyHashes[i], tokenId);
        }
    }

    function _presetOf(uint256 tokenId) internal view virtual returns (uint256) {
        return _tokenPresets[tokenId] == 0 ? tokenId : _tokenPresets[tokenId];
    }

    function _set(
        string calldata key,
        string calldata value,
        uint256 tokenId
    ) internal {
        uint256 keyHash = uint256(keccak256(abi.encodePacked(key)));
        _addKey(keyHash, key);
        _set(keyHash, key, value, tokenId);
    }

    function _setMany(
        string[] calldata keys,
        string[] calldata values,
        uint256 tokenId
    ) internal {
        for (uint256 i = 0; i < keys.length; i++) {
            _set(keys[i], values[i], tokenId);
        }
    }

    function _setByHash(
        uint256 keyHash,
        string calldata value,
        uint256 tokenId
    ) internal {
        require(_existsKey(keyHash), 'RecordStorage: KEY_NOT_FOUND');
        _set(keyHash, getKey(keyHash), value, tokenId);
    }

    function _setManyByHash(
        uint256[] calldata keyHashes,
        string[] calldata values,
        uint256 tokenId
    ) internal {
        for (uint256 i = 0; i < keyHashes.length; i++) {
            _setByHash(keyHashes[i], values[i], tokenId);
        }
    }

    function _reconfigure(
        string[] calldata keys,
        string[] calldata values,
        uint256 tokenId
    ) internal {
        _reset(tokenId);
        _setMany(keys, values, tokenId);
    }

    function _reset(uint256 tokenId) internal {
        _tokenPresets[tokenId] = uint256(keccak256(abi.encodePacked(_presetOf(tokenId))));
        emit ResetRecords(tokenId);
    }

    function _get(string memory key, uint256 tokenId) private view returns (string memory) {
        return _get(uint256(keccak256(abi.encodePacked(key))), tokenId);
    }

    function _getByHash(uint256 keyHash, uint256 tokenId)
        private
        view
        returns (string memory key, string memory value)
    {
        key = getKey(keyHash);
        value = _get(keyHash, tokenId);
    }

    function _get(uint256 keyHash, uint256 tokenId) private view returns (string memory) {
        return _records[_presetOf(tokenId)][keyHash];
    }

    function _set(
        uint256 keyHash,
        string memory key,
        string memory value,
        uint256 tokenId
    ) private {
        if (bytes(_records[_presetOf(tokenId)][keyHash]).length == 0) {
            emit NewKey(tokenId, key, key);
        }

        _records[_presetOf(tokenId)][keyHash] = value;
        emit Set(tokenId, key, value, key, value);
    }
}

pragma solidity ^0.8.0;

abstract contract WhiteList is AdminControl {

    mapping(address => uint256) public _whiteList;
	
	bool public isWhiteListActive = false;

    function setWhiteListActive(bool _isWhiteListActive) external onlyOwner {
        isWhiteListActive = _isWhiteListActive;
    }

    function addWhiteLists(address[] calldata accounts, uint256 numbers) external onlyMinterController {
        for (uint256 i = 0; i < accounts.length; i++) 
		{
            _whiteList[accounts[i]] = numbers;
        }
    }
	
	function addWhiteList(address account, uint256 numbers) external onlyMinterController {
        _whiteList[account] = numbers;
    }
	
	function numberInWhiteList(address addr) external view returns (uint256) {
        return _whiteList[addr];
    }
	
	function chkInWhiteList(address addr) external view returns (bool) {
        return _whiteList[addr] > 0;
    }
}

abstract contract BookingList is AdminControl {

    mapping(bytes => string) public _bookingList;
	
	bool public _isBookingListActive = false;

    function setBookingListActive() external onlyOwner {
        _isBookingListActive = !_isBookingListActive;
    }

    function addBookingLists(string[] calldata names) external onlyMinterController {
        for (uint256 i = 0; i < names.length; i++) 
		{
            _bookingList[bytes(names[i])] = names[i];
        }
    }
	
	function addBookingList(string calldata name) external onlyMinterController {
        _bookingList[bytes(name)] = name;
    }
	
	function removeBookingList(string calldata name) external onlyMinterController {
		delete _bookingList[bytes(name)];
    }
	
	function chkInBookingList(string calldata name) external view returns (bool) {
		string memory _name = _bookingList[bytes(name)];
        return bytes(_name).length > 0;
    }
}


pragma solidity ^0.8.0;

contract Web3Domains is ERC721, ERC721Enumerable, AdminControl, RecordStorage, WhiteList, BookingList
{
	using SafeMath for uint256;
	 
	using EnumerableSet for EnumerableSet.UintSet;  
	
	event NewURI(uint256 indexed tokenId, string tokenUri);
		
	mapping (uint256 => EnumerableSet.UintSet) private _subTokens;

	mapping (uint256 => string) public _tokenURIs;
	
	mapping(uint256 => bytes) public _nativeAddress;
	
	mapping (uint256 => address) internal _tokenResolvers;
	
	mapping(address => uint256) private _tokenReverses;

    mapping(uint256 => string) private _tlds;
	
	string private _nftBaseURI = "";
	
	bool public _saleIsActive = true;
	
	bool public _saleTwoCharIsActive = false;

	uint256 private _price = 1 ether;
	
	uint256 private _2chartimes = 100;
	
	uint256 private _3chartimes = 10;
	
	uint256 private _4chartimes = 5;
	
    modifier onlyApprovedOrOwner(uint256 tokenId) {
        require(
            _isApprovedOrOwner(_msgSender(), tokenId)
        );
        _;
    }
	
	constructor() ERC721("IoTex Web3 Domains", "IWD") {
		
	}
	
    function isApprovedOrOwner(address account, uint256 tokenId) external view returns(bool)  {
        return _isApprovedOrOwner(account, tokenId);
    }
	
	
	function getOwner(string memory domain) external view returns (address)  {
		string memory _domain = StringUtil.toLower(domain);
	    uint256 tokenId = uint256(keccak256(abi.encodePacked(_domain)));
        return ownerOf(tokenId);
    }
	
	function getDomainbyAddress(address account) external view returns (uint256[] memory tokenIds,  string[] memory domains)  {
		uint256 _balance = balanceOf(account);
        require(_balance > 0, "");	
        uint256[] memory _tokenIds = new uint256[](_balance);
        string[] memory _domains = new string[](_balance);
        for (uint256 i = 0; i < _balance; i++) {
            uint256 tokenId = tokenOfOwnerByIndex(account, i);
            string memory domain = _tokenURIs[tokenId];
            _tokenIds[i] = tokenId;
            _domains[i] = domain;
        }
        tokenIds = _tokenIds;
        domains = _domains;
    }
	
		
	function exists(uint256 tokenId) external view returns (bool) {
        return _exists(tokenId);
    }


	function getPrice() public view returns (uint256) {
        return _price;
    }
	
	function getPrice2Char() public view returns (uint256) {
        return getPrice().mul(_2chartimes);
    }
	
	function getPrice3Char() public view returns (uint256) {
        return getPrice().mul(_3chartimes);
    }
	
	function getPrice4Char() public view returns (uint256) {
        return getPrice().mul(_4chartimes);
    }
	
	function get2charTimes() public view returns (uint256) {
        return _2chartimes;
    }
	
	function get3charTimes() public view returns (uint256) {
        return _3chartimes;
    }
	
	function get4charTimes() public view returns (uint256) {
        return _4chartimes;
    }
	
	function setTimes(uint256 _2chartimenew, uint256 _3chartimenew, uint256 _4chartimenew) public onlyOwner {
		_2chartimes = _2chartimenew;
        _3chartimes = _3chartimenew;
		_4chartimes = _4chartimenew;
    }
	
	function setPrice(uint256 price) public onlyOwner {
        _price = price;
    }
	
	function setSaleStateTwoChar() public onlyOwner {
        _saleTwoCharIsActive = !_saleTwoCharIsActive;
    }
	
	function setTLD(string memory _tld) public onlyOwner {
        uint256 tokenId = genTokenId(_tld);
		_tlds[tokenId] = _tld;
    }
	
	function isTLD(string memory _tld) public view returns (bool) {
		bool isExist = false;
        uint256 tokenId = genTokenId(_tld);
		if (bytes(_tlds[tokenId]).length != 0){
            isExist = true;
        }
		return isExist;
	}
	
	function setSaleState() public onlyOwner {
        _saleIsActive = !_saleIsActive;
    }
	
	function _baseURI() internal view override returns (string memory) {
        return _nftBaseURI;
    }
    
    function setBaseURI(string memory _uri) external onlyOwner {
        _nftBaseURI = _uri;
    }
	
	function tokenURI(uint256 tokenId) public view override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory _tokenURI = _tokenURIs[tokenId];

        // If there is no base URI, return the token URI.
		string memory baseURI = _baseURI();
        if (bytes(baseURI).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(baseURI, _tokenURI));
        }
        // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.
        return string(abi.encodePacked(baseURI, tokenId));
    }

	function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }
	

	function buyDomain(string memory domain, string memory tld) external payable 
	{
		require(_saleIsActive, "Sale must be active to buy");
		
		require(bytes(tld).length != 0, "Top level domain must be non-empty");
		
		require(isTLD(tld) == true, "Top level domain not exist");
		
		require(StringUtil.dotCount(domain) == 0, "Domains cannot contain dot");
		
		uint256 _length = bytes(domain).length;
		
		require(_length != 0, "Domain must be non-empty");	
		
		require(_length >= 2, "Domain requires at least 2 characters");	
		
		  // Check BookingList
		if (_isBookingListActive == true){
			string memory name = _bookingList[bytes(domain)];
			require(bytes(name).length == 0, "This name is already reserved");
		}
		
		
	    // Check WhiteList
		if (isWhiteListActive == true){
			uint256 numbers = _whiteList[msg.sender];
			require(numbers > 0, "The address is not in the Whitelist");
			require(numbers >= balanceOf(msg.sender), "Exceeded max available to purchase");
		}
		
		if (_length == 2)
		{
			require(_saleTwoCharIsActive == true, "2 Character domain names need to be allowed to buy");
			
			require(msg.value >= getPrice().mul(_2chartimes), "Insufficient Token or Token value sent is not correct");
		}
	
		if (_length == 3)
		{
			require(msg.value >= getPrice().mul(_3chartimes), "Insufficient Token or Token value sent is not correct");
		}
		
		if (_length == 4)
		{
			require(msg.value >= getPrice().mul(_4chartimes), "Insufficient Token or Token value sent is not correct");
		}
		
		if (_length >= 5)
		{
			require(msg.value >= getPrice(), "Insufficient Token or Token value sent is not correct");
		}
		
		string memory _domain = StringUtil.toLower(domain);
		
		string memory _tld = StringUtil.toLower(tld);
		
		_domain = string(abi.encodePacked(_domain, ".", _tld));
		
		uint256 tokenId = genTokenId(_domain);
		
		require (!_exists(tokenId), "Domain already exists");
		
	   _safeMint(msg.sender, tokenId);
	   
	   _setTokenURI(tokenId, _domain);
	   
	   emit NewURI(tokenId, _domain);
    }

	function registerDomain(address to, string memory domain, string memory tld) external onlyMinterController 
	{
		require(to != address(0), "To address is null");
		
		require(bytes(tld).length != 0, "Top level domain must be non-empty");
		
		require(isTLD(tld) == true, "Top level domain not exist");
		
		require(bytes(domain).length != 0, "Domain must be non-empty");	
		
		require(StringUtil.dotCount(domain) == 0, "Domain not support");

		string memory _domain = StringUtil.toLower(domain);

		string memory _tld = StringUtil.toLower(tld);
		
		_domain = string(abi.encodePacked(_domain, ".", _tld));

		uint256 tokenId = genTokenId(_domain);
		
		require (!_exists(tokenId), "Domain already exists");
		
       _safeMint(to, tokenId);
	   
	   _setTokenURI(tokenId, _domain);
	   
	   emit NewURI(tokenId, _domain);
    }

	function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override(IERC721, ERC721)  {

        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
		
		_reset(tokenId);
		
        _transfer(from, to, tokenId);
    }

    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override(IERC721, ERC721)  {
        safeTransferFrom(from, to, tokenId, "");
    }


    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override(IERC721, ERC721) {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
		
		_reset(tokenId);
		
        _safeTransfer(from, to, tokenId, _data);
    }
		
	function burn(uint256 tokenId) public virtual {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
		
		if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
		
		if (_tokenReverses[_msgSender()] != 0) {
            delete _tokenReverses[_msgSender()];
        }
		
		if (_tokenResolvers[tokenId] != address(0)) {
            delete _tokenResolvers[tokenId];
        }
		
		_reset(tokenId);

        _burn(tokenId);
    }

    function setOwner(address to, uint256 tokenId) external onlyApprovedOrOwner(tokenId) {
        _transfer(ownerOf(tokenId), to, tokenId);
    }
	
	/**
     * Begin: set and get Reverses
     */
	function reverseOf(address account) public view returns (string memory){
        uint256 tokenId = _tokenReverses[account];
        require(tokenId != 0, 'ReverseResolver: REVERSE_RECORD_IS_EMPTY');
        require(_isApprovedOrOwner(account, tokenId), 'ReverseResolver: ACCOUNT_IS_NOT_APPROVED_OR_OWNER');
        return _tokenURIs[tokenId];
    }
	
	function setReverse(uint256 tokenId) public {
        address _sender = _msgSender();
        require(_isApprovedOrOwner(_sender, tokenId), 'ReverseResolver: SENDER_IS_NOT_APPROVED_OR_OWNER');
        _tokenReverses[_sender] = tokenId;
    }
	
	function setReverse(string memory domain) public {
		uint256 tokenId = genTokenId(domain);
        address _sender = _msgSender();
        require(_isApprovedOrOwner(_sender, tokenId), 'ReverseResolver: SENDER_IS_NOT_APPROVED_OR_OWNER');
        _tokenReverses[_sender] = tokenId;
    }
	
	function removeReverse() public {
        address _sender = _msgSender();
        uint256 tokenId = _tokenReverses[_sender];
        require(tokenId != 0, 'ReverseResolver: REVERSE_RECORD_IS_EMPTY');
        delete _tokenReverses[_sender];
    }
	/**
     * End: set and get Reverses
     */
	 
	/**
	* Begin set and get Resolver
	**/
	
	function setResolver(uint256 tokenId, address resolver) external onlyApprovedOrOwner(tokenId) {
        _setResolver(tokenId, resolver);
    }
	
	function resolverOf(string memory domain) external view returns (address) {
		uint256 tokenId = genTokenId(domain);
		if (_exists(tokenId) == false){
			return address(0);
		}
		address resolver = _tokenResolvers[tokenId];
        if (resolver == address(0)){
			resolver = address(this);
		}
        return resolver;
	}

    function resolverOf(uint256 tokenId) external view returns (address) {
		if (_exists(tokenId) == false){
			return address(0);
		}
		address resolver = _tokenResolvers[tokenId];
        if (resolver == address(0)){
			resolver = address(this);
		}
        return resolver;
    }
	
	function removeResolver(string memory domain) external {
        uint256 tokenId = genTokenId(domain);
        address _sender = _msgSender();
        require(_isApprovedOrOwner(_sender, tokenId), 'ReverseResolver: SENDER_IS_NOT_APPROVED_OR_OWNER');
        delete _tokenResolvers[tokenId];
    }
	
	function removeResolver(uint256 tokenId) external onlyApprovedOrOwner(tokenId) {
        require(tokenId != 0, 'ReverseResolver: REVERSE_RECORD_IS_EMPTY');
        delete _tokenResolvers[tokenId];
    }
    
	function _setResolver(uint256 tokenId, address resolver) internal {
        require (_exists(tokenId));
        _tokenResolvers[tokenId] = resolver;
    }
	/**
     * End:Resolver
     */

	/**
     * Begin: Subdomain
     */
    function registerSubDomain(address to, uint256 tokenId, string memory sub) external 
        onlyApprovedOrOwner(tokenId) 
    {
        _safeMintSubDomain(to, tokenId, sub, "");
    }
	
    function burnSubDomain(uint256 tokenId, string memory sub) external onlyApprovedOrOwner(tokenId) 
	{
        _burnSubDomain(tokenId, sub);
    }
	
	function _safeMintSubDomain(address to, uint256 tokenId, string memory sub, bytes memory _data) internal {
		require(to != address(0));
        require (bytes(sub).length != 0);
        require (StringUtil.dotCount(sub) == 0);
        require (_exists(tokenId));
		
		string memory _sub = StringUtil.toLower(sub);
		
        bytes memory _newUri = abi.encodePacked(_sub, ".", _tokenURIs[tokenId]);
		
		uint256 _newTokenId = genTokenId(string(_newUri));

        uint256 count = StringUtil.dotCount(_tokenURIs[tokenId]);
		
        if (count == 1) 
		{
            _subTokens[tokenId].add(_newTokenId);
        }

        if (bytes(_data).length != 0) {
            _safeMint(to, _newTokenId, _data);
        } else {
            _safeMint(to, _newTokenId);
        }
        
        _setTokenURI(_newTokenId, string(_newUri));

        emit NewURI(_newTokenId, string(_newUri));
    }
	
	function _burnSubDomain(uint256 tokenId, string memory sub) internal {
        string memory _sub = StringUtil.toLower(sub);
		
        bytes memory _newUri = abi.encodePacked(_sub, ".", _tokenURIs[tokenId]);
		
		uint256 _newTokenId = genTokenId(string(_newUri));
        // remove sub tokenIds itself
        _subTokens[tokenId].remove(_newTokenId);
		
		if (bytes(_tokenURIs[_newTokenId]).length != 0) {
            delete _tokenURIs[_newTokenId];
        }
		
        super._burn(_newTokenId);
    }
	function subTokenIdCount(uint256 tokenId) public view returns (uint256) {
        require (_exists(tokenId));
        return _subTokens[tokenId].length();
    }
	
	function subTokenIdByIndex(uint256 tokenId, uint256 index) public view returns (uint256) {
        require (subTokenIdCount(tokenId) > index);
        return _subTokens[tokenId].at(index);
    }
	/**
     * End:Subdomain
     */

  
	/**
     * Begin: System
     */
	function genTokenId(string memory label) public pure returns(uint256)  {
        require (bytes(label).length != 0);
        return uint256(keccak256(abi.encodePacked(label)));
    }

    
	function withdraw() external payable onlyOwner {
        require(payable(msg.sender).send(address(this).balance));
    }
	
	function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
		super._beforeTokenTransfer(from, to, tokenId);
	}

	function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
		return super.supportsInterface(interfaceId);
	}
	/**
     * End: System
     */
	/**
     * Begin: working with metadata like: avatar, cover, email, phone, address, social ...
     */
	function set(
        string calldata key,
        string calldata value,
        uint256 tokenId
    ) external onlyApprovedOrOwner(tokenId)  {
        _set(key, value, tokenId);
    }

    function setMany(
        string[] calldata keys,
        string[] calldata values,
        uint256 tokenId
    ) external onlyApprovedOrOwner(tokenId)  {
        _setMany(keys, values, tokenId);
    }

    function setByHash(
        uint256 keyHash,
        string calldata value,
        uint256 tokenId
    ) external override onlyApprovedOrOwner(tokenId)  {
        _setByHash(keyHash, value, tokenId);
    }

    function setManyByHash(
        uint256[] calldata keyHashes,
        string[] calldata values,
        uint256 tokenId
    ) external override onlyApprovedOrOwner(tokenId)  {
        _setManyByHash(keyHashes, values, tokenId);
    }

    function reconfigure(
        string[] calldata keys,
        string[] calldata values,
        uint256 tokenId
    ) external override onlyApprovedOrOwner(tokenId) {
        _reconfigure(keys, values, tokenId);
    }

    function reset(uint256 tokenId) external override onlyApprovedOrOwner(tokenId) {
        _reset(tokenId);
    }
	/**
     * End: metadata
     */
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"string","name":"keyIndex","type":"string"},{"indexed":false,"internalType":"string","name":"key","type":"string"}],"name":"NewKey","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"tokenUri","type":"string"}],"name":"NewURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ResetRecords","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"string","name":"keyIndex","type":"string"},{"indexed":true,"internalType":"string","name":"valueIndex","type":"string"},{"indexed":false,"internalType":"string","name":"key","type":"string"},{"indexed":false,"internalType":"string","name":"value","type":"string"}],"name":"Set","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"bytes","name":"","type":"bytes"}],"name":"_bookingList","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_isBookingListActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_nativeAddress","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_saleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_saleTwoCharIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_tokenURIs","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"_whiteList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"addBookingList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"names","type":"string[]"}],"name":"addBookingLists","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"key","type":"string"}],"name":"addKey","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"numbers","type":"uint256"}],"name":"addWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256","name":"numbers","type":"uint256"}],"name":"addWhiteLists","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"sub","type":"string"}],"name":"burnSubDomain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"domain","type":"string"},{"internalType":"string","name":"tld","type":"string"}],"name":"buyDomain","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"chkInBookingList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"chkInWhiteList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"label","type":"string"}],"name":"genTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"string","name":"key","type":"string"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"get","outputs":[{"internalType":"string","name":"value","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"get2charTimes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"get3charTimes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"get4charTimes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"keyHash","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getByHash","outputs":[{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getDomainbyAddress","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"domains","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"keyHash","type":"uint256"}],"name":"getKey","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"hashes","type":"uint256[]"}],"name":"getKeys","outputs":[{"internalType":"string[]","name":"values","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string[]","name":"keys","type":"string[]"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMany","outputs":[{"internalType":"string[]","name":"values","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"keyHashes","type":"uint256[]"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getManyByHash","outputs":[{"internalType":"string[]","name":"keys","type":"string[]"},{"internalType":"string[]","name":"values","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"domain","type":"string"}],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrice2Char","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrice3Char","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrice4Char","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"grantMinterRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isApprovedOrOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_tld","type":"string"}],"name":"isTLD","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isWhiteListActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"numberInWhiteList","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string[]","name":"keys","type":"string[]"},{"internalType":"string[]","name":"values","type":"string[]"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"reconfigure","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"domain","type":"string"},{"internalType":"string","name":"tld","type":"string"}],"name":"registerDomain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"sub","type":"string"}],"name":"registerSubDomain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name","type":"string"}],"name":"removeBookingList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"domain","type":"string"}],"name":"removeResolver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"removeResolver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"removeReverse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"reset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"domain","type":"string"}],"name":"resolverOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resolverOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"reverseOf","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeMinterRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"key","type":"string"},{"internalType":"string","name":"value","type":"string"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"set","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setBookingListActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"keyHash","type":"uint256"},{"internalType":"string","name":"value","type":"string"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"setByHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string[]","name":"keys","type":"string[]"},{"internalType":"string[]","name":"values","type":"string[]"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"setMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"keyHashes","type":"uint256[]"},{"internalType":"string[]","name":"values","type":"string[]"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"setManyByHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"resolver","type":"address"}],"name":"setResolver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"setReverse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"domain","type":"string"}],"name":"setReverse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setSaleStateTwoChar","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_tld","type":"string"}],"name":"setTLD","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_2chartimenew","type":"uint256"},{"internalType":"uint256","name":"_3chartimenew","type":"uint256"},{"internalType":"uint256","name":"_4chartimenew","type":"uint256"}],"name":"setTimes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isWhiteListActive","type":"bool"}],"name":"setWhiteListActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"subTokenIdByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"subTokenIdCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]

Contract Creation Code

6080604052600436106104e15760003560e01c80636bc2290f11610281578063b3f9e4cb1161015a578063ce92b33e116100cc578063ec129eea11610085578063ec129eea14610f77578063eceb7d5214610f97578063f25eb5c114610fb7578063f2fde38b14610fcc578063f5c1f76e14610fec578063f6283ad41461100c57600080fd5b8063ce92b33e14610e8c578063d231563014610eac578063d439daa214610ec1578063e5f9da8814610ef9578063e985e9c514610f19578063ea7b25be14610f6257600080fd5b8063bc7c8ceb1161011e578063bc7c8ceb14610dcf578063bcba4c1b14610dfd578063c479a80414610e1d578063c6438cb814610e3d578063c7bc6d6814610e52578063c87b56dd14610e6c57600080fd5b8063b3f9e4cb14610d21578063b85afd2814610d41578063b88d4fde14610d6f578063bb5b27e114610d8f578063bc7b6d6214610daf57600080fd5b80638da5cb5b116101f357806398d5fdca116101b757806398d5fdca14610c565780639cbf529d14610c6b578063a22cb46514610c8b578063a736868b14610cab578063ab3b87fe14610ce1578063ad59e22614610d0157600080fd5b80638da5cb5b14610bc35780638f704aec14610be157806391b7f5ed14610c0157806395d89b4114610c2157806398a6024314610c3657600080fd5b806377e9d00b1161024557806377e9d00b14610b0357806379f8072214610b235780637ce4538314610b435780637e37479e14610b635780637ef09bca14610b835780638a4c757714610ba357600080fd5b80636bc2290f14610a795780636e2db8d714610a8e57806370a0823114610aae578063715018a614610ace57806376f909ae14610ae357600080fd5b80633dd1eb61116103be5780634f558e7911610330578063573f5dae116102e9578063573f5dae146109c45780635d893ba0146109de5780636352211e146109f85780636506437014610a18578063672b9f8114610a2b57806369e2f0fb14610a5957600080fd5b80634f558e79146109045780634f6ccce71461092457806350382c1a1461094457806350b3a14414610964578063559f74141461098457806355f804b3146109a457600080fd5b8063434d8aca11610382578063434d8aca1461085a5780634500d4491461087a57806347c816991461088f5780634a72584d146108af5780634aaf4a12146108cf5780634cd637b5146108ef57600080fd5b80633dd1eb61146107ba578063426932c7146107da57806342842e0e146107fa57806342966c681461081a578063430c20811461083a57600080fd5b80631ed40559116104575780632dc50d9a1161041b5780632dc50d9a1461071d5780632f745c591461073d578063310bd74b1461075d578063358deb1c1461077d578063384e9a55146107925780633ccfd60b146107b257600080fd5b80631ed40559146106885780632319afde1461069d57806323b872dd146106bd57806323bbde56146106dd57806327f18975146106fd57600080fd5b8063095ea7b3116104a9578063095ea7b3146105cf5780630bb78ec1146105f1578063157c61381461061157806318160ddd146106265780631bd8cc1a1461063b5780631be5e7ed1461066857600080fd5b806301ffc9a7146104e65780630302e9531461051b57806305d60ffb1461053a57806306fdde0314610575578063081812fc14610597575b600080fd5b3480156104f257600080fd5b50610506610501366004614ca3565b61102c565b60405190151581526020015b60405180910390f35b34801561052757600080fd5b50601a5461050690610100900460ff1681565b34801561054657600080fd5b50610567610555366004614cdc565b600f6020526000908152604090205481565b604051908152602001610512565b34801561058157600080fd5b5061058a61103d565b6040516105129190614d4f565b3480156105a357600080fd5b506105b76105b2366004614d62565b6110cf565b6040516001600160a01b039091168152602001610512565b3480156105db57600080fd5b506105ef6105ea366004614d7b565b61115c565b005b3480156105fd57600080fd5b5061058a61060c366004614d62565b611272565b34801561061d57600080fd5b5061056761130c565b34801561063257600080fd5b50600854610567565b34801561064757600080fd5b5061065b610656366004614df0565b611328565b6040516105129190614e93565b34801561067457600080fd5b5061058a610683366004614ee7565b61141e565b34801561069457600080fd5b506105ef611469565b3480156106a957600080fd5b506105ef6106b8366004614f1e565b6114a7565b3480156106c957600080fd5b506105ef6106d8366004614f5f565b61155c565b3480156106e957600080fd5b506105ef6106f836600461503d565b611597565b34801561070957600080fd5b506105ef610718366004615071565b6115eb565b34801561072957600080fd5b506105676107383660046150e4565b611613565b34801561074957600080fd5b50610567610758366004614d7b565b611648565b34801561076957600080fd5b506105ef610778366004614d62565b6116de565b34801561078957600080fd5b50601d54610567565b34801561079e57600080fd5b506105ef6107ad366004614d62565b6116fe565b6105ef61173f565b3480156107c657600080fd5b506105ef6107d5366004614cdc565b61178f565b3480156107e657600080fd5b506105ef6107f5366004614df0565b6117c5565b34801561080657600080fd5b506105ef610815366004614f5f565b611853565b34801561082657600080fd5b506105ef610835366004614d62565b61186e565b34801561084657600080fd5b50610506610855366004614d7b565b611985565b34801561086657600080fd5b5061058a61087536600461503d565b611991565b34801561088657600080fd5b506105ef6119b5565b34801561089b57600080fd5b506105ef6108aa366004615106565b6119fc565b3480156108bb57600080fd5b506105ef6108ca366004615167565b611a1c565b3480156108db57600080fd5b506105b76108ea36600461503d565b611a42565b3480156108fb57600080fd5b50610567611a87565b34801561091057600080fd5b5061050661091f366004614d62565b611a98565b34801561093057600080fd5b5061056761093f366004614d62565b611aa3565b34801561095057600080fd5b506105ef61095f36600461503d565b611b36565b34801561097057600080fd5b5061056761097f36600461503d565b611b69565b34801561099057600080fd5b506105ef61099f3660046151b9565b611ba9565b3480156109b057600080fd5b506105ef6109bf36600461503d565b611bfc565b3480156109d057600080fd5b506010546105069060ff1681565b3480156109ea57600080fd5b50601a546105069060ff1681565b348015610a0457600080fd5b506105b7610a13366004614d62565b611c39565b6105ef610a263660046151ee565b611cb0565b348015610a3757600080fd5b50610a4b610a463660046150e4565b612299565b604051610512929190615251565b348015610a6557600080fd5b506105ef610a74366004614cdc565b6122b1565b348015610a8557600080fd5b50601c54610567565b348015610a9a57600080fd5b506105ef610aa9366004614d7b565b6122e4565b348015610aba57600080fd5b50610567610ac9366004614cdc565b612325565b348015610ada57600080fd5b506105ef6123ac565b348015610aef57600080fd5b50610567610afe366004614d62565b6123e0565b348015610b0f57600080fd5b506105ef610b1e36600461527f565b61240b565b348015610b2f57600080fd5b506105b7610b3e36600461503d565b61262a565b348015610b4f57600080fd5b506105ef610b5e3660046151b9565b612674565b348015610b6f57600080fd5b5061058a610b7e366004614cdc565b6126c5565b348015610b8f57600080fd5b50610506610b9e366004614cdc565b61280d565b348015610baf57600080fd5b506105ef610bbe366004614d62565b61281a565b348015610bcf57600080fd5b50600b546001600160a01b03166105b7565b348015610bed57600080fd5b506105ef610bfc3660046152f2565b612869565b348015610c0d57600080fd5b506105ef610c1c366004614d62565b6128a1565b348015610c2d57600080fd5b5061058a6128d0565b348015610c4257600080fd5b506105ef610c5136600461531e565b6128df565b348015610c6257600080fd5b50601b54610567565b348015610c7757600080fd5b506105ef610c8636600461503d565b61290d565b348015610c9757600080fd5b506105ef610ca636600461537a565b61295c565b348015610cb757600080fd5b50610567610cc6366004614cdc565b6001600160a01b03166000908152600f602052604090205490565b348015610ced57600080fd5b506105ef610cfc366004614d7b565b612a21565b348015610d0d57600080fd5b506105ef610d1c36600461503d565b612a47565b348015610d2d57600080fd5b506105b7610d3c366004614d62565b612aa0565b348015610d4d57600080fd5b50610d61610d5c366004614df0565b612adc565b6040516105129291906153a4565b348015610d7b57600080fd5b506105ef610d8a3660046153c9565b612bfe565b348015610d9b57600080fd5b5061058a610daa366004614d62565b612c39565b348015610dbb57600080fd5b506105ef610dca366004615430565b612cdb565b348015610ddb57600080fd5b50610def610dea366004614cdc565b612cf8565b604051610512929190615453565b348015610e0957600080fd5b5061058a610e18366004614d62565b612edb565b348015610e2957600080fd5b506105ef610e383660046154aa565b612ef4565b348015610e4957600080fd5b50610567612f11565b348015610e5e57600080fd5b506012546105069060ff1681565b348015610e7857600080fd5b5061058a610e87366004614d62565b612f22565b348015610e9857600080fd5b506105ef610ea7366004615071565b61308c565b348015610eb857600080fd5b50601e54610567565b348015610ecd57600080fd5b50610506610edc366004614cdc565b6001600160a01b03166000908152600f6020526040902054151590565b348015610f0557600080fd5b50610506610f1436600461503d565b6130ac565b348015610f2557600080fd5b50610506610f343660046154e6565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610f6e57600080fd5b506105ef6130e9565b348015610f8357600080fd5b506105ef610f92366004615071565b613127565b348015610fa357600080fd5b506105ef610fb2366004615510565b613147565b348015610fc357600080fd5b506105ef613184565b348015610fd857600080fd5b506105ef610fe7366004614cdc565b6131cc565b348015610ff857600080fd5b5061065b611007366004614f1e565b613264565b34801561101857600080fd5b506105066110273660046151b9565b613310565b600061103782613444565b92915050565b60606000805461104c9061552b565b80601f01602080910402602001604051908101604052809291908181526020018280546110789061552b565b80156110c55780601f1061109a576101008083540402835291602001916110c5565b820191906000526020600020905b8154815290600101906020018083116110a857829003601f168201915b5050505050905090565b60006110da82613469565b6111405760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061116782611c39565b9050806001600160a01b0316836001600160a01b031614156111d55760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401611137565b336001600160a01b03821614806111f157506111f18133610f34565b6112635760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401611137565b61126d8383613486565b505050565b6014602052600090815260409020805461128b9061552b565b80601f01602080910402602001604051908101604052809291908181526020018280546112b79061552b565b80156113045780601f106112d957610100808354040283529160200191611304565b820191906000526020600020905b8154815290600101906020018083116112e757829003601f168201915b505050505081565b6000611323601c5461131d601b5490565b906134f4565b905090565b6060826001600160401b0381111561134257611342614f9b565b60405190808252806020026020018201604052801561137557816020015b60608152602001906001900390816113605790505b50905060005b83811015611416576113e685858381811061139857611398615566565b90506020028101906113aa919061557c565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250879250613500915050565b8282815181106113f8576113f8615566565b6020026020010181905250808061140e906155d8565b91505061137b565b509392505050565b606061146184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250869250613500915050565b949350505050565b600b546001600160a01b031633146114935760405162461bcd60e51b8152600401611137906155f3565b601a805460ff19811660ff90911615179055565b6114b03361280d565b6114cc5760405162461bcd60e51b815260040161113790615628565b60005b8181101561126d578282828181106114e9576114e9615566565b90506020028101906114fb919061557c565b601185858581811061150f5761150f615566565b9050602002810190611521919061557c565b60405161152f929190615672565b908152604051908190036020019020611549929091614b4a565b5080611554816155d8565b9150506114cf565b611567335b82613535565b6115835760405162461bcd60e51b815260040161113790615682565b61158c8161361b565b61126d838383613688565b60006115a282611b69565b9050336115af8183613535565b6115cb5760405162461bcd60e51b8152600401611137906156d3565b50600090815260166020526040902080546001600160a01b031916905550565b806115f533611561565b6115fe57600080fd5b61160b8686868686613833565b505050505050565b60008161161f846123e0565b1161162957600080fd5b60008381526013602052604090206116419083613896565b9392505050565b600061165383612325565b82106116b55760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401611137565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b806116e833611561565b6116f157600080fd5b6116fa8261361b565b5050565b336117098183613535565b6117255760405162461bcd60e51b8152600401611137906156d3565b6001600160a01b0316600090815260176020526040902055565b600b546001600160a01b031633146117695760405162461bcd60e51b8152600401611137906155f3565b60405133904780156108fc02916000818181858888f1935050505061178d57600080fd5b565b600b546001600160a01b031633146117b95760405162461bcd60e51b8152600401611137906155f3565b6117c2816138a2565b50565b6117ce3361280d565b6117ea5760405162461bcd60e51b815260040161113790615628565b60005b8281101561184d5781600f600086868581811061180c5761180c615566565b90506020020160208101906118219190614cdc565b6001600160a01b0316815260208101919091526040016000205580611845816155d8565b9150506117ed565b50505050565b61126d83838360405180602001604052806000815250612bfe565b61187733611561565b6118dc5760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401611137565b600081815260146020526040902080546118f59061552b565b15905061191357600081815260146020526040812061191391614bca565b336000908152601760205260409020541561193957336000908152601760205260408120555b6000818152601660205260409020546001600160a01b03161561197357600081815260166020526040902080546001600160a01b03191690555b61197c8161361b565b6117c2816138ad565b60006116418383613535565b80516020818301810180516011825292820191909301209152805461128b9061552b565b600b546001600160a01b031633146119df5760405162461bcd60e51b8152600401611137906155f3565b601a805461ff001981166101009182900460ff1615909102179055565b80611a0633611561565b611a0f57600080fd5b61160b8686868686613954565b80611a2633611561565b611a2f57600080fd5b611a3b85858585613a33565b5050505050565b600080611a4e83613ad3565b9050600081604051602001611a639190615723565b6040516020818303038152906040528051906020012060001c905061146181611c39565b6000611323601e5461131d601b5490565b600061103782613469565b6000611aae60085490565b8210611b115760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401611137565b60088281548110611b2457611b24615566565b90600052602060002001549050919050565b6117c281604051602001611b4a9190615723565b6040516020818303038152906040528051906020012060001c82613c2d565b6000815160001415611b7a57600080fd5b81604051602001611b8b9190615723565b60408051601f19818403018152919052805160209091012092915050565b611bb23361280d565b611bce5760405162461bcd60e51b815260040161113790615628565b818160118484604051611be2929190615672565b90815260405190819003602001902061126d929091614b4a565b600b546001600160a01b03163314611c265760405162461bcd60e51b8152600401611137906155f3565b80516116fa906019906020840190614c04565b6000818152600260205260408120546001600160a01b0316806110375760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401611137565b601a5460ff16611d025760405162461bcd60e51b815260206004820152601a60248201527f53616c65206d7573742062652061637469766520746f206275790000000000006044820152606401611137565b8051611d205760405162461bcd60e51b81526004016111379061573f565b611d29816130ac565b1515600114611d7a5760405162461bcd60e51b815260206004820152601a60248201527f546f70206c6576656c20646f6d61696e206e6f742065786973740000000000006044820152606401611137565b611d8382613c59565b15611dd05760405162461bcd60e51b815260206004820152601a60248201527f446f6d61696e732063616e6e6f7420636f6e7461696e20646f740000000000006044820152606401611137565b815180611e1a5760405162461bcd60e51b8152602060048201526018602482015277446f6d61696e206d757374206265206e6f6e2d656d70747960401b6044820152606401611137565b6002811015611e795760405162461bcd60e51b815260206004820152602560248201527f446f6d61696e207265717569726573206174206c656173742032206368617261604482015264637465727360d81b6064820152608401611137565b60125460ff16151560011415611f87576000601184604051611e9b9190615723565b90815260200160405180910390208054611eb49061552b565b80601f0160208091040260200160405190810160405280929190818152602001828054611ee09061552b565b8015611f2d5780601f10611f0257610100808354040283529160200191611f2d565b820191906000526020600020905b815481529060010190602001808311611f1057829003601f168201915b505050505090508051600014611f855760405162461bcd60e51b815260206004820152601d60248201527f54686973206e616d6520697320616c72656164792072657365727665640000006044820152606401611137565b505b60105460ff1615156001141561206557336000908152600f6020526040902054806120005760405162461bcd60e51b815260206004820152602360248201527f5468652061646472657373206973206e6f7420696e207468652057686974656c6044820152621a5cdd60ea1b6064820152608401611137565b61200933612325565b8110156120635760405162461bcd60e51b815260206004820152602260248201527f4578636565646564206d617820617661696c61626c6520746f20707572636861604482015261736560f01b6064820152608401611137565b505b806002141561211457601a5460ff6101009091041615156001146120e65760405162461bcd60e51b815260206004820152603260248201527f322043686172616374657220646f6d61696e206e616d6573206e65656420746f60448201527120626520616c6c6f77656420746f2062757960701b6064820152608401611137565b6120f5601c5461131d601b5490565b3410156121145760405162461bcd60e51b815260040161113790615781565b806003141561214b5761212c601d5461131d601b5490565b34101561214b5760405162461bcd60e51b815260040161113790615781565b806004141561218257612163601e5461131d601b5490565b3410156121825760405162461bcd60e51b815260040161113790615781565b600581106121ac57601b543410156121ac5760405162461bcd60e51b815260040161113790615781565b60006121b784613ad3565b905060006121c484613ad3565b905081816040516020016121d99291906157d6565b604051602081830303815290604052915060006121f583611b69565b905061220081613469565b156122455760405162461bcd60e51b8152602060048201526015602482015274446f6d61696e20616c72656164792065786973747360581b6044820152606401611137565b61224f3382613cb8565b6122598184613cd2565b807fc5beef08f693b11c316c0c8394a377a0033c9cf701b8cd8afd79cecef60c3952846040516122899190614d4f565b60405180910390a2505050505050565b6060806122a68484613d5b565b909590945092505050565b600b546001600160a01b031633146122db5760405162461bcd60e51b8152600401611137906155f3565b6117c281613d7c565b6122ed3361280d565b6123095760405162461bcd60e51b815260040161113790615628565b6001600160a01b039091166000908152600f6020526040902055565b60006001600160a01b0382166123905760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401611137565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b031633146123d65760405162461bcd60e51b8152600401611137906155f3565b61178d6000613d87565b60006123eb82613469565b6123f457600080fd5b600082815260136020526040902061103790613dd9565b6124143361280d565b6124305760405162461bcd60e51b815260040161113790615628565b6001600160a01b03831661247b5760405162461bcd60e51b8152602060048201526012602482015271151bc81859191c995cdcc81a5cc81b9d5b1b60721b6044820152606401611137565b80516124995760405162461bcd60e51b81526004016111379061573f565b6124a2816130ac565b15156001146124f35760405162461bcd60e51b815260206004820152601a60248201527f546f70206c6576656c20646f6d61696e206e6f742065786973740000000000006044820152606401611137565b815161253c5760405162461bcd60e51b8152602060048201526018602482015277446f6d61696e206d757374206265206e6f6e2d656d70747960401b6044820152606401611137565b61254582613c59565b156125875760405162461bcd60e51b8152602060048201526012602482015271111bdb585a5b881b9bdd081cdd5c1c1bdc9d60721b6044820152606401611137565b600061259283613ad3565b9050600061259f83613ad3565b905081816040516020016125b49291906157d6565b604051602081830303815290604052915060006125d083611b69565b90506125db81613469565b156126205760405162461bcd60e51b8152602060048201526015602482015274446f6d61696e20616c72656164792065786973747360581b6044820152606401611137565b61224f8682613cb8565b60008061263683611b69565b905061264181613469565b61264e5750600092915050565b6000818152601660205260409020546001600160a01b0316806116415750309392505050565b61267d3361280d565b6126995760405162461bcd60e51b815260040161113790615628565b601182826040516126ab929190615672565b908152602001604051809103902060006116fa9190614bca565b6001600160a01b038116600090815260176020526040902054606090806126fe5760405162461bcd60e51b815260040161113790615812565b6127088382613535565b61276e5760405162461bcd60e51b815260206004820152603160248201527f526576657273655265736f6c7665723a204143434f554e545f49535f4e4f545f60448201527020a8282927ab22a22fa7a92fa7aba722a960791b6064820152608401611137565b600081815260146020526040902080546127879061552b565b80601f01602080910402602001604051908101604052809291908181526020018280546127b39061552b565b80156128005780601f106127d557610100808354040283529160200191612800565b820191906000526020600020905b8154815290600101906020018083116127e357829003601f168201915b5050505050915050919050565b6000611037600c83613de3565b8061282433611561565b61282d57600080fd5b8161284a5760405162461bcd60e51b815260040161113790615812565b50600090815260166020526040902080546001600160a01b0319169055565b600b546001600160a01b031633146128935760405162461bcd60e51b8152600401611137906155f3565b601c92909255601d55601e55565b600b546001600160a01b031633146128cb5760405162461bcd60e51b8152600401611137906155f3565b601b55565b60606001805461104c9061552b565b816128e933611561565b6128f257600080fd5b61184d84848460405180602001604052806000815250613e66565b600061291882611b69565b9050336129258183613535565b6129415760405162461bcd60e51b8152600401611137906156d3565b6001600160a01b031660009081526017602052604090205550565b6001600160a01b0382163314156129b55760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401611137565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b80612a2b33611561565b612a3457600080fd5b61126d612a4083611c39565b8484613688565b600b546001600160a01b03163314612a715760405162461bcd60e51b8152600401611137906155f3565b6000612a7c82611b69565b6000818152601860209081526040909120845192935061126d929091850190614c04565b6000612aab82613469565b612ab757506000919050565b6000828152601660205260409020546001600160a01b03168061103757503092915050565b606080836001600160401b03811115612af757612af7614f9b565b604051908082528060200260200182016040528015612b2a57816020015b6060815260200190600190039081612b155790505b509150836001600160401b03811115612b4557612b45614f9b565b604051908082528060200260200182016040528015612b7857816020015b6060815260200190600190039081612b635790505b50905060005b84811015612bf557612ba8868683818110612b9b57612b9b615566565b9050602002013585613d5b565b848381518110612bba57612bba615566565b60200260200101848481518110612bd357612bd3615566565b6020026020010182905282905250508080612bed906155d8565b915050612b7e565b50935093915050565b612c083383613535565b612c245760405162461bcd60e51b815260040161113790615682565b612c2d8261361b565b61184d84848484614033565b6000818152600a60205260409020805460609190612c569061552b565b80601f0160208091040260200160405190810160405280929190818152602001828054612c829061552b565b8015612ccf5780601f10612ca457610100808354040283529160200191612ccf565b820191906000526020600020905b815481529060010190602001808311612cb257829003601f168201915b50505050509050919050565b81612ce533611561565b612cee57600080fd5b61126d8383614066565b6060806000612d0684612325565b905060008111612d325760405162461bcd60e51b81526020600482015260006024820152604401611137565b6000816001600160401b03811115612d4c57612d4c614f9b565b604051908082528060200260200182016040528015612d75578160200160208202803683370190505b5090506000826001600160401b03811115612d9257612d92614f9b565b604051908082528060200260200182016040528015612dc557816020015b6060815260200190600190039081612db05790505b50905060005b83811015612ecf576000612ddf8883611648565b600081815260146020526040812080549293509091612dfd9061552b565b80601f0160208091040260200160405190810160405280929190818152602001828054612e299061552b565b8015612e765780601f10612e4b57610100808354040283529160200191612e76565b820191906000526020600020905b815481529060010190602001808311612e5957829003601f168201915b5050505050905081858481518110612e9057612e90615566565b60200260200101818152505080848481518110612eaf57612eaf615566565b602002602001018190525050508080612ec7906155d8565b915050612dcb565b50909590945092505050565b6015602052600090815260409020805461128b9061552b565b81612efe33611561565b612f0757600080fd5b61126d83836140a6565b6000611323601d5461131d601b5490565b6060612f2d82613469565b612f915760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401611137565b60008281526014602052604081208054612faa9061552b565b80601f0160208091040260200160405190810160405280929190818152602001828054612fd69061552b565b80156130235780601f10612ff857610100808354040283529160200191613023565b820191906000526020600020905b81548152906001019060200180831161300657829003601f168201915b505050505090506000613034614152565b9050805160001415613047575092915050565b81511561307957808260405160200161306192919061585a565b60405160208183030381529060405292505050919050565b8084604051602001613061929190615889565b8061309633611561565b61309f57600080fd5b61160b8686868686614161565b600080806130b984611b69565b60008181526018602052604090208054919250906130d69061552b565b1590506130e257600191505b5092915050565b600b546001600160a01b031633146131135760405162461bcd60e51b8152600401611137906155f3565b6012805460ff19811660ff90911615179055565b8061313133611561565b61313a57600080fd5b61160b86868686866141cf565b600b546001600160a01b031633146131715760405162461bcd60e51b8152600401611137906155f3565b6010805460ff1916911515919091179055565b33600081815260176020526040902054806131b15760405162461bcd60e51b815260040161113790615812565b506001600160a01b0316600090815260176020526040812055565b600b546001600160a01b031633146131f65760405162461bcd60e51b8152600401611137906155f3565b6001600160a01b03811661325b5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401611137565b6117c281613d87565b6060816001600160401b0381111561327e5761327e614f9b565b6040519080825280602002602001820160405280156132b157816020015b606081526020019060019003908161329c5790505b50905060005b828110156130e2576132e08484838181106132d4576132d4615566565b90506020020135612c39565b8282815181106132f2576132f2615566565b60200260200101819052508080613308906155d8565b9150506132b7565b60008060118484604051613325929190615672565b9081526020016040518091039020805461333e9061552b565b80601f016020809104026020016040519081016040528092919081815260200182805461336a9061552b565b80156133b75780601f1061338c576101008083540402835291602001916133b7565b820191906000526020600020905b81548152906001019060200180831161339a57829003601f168201915b505092511515979650505050505050565b6133d28282613de3565b1561341f5760405162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c65006044820152606401611137565b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b60006001600160e01b0319821663780e9d6360e01b14806110375750611037826141e5565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906134bb82611c39565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061164182846158ab565b6060611641836040516020016135169190615723565b6040516020818303038152906040528051906020012060001c83614235565b600061354082613469565b6135a15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401611137565b60006135ac83611c39565b9050806001600160a01b0316846001600160a01b031614806135e75750836001600160a01b03166135dc846110cf565b6001600160a01b0316145b8061146157506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff16611461565b613624816142f4565b60405160200161363691815260200190565b60408051601f1981840301815282825280516020918201206000858152600e9092529181209190915582917f185c30856dadb58bf097c1f665a52ada7029752dbcad008ea3fefc73bee8c9fe9190a250565b826001600160a01b031661369b82611c39565b6001600160a01b0316146137035760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401611137565b6001600160a01b0382166137655760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401611137565b613770838383614320565b61377b600082613486565b6001600160a01b03831660009081526003602052604081208054600192906137a49084906158ca565b90915550506001600160a01b03821660009081526003602052604081208054600192906137d29084906158e1565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60005b8481101561160b5761388486868381811061385357613853615566565b9050602002013585858481811061386c5761386c615566565b905060200281019061387e919061557c565b85613a33565b8061388e816155d8565b915050613836565b6000611641838361432b565b6117c2600c826133c8565b60006138b882611c39565b90506138c681600084614320565b6138d1600083613486565b6001600160a01b03811660009081526003602052604081208054600192906138fa9084906158ca565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60008585604051602001613969929190615672565b60408051601f198184030181528282528051602091820120601f89018290048202840182019092528783529092506139bd9183918990899081908401838280828437600092019190915250613c2d92505050565b61160b8187878080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525050604080516020601f8b018190048102820181019092528981529250899150889081908401838280828437600092019190915250889250614355915050565b613a3c84614490565b613a885760405162461bcd60e51b815260206004820152601c60248201527f5265636f726453746f726167653a204b45595f4e4f545f464f554e44000000006044820152606401611137565b61184d84613a9586612c39565b85858080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250879250614355915050565b60606000829050600081516001600160401b03811115613af557613af5614f9b565b6040519080825280601f01601f191660200182016040528015613b1f576020820181803683370190505b50905060005b8251811015611416576041838281518110613b4257613b42615566565b016020015160f81c10801590613b725750605a838281518110613b6757613b67615566565b016020015160f81c11155b15613bd457828181518110613b8957613b89615566565b602001015160f81c60f81b60f81c6020613ba391906158f9565b60f81b828281518110613bb857613bb8615566565b60200101906001600160f81b031916908160001a905350613c1b565b828181518110613be657613be6615566565b602001015160f81c60f81b828281518110613c0357613c03615566565b60200101906001600160f81b031916908160001a9053505b80613c25816155d8565b915050613b25565b613c3682614490565b6116fa576000828152600a60209081526040909120825161126d92840190614c04565b805160009060018381019184010182805b82841015613caf57835160ff16602e811415613c8e57613c8b6001846158e1565b92505b613c996001866158e1565b9450508080613ca7906155d8565b915050613c6a565b50949350505050565b6116fa8282604051806020016040528060008152506144b6565b613cdb82613469565b613d3c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732314d657461646174613a2055524920736574206f66206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401611137565b6000828152601460209081526040909120825161126d92840190614c04565b606080613d6784612c39565b9150613d738484614235565b90509250929050565b6117c2600c826144e9565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000611037825490565b60006001600160a01b038216613e465760405162461bcd60e51b815260206004820152602260248201527f526f6c65733a206163636f756e7420697320746865207a65726f206164647265604482015261737360f01b6064820152608401611137565b506001600160a01b03166000908152602091909152604090205460ff1690565b6001600160a01b038416613e7957600080fd5b8151613e8457600080fd5b613e8d82613c59565b15613e9757600080fd5b613ea083613469565b613ea957600080fd5b6000613eb483613ad3565b905060008160146000878152602001908152602001600020604051602001613edd92919061591e565b60405160208183030381529060405290506000613ef982611b69565b90506000613fa1601460008981526020019081526020016000208054613f1e9061552b565b80601f0160208091040260200160405190810160405280929190818152602001828054613f4a9061552b565b8015613f975780601f10613f6c57610100808354040283529160200191613f97565b820191906000526020600020905b815481529060010190602001808311613f7a57829003601f168201915b5050505050613c59565b90508060011415613fc6576000878152601360205260409020613fc4908361456b565b505b845115613fdd57613fd88883876144b6565b613fe7565b613fe78883613cb8565b613ff18284613cd2565b817fc5beef08f693b11c316c0c8394a377a0033c9cf701b8cd8afd79cecef60c3952846040516140219190614d4f565b60405180910390a25050505050505050565b61403e848484613688565b61404a84848484614577565b61184d5760405162461bcd60e51b8152600401611137906159de565b61406f82613469565b61407857600080fd5b60009182526016602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b60006140b182613ad3565b9050600081601460008681526020019081526020016000206040516020016140da92919061591e565b604051602081830303815290604052905060006140f682611b69565b60008681526013602052604090209091506141119082614675565b506000818152601460205260409020805461412b9061552b565b15905061414957600081815260146020526040812061414991614bca565b611a3b816138ad565b60606019805461104c9061552b565b60005b8481101561160b576141bd86868381811061418157614181615566565b9050602002810190614193919061557c565b8686858181106141a5576141a5615566565b90506020028101906141b7919061557c565b86613954565b806141c7816155d8565b915050614164565b6141d88161361b565b611a3b8585858585614161565b60006001600160e01b031982166380ac58cd60e01b148061421657506001600160e01b03198216635b5e139f60e01b145b8061103757506301ffc9a760e01b6001600160e01b0319831614611037565b6060600d6000614244846142f4565b81526020019081526020016000206000848152602001908152602001600020805461426e9061552b565b80601f016020809104026020016040519081016040528092919081815260200182805461429a9061552b565b80156142e75780601f106142bc576101008083540402835291602001916142e7565b820191906000526020600020905b8154815290600101906020018083116142ca57829003601f168201915b5050505050905092915050565b6000818152600e60205260408120541561431c576000828152600e6020526040902054611037565b5090565b61126d838383614681565b600082600001828154811061434257614342615566565b9060005260206000200154905092915050565b600d6000614362836142f4565b81526020019081526020016000206000858152602001908152602001600020805461438c9061552b565b151590506143e357826040516143a29190615723565b6040518091039020817f7ae4f661958fbecc2f77be6b0eb280d2a6f604b29e1e7221c82b9da0c4af7f86856040516143da9190614d4f565b60405180910390a35b81600d60006143f1846142f4565b815260200190815260200160002060008681526020019081526020016000209080519060200190614423929190614c04565b50816040516144329190615723565b6040518091039020836040516144489190615723565b6040518091039020827f851ffe8e74d5015261dba0a1f9e1b0e5d42c5af5d2ad1908fee897c7d80a0d928686604051614482929190615251565b60405180910390a450505050565b6000818152600a6020526040812080548291906144ac9061552b565b9050119050919050565b6144c08383614739565b6144cd6000848484614577565b61126d5760405162461bcd60e51b8152600401611137906159de565b6144f38282613de3565b6145495760405162461bcd60e51b815260206004820152602160248201527f526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c6044820152606560f81b6064820152608401611137565b6001600160a01b0316600090815260209190915260409020805460ff19169055565b60006116418383614878565b60006001600160a01b0384163b1561466a57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906145bb903390899088908890600401615a30565b6020604051808303816000875af19250505080156145f6575060408051601f3d908101601f191682019092526145f391810190615a63565b60015b614650573d808015614624576040519150601f19603f3d011682016040523d82523d6000602084013e614629565b606091505b5080516146485760405162461bcd60e51b8152600401611137906159de565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611461565b506001949350505050565b600061164183836148c7565b6001600160a01b0383166146dc576146d781600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6146ff565b816001600160a01b0316836001600160a01b0316146146ff576146ff83826149ba565b6001600160a01b0382166147165761126d81614a57565b826001600160a01b0316826001600160a01b03161461126d5761126d8282614b06565b6001600160a01b03821661478f5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401611137565b61479881613469565b156147e55760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401611137565b6147f160008383614320565b6001600160a01b038216600090815260036020526040812080546001929061481a9084906158e1565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008181526001830160205260408120546148bf57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611037565b506000611037565b600081815260018301602052604081205480156149b05760006148eb6001836158ca565b85549091506000906148ff906001906158ca565b905081811461496457600086600001828154811061491f5761491f615566565b906000526020600020015490508087600001848154811061494257614942615566565b6000918252602080832090910192909255918252600188019052604090208390555b855486908061497557614975615a80565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611037565b6000915050611037565b600060016149c784612325565b6149d191906158ca565b600083815260076020526040902054909150808214614a24576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090614a69906001906158ca565b60008381526009602052604081205460088054939450909284908110614a9157614a91615566565b906000526020600020015490508060088381548110614ab257614ab2615566565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480614aea57614aea615a80565b6001900381819060005260206000200160009055905550505050565b6000614b1183612325565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b828054614b569061552b565b90600052602060002090601f016020900481019282614b785760008555614bbe565b82601f10614b915782800160ff19823516178555614bbe565b82800160010185558215614bbe579182015b82811115614bbe578235825591602001919060010190614ba3565b5061431c929150614c78565b508054614bd69061552b565b6000825580601f10614be6575050565b601f0160209004906000526020600020908101906117c29190614c78565b828054614c109061552b565b90600052602060002090601f016020900481019282614c325760008555614bbe565b82601f10614c4b57805160ff1916838001178555614bbe565b82800160010185558215614bbe579182015b82811115614bbe578251825591602001919060010190614c5d565b5b8082111561431c5760008155600101614c79565b6001600160e01b0319811681146117c257600080fd5b600060208284031215614cb557600080fd5b813561164181614c8d565b80356001600160a01b0381168114614cd757600080fd5b919050565b600060208284031215614cee57600080fd5b61164182614cc0565b60005b83811015614d12578181015183820152602001614cfa565b8381111561184d5750506000910152565b60008151808452614d3b816020860160208601614cf7565b601f01601f19169290920160200192915050565b6020815260006116416020830184614d23565b600060208284031215614d7457600080fd5b5035919050565b60008060408385031215614d8e57600080fd5b614d9783614cc0565b946020939093013593505050565b60008083601f840112614db757600080fd5b5081356001600160401b03811115614dce57600080fd5b6020830191508360208260051b8501011115614de957600080fd5b9250929050565b600080600060408486031215614e0557600080fd5b83356001600160401b03811115614e1b57600080fd5b614e2786828701614da5565b909790965060209590950135949350505050565b600082825180855260208086019550808260051b84010181860160005b84811015614e8657601f19868403018952614e74838351614d23565b98840198925090830190600101614e58565b5090979650505050505050565b6020815260006116416020830184614e3b565b60008083601f840112614eb857600080fd5b5081356001600160401b03811115614ecf57600080fd5b602083019150836020828501011115614de957600080fd5b600080600060408486031215614efc57600080fd5b83356001600160401b03811115614f1257600080fd5b614e2786828701614ea6565b60008060208385031215614f3157600080fd5b82356001600160401b03811115614f4757600080fd5b614f5385828601614da5565b90969095509350505050565b600080600060608486031215614f7457600080fd5b614f7d84614cc0565b9250614f8b60208501614cc0565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b600082601f830112614fc257600080fd5b81356001600160401b0380821115614fdc57614fdc614f9b565b604051601f8301601f19908116603f0116810190828211818310171561500457615004614f9b565b8160405283815286602085880101111561501d57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60006020828403121561504f57600080fd5b81356001600160401b0381111561506557600080fd5b61146184828501614fb1565b60008060008060006060868803121561508957600080fd5b85356001600160401b03808211156150a057600080fd5b6150ac89838a01614da5565b909750955060208801359150808211156150c557600080fd5b506150d288828901614da5565b96999598509660400135949350505050565b600080604083850312156150f757600080fd5b50508035926020909101359150565b60008060008060006060868803121561511e57600080fd5b85356001600160401b038082111561513557600080fd5b61514189838a01614ea6565b9097509550602088013591508082111561515a57600080fd5b506150d288828901614ea6565b6000806000806060858703121561517d57600080fd5b8435935060208501356001600160401b0381111561519a57600080fd5b6151a687828801614ea6565b9598909750949560400135949350505050565b600080602083850312156151cc57600080fd5b82356001600160401b038111156151e257600080fd5b614f5385828601614ea6565b6000806040838503121561520157600080fd5b82356001600160401b038082111561521857600080fd5b61522486838701614fb1565b9350602085013591508082111561523a57600080fd5b5061524785828601614fb1565b9150509250929050565b6040815260006152646040830185614d23565b82810360208401526152768185614d23565b95945050505050565b60008060006060848603121561529457600080fd5b61529d84614cc0565b925060208401356001600160401b03808211156152b957600080fd5b6152c587838801614fb1565b935060408601359150808211156152db57600080fd5b506152e886828701614fb1565b9150509250925092565b60008060006060848603121561530757600080fd5b505081359360208301359350604090920135919050565b60008060006060848603121561533357600080fd5b61533c84614cc0565b92506020840135915060408401356001600160401b0381111561535e57600080fd5b6152e886828701614fb1565b80358015158114614cd757600080fd5b6000806040838503121561538d57600080fd5b61539683614cc0565b9150613d736020840161536a565b6040815260006153b76040830185614e3b565b82810360208401526152768185614e3b565b600080600080608085870312156153df57600080fd5b6153e885614cc0565b93506153f660208601614cc0565b92506040850135915060608501356001600160401b0381111561541857600080fd5b61542487828801614fb1565b91505092959194509250565b6000806040838503121561544357600080fd5b82359150613d7360208401614cc0565b604080825283519082018190526000906020906060840190828701845b8281101561548c57815184529284019290840190600101615470565b505050838103828501526154a08186614e3b565b9695505050505050565b600080604083850312156154bd57600080fd5b8235915060208301356001600160401b038111156154da57600080fd5b61524785828601614fb1565b600080604083850312156154f957600080fd5b61550283614cc0565b9150613d7360208401614cc0565b60006020828403121561552257600080fd5b6116418261536a565b600181811c9082168061553f57607f821691505b6020821081141561556057634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b6000808335601e1984360301811261559357600080fd5b8301803591506001600160401b038211156155ad57600080fd5b602001915036819003821315614de957600080fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156155ec576155ec6155c2565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252602a908201527f41646d696e436f6e74726f6c3a2073656e646572206d75737420686173206d696040820152696e74696e6720726f6c6560b01b606082015260800190565b8183823760009101908152919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526030908201527f526576657273655265736f6c7665723a2053454e4445525f49535f4e4f545f4160408201526f28282927ab22a22fa7a92fa7aba722a960811b606082015260800190565b60008251615735818460208701614cf7565b9190910192915050565b60208082526022908201527f546f70206c6576656c20646f6d61696e206d757374206265206e6f6e2d656d70604082015261747960f01b606082015260800190565b60208082526035908201527f496e73756666696369656e7420546f6b656e206f7220546f6b656e2076616c7560408201527419481cd95b9d081a5cc81b9bdd0818dbdc9c9958dd605a1b606082015260800190565b600083516157e8818460208801614cf7565b601760f91b9083019081528351615806816001840160208801614cf7565b01600101949350505050565b60208082526028908201527f526576657273655265736f6c7665723a20524556455253455f5245434f52445f60408201526749535f454d50545960c01b606082015260800190565b6000835161586c818460208801614cf7565b835190830190615880818360208801614cf7565b01949350505050565b6000835161589b818460208801614cf7565b9190910191825250602001919050565b60008160001904831182151516156158c5576158c56155c2565b500290565b6000828210156158dc576158dc6155c2565b500390565b600082198211156158f4576158f46155c2565b500190565b600060ff821660ff84168060ff03821115615916576159166155c2565b019392505050565b6000835160206159318285838901614cf7565b601760f91b918401918252845460019060009080831c8184168061595657607f821691505b85821081141561597457634e487b7160e01b84526022600452602484fd5b808015615988576001811461599d576159ce565b60ff19841688870152828801860194506159ce565b60008b81526020902060005b848110156159c45781548a82018901529087019088016159a9565b5050858389010194505b50929a9950505050505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906154a090830184614d23565b600060208284031215615a7557600080fd5b815161164181614c8d565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208cafa67b5740b2130ab31403cdcfc546ef2e6c75f7fca24f5785019fb07de32664736f6c634300080c0033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.