ETH Price: $3,464.70 (+5.65%)
Gas: 7 Gwei

Contract

0x0Cc5D6c786202Ba7d938aba1d458c4B84AC77ba3
 

Overview

ETH Balance

0.18 ETH

Eth Value

$623.65 (@ $3,464.70/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...167689562023-03-06 11:16:47497 days ago1678101407IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0005466822.54269069
Set Approval For...166896412023-02-23 7:33:47508 days ago1677137627IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0023294450.4612177
Set Approval For...166376312023-02-16 0:11:23516 days ago1676506283IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0023266150.39996057
Set Approval For...165991052023-02-10 14:58:35521 days ago1676041115IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0012784227.69369418
Set Approval For...163750512023-01-10 7:55:59552 days ago1673337359IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0006922714.99621234
Claim Sentence R...161587702022-12-11 3:25:59582 days ago1670729159IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0005989212.30789937
Claim Sentence R...161587662022-12-11 3:25:11582 days ago1670729111IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0004251712
Claim Sentence R...161587652022-12-11 3:24:59582 days ago1670729099IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0007094812.78578026
Claim Sentence R...161587592022-12-11 3:23:47582 days ago1670729027IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0004973612
Claim Sentence R...160843132022-11-30 17:32:35593 days ago1669829555IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0006663718.16528644
Claim Sentence R...160843132022-11-30 17:32:35593 days ago1669829555IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.000690416.66528644
Claim Sentence R...159607282022-11-13 11:13:11610 days ago1668337991IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0006772116.3468036
Claim Sentence R...159607232022-11-13 11:12:11610 days ago1668337931IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0006083817.17670745
Claim Sentence R...158963162022-11-04 11:21:11619 days ago1667560871IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0005765913.91796587
Claim Sentence R...158963132022-11-04 11:20:35619 days ago1667560835IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0005848114.11652621
Claim Sentence R...158963072022-11-04 11:19:23619 days ago1667560763IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0006113914.75791561
Claim Sentence R...158914182022-11-03 18:56:47620 days ago1667501807IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.000749821.16950121
Set Approval For...158368302022-10-27 3:49:35627 days ago1666842575IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0004687610.13619634
Claim Sentence R...157314512022-10-12 10:31:35642 days ago1665570695IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0007465720.35164754
Claim Sentence R...157314462022-10-12 10:30:35642 days ago1665570635IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0007570918.27488596
Set Approval For...157034832022-10-08 12:50:23646 days ago1665233423IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.000349987.58140252
Owner Claim Mint...156908642022-10-06 18:31:35648 days ago1665081095IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.0004598413.95325648
Set Approval For...156009822022-09-24 4:58:59660 days ago1663995539IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.000224684.86714113
Set Approval For...155540002022-09-17 14:49:47667 days ago1663426187IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.000281896.10659658
Claim Sentence R...155518902022-09-17 7:42:23667 days ago1663400543IN
0x0Cc5D6c7...84AC77ba3
0 ETH0.00027226.57056235
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
161587662022-12-11 3:25:11582 days ago1670729111
0x0Cc5D6c7...84AC77ba3
0.02 ETH
161587652022-12-11 3:24:59582 days ago1670729099
0x0Cc5D6c7...84AC77ba3
0.04 ETH
161587592022-12-11 3:23:47582 days ago1670729027
0x0Cc5D6c7...84AC77ba3
0.02 ETH
160843132022-11-30 17:32:35593 days ago1669829555
0x0Cc5D6c7...84AC77ba3
0.05 ETH
159607282022-11-13 11:13:11610 days ago1668337991
0x0Cc5D6c7...84AC77ba3
0.02 ETH
159607232022-11-13 11:12:11610 days ago1668337931
0x0Cc5D6c7...84AC77ba3
0.01 ETH
158963162022-11-04 11:21:11619 days ago1667560871
0x0Cc5D6c7...84AC77ba3
0.02 ETH
158963132022-11-04 11:20:35619 days ago1667560835
0x0Cc5D6c7...84AC77ba3
0.03 ETH
158963072022-11-04 11:19:23619 days ago1667560763
0x0Cc5D6c7...84AC77ba3
0.06 ETH
158914182022-11-03 18:56:47620 days ago1667501807
0x0Cc5D6c7...84AC77ba3
0.01 ETH
157314462022-10-12 10:30:35642 days ago1665570635
0x0Cc5D6c7...84AC77ba3
0.04 ETH
156908642022-10-06 18:31:35648 days ago1665081095
0x0Cc5D6c7...84AC77ba3
9.89 ETH
155518902022-09-17 7:42:23667 days ago1663400543
0x0Cc5D6c7...84AC77ba3
0.02 ETH
154873612022-09-07 1:03:36677 days ago1662512616
0x0Cc5D6c7...84AC77ba3
0.02 ETH
154782412022-09-05 13:56:02679 days ago1662386162
0x0Cc5D6c7...84AC77ba3
0.03 ETH
154774712022-09-05 11:00:19679 days ago1662375619
0x0Cc5D6c7...84AC77ba3
0.01 ETH
154774562022-09-05 10:57:36679 days ago1662375456
0x0Cc5D6c7...84AC77ba3
0.02 ETH
154768372022-09-05 8:42:38679 days ago1662367358
0x0Cc5D6c7...84AC77ba3
0.02 ETH
154717732022-09-04 12:57:38680 days ago1662296258
0x0Cc5D6c7...84AC77ba3
0.01 ETH
154685742022-09-04 0:43:29680 days ago1662252209
0x0Cc5D6c7...84AC77ba3
0.01 ETH
154685592022-09-04 0:39:41680 days ago1662251981
0x0Cc5D6c7...84AC77ba3
0.01 ETH
154660852022-09-03 15:12:25681 days ago1662217945
0x0Cc5D6c7...84AC77ba3
0.02 ETH
154659612022-09-03 14:44:16681 days ago1662216256
0x0Cc5D6c7...84AC77ba3
0.02 ETH
154654132022-09-03 12:33:37681 days ago1662208417
0x0Cc5D6c7...84AC77ba3
0.02 ETH
154652672022-09-03 12:02:06681 days ago1662206526
0x0Cc5D6c7...84AC77ba3
0.02 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Word

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 19 : Word.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./common/EnumerableMap.sol";
import "./common/Descriptor.sol";

contract Word is ERC721, ERC721Enumerable, Ownable, ReentrancyGuard {
    // lib
    using EnumerableMap for EnumerableMap.Bytes32ToUintMap;
    using Strings for uint256;
    using ECDSA for bytes32;

    // struct

    // constant
    uint256 public constant mintPrice = 0.1 ether;
    uint256 public constant sentenceWordPrice = 0.01 ether;
    uint256 public constant publicMintDate = 1662408000;

    uint256 public constant whitelistMintMaxNum = 10;
    uint256[] public whitelistMintPrize = [0.08 ether, 0.04 ether, 0.01 ether];
    uint256[] public whitelistMintDate = [1662321600, 1662235200, 1662148800];

    // storage
    uint256 private _counter;

    uint256 public maxSupply;

    mapping(bytes32 => uint256) public wordHash2TokenID;
    mapping(uint256 => bytes32) public wordTokenID2Hash;
    mapping(bytes32 => string) public wordHash2String;

    EnumerableMap.Bytes32ToUintMap private _lockWord;

    string private _basePath;

    uint256 public mintRevenue;

    address public senteceAddress;
    mapping(bytes32 => uint256[]) public sentenceMintTokenIDs;
    mapping(uint256 => uint256) public sentenceMintRevenue;

    address public mineAddress;

    uint256 public feePer = 0;

    mapping(address => uint256) public whitelistMintNum;
    address public signAddress;

    // event
    event ClaimSentenceRevenue(uint256 tokenID);
    event FeePerChange(uint256 newFee);

    constructor(address _mineAddress, address _signAddress) ERC721("Word", "WD") {
        mineAddress = _mineAddress;
        signAddress = _signAddress;
    }

    function setSignAddress(address _signAddress) public onlyOwner{
        signAddress = _signAddress;
    }

    function setSentenceAddress(address addr) public onlyOwner {
        senteceAddress = addr;
    }

    function setMineAddress(address addr) public onlyOwner{
        mineAddress = addr;
    }

    function setMaxSupply(uint256 num) public onlyOwner {
        maxSupply = num;
    }

    function setFeePer(uint256 per) public onlyOwner{
        require(per <= 1000, "per overflow");
        feePer = per;
        emit FeePerChange(per);
    }

    function updateLockWord(string[] memory words, uint256[] memory wordDates)
        public
        onlyOwner
    {
        for (uint256 i = 0; i < words.length; ++i) {
            string memory tempStr = toLowerCase(words[i]);
            bytes32 tempHash = keccak256(bytes(tempStr));
            _lockWord.set(tempHash, wordDates[i]);
            wordHash2String[tempHash] = tempStr;
        }
    }

    function getAllLockWord()
        public
        view
        returns (string[] memory, uint256[] memory)
    {
        uint256 len = _lockWord.length();
        string[] memory words = new string[](len);
        uint256[] memory dates = new uint256[](len);
        bytes32 tempHash;
        for (uint256 i = 0; i < len; ++i) {
            (tempHash, dates[i]) = _lockWord.at(i);
            words[i] = wordHash2String[tempHash];
        }

        return (words, dates);
    }

    function toLowerCase(string memory word)
        public
        pure
        returns (string memory)
    {
        unchecked {
            bytes memory s = bytes(word);
            for (uint256 i = 0; i < s.length; ++i) {
                uint8 temp = uint8(s[i]);
                require(
                    (temp >= 0x30 && temp <= 0x39) ||
                        (temp >= 0x41 && temp <= 0x5a) ||
                        (temp >= 0x61 && temp <= 0x7a),
                    "word contains illegal characters!"
                );
                if (temp >= 0x41 && temp <= 0x5a) {
                    s[i] = bytes1(temp + 32);
                }
            }
        }

        return word;
    }

    function whitelistMint(string memory word, uint256 level, bytes calldata sig) public payable{
        require(level < whitelistMintDate.length, "level error");
        require(block.timestamp >= whitelistMintDate[level], "mint date is not enabled");
        require(whitelistMintNum[msg.sender] < whitelistMintMaxNum, "mint num limit");
        require(block.timestamp < publicMintDate, "public mint enabled");

        bytes32 hash = keccak256(abi.encode(msg.sender, level, address(this)));
        require(hash.recover(sig) == signAddress, "sign error");
        whitelistMintNum[msg.sender]++;
        _mint(word, whitelistMintPrize[level]);
    }

    function mint(string memory word) public payable {
        require(block.timestamp >= publicMintDate, "mint date is not enabled");
        _mint(word, mintPrice);
    }

    function _mint(string memory word, uint256 price) private {
        require(
            maxSupply <= 0 || totalSupply() < maxSupply,
            "max supply limit"
        );
        word = toLowerCase(word);
        bytes memory s = bytes(word);
        bytes32 wordHash = keccak256(s);

        require(s.length > 0 && s.length <= 18, "word length illegal!");
        require(msg.value == price, "eth illegal!");
        require(_exists(wordHash2TokenID[wordHash]) == false, "word exist!");
        (bool suc, uint256 date) = _lockWord.tryGet(wordHash);
        if (suc) {
            require(date > 0 && block.timestamp >= date, "word locked!");
        }
        unchecked {
            mintRevenue += msg.value;
            _counter++;
        }
        _mint(msg.sender, _counter);
        wordHash2TokenID[wordHash] = _counter;
        wordHash2String[wordHash] = word;
        wordTokenID2Hash[_counter] = wordHash;
    }

    function sentenceMint(uint256 tokenID, string[] memory words)
        public
        payable
    {
        require(msg.sender == senteceAddress, "sentence address error!");
        unchecked {
            uint256 price = 0;
            uint256 mineAmount = 0;
            uint256 feeRevenueUnit = (sentenceWordPrice / 10000) * feePer;
            uint256 priceUnit = sentenceWordPrice - feeRevenueUnit;
            uint256 feeRevenue = 0;
            string memory word;
            bytes32 wordHash;
            uint256 wordTokenID;
            bytes32[] memory wordHashs = new bytes32[](words.length);
            for (uint256 i = 0; i < words.length; ++i) {
                word = toLowerCase(words[i]);
                wordHash = keccak256(bytes(word));

                bool find = false;
                for (uint256 j = 0; j < i; ++j) {
                    if (wordHash == wordHashs[j]) {
                        find = true;
                        continue;
                    }
                }
                if (find) {
                    continue;
                }
                wordHashs[i] = wordHash;

                if (!isWordLock(wordHash)) {
                    wordTokenID = wordHash2TokenID[wordHash];
                    price += sentenceWordPrice;
                    feeRevenue += feeRevenueUnit;
                    if (wordTokenID != 0){
                        sentenceMintRevenue[wordTokenID] += priceUnit;
                    }
                    else{
                        mineAmount += priceUnit;
                    }
                }

                sentenceMintTokenIDs[wordHash].push(tokenID);
            }

            mintRevenue += feeRevenue;

            require(msg.value == price, "eth not enough");
            if (mineAmount > 0){
                _sendEth(mineAddress, mineAmount);
            }
        }
    }

    function sentenceMintNum(bytes32 wordHash) public view returns (uint256){
        return sentenceMintTokenIDs[wordHash].length;
    }

    function queryTokenID(string memory word) public view returns (uint256) {
        return wordHash2TokenID[keccak256(bytes(toLowerCase(word)))];
    }

    function queryWord(uint256 tokenID) public view returns (string memory) {
        return wordHash2String[wordTokenID2Hash[tokenID]];
    }

    function isWordLock(bytes32 wordHash) public view returns (bool) {
        if (_exists(wordHash2TokenID[wordHash])) {
            return false;
        }
        (bool suc, uint256 date) = _lockWord.tryGet(wordHash);
        if (suc && (date == 0 || block.timestamp < date)) {
            return true;
        }

        return false;
    }

    function getWordHash(string memory word) public pure returns (bytes32) {
        return keccak256(bytes(toLowerCase(word)));
    }

    function ownerClaimMintRevenue() public onlyOwner nonReentrant {
        _sendEth(msg.sender, mintRevenue);
        mintRevenue = 0;
    }

    function claimSentenceRevenue(uint256[] memory tokenIDs)
        public
        nonReentrant
    {
        unchecked {
            uint256 amount = 0;
            uint256 tokenID;
            for (uint256 i = 0; i < tokenIDs.length; ++i) {
                tokenID = tokenIDs[i];
                require(ownerOf(tokenID) == msg.sender, "not owned!");
                amount += sentenceMintRevenue[tokenID];
                sentenceMintRevenue[tokenID] = 0;

                emit ClaimSentenceRevenue(tokenID);
            }
            _sendEth(msg.sender, amount);
        }
    }

    function _sendEth(address to, uint256 value) private{
        (bool suc,) = to.call{value:value}("");
        require(suc, "sendEth fail");
    }

    // url
    function setBaseURI(string calldata path) public onlyOwner {
        _basePath = path;
    }

    function tokenURI(uint256 tokenId)
        public
        view
        override
        returns (string memory)
    {
        require(
            _exists(tokenId),
            "ERC721Metadata: URI query for nonexistent token"
        );
        if (bytes(_basePath).length > 0) {
            return string(abi.encodePacked(_basePath, tokenId.toString()));
        }

        return Descriptor.GetWordDesc(tokenId, queryWord(tokenId));
    }

    // The following functions are overrides required by Solidity.
    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);
    }
}

File 2 of 19 : EnumerableMap.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableMap.sol)

pragma solidity ^0.8.0;

import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

/**
 * @dev Library for managing an enumerable variant of Solidity's
 * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
 * type.
 *
 * Maps have the following properties:
 *
 * - Entries are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Entries are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableMap for EnumerableMap.UintToAddressMap;
 *
 *     // Declare a set state variable
 *     EnumerableMap.UintToAddressMap private myMap;
 * }
 * ```
 *
 * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are
 * supported.
 */
library EnumerableMap {
    using EnumerableSet for EnumerableSet.Bytes32Set;

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

    struct Map {
        // Storage of keys
        EnumerableSet.Bytes32Set _keys;
        mapping(bytes32 => bytes32) _values;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function _set(
        Map storage map,
        bytes32 key,
        bytes32 value
    ) private returns (bool) {
        map._values[key] = value;
        return map._keys.add(key);
    }

    /**
     * @dev Removes a key-value pair from a map. O(1).
     *
     * Returns true if the key was removed from the map, that is if it was present.
     */
    function _remove(Map storage map, bytes32 key) private returns (bool) {
        delete map._values[key];
        return map._keys.remove(key);
    }

    /**
     * @dev Returns true if the key is in the map. O(1).
     */
    function _contains(Map storage map, bytes32 key) private view returns (bool) {
        return map._keys.contains(key);
    }

    /**
     * @dev Returns the number of key-value pairs in the map. O(1).
     */
    function _length(Map storage map) private view returns (uint256) {
        return map._keys.length();
    }

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

    /**
     * @dev Tries to returns the value associated with `key`.  O(1).
     * Does not revert if `key` is not in the map.
     */
    function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {
        bytes32 value = map._values[key];
        if (value == bytes32(0)) {
            return (_contains(map, key), bytes32(0));
        } else {
            return (true, value);
        }
    }

    /**
     * @dev Returns the value associated with `key`.  O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function _get(Map storage map, bytes32 key) private view returns (bytes32) {
        bytes32 value = map._values[key];
        require(value != 0 || _contains(map, key), "EnumerableMap: nonexistent key");
        return value;
    }

    /**
     * @dev Same as {_get}, with a custom error message when `key` is not in the map.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {_tryGet}.
     */
    function _get(
        Map storage map,
        bytes32 key,
        string memory errorMessage
    ) private view returns (bytes32) {
        bytes32 value = map._values[key];
        require(value != 0 || _contains(map, key), errorMessage);
        return value;
    }

    // Bytes32ToUintMap
    struct Bytes32ToUintMap {
        Map _inner;
    }

    /**
     * @dev Adds a key-value pair to a map, or updates the value for an existing
     * key. O(1).
     *
     * Returns true if the key was added to the map, that is if it was not
     * already present.
     */
    function set(
        Bytes32ToUintMap storage map,
        bytes32 key,
        uint256 value
    ) internal returns (bool) {
        return _set(map._inner, key, bytes32(value));
    }

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

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

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

    /**
     * @dev Returns the element 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(Bytes32ToUintMap storage map, uint256 index) internal view returns (bytes32, uint256) {
        (bytes32 key, bytes32 value) = _at(map._inner, index);
        return (key, uint256(value));
    }

    /**
     * @dev Tries to returns the value associated with `key`.  O(1).
     * Does not revert if `key` is not in the map.
     *
     * _Available since v3.4._
     */
    function tryGet(Bytes32ToUintMap storage map, bytes32 key) internal view returns (bool, uint256) {
        (bool success, bytes32 value) = _tryGet(map._inner, key);
        return (success, uint256(value));
    }

    /**
     * @dev Returns the value associated with `key`.  O(1).
     *
     * Requirements:
     *
     * - `key` must be in the map.
     */
    function get(Bytes32ToUintMap storage map, bytes32 key) internal view returns (uint256) {
        return uint256(_get(map._inner, key));
    }
}

File 3 of 19 : Descriptor.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

library Descriptor {
    bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    bytes internal constant FONT_DATA = "d09GRgABAAAAACa0ABAAAAAAY/wACQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAmmAAAABwAAAAcgdpSK0dERUYAACZ4AAAAHgAAAB4AKQBoT1MvMgAAAeAAAABeAAAAYCRZSspjbWFwAAACeAAAAKAAAAFCzJGg2WN2dCAAAAVwAAAAJAAAACwJKAooZnBnbQAAAxgAAAGxAAACZQ+0L6dnYXNwAAAmcAAAAAgAAAAIAAAAEGdseWYAAAZcAAALXAAAHpigiWlQaGVhZAAAAWwAAAA2AAAANgtso3toaGVhAAABpAAAABwAAAAkBjIAdWhtdHgAAAJAAAAAOAAAAMwWQA/AbG9jYQAABZQAAADGAAAAxoMPe5ptYXhwAAABwAAAACAAAAAgAY8AfW5hbWUAABG4AAATXgAAOMo3osZ+cG9zdAAAJRgAAAFXAAAD3sBe3mVwcmVwAAAEzAAAAKQAAAEgCUU/EwABAAAACQAAwhozll8PPPUAHwQAAAAAANSCFqoAAAAA1W9JFABA/4ACAANAAAAACAACAAAAAAAAeJxjYGRgYH7xr4DBg4kBBIAkIwMqYAEATzwCrAABAAAAYgBUABUAAAAAAAIAAQACABYAAAEAACUAAAAAeJxjYGFiYPzCwMrAwDST6cz/CQz9IJqxifE1gzEjJysrAzcbJycTMyMj838o+Pz9/3/2//v/B6S5pjAeYFBgqGNu+N/AwMD8gnHCA3tGoAqgWQxMQBGgHCMADMohdgAAeJxjYmBwYAACJihmZGBoAIqAIZB9AMoD0QfALLgsHB6Aq8IGccvAISMDHtUNRJjSAHE1APk8HAt4nGNgYGBmgGAZBkYGELAB8hjBfBYGBSDNAoQgft3//0BS4f///4+hKhkY2RhgTAZGJiDBxIAKgJLMLKxs7BycXNw8vHz8AoJCw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nBTnaxmz3sZR/7OcBBDnGYIxzlGMc5wUlOcZoznOUc55nhAhe5xGWucJVrDJllRJAUjc6YOa5zg5vc4jbz3GGBRZZYZsIKd7nHfR7wkEc85glPecZzXvCSV7zmDW95x3s+8JFPfOYLX/k2/evnj+FwNLSzdmTDpi3bbLdjO2cX7KJdsst2Ylf+NfRDP/RDP/RDP/RDP/RDP/RDP/RDP/RDP/VTP/VTP/VTP/VTP/VTP/VTP/VTP/VTv/RLv/RLv/RLv/RLv/RLv/RLv/RLv/RLv+k3/abf9Jt+02/6Tb/pN/2m3/SbftNv+k2/63f9rt/1u37X7/pdv+t3/a7f9bt+1++TP9FB3sIAAAEAAf//AA8AAQAAAAwAAAAWAAAAAgABAAMAYQABAAQAAAACAAAAAAAAAAEAAAAA1+jybAAAAADUghaqAAAAANVvSRQ=";
    /// @notice Encodes some bytes to the base64 representation
    function encode(bytes memory data) internal pure returns (string memory) {
        uint256 len = data.length;
        if (len == 0) return "";

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

        // Add some extra buffer at the end
        bytes memory result = new bytes(encodedLen + 32);

        bytes memory table = TABLE;

        assembly {
            let tablePtr := add(table, 1)
            let resultPtr := add(result, 32)

            for {
                let i := 0
            } lt(i, len) {

            } {
                i := add(i, 3)
                let input := and(mload(add(data, i)), 0xffffff)

                let out := mload(add(tablePtr, and(shr(18, input), 0x3F)))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF))
                out := shl(8, out)
                out := add(out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF))
                out := shl(224, out)

                mstore(resultPtr, out)

                resultPtr := add(resultPtr, 4)
            }

            switch mod(len, 3)
            case 1 {
                mstore(sub(resultPtr, 2), shl(240, 0x3d3d))
            }
            case 2 {
                mstore(sub(resultPtr, 1), shl(248, 0x3d))
            }

            mstore(result, encodedLen)
        }

        return string(result);
    }

    function toString(uint256 value) internal pure returns (string memory) {
        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);
    }

    function GetSentenceDesc(uint256 tokenId, string memory sentence, uint24 color) public pure returns (string memory){
        string memory output = string(
            abi.encodePacked(
                '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMiDYMid meet" viewBox="0 0,360,360"><style>@font-face {font-family: "Unifont";font-style: normal;font-weight: normal;src: url(data:font/woff;base64,',
                FONT_DATA,
                ') format("woff");}</style><style>.base{fill:rgb(',
                toString(uint8(bytes3(color)[0])),
                ',',
                toString(uint8(bytes3(color)[1])),
                ',',
                toString(uint8(bytes3(color)[2])),
                '); font-family:Unifont;font-size:22px;text-anchor:start;white-space:pre}</style><rect width="100%" height="100%" fill="black" />'
            )
        );
        bytes memory b = bytes(sentence);
        uint256 len = b.length / 29;
        uint256 startPosY = 35;
        uint256 i = 0;
        for (; i < len; ++i){
            bytes memory temp = new bytes(29);
            for (uint256 j = 0; j < 29; ++j){
                temp[j] = b[i*29+j];
            }
            bytes memory line = abi.encodePacked(
                '<text x="20" y="',
                toString(startPosY + i * 30),
                '" class="base"><![CDATA[',
                temp,
                ']]></text>'
                );
            output = string(abi.encodePacked(output, line));
        }

        uint256 remain = b.length % 29;
        if (remain > 0){
            bytes memory temp = new bytes(remain);
            for (uint256 j = 0; j < remain; ++j){
                temp[j] = b[i*29+j];
            }
            bytes memory line = abi.encodePacked(
                '<text x="20" y="',
                toString(startPosY + i * 30),
                '" class="base"><![CDATA[',
                temp,
                ']]></text>'
                );
            output = string(abi.encodePacked(output, line));
        }
        output = string(abi.encodePacked(output, "</svg>"));

        string memory json = encode(
            bytes(
                string(
                    abi.encodePacked(
                        '{"name": "Sentence#',
                        toString(tokenId),
                        '", "description": "", "image": "data:image/svg+xml;base64,',
                        encode(bytes(output)),
                        '"}'
                    )
                )
            )
        );
        output = string(
            abi.encodePacked("data:application/json;base64,", json)
        );

        return output;
    }


    function GetWordDesc(uint256 tokenId, string memory word) public pure returns (string memory) {
        string memory output = string(
            abi.encodePacked(
                '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMiDYMid meet" viewBox="0 0,360,360"><style>@font-face {font-family: "Unifont";font-style: normal;font-weight: normal;src: url(data:font/woff;base64,',
                FONT_DATA,
                ') format("woff");}</style><style>.base{fill:rgb(255,255,255); font-family:Unifont;font-size:22px;text-anchor:middle}</style><rect width="100%" height="100%" fill="black" /><text x="180" y="195" class="base">',
                word,
                "</text></svg>"
            )
        );
        string memory json = encode(
            bytes(
                string(
                    abi.encodePacked(
                        '{"name": "Word#',
                        toString(tokenId),
                        '", "description": "", "image": "data:image/svg+xml;base64,',
                        encode(bytes(output)),
                        '"}'
                    )
                )
            )
        );
        output = string(
            abi.encodePacked("data:application/json;base64,", json)
        );
        return output;
    }
}

File 4 of 19 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
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;
    }
}

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

import "../Strings.sol";

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

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

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

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

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

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

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

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

        return (signer, RecoverError.NoError);
    }

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

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

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

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

File 8 of 19 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 10 of 19 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 11 of 19 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

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

File 12 of 19 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 13 of 19 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 14 of 19 : ERC721Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol)

pragma solidity ^0.8.0;

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

/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }
}

File 15 of 19 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 16 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

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

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

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

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

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

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

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 17 of 19 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

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

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

File 18 of 19 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 19 of 19 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "london",
  "libraries": {
    "/contracts/common/Descriptor.sol": {
      "Descriptor": "0x256ca7a1e21cB903b0D2b166FD1505299adDF2Ff"
    }
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_mineAddress","type":"address"},{"internalType":"address","name":"_signAddress","type":"address"}],"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":false,"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"ClaimSentenceRevenue","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"FeePerChange","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":"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":"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":"tokenIDs","type":"uint256[]"}],"name":"claimSentenceRevenue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feePer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllLockWord","outputs":[{"internalType":"string[]","name":"","type":"string[]"},{"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":"string","name":"word","type":"string"}],"name":"getWordHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"wordHash","type":"bytes32"}],"name":"isWordLock","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mineAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"word","type":"string"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintRevenue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerClaimMintRevenue","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicMintDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"word","type":"string"}],"name":"queryTokenID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"queryWord","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","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":[],"name":"senteceAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenID","type":"uint256"},{"internalType":"string[]","name":"words","type":"string[]"}],"name":"sentenceMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"wordHash","type":"bytes32"}],"name":"sentenceMintNum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"sentenceMintRevenue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"sentenceMintTokenIDs","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sentenceWordPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"path","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"per","type":"uint256"}],"name":"setFeePer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"num","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setMineAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setSentenceAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signAddress","type":"address"}],"name":"setSignAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"string","name":"word","type":"string"}],"name":"toLowerCase","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","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":[{"internalType":"string[]","name":"words","type":"string[]"},{"internalType":"uint256[]","name":"wordDates","type":"uint256[]"}],"name":"updateLockWord","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"word","type":"string"},{"internalType":"uint256","name":"level","type":"uint256"},{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"whitelistMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"whitelistMintDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"whitelistMintMaxNum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistMintNum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"whitelistMintPrize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"wordHash2String","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"wordHash2TokenID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"wordTokenID2Hash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]

60e060405267011c37937e0800006080908152668e1bc9bf04000060a052662386f26fc1000060c0526200003890600c906003620001ac565b506040805160608101825263631503c08152636313b240602082015263631260c0918101919091526200007090600d90600362000207565b506000601c553480156200008357600080fd5b50604051620041f1380380620041f1833981016040819052620000a691620002fe565b604080518082018252600481526315dbdc9960e21b60208083019182528351808501909452600284526115d160f21b908401528151919291620000ec916000916200024d565b508051620001029060019060208401906200024d565b5050506200011f620001196200015660201b60201c565b6200015a565b6001600b55601b80546001600160a01b039384166001600160a01b031991821617909155601e805492909316911617905562000373565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054828255906000526020600020908101928215620001f5579160200282015b82811115620001f557825182906001600160401b0316905591602001919060010190620001cd565b5062000203929150620002ca565b5090565b828054828255906000526020600020908101928215620001f5579160200282015b82811115620001f5578251829063ffffffff1690559160200191906001019062000228565b8280546200025b9062000336565b90600052602060002090601f0160209004810192826200027f5760008555620001f5565b82601f106200029a57805160ff1916838001178555620001f5565b82800160010185558215620001f5579182015b82811115620001f5578251825591602001919060010190620002ad565b5b80821115620002035760008155600101620002cb565b80516001600160a01b0381168114620002f957600080fd5b919050565b600080604083850312156200031257600080fd5b6200031d83620002e1565b91506200032d60208401620002e1565b90509250929050565b600181811c908216806200034b57607f821691505b602082108114156200036d57634e487b7160e01b600052602260045260246000fd5b50919050565b613e6e80620003836000396000f3fe60806040526004361061036b5760003560e01c80636f8b44b0116101c6578063be2bd96c116100f7578063d5abeb0111610095578063e97279b31161006f578063e97279b3146109e4578063e985e9c514610a04578063f2fde38b14610a4d578063f53675eb14610a6d57600080fd5b8063d5abeb011461098e578063d85d3d27146109a4578063dbfb5f26146109b757600080fd5b8063c2e4d08f116100d1578063c2e4d08f14610918578063c87b56dd1461092e578063cda9a98d1461094e578063d50bbdcd1461096e57600080fd5b8063be2bd96c146108c7578063c11aa3ab146108e7578063c13ec1f61461090257600080fd5b80638c56c4871161016457806397b214401161013e57806397b214401461083a578063a22cb4651461085a578063b88d4fde1461087a578063b8a941281461089a57600080fd5b80638c56c487146107da5780638da5cb5b1461080757806395d89b411461082557600080fd5b8063715018a6116101a0578063715018a61461076357806380b30d5a1461077857806382d19e42146107a55780638a74cd79146107ba57600080fd5b80636f8b44b014610703578063702420151461072357806370a082311461074357600080fd5b806326184174116102a05780634f6ccce71161023e5780636352211e116102185780636352211e1461069257806365067051146106b25780636773e657146106c75780636817c76c146106e757600080fd5b80634f6ccce71461062f57806355f804b31461064f5780635659b64d1461066f57600080fd5b80633010292d1161027a5780633010292d146105a257806336998f20146105c257806337f71788146105e257806342842e0e1461060f57600080fd5b8063261841741461054f57806326a73789146105625780632f745c591461058257600080fd5b80630b36404b1161030d57806315137045116102e757806315137045146104da57806318160ddd146104fa57806323b872dd1461050f5780632554ccda1461052f57600080fd5b80630b36404b146104875780630d1d4a62146104a757806310a2eaa2146104ba57600080fd5b806306fdde031161034957806306fdde03146103fd578063074a130d1461041f578063081812fc14610445578063095ea7b31461046557600080fd5b806301ffc9a7146103705780630644aa0a146103a55780630682bdbc146103dd575b600080fd5b34801561037c57600080fd5b5061039061038b3660046133f2565b610a8d565b60405190151581526020015b60405180910390f35b3480156103b157600080fd5b506018546103c5906001600160a01b031681565b6040516001600160a01b03909116815260200161039c565b3480156103e957600080fd5b50601e546103c5906001600160a01b031681565b34801561040957600080fd5b50610412610a9e565b60405161039c9190613467565b34801561042b57600080fd5b50610437636316554081565b60405190815260200161039c565b34801561045157600080fd5b506103c561046036600461347a565b610b30565b34801561047157600080fd5b506104856104803660046134af565b610bbd565b005b34801561049357600080fd5b506104376104a23660046135a4565b610cd3565b6104856104b5366004613619565b610cff565b3480156104c657600080fd5b506104376104d5366004613688565b610f4f565b3480156104e657600080fd5b506104856104f53660046136aa565b610f80565b34801561050657600080fd5b50600854610437565b34801561051b57600080fd5b5061048561052a3660046136c5565b610fcc565b34801561053b57600080fd5b5061041261054a36600461347a565b610ffd565b61048561055d3660046137ae565b6110ac565b34801561056e57600080fd5b5061048561057d36600461384f565b611316565b34801561058e57600080fd5b5061043761059d3660046134af565b6113d4565b3480156105ae57600080fd5b506104856105bd3660046138a8565b61146a565b3480156105ce57600080fd5b506104376105dd36600461347a565b6115ae565b3480156105ee57600080fd5b506104376105fd36600461347a565b60106020526000908152604090205481565b34801561061b57600080fd5b5061048561062a3660046136c5565b6115cf565b34801561063b57600080fd5b5061043761064a36600461347a565b6115ea565b34801561065b57600080fd5b5061048561066a3660046138dc565b61167d565b34801561067b57600080fd5b506106846116b3565b60405161039c92919061391d565b34801561069e57600080fd5b506103c56106ad36600461347a565b611869565b3480156106be57600080fd5b506104856118e0565b3480156106d357600080fd5b506104126106e236600461347a565b61197c565b3480156106f357600080fd5b5061043767016345785d8a000081565b34801561070f57600080fd5b5061048561071e36600461347a565b611a16565b34801561072f57600080fd5b5061048561073e3660046136aa565b611a45565b34801561074f57600080fd5b5061043761075e3660046136aa565b611a91565b34801561076f57600080fd5b50610485611b18565b34801561078457600080fd5b5061043761079336600461347a565b601a6020526000908152604090205481565b3480156107b157600080fd5b50610437600a81565b3480156107c657600080fd5b506104376107d53660046135a4565b611b4e565b3480156107e657600080fd5b506104376107f536600461347a565b60116020526000908152604090205481565b34801561081357600080fd5b50600a546001600160a01b03166103c5565b34801561083157600080fd5b50610412611b67565b34801561084657600080fd5b506104126108553660046135a4565b611b76565b34801561086657600080fd5b506104856108753660046139b8565b611ca9565b34801561088657600080fd5b506104856108953660046139f4565b611cb8565b3480156108a657600080fd5b506104376108b53660046136aa565b601d6020526000908152604090205481565b3480156108d357600080fd5b50601b546103c5906001600160a01b031681565b3480156108f357600080fd5b50610437662386f26fc1000081565b34801561090e57600080fd5b5061043760175481565b34801561092457600080fd5b50610437601c5481565b34801561093a57600080fd5b5061041261094936600461347a565b611cf0565b34801561095a57600080fd5b5061048561096936600461347a565b611e3d565b34801561097a57600080fd5b5061043761098936600461347a565b611ee3565b34801561099a57600080fd5b50610437600f5481565b6104856109b23660046135a4565b611ef3565b3480156109c357600080fd5b506104376109d236600461347a565b60009081526019602052604090205490565b3480156109f057600080fd5b506104856109ff3660046136aa565b611f57565b348015610a1057600080fd5b50610390610a1f366004613a6f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a5957600080fd5b50610485610a683660046136aa565b611fa3565b348015610a7957600080fd5b50610390610a8836600461347a565b61203b565b6000610a988261209f565b92915050565b606060008054610aad90613aa2565b80601f0160208091040260200160405190810160405280929190818152602001828054610ad990613aa2565b8015610b265780601f10610afb57610100808354040283529160200191610b26565b820191906000526020600020905b815481529060010190602001808311610b0957829003601f168201915b5050505050905090565b6000610b3b826120c4565b610ba15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610bc882611869565b9050806001600160a01b0316836001600160a01b03161415610c365760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b98565b336001600160a01b0382161480610c525750610c528133610a1f565b610cc45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b98565b610cce83836120e1565b505050565b600060106000610ce284611b76565b805190602001208152602001908152602001600020549050919050565b600d548310610d3e5760405162461bcd60e51b815260206004820152600b60248201526a3632bb32b61032b93937b960a91b6044820152606401610b98565b600d8381548110610d5157610d51613add565b9060005260206000200154421015610da65760405162461bcd60e51b81526020600482015260186024820152771b5a5b9d0819185d19481a5cc81b9bdd08195b98589b195960421b6044820152606401610b98565b336000908152601d6020526040902054600a11610df65760405162461bcd60e51b815260206004820152600e60248201526d1b5a5b9d081b9d5b481b1a5b5a5d60921b6044820152606401610b98565b63631655404210610e3f5760405162461bcd60e51b81526020600482015260136024820152721c1d589b1a58c81b5a5b9d08195b98589b1959606a1b6044820152606401610b98565b6040805133602082015290810184905230606082015260009060800160408051601f198184030181528282528051602091820120601e54601f870183900483028501830190935285845293506001600160a01b0390911691610ebe918690869081908401838280828437600092019190915250869392505061214f9050565b6001600160a01b031614610f015760405162461bcd60e51b815260206004820152600a60248201526939b4b3b71032b93937b960b11b6044820152606401610b98565b336000908152601d60205260408120805491610f1c83613b09565b9190505550610f4885600c8681548110610f3857610f38613add565b9060005260206000200154612173565b5050505050565b60196020528160005260406000208181548110610f6b57600080fd5b90600052602060002001600091509150505481565b600a546001600160a01b03163314610faa5760405162461bcd60e51b8152600401610b9890613b24565b601e80546001600160a01b0319166001600160a01b0392909216919091179055565b610fd6338261238b565b610ff25760405162461bcd60e51b8152600401610b9890613b59565b610cce838383612475565b60008181526011602090815260408083205483526012909152902080546060919061102790613aa2565b80601f016020809104026020016040519081016040528092919081815260200182805461105390613aa2565b80156110a05780601f10611075576101008083540402835291602001916110a0565b820191906000526020600020905b81548152906001019060200180831161108357829003601f168201915b50505050509050919050565b6018546001600160a01b031633146111065760405162461bcd60e51b815260206004820152601760248201527f73656e74656e63652061646472657373206572726f72210000000000000000006044820152606401610b98565b6000806000601c54612710662386f26fc100008161112657611126613baa565b04029050600081662386f26fc1000003905060006060600080600089516001600160401b0381111561115a5761115a6134d9565b604051908082528060200260200182016040528015611183578160200160208202803683370190505b50905060005b8a518110156112a4576111b48b82815181106111a7576111a7613add565b6020026020010151611b76565b9450848051906020012093506000805b828110156111fa578381815181106111de576111de613add565b60200260200101518614156111f257600191505b6001016111c4565b508015611207575061129c565b8483838151811061121a5761121a613add565b60200260200101818152505061122f8561203b565b61127957600085815260106020526040902054662386f26fc100009b909b019a9689019693508315611274576000848152601a60205260409020805489019055611279565b988701985b506000848152601960209081526040822080546001810182559083529120018c90555b600101611189565b5060178054860190553489146112ed5760405162461bcd60e51b815260206004820152600e60248201526d0cae8d040dcdee840cadcdeeaced60931b6044820152606401610b98565b871561130957601b54611309906001600160a01b03168961261c565b5050505050505050505050565b600a546001600160a01b031633146113405760405162461bcd60e51b8152600401610b9890613b24565b60005b8251811015610cce5760006113638483815181106111a7576111a7613add565b90506000818051906020012090506113a08185858151811061138757611387613add565b602002602001015160136126ae9092919063ffffffff16565b50600081815260126020908152604090912083516113c0928501906132cf565b505050806113cd90613b09565b9050611343565b60006113df83611a91565b82106114415760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610b98565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6002600b5414156114bd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b98565b6002600b55600080805b8351811015611599578381815181106114e2576114e2613add565b60200260200101519150336001600160a01b03166114ff83611869565b6001600160a01b0316146115425760405162461bcd60e51b815260206004820152600a6024820152696e6f74206f776e65642160b01b6044820152606401610b98565b6000828152601a60205260408082208054929055519301927f10612c5d19a9ec8809395b892bb79cf271e5ec4f1cb4afb4a67e813de7a103c8906115899084815260200190565b60405180910390a16001016114c7565b506115a4338361261c565b50506001600b5550565b600c81815481106115be57600080fd5b600091825260209091200154905081565b610cce83838360405180602001604052806000815250611cb8565b60006115f560085490565b82106116585760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610b98565b6008828154811061166b5761166b613add565b90600052602060002001549050919050565b600a546001600160a01b031633146116a75760405162461bcd60e51b8152600401610b9890613b24565b610cce60168383613353565b60608060006116c260136126bb565b90506000816001600160401b038111156116de576116de6134d9565b60405190808252806020026020018201604052801561171157816020015b60608152602001906001900390816116fc5790505b5090506000826001600160401b0381111561172e5761172e6134d9565b604051908082528060200260200182016040528015611757578160200160208202803683370190505b5090506000805b8481101561185d576117716013826126c6565b84838151811061178357611783613add565b602002602001018181525081935050506012600083815260200190815260200160002080546117b190613aa2565b80601f01602080910402602001604051908101604052809291908181526020018280546117dd90613aa2565b801561182a5780601f106117ff5761010080835404028352916020019161182a565b820191906000526020600020905b81548152906001019060200180831161180d57829003601f168201915b505050505084828151811061184157611841613add565b60200260200101819052508061185690613b09565b905061175e565b50919590945092505050565b6000818152600260205260408120546001600160a01b031680610a985760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b98565b600a546001600160a01b0316331461190a5760405162461bcd60e51b8152600401610b9890613b24565b6002600b54141561195d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b98565b6002600b5560175461197090339061261c565b60006017556001600b55565b6012602052600090815260409020805461199590613aa2565b80601f01602080910402602001604051908101604052809291908181526020018280546119c190613aa2565b8015611a0e5780601f106119e357610100808354040283529160200191611a0e565b820191906000526020600020905b8154815290600101906020018083116119f157829003601f168201915b505050505081565b600a546001600160a01b03163314611a405760405162461bcd60e51b8152600401610b9890613b24565b600f55565b600a546001600160a01b03163314611a6f5760405162461bcd60e51b8152600401610b9890613b24565b601b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b038216611afc5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610b98565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314611b425760405162461bcd60e51b8152600401610b9890613b24565b611b4c60006126e4565b565b6000611b5982611b76565b805190602001209050919050565b606060018054610aad90613aa2565b60608160005b8151811015611ca1576000828281518110611b9957611b99613add565b016020015160f81c905060308110801590611bb8575060398160ff1611155b80611bd6575060418160ff1610158015611bd65750605a8160ff1611155b80611bf4575060618160ff1610158015611bf45750607a8160ff1611155b611c4a5760405162461bcd60e51b815260206004820152602160248201527f776f726420636f6e7461696e7320696c6c6567616c20636861726163746572736044820152602160f81b6064820152608401610b98565b60418160ff1610158015611c625750605a8160ff1611155b15611c98578060200160f81b838381518110611c8057611c80613add565b60200101906001600160f81b031916908160001a9053505b50600101611b7c565b509192915050565b611cb4338383612736565b5050565b611cc2338361238b565b611cde5760405162461bcd60e51b8152600401610b9890613b59565b611cea84848484612805565b50505050565b6060611cfb826120c4565b611d5f5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b98565b600060168054611d6e90613aa2565b90501115611da8576016611d8183612838565b604051602001611d92929190613bdc565b6040516020818303038152906040529050919050565b73256ca7a1e21cb903b0d2b166fd1505299addf2ff63098f447c83611dcc85610ffd565b6040518363ffffffff1660e01b8152600401611de9929190613c83565b60006040518083038186803b158015611e0157600080fd5b505af4158015611e15573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a989190810190613c9c565b600a546001600160a01b03163314611e675760405162461bcd60e51b8152600401610b9890613b24565b6103e8811115611ea85760405162461bcd60e51b815260206004820152600c60248201526b706572206f766572666c6f7760a01b6044820152606401610b98565b601c8190556040518181527faf65b919990138c5e04362cdb383de54f68676658ac8917ce55392fdcd7958d99060200160405180910390a150565b600d81815481106115be57600080fd5b6363165540421015611f425760405162461bcd60e51b81526020600482015260186024820152771b5a5b9d0819185d19481a5cc81b9bdd08195b98589b195960421b6044820152606401610b98565b611f548167016345785d8a0000612173565b50565b600a546001600160a01b03163314611f815760405162461bcd60e51b8152600401610b9890613b24565b601880546001600160a01b0319166001600160a01b0392909216919091179055565b600a546001600160a01b03163314611fcd5760405162461bcd60e51b8152600401610b9890613b24565b6001600160a01b0381166120325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b98565b611f54816126e4565b600081815260106020526040812054612053906120c4565b1561206057506000919050565b60008061206e601385612935565b91509150818015612086575080158061208657508042105b15612095575060019392505050565b5060009392505050565b60006001600160e01b0319821663780e9d6360e01b1480610a985750610a9882612944565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061211682611869565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080600061215e8585612994565b9150915061216b81612a01565b509392505050565b600f5415806121855750600f54600854105b6121c45760405162461bcd60e51b815260206004820152601060248201526f1b585e081cdd5c1c1b1e481b1a5b5a5d60821b6044820152606401610b98565b6121cd82611b76565b805160208201819020919350839190158015906121ec57506012825111155b61222f5760405162461bcd60e51b8152602060048201526014602482015273776f7264206c656e67746820696c6c6567616c2160601b6044820152606401610b98565b82341461226d5760405162461bcd60e51b815260206004820152600c60248201526b65746820696c6c6567616c2160a01b6044820152606401610b98565b600081815260106020526040902054612285906120c4565b156122c05760405162461bcd60e51b815260206004820152600b60248201526a776f72642065786973742160a81b6044820152606401610b98565b6000806122ce601384612935565b915091508115612323576000811180156122e85750804210155b6123235760405162461bcd60e51b815260206004820152600c60248201526b776f7264206c6f636b65642160a01b6044820152606401610b98565b6017805434019055600e805460010190819055612341903390612bbc565b600e5460008481526010602090815260408083209390935560128152919020875161236e928901906132cf565b5050600e5460009081526011602052604090209190915550505050565b6000612396826120c4565b6123f75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b98565b600061240283611869565b9050806001600160a01b0316846001600160a01b0316148061243d5750836001600160a01b031661243284610b30565b6001600160a01b0316145b8061246d57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661248882611869565b6001600160a01b0316146124ec5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b98565b6001600160a01b03821661254e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b98565b612559838383612cfb565b6125646000826120e1565b6001600160a01b038316600090815260036020526040812080546001929061258d908490613d09565b90915550506001600160a01b03821660009081526003602052604081208054600192906125bb908490613d20565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612669576040519150601f19603f3d011682016040523d82523d6000602084013e61266e565b606091505b5050905080610cce5760405162461bcd60e51b815260206004820152600c60248201526b1cd95b99115d1a0819985a5b60a21b6044820152606401610b98565b600061246d848484612d06565b6000610a9882612d23565b60008080806126d58686612d2e565b909450925050505b9250929050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156127985760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b98565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612810848484612475565b61281c84848484612d59565b611cea5760405162461bcd60e51b8152600401610b9890613d38565b60608161285c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612886578061287081613b09565b915061287f9050600a83613d8a565b9150612860565b6000816001600160401b038111156128a0576128a06134d9565b6040519080825280601f01601f1916602001820160405280156128ca576020820181803683370190505b5090505b841561246d576128df600183613d09565b91506128ec600a86613d9e565b6128f7906030613d20565b60f81b81838151811061290c5761290c613add565b60200101906001600160f81b031916908160001a90535061292e600a86613d8a565b94506128ce565b60008080806126d58686612e66565b60006001600160e01b031982166380ac58cd60e01b148061297557506001600160e01b03198216635b5e139f60e01b145b80610a9857506301ffc9a760e01b6001600160e01b0319831614610a98565b6000808251604114156129cb5760208301516040840151606085015160001a6129bf87828585612ea0565b945094505050506126dd565b8251604014156129f557602083015160408401516129ea868383612f8d565b9350935050506126dd565b506000905060026126dd565b6000816004811115612a1557612a15613db2565b1415612a1e5750565b6001816004811115612a3257612a32613db2565b1415612a805760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b98565b6002816004811115612a9457612a94613db2565b1415612ae25760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b98565b6003816004811115612af657612af6613db2565b1415612b4f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b98565b6004816004811115612b6357612b63613db2565b1415611f545760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610b98565b6001600160a01b038216612c125760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b98565b612c1b816120c4565b15612c685760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b98565b612c7460008383612cfb565b6001600160a01b0382166000908152600360205260408120805460019290612c9d908490613d20565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b610cce838383612fc6565b6000828152600284016020526040812082905561246d848461307e565b6000610a9882613091565b60008080612d3c858561309b565b600081815260029690960160205260409095205494959350505050565b60006001600160a01b0384163b15612e5b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612d9d903390899088908890600401613dc8565b602060405180830381600087803b158015612db757600080fd5b505af1925050508015612de7575060408051601f3d908101601f19168201909252612de491810190613e05565b60015b612e41573d808015612e15576040519150601f19603f3d011682016040523d82523d6000602084013e612e1a565b606091505b508051612e395760405162461bcd60e51b8152600401610b9890613d38565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061246d565b506001949350505050565b6000818152600283016020526040812054819080612e9557612e8885856130a7565b9250600091506126dd9050565b6001925090506126dd565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612ed75750600090506003612f84565b8460ff16601b14158015612eef57508460ff16601c14155b15612f005750600090506004612f84565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612f54573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612f7d57600060019250925050612f84565b9150600090505b94509492505050565b6000806001600160ff1b03831681612faa60ff86901c601b613d20565b9050612fb887828885612ea0565b935093505050935093915050565b6001600160a01b0383166130215761301c81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613044565b816001600160a01b0316836001600160a01b0316146130445761304483826130c6565b6001600160a01b03821661305b57610cce81613163565b826001600160a01b0316826001600160a01b031614610cce57610cce8282613212565b600061308a8383613256565b9392505050565b6000610a98825490565b600061308a83836132a5565b600061308a83836000818152600183016020526040812054151561308a565b600060016130d384611a91565b6130dd9190613d09565b600083815260076020526040902054909150808214613130576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061317590600190613d09565b6000838152600960205260408120546008805493945090928490811061319d5761319d613add565b9060005260206000200154905080600883815481106131be576131be613add565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806131f6576131f6613e22565b6001900381819060005260206000200160009055905550505050565b600061321d83611a91565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600081815260018301602052604081205461329d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a98565b506000610a98565b60008260000182815481106132bc576132bc613add565b9060005260206000200154905092915050565b8280546132db90613aa2565b90600052602060002090601f0160209004810192826132fd5760008555613343565b82601f1061331657805160ff1916838001178555613343565b82800160010185558215613343579182015b82811115613343578251825591602001919060010190613328565b5061334f9291506133c7565b5090565b82805461335f90613aa2565b90600052602060002090601f0160209004810192826133815760008555613343565b82601f1061339a5782800160ff19823516178555613343565b82800160010185558215613343579182015b828111156133435782358255916020019190600101906133ac565b5b8082111561334f57600081556001016133c8565b6001600160e01b031981168114611f5457600080fd5b60006020828403121561340457600080fd5b813561308a816133dc565b60005b8381101561342a578181015183820152602001613412565b83811115611cea5750506000910152565b6000815180845261345381602086016020860161340f565b601f01601f19169290920160200192915050565b60208152600061308a602083018461343b565b60006020828403121561348c57600080fd5b5035919050565b80356001600160a01b03811681146134aa57600080fd5b919050565b600080604083850312156134c257600080fd5b6134cb83613493565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613517576135176134d9565b604052919050565b60006001600160401b03821115613538576135386134d9565b50601f01601f191660200190565b60006135596135548461351f565b6134ef565b905082815283838301111561356d57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261359557600080fd5b61308a83833560208501613546565b6000602082840312156135b657600080fd5b81356001600160401b038111156135cc57600080fd5b61246d84828501613584565b60008083601f8401126135ea57600080fd5b5081356001600160401b0381111561360157600080fd5b6020830191508360208285010111156126dd57600080fd5b6000806000806060858703121561362f57600080fd5b84356001600160401b038082111561364657600080fd5b61365288838901613584565b955060208701359450604087013591508082111561366f57600080fd5b5061367c878288016135d8565b95989497509550505050565b6000806040838503121561369b57600080fd5b50508035926020909101359150565b6000602082840312156136bc57600080fd5b61308a82613493565b6000806000606084860312156136da57600080fd5b6136e384613493565b92506136f160208501613493565b9150604084013590509250925092565b60006001600160401b0382111561371a5761371a6134d9565b5060051b60200190565b600082601f83011261373557600080fd5b8135602061374561355483613701565b82815260059290921b8401810191818101908684111561376457600080fd5b8286015b848110156137a35780356001600160401b038111156137875760008081fd5b6137958986838b0101613584565b845250918301918301613768565b509695505050505050565b600080604083850312156137c157600080fd5b8235915060208301356001600160401b038111156137de57600080fd5b6137ea85828601613724565b9150509250929050565b600082601f83011261380557600080fd5b8135602061381561355483613701565b82815260059290921b8401810191818101908684111561383457600080fd5b8286015b848110156137a35780358352918301918301613838565b6000806040838503121561386257600080fd5b82356001600160401b038082111561387957600080fd5b61388586838701613724565b9350602085013591508082111561389b57600080fd5b506137ea858286016137f4565b6000602082840312156138ba57600080fd5b81356001600160401b038111156138d057600080fd5b61246d848285016137f4565b600080602083850312156138ef57600080fd5b82356001600160401b0381111561390557600080fd5b613911858286016135d8565b90969095509350505050565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b8381101561397457605f1988870301855261396286835161343b565b95509382019390820190600101613946565b50508584038187015286518085528782019482019350915060005b828110156139ab5784518452938101939281019260010161398f565b5091979650505050505050565b600080604083850312156139cb57600080fd5b6139d483613493565b9150602083013580151581146139e957600080fd5b809150509250929050565b60008060008060808587031215613a0a57600080fd5b613a1385613493565b9350613a2160208601613493565b92506040850135915060608501356001600160401b03811115613a4357600080fd5b8501601f81018713613a5457600080fd5b613a6387823560208401613546565b91505092959194509250565b60008060408385031215613a8257600080fd5b613a8b83613493565b9150613a9960208401613493565b90509250929050565b600181811c90821680613ab657607f821691505b60208210811415613ad757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415613b1d57613b1d613af3565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b60008151613bd281856020860161340f565b9290920192915050565b600080845481600182811c915080831680613bf857607f831692505b6020808410821415613c1857634e487b7160e01b86526022600452602486fd5b818015613c2c5760018114613c3d57613c6a565b60ff19861689528489019650613c6a565b60008b81526020902060005b86811015613c625781548b820152908501908301613c49565b505084890196505b505050505050613c7a8185613bc0565b95945050505050565b82815260406020820152600061246d604083018461343b565b600060208284031215613cae57600080fd5b81516001600160401b03811115613cc457600080fd5b8201601f81018413613cd557600080fd5b8051613ce36135548261351f565b818152856020838501011115613cf857600080fd5b613c7a82602083016020860161340f565b600082821015613d1b57613d1b613af3565b500390565b60008219821115613d3357613d33613af3565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082613d9957613d99613baa565b500490565b600082613dad57613dad613baa565b500690565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613dfb9083018461343b565b9695505050505050565b600060208284031215613e1757600080fd5b815161308a816133dc565b634e487b7160e01b600052603160045260246000fdfea26469706673582212205ef4bce518a921318933a188839412313ac664d51b6ebbb6eb8a485f0c44672764736f6c634300080900330000000000000000000000003eef7ae93973bc8f4bfe0c4929977327ee0ea8fd000000000000000000000000c849db869527a973b9a1e9303adc282c2f80eb71

Deployed Bytecode

0x60806040526004361061036b5760003560e01c80636f8b44b0116101c6578063be2bd96c116100f7578063d5abeb0111610095578063e97279b31161006f578063e97279b3146109e4578063e985e9c514610a04578063f2fde38b14610a4d578063f53675eb14610a6d57600080fd5b8063d5abeb011461098e578063d85d3d27146109a4578063dbfb5f26146109b757600080fd5b8063c2e4d08f116100d1578063c2e4d08f14610918578063c87b56dd1461092e578063cda9a98d1461094e578063d50bbdcd1461096e57600080fd5b8063be2bd96c146108c7578063c11aa3ab146108e7578063c13ec1f61461090257600080fd5b80638c56c4871161016457806397b214401161013e57806397b214401461083a578063a22cb4651461085a578063b88d4fde1461087a578063b8a941281461089a57600080fd5b80638c56c487146107da5780638da5cb5b1461080757806395d89b411461082557600080fd5b8063715018a6116101a0578063715018a61461076357806380b30d5a1461077857806382d19e42146107a55780638a74cd79146107ba57600080fd5b80636f8b44b014610703578063702420151461072357806370a082311461074357600080fd5b806326184174116102a05780634f6ccce71161023e5780636352211e116102185780636352211e1461069257806365067051146106b25780636773e657146106c75780636817c76c146106e757600080fd5b80634f6ccce71461062f57806355f804b31461064f5780635659b64d1461066f57600080fd5b80633010292d1161027a5780633010292d146105a257806336998f20146105c257806337f71788146105e257806342842e0e1461060f57600080fd5b8063261841741461054f57806326a73789146105625780632f745c591461058257600080fd5b80630b36404b1161030d57806315137045116102e757806315137045146104da57806318160ddd146104fa57806323b872dd1461050f5780632554ccda1461052f57600080fd5b80630b36404b146104875780630d1d4a62146104a757806310a2eaa2146104ba57600080fd5b806306fdde031161034957806306fdde03146103fd578063074a130d1461041f578063081812fc14610445578063095ea7b31461046557600080fd5b806301ffc9a7146103705780630644aa0a146103a55780630682bdbc146103dd575b600080fd5b34801561037c57600080fd5b5061039061038b3660046133f2565b610a8d565b60405190151581526020015b60405180910390f35b3480156103b157600080fd5b506018546103c5906001600160a01b031681565b6040516001600160a01b03909116815260200161039c565b3480156103e957600080fd5b50601e546103c5906001600160a01b031681565b34801561040957600080fd5b50610412610a9e565b60405161039c9190613467565b34801561042b57600080fd5b50610437636316554081565b60405190815260200161039c565b34801561045157600080fd5b506103c561046036600461347a565b610b30565b34801561047157600080fd5b506104856104803660046134af565b610bbd565b005b34801561049357600080fd5b506104376104a23660046135a4565b610cd3565b6104856104b5366004613619565b610cff565b3480156104c657600080fd5b506104376104d5366004613688565b610f4f565b3480156104e657600080fd5b506104856104f53660046136aa565b610f80565b34801561050657600080fd5b50600854610437565b34801561051b57600080fd5b5061048561052a3660046136c5565b610fcc565b34801561053b57600080fd5b5061041261054a36600461347a565b610ffd565b61048561055d3660046137ae565b6110ac565b34801561056e57600080fd5b5061048561057d36600461384f565b611316565b34801561058e57600080fd5b5061043761059d3660046134af565b6113d4565b3480156105ae57600080fd5b506104856105bd3660046138a8565b61146a565b3480156105ce57600080fd5b506104376105dd36600461347a565b6115ae565b3480156105ee57600080fd5b506104376105fd36600461347a565b60106020526000908152604090205481565b34801561061b57600080fd5b5061048561062a3660046136c5565b6115cf565b34801561063b57600080fd5b5061043761064a36600461347a565b6115ea565b34801561065b57600080fd5b5061048561066a3660046138dc565b61167d565b34801561067b57600080fd5b506106846116b3565b60405161039c92919061391d565b34801561069e57600080fd5b506103c56106ad36600461347a565b611869565b3480156106be57600080fd5b506104856118e0565b3480156106d357600080fd5b506104126106e236600461347a565b61197c565b3480156106f357600080fd5b5061043767016345785d8a000081565b34801561070f57600080fd5b5061048561071e36600461347a565b611a16565b34801561072f57600080fd5b5061048561073e3660046136aa565b611a45565b34801561074f57600080fd5b5061043761075e3660046136aa565b611a91565b34801561076f57600080fd5b50610485611b18565b34801561078457600080fd5b5061043761079336600461347a565b601a6020526000908152604090205481565b3480156107b157600080fd5b50610437600a81565b3480156107c657600080fd5b506104376107d53660046135a4565b611b4e565b3480156107e657600080fd5b506104376107f536600461347a565b60116020526000908152604090205481565b34801561081357600080fd5b50600a546001600160a01b03166103c5565b34801561083157600080fd5b50610412611b67565b34801561084657600080fd5b506104126108553660046135a4565b611b76565b34801561086657600080fd5b506104856108753660046139b8565b611ca9565b34801561088657600080fd5b506104856108953660046139f4565b611cb8565b3480156108a657600080fd5b506104376108b53660046136aa565b601d6020526000908152604090205481565b3480156108d357600080fd5b50601b546103c5906001600160a01b031681565b3480156108f357600080fd5b50610437662386f26fc1000081565b34801561090e57600080fd5b5061043760175481565b34801561092457600080fd5b50610437601c5481565b34801561093a57600080fd5b5061041261094936600461347a565b611cf0565b34801561095a57600080fd5b5061048561096936600461347a565b611e3d565b34801561097a57600080fd5b5061043761098936600461347a565b611ee3565b34801561099a57600080fd5b50610437600f5481565b6104856109b23660046135a4565b611ef3565b3480156109c357600080fd5b506104376109d236600461347a565b60009081526019602052604090205490565b3480156109f057600080fd5b506104856109ff3660046136aa565b611f57565b348015610a1057600080fd5b50610390610a1f366004613a6f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610a5957600080fd5b50610485610a683660046136aa565b611fa3565b348015610a7957600080fd5b50610390610a8836600461347a565b61203b565b6000610a988261209f565b92915050565b606060008054610aad90613aa2565b80601f0160208091040260200160405190810160405280929190818152602001828054610ad990613aa2565b8015610b265780601f10610afb57610100808354040283529160200191610b26565b820191906000526020600020905b815481529060010190602001808311610b0957829003601f168201915b5050505050905090565b6000610b3b826120c4565b610ba15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610bc882611869565b9050806001600160a01b0316836001600160a01b03161415610c365760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b98565b336001600160a01b0382161480610c525750610c528133610a1f565b610cc45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b98565b610cce83836120e1565b505050565b600060106000610ce284611b76565b805190602001208152602001908152602001600020549050919050565b600d548310610d3e5760405162461bcd60e51b815260206004820152600b60248201526a3632bb32b61032b93937b960a91b6044820152606401610b98565b600d8381548110610d5157610d51613add565b9060005260206000200154421015610da65760405162461bcd60e51b81526020600482015260186024820152771b5a5b9d0819185d19481a5cc81b9bdd08195b98589b195960421b6044820152606401610b98565b336000908152601d6020526040902054600a11610df65760405162461bcd60e51b815260206004820152600e60248201526d1b5a5b9d081b9d5b481b1a5b5a5d60921b6044820152606401610b98565b63631655404210610e3f5760405162461bcd60e51b81526020600482015260136024820152721c1d589b1a58c81b5a5b9d08195b98589b1959606a1b6044820152606401610b98565b6040805133602082015290810184905230606082015260009060800160408051601f198184030181528282528051602091820120601e54601f870183900483028501830190935285845293506001600160a01b0390911691610ebe918690869081908401838280828437600092019190915250869392505061214f9050565b6001600160a01b031614610f015760405162461bcd60e51b815260206004820152600a60248201526939b4b3b71032b93937b960b11b6044820152606401610b98565b336000908152601d60205260408120805491610f1c83613b09565b9190505550610f4885600c8681548110610f3857610f38613add565b9060005260206000200154612173565b5050505050565b60196020528160005260406000208181548110610f6b57600080fd5b90600052602060002001600091509150505481565b600a546001600160a01b03163314610faa5760405162461bcd60e51b8152600401610b9890613b24565b601e80546001600160a01b0319166001600160a01b0392909216919091179055565b610fd6338261238b565b610ff25760405162461bcd60e51b8152600401610b9890613b59565b610cce838383612475565b60008181526011602090815260408083205483526012909152902080546060919061102790613aa2565b80601f016020809104026020016040519081016040528092919081815260200182805461105390613aa2565b80156110a05780601f10611075576101008083540402835291602001916110a0565b820191906000526020600020905b81548152906001019060200180831161108357829003601f168201915b50505050509050919050565b6018546001600160a01b031633146111065760405162461bcd60e51b815260206004820152601760248201527f73656e74656e63652061646472657373206572726f72210000000000000000006044820152606401610b98565b6000806000601c54612710662386f26fc100008161112657611126613baa565b04029050600081662386f26fc1000003905060006060600080600089516001600160401b0381111561115a5761115a6134d9565b604051908082528060200260200182016040528015611183578160200160208202803683370190505b50905060005b8a518110156112a4576111b48b82815181106111a7576111a7613add565b6020026020010151611b76565b9450848051906020012093506000805b828110156111fa578381815181106111de576111de613add565b60200260200101518614156111f257600191505b6001016111c4565b508015611207575061129c565b8483838151811061121a5761121a613add565b60200260200101818152505061122f8561203b565b61127957600085815260106020526040902054662386f26fc100009b909b019a9689019693508315611274576000848152601a60205260409020805489019055611279565b988701985b506000848152601960209081526040822080546001810182559083529120018c90555b600101611189565b5060178054860190553489146112ed5760405162461bcd60e51b815260206004820152600e60248201526d0cae8d040dcdee840cadcdeeaced60931b6044820152606401610b98565b871561130957601b54611309906001600160a01b03168961261c565b5050505050505050505050565b600a546001600160a01b031633146113405760405162461bcd60e51b8152600401610b9890613b24565b60005b8251811015610cce5760006113638483815181106111a7576111a7613add565b90506000818051906020012090506113a08185858151811061138757611387613add565b602002602001015160136126ae9092919063ffffffff16565b50600081815260126020908152604090912083516113c0928501906132cf565b505050806113cd90613b09565b9050611343565b60006113df83611a91565b82106114415760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610b98565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6002600b5414156114bd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b98565b6002600b55600080805b8351811015611599578381815181106114e2576114e2613add565b60200260200101519150336001600160a01b03166114ff83611869565b6001600160a01b0316146115425760405162461bcd60e51b815260206004820152600a6024820152696e6f74206f776e65642160b01b6044820152606401610b98565b6000828152601a60205260408082208054929055519301927f10612c5d19a9ec8809395b892bb79cf271e5ec4f1cb4afb4a67e813de7a103c8906115899084815260200190565b60405180910390a16001016114c7565b506115a4338361261c565b50506001600b5550565b600c81815481106115be57600080fd5b600091825260209091200154905081565b610cce83838360405180602001604052806000815250611cb8565b60006115f560085490565b82106116585760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610b98565b6008828154811061166b5761166b613add565b90600052602060002001549050919050565b600a546001600160a01b031633146116a75760405162461bcd60e51b8152600401610b9890613b24565b610cce60168383613353565b60608060006116c260136126bb565b90506000816001600160401b038111156116de576116de6134d9565b60405190808252806020026020018201604052801561171157816020015b60608152602001906001900390816116fc5790505b5090506000826001600160401b0381111561172e5761172e6134d9565b604051908082528060200260200182016040528015611757578160200160208202803683370190505b5090506000805b8481101561185d576117716013826126c6565b84838151811061178357611783613add565b602002602001018181525081935050506012600083815260200190815260200160002080546117b190613aa2565b80601f01602080910402602001604051908101604052809291908181526020018280546117dd90613aa2565b801561182a5780601f106117ff5761010080835404028352916020019161182a565b820191906000526020600020905b81548152906001019060200180831161180d57829003601f168201915b505050505084828151811061184157611841613add565b60200260200101819052508061185690613b09565b905061175e565b50919590945092505050565b6000818152600260205260408120546001600160a01b031680610a985760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b98565b600a546001600160a01b0316331461190a5760405162461bcd60e51b8152600401610b9890613b24565b6002600b54141561195d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b98565b6002600b5560175461197090339061261c565b60006017556001600b55565b6012602052600090815260409020805461199590613aa2565b80601f01602080910402602001604051908101604052809291908181526020018280546119c190613aa2565b8015611a0e5780601f106119e357610100808354040283529160200191611a0e565b820191906000526020600020905b8154815290600101906020018083116119f157829003601f168201915b505050505081565b600a546001600160a01b03163314611a405760405162461bcd60e51b8152600401610b9890613b24565b600f55565b600a546001600160a01b03163314611a6f5760405162461bcd60e51b8152600401610b9890613b24565b601b80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b038216611afc5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610b98565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314611b425760405162461bcd60e51b8152600401610b9890613b24565b611b4c60006126e4565b565b6000611b5982611b76565b805190602001209050919050565b606060018054610aad90613aa2565b60608160005b8151811015611ca1576000828281518110611b9957611b99613add565b016020015160f81c905060308110801590611bb8575060398160ff1611155b80611bd6575060418160ff1610158015611bd65750605a8160ff1611155b80611bf4575060618160ff1610158015611bf45750607a8160ff1611155b611c4a5760405162461bcd60e51b815260206004820152602160248201527f776f726420636f6e7461696e7320696c6c6567616c20636861726163746572736044820152602160f81b6064820152608401610b98565b60418160ff1610158015611c625750605a8160ff1611155b15611c98578060200160f81b838381518110611c8057611c80613add565b60200101906001600160f81b031916908160001a9053505b50600101611b7c565b509192915050565b611cb4338383612736565b5050565b611cc2338361238b565b611cde5760405162461bcd60e51b8152600401610b9890613b59565b611cea84848484612805565b50505050565b6060611cfb826120c4565b611d5f5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610b98565b600060168054611d6e90613aa2565b90501115611da8576016611d8183612838565b604051602001611d92929190613bdc565b6040516020818303038152906040529050919050565b73256ca7a1e21cb903b0d2b166fd1505299addf2ff63098f447c83611dcc85610ffd565b6040518363ffffffff1660e01b8152600401611de9929190613c83565b60006040518083038186803b158015611e0157600080fd5b505af4158015611e15573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a989190810190613c9c565b600a546001600160a01b03163314611e675760405162461bcd60e51b8152600401610b9890613b24565b6103e8811115611ea85760405162461bcd60e51b815260206004820152600c60248201526b706572206f766572666c6f7760a01b6044820152606401610b98565b601c8190556040518181527faf65b919990138c5e04362cdb383de54f68676658ac8917ce55392fdcd7958d99060200160405180910390a150565b600d81815481106115be57600080fd5b6363165540421015611f425760405162461bcd60e51b81526020600482015260186024820152771b5a5b9d0819185d19481a5cc81b9bdd08195b98589b195960421b6044820152606401610b98565b611f548167016345785d8a0000612173565b50565b600a546001600160a01b03163314611f815760405162461bcd60e51b8152600401610b9890613b24565b601880546001600160a01b0319166001600160a01b0392909216919091179055565b600a546001600160a01b03163314611fcd5760405162461bcd60e51b8152600401610b9890613b24565b6001600160a01b0381166120325760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610b98565b611f54816126e4565b600081815260106020526040812054612053906120c4565b1561206057506000919050565b60008061206e601385612935565b91509150818015612086575080158061208657508042105b15612095575060019392505050565b5060009392505050565b60006001600160e01b0319821663780e9d6360e01b1480610a985750610a9882612944565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061211682611869565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080600061215e8585612994565b9150915061216b81612a01565b509392505050565b600f5415806121855750600f54600854105b6121c45760405162461bcd60e51b815260206004820152601060248201526f1b585e081cdd5c1c1b1e481b1a5b5a5d60821b6044820152606401610b98565b6121cd82611b76565b805160208201819020919350839190158015906121ec57506012825111155b61222f5760405162461bcd60e51b8152602060048201526014602482015273776f7264206c656e67746820696c6c6567616c2160601b6044820152606401610b98565b82341461226d5760405162461bcd60e51b815260206004820152600c60248201526b65746820696c6c6567616c2160a01b6044820152606401610b98565b600081815260106020526040902054612285906120c4565b156122c05760405162461bcd60e51b815260206004820152600b60248201526a776f72642065786973742160a81b6044820152606401610b98565b6000806122ce601384612935565b915091508115612323576000811180156122e85750804210155b6123235760405162461bcd60e51b815260206004820152600c60248201526b776f7264206c6f636b65642160a01b6044820152606401610b98565b6017805434019055600e805460010190819055612341903390612bbc565b600e5460008481526010602090815260408083209390935560128152919020875161236e928901906132cf565b5050600e5460009081526011602052604090209190915550505050565b6000612396826120c4565b6123f75760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b98565b600061240283611869565b9050806001600160a01b0316846001600160a01b0316148061243d5750836001600160a01b031661243284610b30565b6001600160a01b0316145b8061246d57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661248882611869565b6001600160a01b0316146124ec5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b98565b6001600160a01b03821661254e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b98565b612559838383612cfb565b6125646000826120e1565b6001600160a01b038316600090815260036020526040812080546001929061258d908490613d09565b90915550506001600160a01b03821660009081526003602052604081208054600192906125bb908490613d20565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612669576040519150601f19603f3d011682016040523d82523d6000602084013e61266e565b606091505b5050905080610cce5760405162461bcd60e51b815260206004820152600c60248201526b1cd95b99115d1a0819985a5b60a21b6044820152606401610b98565b600061246d848484612d06565b6000610a9882612d23565b60008080806126d58686612d2e565b909450925050505b9250929050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156127985760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b98565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612810848484612475565b61281c84848484612d59565b611cea5760405162461bcd60e51b8152600401610b9890613d38565b60608161285c5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612886578061287081613b09565b915061287f9050600a83613d8a565b9150612860565b6000816001600160401b038111156128a0576128a06134d9565b6040519080825280601f01601f1916602001820160405280156128ca576020820181803683370190505b5090505b841561246d576128df600183613d09565b91506128ec600a86613d9e565b6128f7906030613d20565b60f81b81838151811061290c5761290c613add565b60200101906001600160f81b031916908160001a90535061292e600a86613d8a565b94506128ce565b60008080806126d58686612e66565b60006001600160e01b031982166380ac58cd60e01b148061297557506001600160e01b03198216635b5e139f60e01b145b80610a9857506301ffc9a760e01b6001600160e01b0319831614610a98565b6000808251604114156129cb5760208301516040840151606085015160001a6129bf87828585612ea0565b945094505050506126dd565b8251604014156129f557602083015160408401516129ea868383612f8d565b9350935050506126dd565b506000905060026126dd565b6000816004811115612a1557612a15613db2565b1415612a1e5750565b6001816004811115612a3257612a32613db2565b1415612a805760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610b98565b6002816004811115612a9457612a94613db2565b1415612ae25760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610b98565b6003816004811115612af657612af6613db2565b1415612b4f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610b98565b6004816004811115612b6357612b63613db2565b1415611f545760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b6064820152608401610b98565b6001600160a01b038216612c125760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b98565b612c1b816120c4565b15612c685760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b98565b612c7460008383612cfb565b6001600160a01b0382166000908152600360205260408120805460019290612c9d908490613d20565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b610cce838383612fc6565b6000828152600284016020526040812082905561246d848461307e565b6000610a9882613091565b60008080612d3c858561309b565b600081815260029690960160205260409095205494959350505050565b60006001600160a01b0384163b15612e5b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612d9d903390899088908890600401613dc8565b602060405180830381600087803b158015612db757600080fd5b505af1925050508015612de7575060408051601f3d908101601f19168201909252612de491810190613e05565b60015b612e41573d808015612e15576040519150601f19603f3d011682016040523d82523d6000602084013e612e1a565b606091505b508051612e395760405162461bcd60e51b8152600401610b9890613d38565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061246d565b506001949350505050565b6000818152600283016020526040812054819080612e9557612e8885856130a7565b9250600091506126dd9050565b6001925090506126dd565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115612ed75750600090506003612f84565b8460ff16601b14158015612eef57508460ff16601c14155b15612f005750600090506004612f84565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612f54573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612f7d57600060019250925050612f84565b9150600090505b94509492505050565b6000806001600160ff1b03831681612faa60ff86901c601b613d20565b9050612fb887828885612ea0565b935093505050935093915050565b6001600160a01b0383166130215761301c81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613044565b816001600160a01b0316836001600160a01b0316146130445761304483826130c6565b6001600160a01b03821661305b57610cce81613163565b826001600160a01b0316826001600160a01b031614610cce57610cce8282613212565b600061308a8383613256565b9392505050565b6000610a98825490565b600061308a83836132a5565b600061308a83836000818152600183016020526040812054151561308a565b600060016130d384611a91565b6130dd9190613d09565b600083815260076020526040902054909150808214613130576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061317590600190613d09565b6000838152600960205260408120546008805493945090928490811061319d5761319d613add565b9060005260206000200154905080600883815481106131be576131be613add565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806131f6576131f6613e22565b6001900381819060005260206000200160009055905550505050565b600061321d83611a91565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600081815260018301602052604081205461329d57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610a98565b506000610a98565b60008260000182815481106132bc576132bc613add565b9060005260206000200154905092915050565b8280546132db90613aa2565b90600052602060002090601f0160209004810192826132fd5760008555613343565b82601f1061331657805160ff1916838001178555613343565b82800160010185558215613343579182015b82811115613343578251825591602001919060010190613328565b5061334f9291506133c7565b5090565b82805461335f90613aa2565b90600052602060002090601f0160209004810192826133815760008555613343565b82601f1061339a5782800160ff19823516178555613343565b82800160010185558215613343579182015b828111156133435782358255916020019190600101906133ac565b5b8082111561334f57600081556001016133c8565b6001600160e01b031981168114611f5457600080fd5b60006020828403121561340457600080fd5b813561308a816133dc565b60005b8381101561342a578181015183820152602001613412565b83811115611cea5750506000910152565b6000815180845261345381602086016020860161340f565b601f01601f19169290920160200192915050565b60208152600061308a602083018461343b565b60006020828403121561348c57600080fd5b5035919050565b80356001600160a01b03811681146134aa57600080fd5b919050565b600080604083850312156134c257600080fd5b6134cb83613493565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715613517576135176134d9565b604052919050565b60006001600160401b03821115613538576135386134d9565b50601f01601f191660200190565b60006135596135548461351f565b6134ef565b905082815283838301111561356d57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261359557600080fd5b61308a83833560208501613546565b6000602082840312156135b657600080fd5b81356001600160401b038111156135cc57600080fd5b61246d84828501613584565b60008083601f8401126135ea57600080fd5b5081356001600160401b0381111561360157600080fd5b6020830191508360208285010111156126dd57600080fd5b6000806000806060858703121561362f57600080fd5b84356001600160401b038082111561364657600080fd5b61365288838901613584565b955060208701359450604087013591508082111561366f57600080fd5b5061367c878288016135d8565b95989497509550505050565b6000806040838503121561369b57600080fd5b50508035926020909101359150565b6000602082840312156136bc57600080fd5b61308a82613493565b6000806000606084860312156136da57600080fd5b6136e384613493565b92506136f160208501613493565b9150604084013590509250925092565b60006001600160401b0382111561371a5761371a6134d9565b5060051b60200190565b600082601f83011261373557600080fd5b8135602061374561355483613701565b82815260059290921b8401810191818101908684111561376457600080fd5b8286015b848110156137a35780356001600160401b038111156137875760008081fd5b6137958986838b0101613584565b845250918301918301613768565b509695505050505050565b600080604083850312156137c157600080fd5b8235915060208301356001600160401b038111156137de57600080fd5b6137ea85828601613724565b9150509250929050565b600082601f83011261380557600080fd5b8135602061381561355483613701565b82815260059290921b8401810191818101908684111561383457600080fd5b8286015b848110156137a35780358352918301918301613838565b6000806040838503121561386257600080fd5b82356001600160401b038082111561387957600080fd5b61388586838701613724565b9350602085013591508082111561389b57600080fd5b506137ea858286016137f4565b6000602082840312156138ba57600080fd5b81356001600160401b038111156138d057600080fd5b61246d848285016137f4565b600080602083850312156138ef57600080fd5b82356001600160401b0381111561390557600080fd5b613911858286016135d8565b90969095509350505050565b6000604082016040835280855180835260608501915060608160051b8601019250602080880160005b8381101561397457605f1988870301855261396286835161343b565b95509382019390820190600101613946565b50508584038187015286518085528782019482019350915060005b828110156139ab5784518452938101939281019260010161398f565b5091979650505050505050565b600080604083850312156139cb57600080fd5b6139d483613493565b9150602083013580151581146139e957600080fd5b809150509250929050565b60008060008060808587031215613a0a57600080fd5b613a1385613493565b9350613a2160208601613493565b92506040850135915060608501356001600160401b03811115613a4357600080fd5b8501601f81018713613a5457600080fd5b613a6387823560208401613546565b91505092959194509250565b60008060408385031215613a8257600080fd5b613a8b83613493565b9150613a9960208401613493565b90509250929050565b600181811c90821680613ab657607f821691505b60208210811415613ad757634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415613b1d57613b1d613af3565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b60008151613bd281856020860161340f565b9290920192915050565b600080845481600182811c915080831680613bf857607f831692505b6020808410821415613c1857634e487b7160e01b86526022600452602486fd5b818015613c2c5760018114613c3d57613c6a565b60ff19861689528489019650613c6a565b60008b81526020902060005b86811015613c625781548b820152908501908301613c49565b505084890196505b505050505050613c7a8185613bc0565b95945050505050565b82815260406020820152600061246d604083018461343b565b600060208284031215613cae57600080fd5b81516001600160401b03811115613cc457600080fd5b8201601f81018413613cd557600080fd5b8051613ce36135548261351f565b818152856020838501011115613cf857600080fd5b613c7a82602083016020860161340f565b600082821015613d1b57613d1b613af3565b500390565b60008219821115613d3357613d33613af3565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082613d9957613d99613baa565b500490565b600082613dad57613dad613baa565b500690565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613dfb9083018461343b565b9695505050505050565b600060208284031215613e1757600080fd5b815161308a816133dc565b634e487b7160e01b600052603160045260246000fdfea26469706673582212205ef4bce518a921318933a188839412313ac664d51b6ebbb6eb8a485f0c44672764736f6c63430008090033

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

0000000000000000000000003eef7ae93973bc8f4bfe0c4929977327ee0ea8fd000000000000000000000000c849db869527a973b9a1e9303adc282c2f80eb71

-----Decoded View---------------
Arg [0] : _mineAddress (address): 0x3eEF7aE93973bC8F4bFE0C4929977327ee0ea8fd
Arg [1] : _signAddress (address): 0xC849Db869527A973B9A1E9303AdC282c2f80Eb71

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000003eef7ae93973bc8f4bfe0c4929977327ee0ea8fd
Arg [1] : 000000000000000000000000c849db869527a973b9a1e9303adc282c2f80eb71


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.