ETH Price: $3,131.84 (+1.82%)
 

Overview

Max Total Supply

39 STC

Holders

26

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

Balance
3 STC
0x2e440eb42ba088bfe1c78ff4067e1927ac412d20
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.

Contract Source Code Verified (Exact Match)

Contract Name:
Sentence

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 20 : Sentence.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 "./common/EnumerableMap.sol";
import "./common/Descriptor.sol";
import "./Word.sol";

contract Sentence is ERC721, ERC721Enumerable, Ownable {
    // lib
    using EnumerableMap for EnumerableMap.Bytes32ToUintMap;
    using Strings for uint256;

    // struct

    // constant

    // storage
    uint256 private _counter;
    Word public wordAddress;
    string private _basePath;

    mapping(bytes32 => uint256) public sentenceHash2TokenID;
    mapping(uint256 => bytes32) public sentenceTokenID2Hash;
    mapping(bytes32 => string) public sentenceHash2String;
    mapping(uint256 => uint256) public sentenceTokenID2Color;

    // event

    constructor(address _word) ERC721("Sentence", "STC") {
        wordAddress = Word(_word);
    }

    function splitSentence(string memory sentence)
        public
        pure
        returns (string[] memory words)
    {
        bytes memory b = bytes(sentence);
        uint16 len = uint16(b.length);
        require(len >= 1 && len <= 319, "sentence length illegal!");

        uint16 count = 0;
        uint16 code = uint8(b[0]);
        require(
            code >= 32 && code <= 126,
            "sentence contains illegal characters!"
        );
        bool isPrevWord = (code >= 48 && code <= 57) ||
            (code >= 65 && code <= 90) ||
            (code >= 97 && code <= 122);
        bool isWord = false;
        uint16[] memory arrIndex = new uint16[](320);
        uint16 arrIndexIndex = 0;
        if (isPrevWord) {
            arrIndex[arrIndexIndex++] = 0;
        }

        for (uint16 i = 1; i < len - 1; ++i) {
            code = uint8(b[i]);
            require(
                code >= 32 && code <= 126,
                "sentence contains illegal characters!"
            );
            isWord =
                (code >= 48 && code <= 57) ||
                (code >= 65 && code <= 90) ||
                (code >= 97 && code <= 122);
            if (isWord && !isPrevWord) {
                arrIndex[arrIndexIndex++] = i;
            } else if (!isWord && isPrevWord) {
                arrIndex[arrIndexIndex++] = i;
                count++;
            }
            isPrevWord = isWord;
        }

        code = uint8(b[len - 1]);
        require(
            code >= 32 && code <= 126,
            "sentence contains illegal characters!"
        );
        isWord =
            (code >= 48 && code <= 57) ||
            (code >= 65 && code <= 90) ||
            (code >= 97 && code <= 122);
        if (isWord) {
            if (isPrevWord) {
                arrIndex[arrIndexIndex++] = len;
            } else {
                arrIndex[arrIndexIndex++] = len - 1;
                arrIndex[arrIndexIndex++] = len;
            }
            count++;
        } else {
            if (isPrevWord) {
                arrIndex[arrIndexIndex++] = len - 1;
                count++;
            }
        }

        words = new string[](count);
        for (uint16 i = 0; i < count; ++i) {
            uint16 start = arrIndex[i * 2];
            uint16 end = arrIndex[i * 2 + 1];
            bytes memory word = new bytes(end - start);
            for (uint16 j = start; j < end; ++j) {
                word[j - start] = b[j];
            }
            words[i] = string(word);
        }
    }

    function queryPrice(string memory sentence)
        public
        view
        returns (uint256 ret)
    {
        string[] memory words = splitSentence(sentence);
        bytes32[] memory wordHashs = new bytes32[](words.length);
        uint256 price = wordAddress.sentenceWordPrice();
        for (uint256 i = 0; i < words.length; ++i) {
            bytes32 wordHash = wordAddress.getWordHash(words[i]);
            if (wordAddress.isWordLock(wordHash)) {
                continue;
            }
            bool find = false;
            for (uint256 j = 0; j < i; ++j){
                if (wordHash == wordHashs[j]){
                    find = true;
                    continue;
                }
            }
            if (find){
                continue;
            }

            wordHashs[i] = wordHash;
            ret += price;
        }
    }

    function mint(string memory sentence, uint24 color) public payable {
        string[] memory words = splitSentence(sentence);

        bytes memory byteSentence = bytes(sentence);
        bytes memory byteLowerCaseSentence = new bytes(byteSentence.length);
        require((uint8)(byteSentence[byteSentence.length - 1]) != 32, "space at end");

        // tolowercase
        for (uint256 i = 0; i < byteLowerCaseSentence.length; ++i) {
            if (byteSentence[i] >= 0x41 && byteSentence[i] <= 0x5a) {
                byteLowerCaseSentence[i] = bytes1(uint8(byteSentence[i]) + 32);
            }
            else{
                byteLowerCaseSentence[i] = byteSentence[i];
            }
        }

        bytes32 hashSentence = keccak256(byteLowerCaseSentence);
        require(sentenceHash2TokenID[hashSentence] == 0, "sentence exsit!");

        // mint token
        _counter++;
        _mint(msg.sender, _counter);
        sentenceHash2TokenID[hashSentence] = _counter;
        sentenceHash2String[hashSentence] = sentence;
        sentenceTokenID2Hash[_counter] = hashSentence;
        sentenceTokenID2Color[_counter] = color;

        // word proc
        wordAddress.sentenceMint{value:msg.value}(_counter, words);
    }

    function queryTokenID(string memory sentence) public view returns (uint256) {
        bytes memory byteSentence = bytes(sentence);

        // tolowercase
        for (uint256 i = 0; i < byteSentence.length; ++i) {
            if (byteSentence[i] >= 0x41 && byteSentence[i] <= 0x5a) {
                byteSentence[i] = bytes1(uint8(byteSentence[i]) + 32);
            }
        }

        return sentenceHash2TokenID[keccak256(byteSentence)];
    }

    function querySentence(uint256 tokenID) public view returns (string memory) {
        return sentenceHash2String[sentenceTokenID2Hash[tokenID]];
    }

    // 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.GetSentenceDesc(tokenId, sentenceHash2String[sentenceTokenID2Hash[tokenId]], uint24(sentenceTokenID2Color[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 20 : 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 20 : Descriptor.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

library Descriptor {
    bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
    bytes internal constant FONT_DATA = "d09GRgABAAAAACa0ABAAAAAAY/wACQA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ylf+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 20 : 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 5 of 20 : 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 6 of 20 : 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 7 of 20 : 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 8 of 20 : 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 9 of 20 : 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 10 of 20 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 11 of 20 : 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 12 of 20 : 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 13 of 20 : 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 14 of 20 : 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 15 of 20 : 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 16 of 20 : 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 17 of 20 : 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 18 of 20 : 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 19 of 20 : 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 20 of 20 : 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":"_word","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":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":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"sentence","type":"string"},{"internalType":"uint24","name":"color","type":"uint24"}],"name":"mint","outputs":[],"stateMutability":"payable","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"sentence","type":"string"}],"name":"queryPrice","outputs":[{"internalType":"uint256","name":"ret","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenID","type":"uint256"}],"name":"querySentence","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"sentence","type":"string"}],"name":"queryTokenID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"sentenceHash2String","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"sentenceHash2TokenID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"sentenceTokenID2Color","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"sentenceTokenID2Hash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":"string","name":"sentence","type":"string"}],"name":"splitSentence","outputs":[{"internalType":"string[]","name":"words","type":"string[]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wordAddress","outputs":[{"internalType":"contract Word","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b506040516200340b3803806200340b8339810160408190526200003491620001d4565b604080518082018252600881526753656e74656e636560c01b60208083019182528351808501909452600384526253544360e81b9084015281519192916200007f916000916200012e565b508051620000959060019060208401906200012e565b505050620000b2620000ac620000d860201b60201c565b620000dc565b600c80546001600160a01b0319166001600160a01b039290921691909117905562000243565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200013c9062000206565b90600052602060002090601f016020900481019282620001605760008555620001ab565b82601f106200017b57805160ff1916838001178555620001ab565b82800160010185558215620001ab579182015b82811115620001ab5782518255916020019190600101906200018e565b50620001b9929150620001bd565b5090565b5b80821115620001b95760008155600101620001be565b600060208284031215620001e757600080fd5b81516001600160a01b0381168114620001ff57600080fd5b9392505050565b600181811c908216806200021b57607f821691505b602082108114156200023d57634e487b7160e01b600052602260045260246000fd5b50919050565b6131b880620002536000396000f3fe6080604052600436106101cd5760003560e01c80636352211e116100f7578063a22cb46511610095578063d868d85211610064578063d868d85214610562578063e3e3046314610575578063e985e9c514610595578063f2fde38b146105de57600080fd5b8063a22cb465146104e2578063a93c434e14610502578063b88d4fde14610522578063c87b56dd1461054257600080fd5b80637a89ae66116100d15780637a89ae66146104625780638da5cb5b1461048257806395d89b41146104a057806396b17814146104b557600080fd5b80636352211e1461040d57806370a082311461042d578063715018a61461044d57600080fd5b80632f745c591161016f5780634f6ccce71161013e5780634f6ccce7146103735780635280bbac1461039357806355f804b3146103c05780635e135bc6146103e057600080fd5b80632f745c59146102e657806332a1634a1461030657806334525dfd1461032657806342842e0e1461035357600080fd5b8063095ea7b3116101ab578063095ea7b3146102615780630b36404b1461028357806318160ddd146102b157806323b872dd146102c657600080fd5b806301ffc9a7146101d257806306fdde0314610207578063081812fc14610229575b600080fd5b3480156101de57600080fd5b506101f26101ed366004612811565b6105fe565b60405190151581526020015b60405180910390f35b34801561021357600080fd5b5061021c61060f565b6040516101fe919061288d565b34801561023557600080fd5b506102496102443660046128a0565b6106a1565b6040516001600160a01b0390911681526020016101fe565b34801561026d57600080fd5b5061028161027c3660046128d5565b61073b565b005b34801561028f57600080fd5b506102a361029e3660046129cc565b610851565b6040519081526020016101fe565b3480156102bd57600080fd5b506008546102a3565b3480156102d257600080fd5b506102816102e1366004612a01565b610943565b3480156102f257600080fd5b506102a36103013660046128d5565b610974565b34801561031257600080fd5b50600c54610249906001600160a01b031681565b34801561033257600080fd5b506103466103413660046129cc565b610a0a565b6040516101fe9190612a92565b34801561035f57600080fd5b5061028161036e366004612a01565b6110d5565b34801561037f57600080fd5b506102a361038e3660046128a0565b6110f0565b34801561039f57600080fd5b506102a36103ae3660046128a0565b60116020526000908152604090205481565b3480156103cc57600080fd5b506102816103db366004612aa5565b611183565b3480156103ec57600080fd5b506102a36103fb3660046128a0565b600f6020526000908152604090205481565b34801561041957600080fd5b506102496104283660046128a0565b6111b9565b34801561043957600080fd5b506102a3610448366004612b17565b611230565b34801561045957600080fd5b506102816112b7565b34801561046e57600080fd5b506102a361047d3660046129cc565b6112ed565b34801561048e57600080fd5b50600a546001600160a01b0316610249565b3480156104ac57600080fd5b5061021c611595565b3480156104c157600080fd5b506102a36104d03660046128a0565b600e6020526000908152604090205481565b3480156104ee57600080fd5b506102816104fd366004612b40565b6115a4565b34801561050e57600080fd5b5061021c61051d3660046128a0565b6115b3565b34801561052e57600080fd5b5061028161053d366004612b77565b61164d565b34801561054e57600080fd5b5061021c61055d3660046128a0565b611685565b610281610570366004612bf3565b611800565b34801561058157600080fd5b5061021c6105903660046128a0565b611b23565b3480156105a157600080fd5b506101f26105b0366004612c42565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156105ea57600080fd5b506102816105f9366004612b17565b611bd2565b600061060982611c6d565b92915050565b60606000805461061e90612c75565b80601f016020809104026020016040519081016040528092919081815260200182805461064a90612c75565b80156106975780601f1061066c57610100808354040283529160200191610697565b820191906000526020600020905b81548152906001019060200180831161067a57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661071f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610746826111b9565b9050806001600160a01b0316836001600160a01b031614156107b45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610716565b336001600160a01b03821614806107d057506107d081336105b0565b6108425760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610716565b61084c8383611c92565b505050565b600081815b815181101561092557604160f81b82828151811061087657610876612cb0565b01602001516001600160f81b031916108015906108b75750605a60f81b8282815181106108a5576108a5612cb0565b01602001516001600160f81b03191611155b15610915578181815181106108ce576108ce612cb0565b602001015160f81c60f81b60f81c60206108e89190612cdc565b60f81b8282815181106108fd576108fd612cb0565b60200101906001600160f81b031916908160001a9053505b61091e81612d01565b9050610856565b5080516020918201206000908152600e909152604090205492915050565b61094d3382611d00565b6109695760405162461bcd60e51b815260040161071690612d1c565b61084c838383611df7565b600061097f83611230565b82106109e15760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610716565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b80516060908290600161ffff821610801590610a2c575061013f8161ffff1611155b610a785760405162461bcd60e51b815260206004820152601860248201527f73656e74656e6365206c656e67746820696c6c6567616c2100000000000000006044820152606401610716565b60008083600081518110610a8e57610a8e612cb0565b0160209081015160f81c91508110801590610aae5750607e8161ffff1611155b610aca5760405162461bcd60e51b815260040161071690612d6d565b600060308261ffff1610158015610ae6575060398261ffff1611155b80610b06575060418261ffff1610158015610b065750605a8261ffff1611155b80610b26575060618261ffff1610158015610b265750607a8261ffff1611155b6040805161014080825261282082019092529192506000918291602082016128008036833701905050905060008315610b935760008282610b6681612db2565b935061ffff1681518110610b7c57610b7c612cb0565b602002602001019061ffff16908161ffff16815250505b60015b610ba1600189612dd4565b61ffff168161ffff161015610d1257888161ffff1681518110610bc657610bc6612cb0565b0160209081015160f81c96508610801590610be65750607e8661ffff1611155b610c025760405162461bcd60e51b815260040161071690612d6d565b60308661ffff1610158015610c1c575060398661ffff1611155b80610c3c575060418661ffff1610158015610c3c5750605a8661ffff1611155b80610c5c575060618661ffff1610158015610c5c5750607a8661ffff1611155b9350838015610c69575084155b15610cab57808383610c7a81612db2565b945061ffff1681518110610c9057610c90612cb0565b602002602001019061ffff16908161ffff1681525050610cfe565b83158015610cb65750845b15610cfe57808383610cc781612db2565b945061ffff1681518110610cdd57610cdd612cb0565b61ffff9092166020928302919091019091015286610cfa81612db2565b9750505b83945080610d0b90612db2565b9050610b96565b5087610d1f600189612dd4565b61ffff1681518110610d3357610d33612cb0565b0160209081015160f81c95508510801590610d535750607e8561ffff1611155b610d6f5760405162461bcd60e51b815260040161071690612d6d565b60308561ffff1610158015610d89575060398561ffff1611155b80610da9575060418561ffff1610158015610da95750605a8561ffff1611155b80610dc9575060618561ffff1610158015610dc95750607a8561ffff1611155b92508215610e9e578315610e1457868282610de381612db2565b935061ffff1681518110610df957610df9612cb0565b602002602001019061ffff16908161ffff1681525050610e8c565b610e1f600188612dd4565b8282610e2a81612db2565b935061ffff1681518110610e4057610e40612cb0565b61ffff90921660209283029190910190910152868282610e5f81612db2565b935061ffff1681518110610e7557610e75612cb0565b602002602001019061ffff16908161ffff16815250505b85610e9681612db2565b965050610ef1565b8315610ef157610eaf600188612dd4565b8282610eba81612db2565b935061ffff1681518110610ed057610ed0612cb0565b61ffff9092166020928302919091019091015285610eed81612db2565b9650505b8561ffff1667ffffffffffffffff811115610f0e57610f0e6128ff565b604051908082528060200260200182016040528015610f4157816020015b6060815260200190600190039081610f2c5790505b50985060005b8661ffff168161ffff1610156110c757600083610f65836002612df7565b61ffff1681518110610f7957610f79612cb0565b60200260200101519050600084836002610f939190612df7565b610f9e906001612e21565b61ffff1681518110610fb257610fb2612cb0565b6020026020010151905060008282610fca9190612dd4565b61ffff1667ffffffffffffffff811115610fe657610fe66128ff565b6040519080825280601f01601f191660200182016040528015611010576020820181803683370190505b509050825b8261ffff168161ffff161015611090578c8161ffff168151811061103b5761103b612cb0565b01602001516001600160f81b031916826110558684612dd4565b61ffff168151811061106957611069612cb0565b60200101906001600160f81b031916908160001a90535061108981612db2565b9050611015565b50808d8561ffff16815181106110a8576110a8612cb0565b6020026020010181905250505050806110c090612db2565b9050610f47565b505050505050505050919050565b61084c8383836040518060200160405280600081525061164d565b60006110fb60085490565b821061115e5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610716565b6008828154811061117157611171612cb0565b90600052602060002001549050919050565b600a546001600160a01b031633146111ad5760405162461bcd60e51b815260040161071690612e47565b61084c600d83836126ee565b6000818152600260205260408120546001600160a01b0316806106095760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610716565b60006001600160a01b03821661129b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610716565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146112e15760405162461bcd60e51b815260040161071690612e47565b6112eb6000611f9e565b565b6000806112f983610a0a565b90506000815167ffffffffffffffff811115611317576113176128ff565b604051908082528060200260200182016040528015611340578160200160208202803683370190505b5090506000600c60009054906101000a90046001600160a01b03166001600160a01b031663c11aa3ab6040518163ffffffff1660e01b815260040160206040518083038186803b15801561139357600080fd5b505afa1580156113a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113cb9190612e7c565b905060005b835181101561158c57600c5484516000916001600160a01b031690638a74cd799087908590811061140357611403612cb0565b60200260200101516040518263ffffffff1660e01b8152600401611427919061288d565b60206040518083038186803b15801561143f57600080fd5b505afa158015611453573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114779190612e7c565b600c5460405163f53675eb60e01b8152600481018390529192506001600160a01b03169063f53675eb9060240160206040518083038186803b1580156114bc57600080fd5b505afa1580156114d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f49190612e95565b156114ff575061157c565b6000805b838110156115415785818151811061151d5761151d612cb0565b602002602001015183141561153157600191505b61153a81612d01565b9050611503565b50801561154f57505061157c565b8185848151811061156257611562612cb0565b60209081029190910101526115778488612eb2565b965050505b61158581612d01565b90506113d0565b50505050919050565b60606001805461061e90612c75565b6115af338383611ff0565b5050565b601060205260009081526040902080546115cc90612c75565b80601f01602080910402602001604051908101604052809291908181526020018280546115f890612c75565b80156116455780601f1061161a57610100808354040283529160200191611645565b820191906000526020600020905b81548152906001019060200180831161162857829003601f168201915b505050505081565b6116573383611d00565b6116735760405162461bcd60e51b815260040161071690612d1c565b61167f848484846120bf565b50505050565b6000818152600260205260409020546060906001600160a01b03166117045760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610716565b6000600d805461171390612c75565b9050111561174d57600d611726836120f2565b604051602001611737929190612eca565b6040516020818303038152906040529050919050565b6000828152600f60209081526040808320548352601082528083208584526011909252918290205491516366eaf96360e01b815273256ca7a1e21cb903b0d2b166fd1505299addf2ff926366eaf963926117ac92879290600401612f44565b60006040518083038186803b1580156117c457600080fd5b505af41580156117d8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106099190810190612fdb565b600061180b83610a0a565b905060008390506000815167ffffffffffffffff81111561182e5761182e6128ff565b6040519080825280601f01601f191660200182016040528015611858576020820181803683370190505b509050816001835161186a9190613052565b8151811061187a5761187a612cb0565b0160209081015160f81c14156118c15760405162461bcd60e51b815260206004820152600c60248201526b1cdc1858d948185d08195b9960a21b6044820152606401610716565b60005b81518110156119de57604160f81b8382815181106118e4576118e4612cb0565b01602001516001600160f81b031916108015906119255750605a60f81b83828151811061191357611913612cb0565b01602001516001600160f81b03191611155b156119875782818151811061193c5761193c612cb0565b602001015160f81c60f81b60f81c60206119569190612cdc565b60f81b82828151811061196b5761196b612cb0565b60200101906001600160f81b031916908160001a9053506119ce565b82818151811061199957611999612cb0565b602001015160f81c60f81b8282815181106119b6576119b6612cb0565b60200101906001600160f81b031916908160001a9053505b6119d781612d01565b90506118c4565b5080516020808301919091206000818152600e90925260409091205415611a395760405162461bcd60e51b815260206004820152600f60248201526e73656e74656e63652065787369742160881b6044820152606401610716565b600b8054906000611a4983612d01565b9190505550611a5a33600b546121f0565b600b546000828152600e6020908152604080832093909355601081529190208751611a8792890190612772565b50600b80546000908152600f602090815260408083208590558354835260119091529081902062ffffff88169055600c5491549051630986105d60e21b81526001600160a01b03909216916326184174913491611ae991908990600401613069565b6000604051808303818588803b158015611b0257600080fd5b505af1158015611b16573d6000803e3d6000fd5b5050505050505050505050565b6000818152600f6020908152604080832054835260109091529020805460609190611b4d90612c75565b80601f0160208091040260200160405190810160405280929190818152602001828054611b7990612c75565b8015611bc65780601f10611b9b57610100808354040283529160200191611bc6565b820191906000526020600020905b815481529060010190602001808311611ba957829003601f168201915b50505050509050919050565b600a546001600160a01b03163314611bfc5760405162461bcd60e51b815260040161071690612e47565b6001600160a01b038116611c615760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610716565b611c6a81611f9e565b50565b60006001600160e01b0319821663780e9d6360e01b148061060957506106098261233e565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611cc7826111b9565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611d795760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610716565b6000611d84836111b9565b9050806001600160a01b0316846001600160a01b03161480611dbf5750836001600160a01b0316611db4846106a1565b6001600160a01b0316145b80611def57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611e0a826111b9565b6001600160a01b031614611e6e5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610716565b6001600160a01b038216611ed05760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610716565b611edb83838361238e565b611ee6600082611c92565b6001600160a01b0383166000908152600360205260408120805460019290611f0f908490613052565b90915550506001600160a01b0382166000908152600360205260408120805460019290611f3d908490612eb2565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156120525760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610716565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6120ca848484611df7565b6120d684848484612399565b61167f5760405162461bcd60e51b815260040161071690613082565b6060816121165750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612140578061212a81612d01565b91506121399050600a836130ea565b915061211a565b60008167ffffffffffffffff81111561215b5761215b6128ff565b6040519080825280601f01601f191660200182016040528015612185576020820181803683370190505b5090505b8415611def5761219a600183613052565b91506121a7600a866130fe565b6121b2906030612eb2565b60f81b8183815181106121c7576121c7612cb0565b60200101906001600160f81b031916908160001a9053506121e9600a866130ea565b9450612189565b6001600160a01b0382166122465760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610716565b6000818152600260205260409020546001600160a01b0316156122ab5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610716565b6122b76000838361238e565b6001600160a01b03821660009081526003602052604081208054600192906122e0908490612eb2565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160e01b031982166380ac58cd60e01b148061236f57506001600160e01b03198216635b5e139f60e01b145b8061060957506301ffc9a760e01b6001600160e01b0319831614610609565b61084c8383836124a6565b60006001600160a01b0384163b1561249b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906123dd903390899088908890600401613112565b602060405180830381600087803b1580156123f757600080fd5b505af1925050508015612427575060408051601f3d908101601f191682019092526124249181019061314f565b60015b612481573d808015612455576040519150601f19603f3d011682016040523d82523d6000602084013e61245a565b606091505b5080516124795760405162461bcd60e51b815260040161071690613082565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611def565b506001949350505050565b6001600160a01b038316612501576124fc81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612524565b816001600160a01b0316836001600160a01b03161461252457612524838261255e565b6001600160a01b03821661253b5761084c816125fb565b826001600160a01b0316826001600160a01b03161461084c5761084c82826126aa565b6000600161256b84611230565b6125759190613052565b6000838152600760205260409020549091508082146125c8576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061260d90600190613052565b6000838152600960205260408120546008805493945090928490811061263557612635612cb0565b90600052602060002001549050806008838154811061265657612656612cb0565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061268e5761268e61316c565b6001900381819060005260206000200160009055905550505050565b60006126b583611230565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b8280546126fa90612c75565b90600052602060002090601f01602090048101928261271c5760008555612762565b82601f106127355782800160ff19823516178555612762565b82800160010185558215612762579182015b82811115612762578235825591602001919060010190612747565b5061276e9291506127e6565b5090565b82805461277e90612c75565b90600052602060002090601f0160209004810192826127a05760008555612762565b82601f106127b957805160ff1916838001178555612762565b82800160010185558215612762579182015b828111156127625782518255916020019190600101906127cb565b5b8082111561276e57600081556001016127e7565b6001600160e01b031981168114611c6a57600080fd5b60006020828403121561282357600080fd5b813561282e816127fb565b9392505050565b60005b83811015612850578181015183820152602001612838565b8381111561167f5750506000910152565b60008151808452612879816020860160208601612835565b601f01601f19169290920160200192915050565b60208152600061282e6020830184612861565b6000602082840312156128b257600080fd5b5035919050565b80356001600160a01b03811681146128d057600080fd5b919050565b600080604083850312156128e857600080fd5b6128f1836128b9565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561293e5761293e6128ff565b604052919050565b600067ffffffffffffffff821115612960576129606128ff565b50601f01601f191660200190565b600061298161297c84612946565b612915565b905082815283838301111561299557600080fd5b828260208301376000602084830101529392505050565b600082601f8301126129bd57600080fd5b61282e8383356020850161296e565b6000602082840312156129de57600080fd5b813567ffffffffffffffff8111156129f557600080fd5b611def848285016129ac565b600080600060608486031215612a1657600080fd5b612a1f846128b9565b9250612a2d602085016128b9565b9150604084013590509250925092565b600081518084526020808501808196508360051b8101915082860160005b85811015612a85578284038952612a73848351612861565b98850198935090840190600101612a5b565b5091979650505050505050565b60208152600061282e6020830184612a3d565b60008060208385031215612ab857600080fd5b823567ffffffffffffffff80821115612ad057600080fd5b818501915085601f830112612ae457600080fd5b813581811115612af357600080fd5b866020828501011115612b0557600080fd5b60209290920196919550909350505050565b600060208284031215612b2957600080fd5b61282e826128b9565b8015158114611c6a57600080fd5b60008060408385031215612b5357600080fd5b612b5c836128b9565b91506020830135612b6c81612b32565b809150509250929050565b60008060008060808587031215612b8d57600080fd5b612b96856128b9565b9350612ba4602086016128b9565b925060408501359150606085013567ffffffffffffffff811115612bc757600080fd5b8501601f81018713612bd857600080fd5b612be78782356020840161296e565b91505092959194509250565b60008060408385031215612c0657600080fd5b823567ffffffffffffffff811115612c1d57600080fd5b612c29858286016129ac565b925050602083013562ffffff81168114612b6c57600080fd5b60008060408385031215612c5557600080fd5b612c5e836128b9565b9150612c6c602084016128b9565b90509250929050565b600181811c90821680612c8957607f821691505b60208210811415612caa57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff84168060ff03821115612cf957612cf9612cc6565b019392505050565b6000600019821415612d1557612d15612cc6565b5060010190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526025908201527f73656e74656e636520636f6e7461696e7320696c6c6567616c20636861726163604082015264746572732160d81b606082015260800190565b600061ffff80831681811415612dca57612dca612cc6565b6001019392505050565b600061ffff83811690831681811015612def57612def612cc6565b039392505050565b600061ffff80831681851681830481118215151615612e1857612e18612cc6565b02949350505050565b600061ffff808316818516808303821115612e3e57612e3e612cc6565b01949350505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215612e8e57600080fd5b5051919050565b600060208284031215612ea757600080fd5b815161282e81612b32565b60008219821115612ec557612ec5612cc6565b500190565b6000808454612ed881612c75565b60018281168015612ef05760018114612f0157612f30565b60ff19841687528287019450612f30565b8860005260208060002060005b85811015612f275781548a820152908401908201612f0e565b50505082870194505b505050508351612e3e818360208801612835565b8381526000602060608184015260008554612f5e81612c75565b8060608701526080600180841660008114612f805760018114612f9457612fc2565b60ff1985168984015260a089019550612fc2565b8a6000528660002060005b85811015612fba5781548b8201860152908301908801612f9f565b8a0184019650505b5050505062ffffff86166040860152509150611def9050565b600060208284031215612fed57600080fd5b815167ffffffffffffffff81111561300457600080fd5b8201601f8101841361301557600080fd5b805161302361297c82612946565b81815285602083850101111561303857600080fd5b613049826020830160208601612835565b95945050505050565b60008282101561306457613064612cc6565b500390565b828152604060208201526000611def6040830184612a3d565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b6000826130f9576130f96130d4565b500490565b60008261310d5761310d6130d4565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061314590830184612861565b9695505050505050565b60006020828403121561316157600080fd5b815161282e816127fb565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208d639e316e937a5f28714aa058eeb2433e43a1622815630369e0b0e69fd8897e64736f6c634300080900330000000000000000000000000cc5d6c786202ba7d938aba1d458c4b84ac77ba3

Deployed Bytecode

0x6080604052600436106101cd5760003560e01c80636352211e116100f7578063a22cb46511610095578063d868d85211610064578063d868d85214610562578063e3e3046314610575578063e985e9c514610595578063f2fde38b146105de57600080fd5b8063a22cb465146104e2578063a93c434e14610502578063b88d4fde14610522578063c87b56dd1461054257600080fd5b80637a89ae66116100d15780637a89ae66146104625780638da5cb5b1461048257806395d89b41146104a057806396b17814146104b557600080fd5b80636352211e1461040d57806370a082311461042d578063715018a61461044d57600080fd5b80632f745c591161016f5780634f6ccce71161013e5780634f6ccce7146103735780635280bbac1461039357806355f804b3146103c05780635e135bc6146103e057600080fd5b80632f745c59146102e657806332a1634a1461030657806334525dfd1461032657806342842e0e1461035357600080fd5b8063095ea7b3116101ab578063095ea7b3146102615780630b36404b1461028357806318160ddd146102b157806323b872dd146102c657600080fd5b806301ffc9a7146101d257806306fdde0314610207578063081812fc14610229575b600080fd5b3480156101de57600080fd5b506101f26101ed366004612811565b6105fe565b60405190151581526020015b60405180910390f35b34801561021357600080fd5b5061021c61060f565b6040516101fe919061288d565b34801561023557600080fd5b506102496102443660046128a0565b6106a1565b6040516001600160a01b0390911681526020016101fe565b34801561026d57600080fd5b5061028161027c3660046128d5565b61073b565b005b34801561028f57600080fd5b506102a361029e3660046129cc565b610851565b6040519081526020016101fe565b3480156102bd57600080fd5b506008546102a3565b3480156102d257600080fd5b506102816102e1366004612a01565b610943565b3480156102f257600080fd5b506102a36103013660046128d5565b610974565b34801561031257600080fd5b50600c54610249906001600160a01b031681565b34801561033257600080fd5b506103466103413660046129cc565b610a0a565b6040516101fe9190612a92565b34801561035f57600080fd5b5061028161036e366004612a01565b6110d5565b34801561037f57600080fd5b506102a361038e3660046128a0565b6110f0565b34801561039f57600080fd5b506102a36103ae3660046128a0565b60116020526000908152604090205481565b3480156103cc57600080fd5b506102816103db366004612aa5565b611183565b3480156103ec57600080fd5b506102a36103fb3660046128a0565b600f6020526000908152604090205481565b34801561041957600080fd5b506102496104283660046128a0565b6111b9565b34801561043957600080fd5b506102a3610448366004612b17565b611230565b34801561045957600080fd5b506102816112b7565b34801561046e57600080fd5b506102a361047d3660046129cc565b6112ed565b34801561048e57600080fd5b50600a546001600160a01b0316610249565b3480156104ac57600080fd5b5061021c611595565b3480156104c157600080fd5b506102a36104d03660046128a0565b600e6020526000908152604090205481565b3480156104ee57600080fd5b506102816104fd366004612b40565b6115a4565b34801561050e57600080fd5b5061021c61051d3660046128a0565b6115b3565b34801561052e57600080fd5b5061028161053d366004612b77565b61164d565b34801561054e57600080fd5b5061021c61055d3660046128a0565b611685565b610281610570366004612bf3565b611800565b34801561058157600080fd5b5061021c6105903660046128a0565b611b23565b3480156105a157600080fd5b506101f26105b0366004612c42565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156105ea57600080fd5b506102816105f9366004612b17565b611bd2565b600061060982611c6d565b92915050565b60606000805461061e90612c75565b80601f016020809104026020016040519081016040528092919081815260200182805461064a90612c75565b80156106975780601f1061066c57610100808354040283529160200191610697565b820191906000526020600020905b81548152906001019060200180831161067a57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b031661071f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610746826111b9565b9050806001600160a01b0316836001600160a01b031614156107b45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610716565b336001600160a01b03821614806107d057506107d081336105b0565b6108425760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610716565b61084c8383611c92565b505050565b600081815b815181101561092557604160f81b82828151811061087657610876612cb0565b01602001516001600160f81b031916108015906108b75750605a60f81b8282815181106108a5576108a5612cb0565b01602001516001600160f81b03191611155b15610915578181815181106108ce576108ce612cb0565b602001015160f81c60f81b60f81c60206108e89190612cdc565b60f81b8282815181106108fd576108fd612cb0565b60200101906001600160f81b031916908160001a9053505b61091e81612d01565b9050610856565b5080516020918201206000908152600e909152604090205492915050565b61094d3382611d00565b6109695760405162461bcd60e51b815260040161071690612d1c565b61084c838383611df7565b600061097f83611230565b82106109e15760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610716565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b80516060908290600161ffff821610801590610a2c575061013f8161ffff1611155b610a785760405162461bcd60e51b815260206004820152601860248201527f73656e74656e6365206c656e67746820696c6c6567616c2100000000000000006044820152606401610716565b60008083600081518110610a8e57610a8e612cb0565b0160209081015160f81c91508110801590610aae5750607e8161ffff1611155b610aca5760405162461bcd60e51b815260040161071690612d6d565b600060308261ffff1610158015610ae6575060398261ffff1611155b80610b06575060418261ffff1610158015610b065750605a8261ffff1611155b80610b26575060618261ffff1610158015610b265750607a8261ffff1611155b6040805161014080825261282082019092529192506000918291602082016128008036833701905050905060008315610b935760008282610b6681612db2565b935061ffff1681518110610b7c57610b7c612cb0565b602002602001019061ffff16908161ffff16815250505b60015b610ba1600189612dd4565b61ffff168161ffff161015610d1257888161ffff1681518110610bc657610bc6612cb0565b0160209081015160f81c96508610801590610be65750607e8661ffff1611155b610c025760405162461bcd60e51b815260040161071690612d6d565b60308661ffff1610158015610c1c575060398661ffff1611155b80610c3c575060418661ffff1610158015610c3c5750605a8661ffff1611155b80610c5c575060618661ffff1610158015610c5c5750607a8661ffff1611155b9350838015610c69575084155b15610cab57808383610c7a81612db2565b945061ffff1681518110610c9057610c90612cb0565b602002602001019061ffff16908161ffff1681525050610cfe565b83158015610cb65750845b15610cfe57808383610cc781612db2565b945061ffff1681518110610cdd57610cdd612cb0565b61ffff9092166020928302919091019091015286610cfa81612db2565b9750505b83945080610d0b90612db2565b9050610b96565b5087610d1f600189612dd4565b61ffff1681518110610d3357610d33612cb0565b0160209081015160f81c95508510801590610d535750607e8561ffff1611155b610d6f5760405162461bcd60e51b815260040161071690612d6d565b60308561ffff1610158015610d89575060398561ffff1611155b80610da9575060418561ffff1610158015610da95750605a8561ffff1611155b80610dc9575060618561ffff1610158015610dc95750607a8561ffff1611155b92508215610e9e578315610e1457868282610de381612db2565b935061ffff1681518110610df957610df9612cb0565b602002602001019061ffff16908161ffff1681525050610e8c565b610e1f600188612dd4565b8282610e2a81612db2565b935061ffff1681518110610e4057610e40612cb0565b61ffff90921660209283029190910190910152868282610e5f81612db2565b935061ffff1681518110610e7557610e75612cb0565b602002602001019061ffff16908161ffff16815250505b85610e9681612db2565b965050610ef1565b8315610ef157610eaf600188612dd4565b8282610eba81612db2565b935061ffff1681518110610ed057610ed0612cb0565b61ffff9092166020928302919091019091015285610eed81612db2565b9650505b8561ffff1667ffffffffffffffff811115610f0e57610f0e6128ff565b604051908082528060200260200182016040528015610f4157816020015b6060815260200190600190039081610f2c5790505b50985060005b8661ffff168161ffff1610156110c757600083610f65836002612df7565b61ffff1681518110610f7957610f79612cb0565b60200260200101519050600084836002610f939190612df7565b610f9e906001612e21565b61ffff1681518110610fb257610fb2612cb0565b6020026020010151905060008282610fca9190612dd4565b61ffff1667ffffffffffffffff811115610fe657610fe66128ff565b6040519080825280601f01601f191660200182016040528015611010576020820181803683370190505b509050825b8261ffff168161ffff161015611090578c8161ffff168151811061103b5761103b612cb0565b01602001516001600160f81b031916826110558684612dd4565b61ffff168151811061106957611069612cb0565b60200101906001600160f81b031916908160001a90535061108981612db2565b9050611015565b50808d8561ffff16815181106110a8576110a8612cb0565b6020026020010181905250505050806110c090612db2565b9050610f47565b505050505050505050919050565b61084c8383836040518060200160405280600081525061164d565b60006110fb60085490565b821061115e5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610716565b6008828154811061117157611171612cb0565b90600052602060002001549050919050565b600a546001600160a01b031633146111ad5760405162461bcd60e51b815260040161071690612e47565b61084c600d83836126ee565b6000818152600260205260408120546001600160a01b0316806106095760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610716565b60006001600160a01b03821661129b5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610716565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146112e15760405162461bcd60e51b815260040161071690612e47565b6112eb6000611f9e565b565b6000806112f983610a0a565b90506000815167ffffffffffffffff811115611317576113176128ff565b604051908082528060200260200182016040528015611340578160200160208202803683370190505b5090506000600c60009054906101000a90046001600160a01b03166001600160a01b031663c11aa3ab6040518163ffffffff1660e01b815260040160206040518083038186803b15801561139357600080fd5b505afa1580156113a7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113cb9190612e7c565b905060005b835181101561158c57600c5484516000916001600160a01b031690638a74cd799087908590811061140357611403612cb0565b60200260200101516040518263ffffffff1660e01b8152600401611427919061288d565b60206040518083038186803b15801561143f57600080fd5b505afa158015611453573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114779190612e7c565b600c5460405163f53675eb60e01b8152600481018390529192506001600160a01b03169063f53675eb9060240160206040518083038186803b1580156114bc57600080fd5b505afa1580156114d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f49190612e95565b156114ff575061157c565b6000805b838110156115415785818151811061151d5761151d612cb0565b602002602001015183141561153157600191505b61153a81612d01565b9050611503565b50801561154f57505061157c565b8185848151811061156257611562612cb0565b60209081029190910101526115778488612eb2565b965050505b61158581612d01565b90506113d0565b50505050919050565b60606001805461061e90612c75565b6115af338383611ff0565b5050565b601060205260009081526040902080546115cc90612c75565b80601f01602080910402602001604051908101604052809291908181526020018280546115f890612c75565b80156116455780601f1061161a57610100808354040283529160200191611645565b820191906000526020600020905b81548152906001019060200180831161162857829003601f168201915b505050505081565b6116573383611d00565b6116735760405162461bcd60e51b815260040161071690612d1c565b61167f848484846120bf565b50505050565b6000818152600260205260409020546060906001600160a01b03166117045760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610716565b6000600d805461171390612c75565b9050111561174d57600d611726836120f2565b604051602001611737929190612eca565b6040516020818303038152906040529050919050565b6000828152600f60209081526040808320548352601082528083208584526011909252918290205491516366eaf96360e01b815273256ca7a1e21cb903b0d2b166fd1505299addf2ff926366eaf963926117ac92879290600401612f44565b60006040518083038186803b1580156117c457600080fd5b505af41580156117d8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526106099190810190612fdb565b600061180b83610a0a565b905060008390506000815167ffffffffffffffff81111561182e5761182e6128ff565b6040519080825280601f01601f191660200182016040528015611858576020820181803683370190505b509050816001835161186a9190613052565b8151811061187a5761187a612cb0565b0160209081015160f81c14156118c15760405162461bcd60e51b815260206004820152600c60248201526b1cdc1858d948185d08195b9960a21b6044820152606401610716565b60005b81518110156119de57604160f81b8382815181106118e4576118e4612cb0565b01602001516001600160f81b031916108015906119255750605a60f81b83828151811061191357611913612cb0565b01602001516001600160f81b03191611155b156119875782818151811061193c5761193c612cb0565b602001015160f81c60f81b60f81c60206119569190612cdc565b60f81b82828151811061196b5761196b612cb0565b60200101906001600160f81b031916908160001a9053506119ce565b82818151811061199957611999612cb0565b602001015160f81c60f81b8282815181106119b6576119b6612cb0565b60200101906001600160f81b031916908160001a9053505b6119d781612d01565b90506118c4565b5080516020808301919091206000818152600e90925260409091205415611a395760405162461bcd60e51b815260206004820152600f60248201526e73656e74656e63652065787369742160881b6044820152606401610716565b600b8054906000611a4983612d01565b9190505550611a5a33600b546121f0565b600b546000828152600e6020908152604080832093909355601081529190208751611a8792890190612772565b50600b80546000908152600f602090815260408083208590558354835260119091529081902062ffffff88169055600c5491549051630986105d60e21b81526001600160a01b03909216916326184174913491611ae991908990600401613069565b6000604051808303818588803b158015611b0257600080fd5b505af1158015611b16573d6000803e3d6000fd5b5050505050505050505050565b6000818152600f6020908152604080832054835260109091529020805460609190611b4d90612c75565b80601f0160208091040260200160405190810160405280929190818152602001828054611b7990612c75565b8015611bc65780601f10611b9b57610100808354040283529160200191611bc6565b820191906000526020600020905b815481529060010190602001808311611ba957829003601f168201915b50505050509050919050565b600a546001600160a01b03163314611bfc5760405162461bcd60e51b815260040161071690612e47565b6001600160a01b038116611c615760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610716565b611c6a81611f9e565b50565b60006001600160e01b0319821663780e9d6360e01b148061060957506106098261233e565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611cc7826111b9565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b0316611d795760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610716565b6000611d84836111b9565b9050806001600160a01b0316846001600160a01b03161480611dbf5750836001600160a01b0316611db4846106a1565b6001600160a01b0316145b80611def57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611e0a826111b9565b6001600160a01b031614611e6e5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610716565b6001600160a01b038216611ed05760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610716565b611edb83838361238e565b611ee6600082611c92565b6001600160a01b0383166000908152600360205260408120805460019290611f0f908490613052565b90915550506001600160a01b0382166000908152600360205260408120805460019290611f3d908490612eb2565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b031614156120525760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610716565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6120ca848484611df7565b6120d684848484612399565b61167f5760405162461bcd60e51b815260040161071690613082565b6060816121165750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612140578061212a81612d01565b91506121399050600a836130ea565b915061211a565b60008167ffffffffffffffff81111561215b5761215b6128ff565b6040519080825280601f01601f191660200182016040528015612185576020820181803683370190505b5090505b8415611def5761219a600183613052565b91506121a7600a866130fe565b6121b2906030612eb2565b60f81b8183815181106121c7576121c7612cb0565b60200101906001600160f81b031916908160001a9053506121e9600a866130ea565b9450612189565b6001600160a01b0382166122465760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610716565b6000818152600260205260409020546001600160a01b0316156122ab5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610716565b6122b76000838361238e565b6001600160a01b03821660009081526003602052604081208054600192906122e0908490612eb2565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160e01b031982166380ac58cd60e01b148061236f57506001600160e01b03198216635b5e139f60e01b145b8061060957506301ffc9a760e01b6001600160e01b0319831614610609565b61084c8383836124a6565b60006001600160a01b0384163b1561249b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906123dd903390899088908890600401613112565b602060405180830381600087803b1580156123f757600080fd5b505af1925050508015612427575060408051601f3d908101601f191682019092526124249181019061314f565b60015b612481573d808015612455576040519150601f19603f3d011682016040523d82523d6000602084013e61245a565b606091505b5080516124795760405162461bcd60e51b815260040161071690613082565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611def565b506001949350505050565b6001600160a01b038316612501576124fc81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612524565b816001600160a01b0316836001600160a01b03161461252457612524838261255e565b6001600160a01b03821661253b5761084c816125fb565b826001600160a01b0316826001600160a01b03161461084c5761084c82826126aa565b6000600161256b84611230565b6125759190613052565b6000838152600760205260409020549091508082146125c8576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061260d90600190613052565b6000838152600960205260408120546008805493945090928490811061263557612635612cb0565b90600052602060002001549050806008838154811061265657612656612cb0565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061268e5761268e61316c565b6001900381819060005260206000200160009055905550505050565b60006126b583611230565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b8280546126fa90612c75565b90600052602060002090601f01602090048101928261271c5760008555612762565b82601f106127355782800160ff19823516178555612762565b82800160010185558215612762579182015b82811115612762578235825591602001919060010190612747565b5061276e9291506127e6565b5090565b82805461277e90612c75565b90600052602060002090601f0160209004810192826127a05760008555612762565b82601f106127b957805160ff1916838001178555612762565b82800160010185558215612762579182015b828111156127625782518255916020019190600101906127cb565b5b8082111561276e57600081556001016127e7565b6001600160e01b031981168114611c6a57600080fd5b60006020828403121561282357600080fd5b813561282e816127fb565b9392505050565b60005b83811015612850578181015183820152602001612838565b8381111561167f5750506000910152565b60008151808452612879816020860160208601612835565b601f01601f19169290920160200192915050565b60208152600061282e6020830184612861565b6000602082840312156128b257600080fd5b5035919050565b80356001600160a01b03811681146128d057600080fd5b919050565b600080604083850312156128e857600080fd5b6128f1836128b9565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561293e5761293e6128ff565b604052919050565b600067ffffffffffffffff821115612960576129606128ff565b50601f01601f191660200190565b600061298161297c84612946565b612915565b905082815283838301111561299557600080fd5b828260208301376000602084830101529392505050565b600082601f8301126129bd57600080fd5b61282e8383356020850161296e565b6000602082840312156129de57600080fd5b813567ffffffffffffffff8111156129f557600080fd5b611def848285016129ac565b600080600060608486031215612a1657600080fd5b612a1f846128b9565b9250612a2d602085016128b9565b9150604084013590509250925092565b600081518084526020808501808196508360051b8101915082860160005b85811015612a85578284038952612a73848351612861565b98850198935090840190600101612a5b565b5091979650505050505050565b60208152600061282e6020830184612a3d565b60008060208385031215612ab857600080fd5b823567ffffffffffffffff80821115612ad057600080fd5b818501915085601f830112612ae457600080fd5b813581811115612af357600080fd5b866020828501011115612b0557600080fd5b60209290920196919550909350505050565b600060208284031215612b2957600080fd5b61282e826128b9565b8015158114611c6a57600080fd5b60008060408385031215612b5357600080fd5b612b5c836128b9565b91506020830135612b6c81612b32565b809150509250929050565b60008060008060808587031215612b8d57600080fd5b612b96856128b9565b9350612ba4602086016128b9565b925060408501359150606085013567ffffffffffffffff811115612bc757600080fd5b8501601f81018713612bd857600080fd5b612be78782356020840161296e565b91505092959194509250565b60008060408385031215612c0657600080fd5b823567ffffffffffffffff811115612c1d57600080fd5b612c29858286016129ac565b925050602083013562ffffff81168114612b6c57600080fd5b60008060408385031215612c5557600080fd5b612c5e836128b9565b9150612c6c602084016128b9565b90509250929050565b600181811c90821680612c8957607f821691505b60208210811415612caa57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff84168060ff03821115612cf957612cf9612cc6565b019392505050565b6000600019821415612d1557612d15612cc6565b5060010190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526025908201527f73656e74656e636520636f6e7461696e7320696c6c6567616c20636861726163604082015264746572732160d81b606082015260800190565b600061ffff80831681811415612dca57612dca612cc6565b6001019392505050565b600061ffff83811690831681811015612def57612def612cc6565b039392505050565b600061ffff80831681851681830481118215151615612e1857612e18612cc6565b02949350505050565b600061ffff808316818516808303821115612e3e57612e3e612cc6565b01949350505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215612e8e57600080fd5b5051919050565b600060208284031215612ea757600080fd5b815161282e81612b32565b60008219821115612ec557612ec5612cc6565b500190565b6000808454612ed881612c75565b60018281168015612ef05760018114612f0157612f30565b60ff19841687528287019450612f30565b8860005260208060002060005b85811015612f275781548a820152908401908201612f0e565b50505082870194505b505050508351612e3e818360208801612835565b8381526000602060608184015260008554612f5e81612c75565b8060608701526080600180841660008114612f805760018114612f9457612fc2565b60ff1985168984015260a089019550612fc2565b8a6000528660002060005b85811015612fba5781548b8201860152908301908801612f9f565b8a0184019650505b5050505062ffffff86166040860152509150611def9050565b600060208284031215612fed57600080fd5b815167ffffffffffffffff81111561300457600080fd5b8201601f8101841361301557600080fd5b805161302361297c82612946565b81815285602083850101111561303857600080fd5b613049826020830160208601612835565b95945050505050565b60008282101561306457613064612cc6565b500390565b828152604060208201526000611def6040830184612a3d565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b6000826130f9576130f96130d4565b500490565b60008261310d5761310d6130d4565b500690565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061314590830184612861565b9695505050505050565b60006020828403121561316157600080fd5b815161282e816127fb565b634e487b7160e01b600052603160045260246000fdfea26469706673582212208d639e316e937a5f28714aa058eeb2433e43a1622815630369e0b0e69fd8897e64736f6c63430008090033

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

0000000000000000000000000cc5d6c786202ba7d938aba1d458c4b84ac77ba3

-----Decoded View---------------
Arg [0] : _word (address): 0x0Cc5D6c786202Ba7d938aba1d458c4B84AC77ba3

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000cc5d6c786202ba7d938aba1d458c4b84ac77ba3


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.