Token Blitmap

NFT  
 
 
Loading
[ Download CSV Export  ] 
Loading
Loading

OVERVIEW

Community crafted sci-fantasy universe.

# Exchange Pair Price  24H Volume % Volume
Loading
This contract contains unverified libraries: BlitmapAnalysis
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:
Blitmap

Compiler Version
v0.8.1+commit.df193b15

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 15 : blitmap.sol
/*
______ _     _____ _____ 
| ___ \ |   |_   _|_   _|
| |_/ / |     | |   | |  
| ___ \ |     | |   | |  
| |_/ / |_____| |_  | |  
\____/\_____/\___/  \_/                     
___  ___  ___  ______    
|  \/  | / _ \ | ___ \   
| .  . |/ /_\ \| |_/ /   
| |\/| ||  _  ||  __/    
| |  | || | | || |       
\_|  |_/\_| |_/\_|       

by dom hofmann and friends
*/

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./blitmap-analysis.sol";
import "./string-util.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";

contract Blitmap is ERC721Enumerable, ReentrancyGuard {
    struct SVGCursor {
        uint8 x;
        uint8 y;
        string color1;
        string color2;
        string color3;
        string color4;
    }
    
    struct VariantParents {
        uint256 tokenIdA;
        uint256 tokenIdB;
    }
    
    struct Creator {
        string name;
        bool isAllowed;
        uint256 availableBalance;
        uint8 remainingMints;
    }
    
    struct TokenMetadata {
        string name;
        address creator;
        uint8 remainingVariants;
    }
    
    struct Colors {
        uint[4] r;
        uint[4] g;
        uint[4] b;
    }
    
    address private _owner;
    mapping (address => Creator) private _allowedList;
    event AddedToAllowedList(address indexed account);
    event RemovedFromAllowedList(address indexed account);
    event Published();
    event MetadataChanged(uint256 indexed tokenId, TokenMetadata indexed newMetadata);
    
    mapping(uint256 => VariantParents) private _tokenParentIndex;
    mapping(bytes32 => bool) private _tokenPairs;
    
    bytes[] private _tokenDataIndex;
    TokenMetadata[] private _tokenMetadataIndex;
    
    string private _uriPrefix;

    bytes private constant _genesisToken = hex"0000000600ffd5719efff568000000000000000015555555555555541555555555555554140514555555555414451455555555541445045555555554144510555555555414451455555555541405145555555554155555555555555415555555555555541401114051451554145511445145155414550140514115541455114451441554145511445145155414011144514515541555555555555554155555555555555400000000000000002aaaaaaaaaaaaaa82aaaaaaaaaaaaaa800000000000000003ffffffffffffffc3ffffffffffffffc0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000";
    
    uint8 private _numOriginals;
    uint8 private constant _maxNumOriginals = 128;
    uint8 private constant _maxNumVariants = 16;
    
    bool public published;
    
    modifier onlyOwner() {
        require(msg.sender == _owner);
        _;
    }
    
    modifier onlyAllowed() {
        require(isAllowed(msg.sender));
        _;
    }

    constructor() ERC721("Blitmap", "BLIT") {
        _owner = msg.sender;

        published = false;

        setBaseURI("https://api.blitmap.com/v1/metadata/");

        addAllowed(msg.sender, "dom", 128);
        addAllowed(address(0xE7bd51Dc30d4bDc9FDdD42eA7c0a283590C9D416), "jstn", 1);
        addAllowed(address(0x9BC20560301cDc15c3190f745B6D910167d4b467), "bhoka", 1);
        addAllowed(address(0xC5fFbCd8A374889c6e95f8df733e32A0e9476a9c), "BRAINDRAIND", 11);
        addAllowed(address(0x8e29B3F71a8c7276d122C88d9bf317e857ABb376), "BigPapap", 12);
        addAllowed(address(0x9Bf043a72ca1cD3DC4BCa66c9F6c1d040CfF7772), "Veenus", 12);
        addAllowed(address(0xBb01f3CAc350eD60B1bD080B7A55cC5768cFD565), "startselect", 4);
        addAllowed(address(0xf0136dEe223c9a303ae8863F9438a687C775a4a7), "pinot", 2);
        addAllowed(address(0xd1e0eb60Bda1c098353D08a167B011EA8bcd38Fa), "zod", 4);
        addAllowed(address(0x4610CC9c73C0215818fE47962eaBD93cF331856b), "KlingKlong", 4);
        addAllowed(address(0xd42bd96B117dd6BD63280620EA981BF967A7aD2B), "numo", 10);
        addAllowed(address(0xeE463034F385DD9B26efD7767406079f86edB992), "themoonladder", 4);
        addAllowed(address(0x9f2942fF27e40445d3CB2aAD90F84C3a03574F26), "askywlkr", 2);
        addAllowed(address(0x48A63097E1Ac123b1f5A8bbfFafA4afa8192FaB0), "ceresstation", 2);
        addAllowed(address(0x6EBd8991fC87F130DE28DE4b37F882d6cbE9aB28), "HighleyVarlet", 4);
        addAllowed(address(0xfB843f8c4992EfDb6b42349C35f025ca55742D33), "worm", 1);
        addAllowed(address(0x06Ac1F9f86520225b73EFCe4982c9d9505753251), "hipcityreg", 1);
        addAllowed(address(0xf4c9C5229356d39b4F852ecF6E08576EebEDB0EC), "spacedoctor", 4);
        
        mintOriginal(_genesisToken, "Genesis");
    }
    
    function _baseURI() override internal view virtual returns (string memory) {
        return _uriPrefix;
    }
    
    function setBaseURI(string memory prefix) public onlyOwner {
        _uriPrefix = prefix;
    }
    
    function addAllowed(address _address, string memory name, uint8 allowedMints) public onlyOwner {
        Creator memory creator;
        creator.name = name;
        creator.isAllowed = true;
        creator.remainingMints = allowedMints;
        _allowedList[_address] = creator;
        emit AddedToAllowedList(_address);
    }
    
    function changeMetadataOf(uint256 tokenId, TokenMetadata memory newMetadata) public onlyOwner {
        require(published == false, "b:01"); // only allow changes prior to publishing
        _tokenMetadataIndex[tokenId] = newMetadata;
        emit MetadataChanged(tokenId, newMetadata);
    }
    
    function publish() public onlyOwner {
        published = true;
        emit Published();
    }

    function removeAllowed(address _address) public onlyOwner {
        _allowedList[_address].isAllowed = false;
        emit RemovedFromAllowedList(_address);
    }

    function isAllowed(address _address) public view returns (bool) {
        return _allowedList[_address].isAllowed == true;
    }
    
    function creatorNameOf(address _address) public view returns (string memory) {
        return _allowedList[_address].name;
    }

    function mintOriginal(bytes memory tokenData, string memory name) public nonReentrant onlyAllowed {
        require(published == false, "b:01");
        require(_numOriginals < _maxNumOriginals, "b:03");
        require(tokenData.length == 268, "b:04"); // any combination of 268 bytes is technically a valid blit
        require(bytes(name).length > 0 && bytes(name).length < 11, "b:05");
        require(_allowedList[msg.sender].remainingMints > 0, "b:06");
        
        uint256 tokenId = totalSupply();
        
        _tokenDataIndex.push(tokenData);
        
        TokenMetadata memory metadata;
        metadata.name = name;
        metadata.remainingVariants = _maxNumVariants;
        metadata.creator = msg.sender;
        _allowedList[msg.sender].remainingMints--;
        _tokenMetadataIndex.push(metadata);
        
        _numOriginals++;
        
        _safeMint(msg.sender, tokenId);
    }
    
    function remainingNumOriginals() public view returns (uint8) {
        return _maxNumOriginals - _numOriginals;
    }
    
    function remainingNumMints(address _address) public view returns (uint8) {
        return _allowedList[_address].remainingMints;
    }
    
    function allowedNumOriginals() public pure returns (uint8) {
        return _maxNumOriginals;
    }
    
    function allowedNumVariants() public pure returns (uint8) {
        return _maxNumVariants;
    }
    
    function availableBalanceForCreator(address creatorAddress) public view returns (uint256) {
        return _allowedList[creatorAddress].availableBalance;
    }
    
    function withdrawAvailableBalance() public nonReentrant onlyAllowed {
        uint256 withdrawAmount = _allowedList[msg.sender].availableBalance;
        _allowedList[msg.sender].availableBalance = 0;
        payable(msg.sender).transfer(withdrawAmount);
    }
    
    function mintVariant(uint256 tokenIdA, uint256 tokenIdB) public nonReentrant payable {
        require(msg.value == 0.1 ether);
        require(published == true, "b:02");
        require(_exists(tokenIdA) && _exists(tokenIdB), "b:07");
        require(tokenIdA != tokenIdB, "b:08");
        require(tokenRemainingVariantsOf(tokenIdA) > 0, "b:09");
        require(tokenIsOriginal(tokenIdA) && tokenIsOriginal(tokenIdB), "b:10");
        
        // a given pair can only be minted once
        bytes32 pairHash = keccak256(abi.encodePacked(tokenIdA, tokenIdB));
        require(_tokenPairs[pairHash] == false, "b:11");
        
        uint256 variantTokenId = totalSupply();
        
        VariantParents memory parents;
        parents.tokenIdA = tokenIdA;
        parents.tokenIdB = tokenIdB;
        
        _tokenMetadataIndex[tokenIdA].remainingVariants--;
        
        // don't need to write real data here since we can assemble sibling data from parent data
        _tokenDataIndex.push(hex"00");
        
        TokenMetadata memory metadata;
        metadata.name = "";
        metadata.remainingVariants = 0;
        metadata.creator = msg.sender;
        _tokenMetadataIndex.push(metadata);
        
        _tokenParentIndex[variantTokenId] = parents;
        _tokenPairs[pairHash] = true;
        _safeMint(msg.sender, variantTokenId);
        
        _allowedList[_tokenMetadataIndex[tokenIdA].creator].availableBalance += 0.0875 ether;
        _allowedList[_tokenMetadataIndex[tokenIdB].creator].availableBalance += 0.0125 ether;
    }
    
    function tokenNameOf(uint256 tokenId) public view returns (string memory) {
        string memory name;
        if (tokenIsOriginal(tokenId)) {
            name = _tokenMetadataIndex[tokenId].name;
        } else {
            VariantParents memory parents = _tokenParentIndex[tokenId];
            name = string(abi.encodePacked(tokenNameOf(parents.tokenIdA), " ", tokenNameOf(parents.tokenIdB)));
        }
        
        string[] memory components = StringUtil.titleCase(name);
        string memory titleCaseName;
        for (uint8 i = 0; i < components.length; ++i) {
            if (i == 0) {
                titleCaseName = components[i];
            } else {
                titleCaseName = string(abi.encodePacked(titleCaseName, " ", components[i]));
            }
        }
        
        return titleCaseName;
    }
    
    function tokenIsOriginal(uint256 tokenId) public view returns (bool) {
        return (_tokenDataIndex[tokenId].length == 268);
    }
    
    function tokenParentsOf(uint256 tokenId) public view returns (uint256, uint256) {
        require(!tokenIsOriginal(tokenId));
        return (_tokenParentIndex[tokenId].tokenIdA, _tokenParentIndex[tokenId].tokenIdB);
    }

    function tokenCreatorOf(uint256 tokenId) public view returns (address) {
        return _tokenMetadataIndex[tokenId].creator;
    }
    
    function tokenCreatorNameOf(uint256 tokenId) public view returns (string memory) {
        return _allowedList[tokenCreatorOf(tokenId)].name;
    }
    
    function tokenDataOf(uint256 tokenId) public view returns (bytes memory) {
        bytes memory data = _tokenDataIndex[tokenId];
        if (tokenIsOriginal(tokenId)) {
            return data;
        }
        
        bytes memory tokenParentData = _tokenDataIndex[_tokenParentIndex[tokenId].tokenIdA];
        bytes memory tokenPaletteData = _tokenDataIndex[_tokenParentIndex[tokenId].tokenIdB];
        for (uint8 i = 0; i < 12; ++i) {
            // overwrite palette data with parent B's palette data
            tokenParentData[i] = tokenPaletteData[i];
        }
        
        return tokenParentData;
    }
    
    function tokenRemainingVariantsOf(uint256 tokenId) public view returns (uint256) {
        if (!tokenIsOriginal(tokenId)) {
            return 0;
        }
        return _tokenMetadataIndex[tokenId].remainingVariants;
    }
    
    function uintToHexDigit(uint8 d) internal pure returns (bytes1) {
        if (0 <= d && d <= 9) {
            return bytes1(uint8(bytes1('0')) + d);
        } else if (10 <= uint8(d) && uint8(d) <= 15) {
            return bytes1(uint8(bytes1('a')) + d - 10);
        }
        revert();
    }
    
    function uintToHexString(uint a) internal pure returns (string memory) {
        uint count = 0;
        uint b = a;
        while (b != 0) {
            count++;
            b /= 16;
        }
        bytes memory res = new bytes(count);
        for (uint i=0; i<count; ++i) {
            b = a % 16;
            res[count - i - 1] = uintToHexDigit(uint8(b));
            a /= 16;
        }
        
        string memory str = string(res);
        if (bytes(str).length == 0) {
            return "00";
        } else if (bytes(str).length == 1) {
            return string(abi.encodePacked("0", str));
        }
        return str;
    }
    
    function byteToUint(bytes1 b) internal pure returns (uint) {
        return uint(uint8(b));
    }
    
    function byteToHexString(bytes1 b) internal pure returns (string memory) {
        return uintToHexString(byteToUint(b));
    }
    
    function bitTest(bytes1 aByte, uint8 index) internal pure returns (bool) {
        return uint8(aByte) >> index & 1 == 1;
    }
    
    function colorIndex(bytes1 aByte, uint8 index1, uint8 index2) internal pure returns (uint) {
        if (bitTest(aByte, index2) && bitTest(aByte, index1)) {
            return 3;
        } else if (bitTest(aByte, index2) && !bitTest(aByte, index1)) {
            return 2;
        } else if (!bitTest(aByte, index2) && bitTest(aByte, index1)) {
            return 1;
        }
        return 0;
    }
    
    function pixel4(string[32] memory lookup, SVGCursor memory pos) internal pure returns (string memory) {
        return string(abi.encodePacked(
            '<rect fill="', pos.color1, '" x="', lookup[pos.x], '" y="', lookup[pos.y], '" width="1.5" height="1.5" />', 
            '<rect fill="', pos.color2, '" x="', lookup[pos.x + 1], '" y="', lookup[pos.y], '" width="1.5" height="1.5" />',
            
            string(abi.encodePacked(
                '<rect fill="', pos.color3, '" x="', lookup[pos.x + 2], '" y="', lookup[pos.y], '" width="1.5" height="1.5" />', 
                '<rect fill="', pos.color4, '" x="', lookup[pos.x + 3], '" y="', lookup[pos.y], '" width="1.5" height="1.5" />'
            ))
        ));
    }
    
    function tokenSvgDataOf(uint256 tokenId) public view returns (string memory) {
        string memory svgString = '<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32">';
        
        string[32] memory lookup = [
            "0", "1", "2", "3", "4", "5", "6", "7", 
            "8", "9", "10", "11", "12", "13", "14", "15", 
            "16", "17", "18", "19", "20", "21", "22", "23", 
            "24", "25", "26", "27", "28", "29", "30", "31"
        ];
        
        SVGCursor memory pos;
        
        bytes memory data = tokenDataOf(tokenId);
        
        string[4] memory colors = [
            string(abi.encodePacked("#", byteToHexString(data[0]), byteToHexString(data[1]), byteToHexString(data[2]))),
            string(abi.encodePacked("#", byteToHexString(data[3]), byteToHexString(data[4]), byteToHexString(data[5]))),
            string(abi.encodePacked("#", byteToHexString(data[6]), byteToHexString(data[7]), byteToHexString(data[8]))),
            string(abi.encodePacked("#", byteToHexString(data[9]), byteToHexString(data[10]), byteToHexString(data[11])))       
        ];
        
        string[8] memory p;

        for (uint i = 12; i < 268; i += 8) {
            pos.color1 =  colors[colorIndex(data[i], 6, 7)];
            pos.color2 =  colors[colorIndex(data[i], 4, 5)];
            pos.color3 =  colors[colorIndex(data[i], 2, 3)];
            pos.color4 =  colors[colorIndex(data[i], 0, 1)];
            p[0] = pixel4(lookup, pos);
            pos.x += 4;
            
            pos.color1 =  colors[colorIndex(data[i + 1], 6, 7)];
            pos.color2 =  colors[colorIndex(data[i + 1], 4, 5)];
            pos.color3 =  colors[colorIndex(data[i + 1], 2, 3)];
            pos.color4 =  colors[colorIndex(data[i + 1], 0, 1)];
            p[1] = pixel4(lookup, pos);
            pos.x += 4;
            
            pos.color1 =  colors[colorIndex(data[i + 2], 6, 7)];
            pos.color2 =  colors[colorIndex(data[i + 2], 4, 5)];
            pos.color3 =  colors[colorIndex(data[i + 2], 2, 3)];
            pos.color4 =  colors[colorIndex(data[i + 2], 0, 1)];
            p[2] = pixel4(lookup, pos);
            pos.x += 4;
            
            pos.color1 =  colors[colorIndex(data[i + 3], 6, 7)];
            pos.color2 =  colors[colorIndex(data[i + 3], 4, 5)];
            pos.color3 =  colors[colorIndex(data[i + 3], 2, 3)];
            pos.color4 =  colors[colorIndex(data[i + 3], 0, 1)];
            p[3] = pixel4(lookup, pos);
            pos.x += 4;
            
            pos.color1 =  colors[colorIndex(data[i + 4], 6, 7)];
            pos.color2 =  colors[colorIndex(data[i + 4], 4, 5)];
            pos.color3 =  colors[colorIndex(data[i + 4], 2, 3)];
            pos.color4 =  colors[colorIndex(data[i + 4], 0, 1)];
            p[4] = pixel4(lookup, pos);
            pos.x += 4;
            
            pos.color1 =  colors[colorIndex(data[i + 5], 6, 7)];
            pos.color2 =  colors[colorIndex(data[i + 5], 4, 5)];
            pos.color3 =  colors[colorIndex(data[i + 5], 2, 3)];
            pos.color4 =  colors[colorIndex(data[i + 5], 0, 1)];
            p[5] = pixel4(lookup, pos);
            pos.x += 4;
            
            pos.color1 =  colors[colorIndex(data[i + 6], 6, 7)];
            pos.color2 =  colors[colorIndex(data[i + 6], 4, 5)];
            pos.color3 =  colors[colorIndex(data[i + 6], 2, 3)];
            pos.color4 =  colors[colorIndex(data[i + 6], 0, 1)];
            p[6] = pixel4(lookup, pos);
            pos.x += 4;
            
            pos.color1 =  colors[colorIndex(data[i + 7], 6, 7)];
            pos.color2 =  colors[colorIndex(data[i + 7], 4, 5)];
            pos.color3 =  colors[colorIndex(data[i + 7], 2, 3)];
            pos.color4 =  colors[colorIndex(data[i + 7], 0, 1)];
            p[7] = pixel4(lookup, pos);
            pos.x += 4;
            
            svgString = string(abi.encodePacked(svgString, p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7]));
            
            if (pos.x >= 32) {
                pos.x = 0;
                pos.y += 1;
            }
        }
        
        svgString = string(abi.encodePacked(svgString, "</svg>"));
        return svgString;
    }
    
    function tokenRGBColorsOf(uint256 tokenId) public view returns (BlitmapAnalysis.Colors memory) {
        return BlitmapAnalysis.tokenRGBColorsOf(tokenDataOf(tokenId));
    }
    
    function tokenSlabsOf(uint256 tokenId) public view returns (string[4] memory) {
        return BlitmapAnalysis.tokenSlabsOf(tokenDataOf(tokenId));
    }
    
    function tokenAffinityOf(uint256 tokenId) public view returns (string[3] memory) {
        return BlitmapAnalysis.tokenAffinityOf(tokenDataOf(tokenId));
    }
}

/*               
errors:         
01: This can only be done before the project has been published.
02: This can only be done after the project has been published.
03: The maximum number of originals has been minted.
04: Blitmaps must be exactly 268 bytes.
05: Blitmaps must have a title must be between 1 and 10 characters.
06: You have reached your quota for minted originals.
07: One of the originals in this combination doesn't exist.
08: An original cannot be combined with itself.
09: This original has sold out all of its siblings.
10: Both blitmaps in this combination must be originals.
11: A sibling with this combination already exists.
*/

File 2 of 15 : blitmap-analysis.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

library BlitmapAnalysis {
    struct Colors {
        uint[4] r;
        uint[4] g;
        uint[4] b;
    }
    
    function byteToUint(bytes1 b) internal pure returns (uint) {
        return uint(uint8(b));
    }
    
    function tokenRGBColorsOf(bytes memory data) public pure returns (Colors memory) {
        Colors memory rgb;
        
        rgb.r[0] = byteToUint(data[0]);
        rgb.g[0] = byteToUint(data[1]);
        rgb.b[0] = byteToUint(data[2]);
        
        rgb.r[1] = byteToUint(data[3]);
        rgb.g[1] = byteToUint(data[4]);
        rgb.b[1] = byteToUint(data[5]);
        
        rgb.r[2] = byteToUint(data[6]);
        rgb.g[2] = byteToUint(data[7]);
        rgb.b[2] = byteToUint(data[8]);
        
        rgb.r[3] = byteToUint(data[9]);
        rgb.g[3] = byteToUint(data[10]);
        rgb.b[3] = byteToUint(data[11]);
        
        return rgb;
    }
    
    function tokenSlabsOf(bytes memory data) public pure returns (string[4] memory) {
        Colors memory rgb = tokenRGBColorsOf(data);
        
        string[4] memory chars = ["&#9698;", "&#9699;", "&#9700;", "&#9701;"];
        string[4] memory slabs;
        
        slabs[0] = chars[(rgb.r[0] + rgb.g[0] + rgb.b[0]) % 4];
        slabs[1] = chars[(rgb.r[1] + rgb.g[1] + rgb.b[1]) % 4];
        slabs[2] = chars[(rgb.r[2] + rgb.g[2] + rgb.b[2]) % 4];
        slabs[3] = chars[(rgb.r[3] + rgb.g[3] + rgb.b[3]) % 4];
        
        return slabs;
    }
    
    function tokenAffinityOf(bytes memory data) public pure returns (string[3] memory) {
        Colors memory rgb = tokenRGBColorsOf(data);
        
        uint r = rgb.r[0] + rgb.r[1] + rgb.r[2];
        uint g = rgb.g[0] + rgb.g[1] + rgb.g[2];
        uint b = rgb.b[0] + rgb.b[1] + rgb.b[2];
        
        string[3] memory essences;
        uint8 offset;
        
        if (r >= g && r >= b) {
            essences[offset] = "Fire";
            ++offset;
            
            if (g > 256) {
                essences[offset] = "Earth";
                ++offset;
            }
            
            if (b > 256) {
                essences[offset] = "Water";
                ++offset;
            }
        } else if (g >= r && g >= b) {
            essences[offset] = "Earth";
            ++offset;
            
            if (r > 256) {
                essences[offset] = "Fire";
                ++offset;
            }
            
            if (b > 256) {
                essences[offset] = "Water";
                ++offset;
            }
        } else if (b >= r && b >= g) {
            essences[offset] = "Water";
            ++offset;

            if (r > 256) {
                essences[offset] = "Fire";
                ++offset;
            }
            
            if (g > 256) {
                essences[offset] = "Earth";
                ++offset;
            }
        }
        
        if (offset == 1) {
            essences[0] = string(abi.encodePacked(essences[0], " III"));
        } else if (offset == 2) {
            essences[0] = string(abi.encodePacked(essences[0], " II"));
            essences[1] = string(abi.encodePacked(essences[1], " I"));
        } else if (offset == 3) {
            essences[0] = string(abi.encodePacked(essences[0], " I"));
            essences[1] = string(abi.encodePacked(essences[1], " I"));
            essences[2] = string(abi.encodePacked(essences[2], " I"));
        }
        
        return essences;
    }
}

File 3 of 15 : string-util.sol
// SPDX-License-Identifier: Apache-2.0

/*
                                 Apache License
                           Version 2.0, January 2004
                        http://www.apache.org/licenses/

   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION

   1. Definitions.

      "License" shall mean the terms and conditions for use, reproduction,
      and distribution as defined by Sections 1 through 9 of this document.

      "Licensor" shall mean the copyright owner or entity authorized by
      the copyright owner that is granting the License.

      "Legal Entity" shall mean the union of the acting entity and all
      other entities that control, are controlled by, or are under common
      control with that entity. For the purposes of this definition,
      "control" means (i) the power, direct or indirect, to cause the
      direction or management of such entity, whether by contract or
      otherwise, or (ii) ownership of fifty percent (50%) or more of the
      outstanding shares, or (iii) beneficial ownership of such entity.

      "You" (or "Your") shall mean an individual or Legal Entity
      exercising permissions granted by this License.

      "Source" form shall mean the preferred form for making modifications,
      including but not limited to software source code, documentation
      source, and configuration files.

      "Object" form shall mean any form resulting from mechanical
      transformation or translation of a Source form, including but
      not limited to compiled object code, generated documentation,
      and conversions to other media types.

      "Work" shall mean the work of authorship, whether in Source or
      Object form, made available under the License, as indicated by a
      copyright notice that is included in or attached to the work
      (an example is provided in the Appendix below).

      "Derivative Works" shall mean any work, whether in Source or Object
      form, that is based on (or derived from) the Work and for which the
      editorial revisions, annotations, elaborations, or other modifications
      represent, as a whole, an original work of authorship. For the purposes
      of this License, Derivative Works shall not include works that remain
      separable from, or merely link (or bind by name) to the interfaces of,
      the Work and Derivative Works thereof.

      "Contribution" shall mean any work of authorship, including
      the original version of the Work and any modifications or additions
      to that Work or Derivative Works thereof, that is intentionally
      submitted to Licensor for inclusion in the Work by the copyright owner
      or by an individual or Legal Entity authorized to submit on behalf of
      the copyright owner. For the purposes of this definition, "submitted"
      means any form of electronic, verbal, or written communication sent
      to the Licensor or its representatives, including but not limited to
      communication on electronic mailing lists, source code control systems,
      and issue tracking systems that are managed by, or on behalf of, the
      Licensor for the purpose of discussing and improving the Work, but
      excluding communication that is conspicuously marked or otherwise
      designated in writing by the copyright owner as "Not a Contribution."

      "Contributor" shall mean Licensor and any individual or Legal Entity
      on behalf of whom a Contribution has been received by Licensor and
      subsequently incorporated within the Work.

   2. Grant of Copyright License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      copyright license to reproduce, prepare Derivative Works of,
      publicly display, publicly perform, sublicense, and distribute the
      Work and such Derivative Works in Source or Object form.

   3. Grant of Patent License. Subject to the terms and conditions of
      this License, each Contributor hereby grants to You a perpetual,
      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
      (except as stated in this section) patent license to make, have made,
      use, offer to sell, sell, import, and otherwise transfer the Work,
      where such license applies only to those patent claims licensable
      by such Contributor that are necessarily infringed by their
      Contribution(s) alone or by combination of their Contribution(s)
      with the Work to which such Contribution(s) was submitted. If You
      institute patent litigation against any entity (including a
      cross-claim or counterclaim in a lawsuit) alleging that the Work
      or a Contribution incorporated within the Work constitutes direct
      or contributory patent infringement, then any patent licenses
      granted to You under this License for that Work shall terminate
      as of the date such litigation is filed.

   4. Redistribution. You may reproduce and distribute copies of the
      Work or Derivative Works thereof in any medium, with or without
      modifications, and in Source or Object form, provided that You
      meet the following conditions:

      (a) You must give any other recipients of the Work or
          Derivative Works a copy of this License; and

      (b) You must cause any modified files to carry prominent notices
          stating that You changed the files; and

      (c) You must retain, in the Source form of any Derivative Works
          that You distribute, all copyright, patent, trademark, and
          attribution notices from the Source form of the Work,
          excluding those notices that do not pertain to any part of
          the Derivative Works; and

      (d) If the Work includes a "NOTICE" text file as part of its
          distribution, then any Derivative Works that You distribute must
          include a readable copy of the attribution notices contained
          within such NOTICE file, excluding those notices that do not
          pertain to any part of the Derivative Works, in at least one
          of the following places: within a NOTICE text file distributed
          as part of the Derivative Works; within the Source form or
          documentation, if provided along with the Derivative Works; or,
          within a display generated by the Derivative Works, if and
          wherever such third-party notices normally appear. The contents
          of the NOTICE file are for informational purposes only and
          do not modify the License. You may add Your own attribution
          notices within Derivative Works that You distribute, alongside
          or as an addendum to the NOTICE text from the Work, provided
          that such additional attribution notices cannot be construed
          as modifying the License.

      You may add Your own copyright statement to Your modifications and
      may provide additional or different license terms and conditions
      for use, reproduction, or distribution of Your modifications, or
      for any such Derivative Works as a whole, provided Your use,
      reproduction, and distribution of the Work otherwise complies with
      the conditions stated in this License.

   5. Submission of Contributions. Unless You explicitly state otherwise,
      any Contribution intentionally submitted for inclusion in the Work
      by You to the Licensor shall be under the terms and conditions of
      this License, without any additional terms or conditions.
      Notwithstanding the above, nothing herein shall supersede or modify
      the terms of any separate license agreement you may have executed
      with Licensor regarding such Contributions.

   6. Trademarks. This License does not grant permission to use the trade
      names, trademarks, service marks, or product names of the Licensor,
      except as required for reasonable and customary use in describing the
      origin of the Work and reproducing the content of the NOTICE file.

   7. Disclaimer of Warranty. Unless required by applicable law or
      agreed to in writing, Licensor provides the Work (and each
      Contributor provides its Contributions) on an "AS IS" BASIS,
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
      implied, including, without limitation, any warranties or conditions
      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
      PARTICULAR PURPOSE. You are solely responsible for determining the
      appropriateness of using or redistributing the Work and assume any
      risks associated with Your exercise of permissions under this License.

   8. Limitation of Liability. In no event and under no legal theory,
      whether in tort (including negligence), contract, or otherwise,
      unless required by applicable law (such as deliberate and grossly
      negligent acts) or agreed to in writing, shall any Contributor be
      liable to You for damages, including any direct, indirect, special,
      incidental, or consequential damages of any character arising as a
      result of this License or out of the use or inability to use the
      Work (including but not limited to damages for loss of goodwill,
      work stoppage, computer failure or malfunction, or any and all
      other commercial damages or losses), even if such Contributor
      has been advised of the possibility of such damages.

   9. Accepting Warranty or Additional Liability. While redistributing
      the Work or Derivative Works thereof, You may choose to offer,
      and charge a fee for, acceptance of support, warranty, indemnity,
      or other liability obligations and/or rights consistent with this
      License. However, in accepting such obligations, You may act only
      on Your own behalf and on Your sole responsibility, not on behalf
      of any other Contributor, and only if You agree to indemnify,
      defend, and hold each Contributor harmless for any liability
      incurred by, or claims asserted against, such Contributor by reason
      of your accepting any such warranty or additional liability.

   END OF TERMS AND CONDITIONS

   APPENDIX: How to apply the Apache License to your work.

      To apply the Apache License to your work, attach the following
      boilerplate notice, with the fields enclosed by brackets "[]"
      replaced with your own identifying information. (Don't include
      the brackets!)  The text should be enclosed in the appropriate
      comment syntax for the file format. We also recommend that a
      file or class name and description of purpose be included on the
      same "printed page" as the copyright notice for easier
      identification within third-party archives.

   Copyright 2018 James Lockhart <[email protected]>

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.
*/

pragma solidity ^0.8.0;

/**
 * Strings Library
 * 
 * In summary this is a simple library of string functions which make simple 
 * string operations less tedious in solidity.
 * 
 * Please be aware these functions can be quite gas heavy so use them only when
 * necessary not to clog the blockchain with expensive transactions.
 * 
 * @author James Lockhart <[email protected]>
 */
library StringUtil {
    
    function titleCase(string memory _base)
    internal
    pure
    returns (string[] memory) {
        string[] memory components = split(_base, " ");
        for (uint8 i = 0; i < components.length; ++i) {
            if (length(components[i]) == 0) {
                continue;
            }
            string memory firstChar = substring(components[i], 1);
            string memory remainingChars = _substring(components[i], int(StringUtil.length(components[i]) - 1), 1);
            components[i] = string(abi.encodePacked(upper(firstChar), remainingChars));
        }
        
        return components;
    }

    /**
     * Concat (High gas cost)
     * 
     * Appends two strings together and returns a new value
     * 
     * @param _base When being used for a data type this is the extended object
     *              otherwise this is the string which will be the concatenated
     *              prefix
     * @param _value The value to be the concatenated suffix
     * @return string The resulting string from combinging the base and value
     */
    function concat(string memory _base, string memory _value)
        internal
        pure
        returns (string memory) {
        bytes memory _baseBytes = bytes(_base);
        bytes memory _valueBytes = bytes(_value);

        assert(_valueBytes.length > 0);

        string memory _tmpValue = new string(_baseBytes.length +
            _valueBytes.length);
        bytes memory _newValue = bytes(_tmpValue);

        uint i;
        uint j;

        for (i = 0; i < _baseBytes.length; i++) {
            _newValue[j++] = _baseBytes[i];
        }

        for (i = 0; i < _valueBytes.length; i++) {
            _newValue[j++] = _valueBytes[i];
        }

        return string(_newValue);
    }

    /**
     * Index Of
     *
     * Locates and returns the position of a character within a string
     * 
     * @param _base When being used for a data type this is the extended object
     *              otherwise this is the string acting as the haystack to be
     *              searched
     * @param _value The needle to search for, at present this is currently
     *               limited to one character
     * @return int The position of the needle starting from 0 and returning -1
     *             in the case of no matches found
     */
    function indexOf(string memory _base, string memory _value)
        internal
        pure
        returns (int) {
        return _indexOf(_base, _value, 0);
    }

    /**
     * Index Of
     *
     * Locates and returns the position of a character within a string starting
     * from a defined offset
     * 
     * @param _base When being used for a data type this is the extended object
     *              otherwise this is the string acting as the haystack to be
     *              searched
     * @param _value The needle to search for, at present this is currently
     *               limited to one character
     * @param _offset The starting point to start searching from which can start
     *                from 0, but must not exceed the length of the string
     * @return int The position of the needle starting from 0 and returning -1
     *             in the case of no matches found
     */
    function _indexOf(string memory _base, string memory _value, uint _offset)
        internal
        pure
        returns (int) {
        bytes memory _baseBytes = bytes(_base);
        bytes memory _valueBytes = bytes(_value);

        assert(_valueBytes.length == 1);

        for (uint i = _offset; i < _baseBytes.length; i++) {
            if (_baseBytes[i] == _valueBytes[0]) {
                return int(i);
            }
        }

        return -1;
    }

    /**
     * Length
     * 
     * Returns the length of the specified string
     * 
     * @param _base When being used for a data type this is the extended object
     *              otherwise this is the string to be measured
     * @return uint The length of the passed string
     */
    function length(string memory _base)
        internal
        pure
        returns (uint) {
        bytes memory _baseBytes = bytes(_base);
        return _baseBytes.length;
    }

    /**
     * Sub String
     * 
     * Extracts the beginning part of a string based on the desired length
     * 
     * @param _base When being used for a data type this is the extended object
     *              otherwise this is the string that will be used for 
     *              extracting the sub string from
     * @param _length The length of the sub string to be extracted from the base
     * @return string The extracted sub string
     */
    function substring(string memory _base, int _length)
        internal
        pure
        returns (string memory) {
        return _substring(_base, _length, 0);
    }

    /**
     * Sub String
     * 
     * Extracts the part of a string based on the desired length and offset. The
     * offset and length must not exceed the lenth of the base string.
     * 
     * @param _base When being used for a data type this is the extended object
     *              otherwise this is the string that will be used for 
     *              extracting the sub string from
     * @param _length The length of the sub string to be extracted from the base
     * @param _offset The starting point to extract the sub string from
     * @return string The extracted sub string
     */
    function _substring(string memory _base, int _length, int _offset)
        internal
        pure
        returns (string memory) {
        bytes memory _baseBytes = bytes(_base);

        assert(uint(_offset + _length) <= _baseBytes.length);

        string memory _tmp = new string(uint(_length));
        bytes memory _tmpBytes = bytes(_tmp);

        uint j = 0;
        for (uint i = uint(_offset); i < uint(_offset + _length); i++) {
            _tmpBytes[j++] = _baseBytes[i];
        }

        return string(_tmpBytes);
    }

    /**
     * String Split (Very high gas cost)
     *
     * Splits a string into an array of strings based off the delimiter value.
     * Please note this can be quite a gas expensive function due to the use of
     * storage so only use if really required.
     *
     * @param _base When being used for a data type this is the extended object
     *               otherwise this is the string value to be split.
     * @param _value The delimiter to split the string on which must be a single
     *               character
     * @return splitArr An array of values split based off the delimiter, but
     *                  do not container the delimiter.
     */
    function split(string memory _base, string memory _value)
        internal
        pure
        returns (string[] memory splitArr) {
        bytes memory _baseBytes = bytes(_base);

        uint _offset = 0;
        uint _splitsCount = 1;
        while (_offset < _baseBytes.length - 1) {
            int _limit = _indexOf(_base, _value, _offset);
            if (_limit == -1)
                break;
            else {
                _splitsCount++;
                _offset = uint(_limit) + 1;
            }
        }

        splitArr = new string[](_splitsCount);

        _offset = 0;
        _splitsCount = 0;
        while (_offset < _baseBytes.length - 1) {

            int _limit = _indexOf(_base, _value, _offset);
            if (_limit == - 1) {
                _limit = int(_baseBytes.length);
            }

            string memory _tmp = new string(uint(_limit) - _offset);
            bytes memory _tmpBytes = bytes(_tmp);

            uint j = 0;
            for (uint i = _offset; i < uint(_limit); i++) {
                _tmpBytes[j++] = _baseBytes[i];
            }
            _offset = uint(_limit) + 1;
            splitArr[_splitsCount++] = string(_tmpBytes);
        }
        return splitArr;
    }

    /**
     * Compare To
     * 
     * Compares the characters of two strings, to ensure that they have an 
     * identical footprint
     * 
     * @param _base When being used for a data type this is the extended object
     *               otherwise this is the string base to compare against
     * @param _value The string the base is being compared to
     * @return bool Simply notates if the two string have an equivalent
     */
    function compareTo(string memory _base, string memory _value)
        internal
        pure
        returns (bool) {
        bytes memory _baseBytes = bytes(_base);
        bytes memory _valueBytes = bytes(_value);

        if (_baseBytes.length != _valueBytes.length) {
            return false;
        }

        for (uint i = 0; i < _baseBytes.length; i++) {
            if (_baseBytes[i] != _valueBytes[i]) {
                return false;
            }
        }

        return true;
    }

    /**
     * Compare To Ignore Case (High gas cost)
     * 
     * Compares the characters of two strings, converting them to the same case
     * where applicable to alphabetic characters to distinguish if the values
     * match.
     * 
     * @param _base When being used for a data type this is the extended object
     *               otherwise this is the string base to compare against
     * @param _value The string the base is being compared to
     * @return bool Simply notates if the two string have an equivalent value
     *              discarding case
     */
    function compareToIgnoreCase(string memory _base, string memory _value)
        internal
        pure
        returns (bool) {
        bytes memory _baseBytes = bytes(_base);
        bytes memory _valueBytes = bytes(_value);

        if (_baseBytes.length != _valueBytes.length) {
            return false;
        }

        for (uint i = 0; i < _baseBytes.length; i++) {
            if (_baseBytes[i] != _valueBytes[i] &&
            _upper(_baseBytes[i]) != _upper(_valueBytes[i])) {
                return false;
            }
        }

        return true;
    }

    /**
     * Upper
     * 
     * Converts all the values of a string to their corresponding upper case
     * value.
     * 
     * @param _base When being used for a data type this is the extended object
     *              otherwise this is the string base to convert to upper case
     * @return string 
     */
    function upper(string memory _base)
        internal
        pure
        returns (string memory) {
        bytes memory _baseBytes = bytes(_base);
        for (uint i = 0; i < _baseBytes.length; i++) {
            _baseBytes[i] = _upper(_baseBytes[i]);
        }
        return string(_baseBytes);
    }

    /**
     * Lower
     * 
     * Converts all the values of a string to their corresponding lower case
     * value.
     * 
     * @param _base When being used for a data type this is the extended object
     *              otherwise this is the string base to convert to lower case
     * @return string 
     */
    function lower(string memory _base)
        internal
        pure
        returns (string memory) {
        bytes memory _baseBytes = bytes(_base);
        for (uint i = 0; i < _baseBytes.length; i++) {
            _baseBytes[i] = _lower(_baseBytes[i]);
        }
        return string(_baseBytes);
    }

    /**
     * Upper
     * 
     * Convert an alphabetic character to upper case and return the original
     * value when not alphabetic
     * 
     * @param _b1 The byte to be converted to upper case
     * @return bytes1 The converted value if the passed value was alphabetic
     *                and in a lower case otherwise returns the original value
     */
    function _upper(bytes1 _b1)
        private
        pure
        returns (bytes1) {

        if (_b1 >= 0x61 && _b1 <= 0x7A) {
            return bytes1(uint8(_b1) - 32);
        }

        return _b1;
    }

    /**
     * Lower
     * 
     * Convert an alphabetic character to lower case and return the original
     * value when not alphabetic
     * 
     * @param _b1 The byte to be converted to lower case
     * @return bytes1 The converted value if the passed value was alphabetic
     *                and in a upper case otherwise returns the original value
     */
    function _lower(bytes1 _b1)
        private
        pure
        returns (bytes1) {

        if (_b1 >= 0x41 && _b1 <= 0x5A) {
            return bytes1(uint8(_b1) + 32);
        }

        return _b1;
    }
}

File 4 of 15 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

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 make 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 5 of 15 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

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 6 of 15 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "./extensions/IERC721Enumerable.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}. 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 || ERC721.isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

File 7 of 15 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

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

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

File 8 of 15 : IERC721.sol
// SPDX-License-Identifier: MIT

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 9 of 15 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

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 10 of 15 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

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 11 of 15 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 12 of 15 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 13 of 15 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant alphabet = "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] = alphabet[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

}

File 14 of 15 : ERC165.sol
// SPDX-License-Identifier: MIT

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 15 of 15 : IERC165.sol
// SPDX-License-Identifier: MIT

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

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {
    "contracts/blitmap-analysis.sol": {
      "BlitmapAnalysis": "0x7d2e3eba0119f38cca36a1cf4aeb9ffd38bf9210"
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"AddedToAllowedList","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"uint8","name":"remainingVariants","type":"uint8"}],"indexed":true,"internalType":"struct Blitmap.TokenMetadata","name":"newMetadata","type":"tuple"}],"name":"MetadataChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"Published","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"}],"name":"RemovedFromAllowedList","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":"_address","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"uint8","name":"allowedMints","type":"uint8"}],"name":"addAllowed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allowedNumOriginals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"allowedNumVariants","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"creatorAddress","type":"address"}],"name":"availableBalanceForCreator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"address","name":"creator","type":"address"},{"internalType":"uint8","name":"remainingVariants","type":"uint8"}],"internalType":"struct Blitmap.TokenMetadata","name":"newMetadata","type":"tuple"}],"name":"changeMetadataOf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"creatorNameOf","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"_address","type":"address"}],"name":"isAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"tokenData","type":"bytes"},{"internalType":"string","name":"name","type":"string"}],"name":"mintOriginal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenIdA","type":"uint256"},{"internalType":"uint256","name":"tokenIdB","type":"uint256"}],"name":"mintVariant","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publish","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"published","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"remainingNumMints","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"remainingNumOriginals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeAllowed","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":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"prefix","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","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":"tokenId","type":"uint256"}],"name":"tokenAffinityOf","outputs":[{"internalType":"string[3]","name":"","type":"string[3]"}],"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":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenCreatorNameOf","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenCreatorOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenDataOf","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenIsOriginal","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenNameOf","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"tokenParentsOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenRGBColorsOf","outputs":[{"components":[{"internalType":"uint256[4]","name":"r","type":"uint256[4]"},{"internalType":"uint256[4]","name":"g","type":"uint256[4]"},{"internalType":"uint256[4]","name":"b","type":"uint256[4]"}],"internalType":"struct BlitmapAnalysis.Colors","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenRemainingVariantsOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenSlabsOf","outputs":[{"internalType":"string[4]","name":"","type":"string[4]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenSvgDataOf","outputs":[{"internalType":"string","name":"","type":"string"}],"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":[],"name":"withdrawAvailableBalance","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060408051808201825260078152660426c69746d61760cc1b6020808301918252835180850190945260048452631093125560e21b9084015281519192916200005d9160009162000fae565b5080516200007390600190602084019062000fae565b50506001600a5550600b80546001600160a01b031916331790556012805461ff001916905560408051606081019091526024808252620000bd919062006fe0602083013962000601565b620000ec3360405180604001604052806003815260200162646f6d60e81b81525060806200063260201b60201c565b6200013073e7bd51dc30d4bdc9fddd42ea7c0a283590c9d416604051806040016040528060048152602001633539ba3760e11b81525060016200063260201b60201c565b62000175739bc20560301cdc15c3190f745b6d910167d4b4676040518060400160405280600581526020016462686f6b6160d81b81525060016200063260201b60201c565b620001c073c5ffbcd8a374889c6e95f8df733e32a0e9476a9c6040518060400160405280600b81526020016a109490525391149052539160aa1b815250600b6200063260201b60201c565b62000208738e29b3f71a8c7276d122c88d9bf317e857abb37660405180604001604052806008815260200167042696750617061760c41b815250600c6200063260201b60201c565b6200024e739bf043a72ca1cd3dc4bca66c9f6c1d040cff7772604051806040016040528060068152602001655665656e757360d01b815250600c6200063260201b60201c565b6200029973bb01f3cac350ed60b1bd080b7a55cc5768cfd5656040518060400160405280600b81526020016a1cdd185c9d1cd95b1958dd60aa1b81525060046200063260201b60201c565b620002de73f0136dee223c9a303ae8863f9438a687c775a4a7604051806040016040528060058152602001641c1a5b9bdd60da1b81525060026200063260201b60201c565b6200032173d1e0eb60bda1c098353d08a167b011ea8bcd38fa604051806040016040528060038152602001621e9bd960ea1b81525060046200063260201b60201c565b6200036b734610cc9c73c0215818fe47962eabd93cf331856b6040518060400160405280600a8152602001694b6c696e674b6c6f6e6760b01b81525060046200063260201b60201c565b620003af73d42bd96b117dd6bd63280620ea981bf967a7ad2b604051806040016040528060048152602001636e756d6f60e01b815250600a6200063260201b60201c565b620003fc73ee463034f385dd9b26efd7767406079f86edb9926040518060400160405280600d81526020016c3a3432b6b7b7b73630b23232b960991b81525060046200063260201b60201c565b62000444739f2942ff27e40445d3cb2aad90f84c3a03574f266040518060400160405280600881526020016730b9b5bcbbb635b960c11b81525060026200063260201b60201c565b620004907348a63097e1ac123b1f5a8bbffafa4afa8192fab06040518060400160405280600c81526020016b31b2b932b9b9ba30ba34b7b760a11b81525060026200063260201b60201c565b620004dd736ebd8991fc87f130de28de4b37f882d6cbe9ab286040518060400160405280600d81526020016c121a59da1b195e55985c9b195d609a1b81525060046200063260201b60201c565b6200052173fb843f8c4992efdb6b42349c35f025ca55742d3360405180604001604052806004815260200163776f726d60e01b81525060016200063260201b60201c565b6200056b7306ac1f9f86520225b73efce4982c9d95057532516040518060400160405280600a8152602001696869706369747972656760b01b81525060016200063260201b60201c565b620005b673f4c9c5229356d39b4f852ecf6e08576eebedb0ec6040518060400160405280600b81526020016a39b830b1b2b237b1ba37b960a91b81525060046200063260201b60201c565b620005fb60405180610140016040528061010c815260200162006ed461010c913960408051808201909152600781526647656e6573697360c81b602082015262000710565b620013eb565b600b546001600160a01b031633146200061957600080fd5b80516200062e90601190602084019062000fae565b5050565b600b546001600160a01b031633146200064a57600080fd5b620006546200103d565b828152600160208083019190915260ff831660608301526001600160a01b0385166000908152600c8252604090208251805184936200069892849291019062000fae565b50602082015160018201805491151560ff1992831617905560408084015160028401556060909301516003909201805460ff9390931692909116919091179055516001600160a01b038516907f71371801a169701f6f13d082305afe9a82bb39e61d9ab9609b2cd86e91922a2390600090a250505050565b6002600a5414156200073f5760405162461bcd60e51b81526004016200073690620012e9565b60405180910390fd5b6002600a556200074f33620009cb565b6200075957600080fd5b601254610100900460ff1615620007845760405162461bcd60e51b815260040162000736906200114b565b601254608060ff90911610620007ae5760405162461bcd60e51b81526004016200073690620011bb565b815161010c14620007d35760405162461bcd60e51b8152600401620007369062001210565b60008151118015620007e65750600b8151105b620008055760405162461bcd60e51b81526004016200073690620012cb565b336000908152600c602052604090206003015460ff166200083a5760405162461bcd60e51b815260040162000736906200122e565b600062000846620009f1565b600f8054600181018255600091909152845191925062000890917f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac80290910190602086019062000fae565b506200089b6200106a565b82815260106040808301919091523360208084018290526000918252600c9052908120600301805460ff1691620008d28362001355565b825460ff9182166101009390930a928302919092021990911617905550601080546001810182556000919091528151805183926002027f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae67201916200093c9183916020019062000fae565b50602082015160019190910180546040909301516001600160a01b03199093166001600160a01b039092169190911760ff60a01b1916600160a01b60ff93841602179055601280549091169060006200099583620013b2565b91906101000a81548160ff021916908360ff16021790555050620009c03383620009f760201b60201c565b50506001600a555050565b6001600160a01b03166000908152600c6020526040902060019081015460ff1615151490565b60085490565b6200062e82826040518060200160405280600081525062000a1960201b60201c565b62000a25838362000a58565b62000a34600084848462000b43565b62000a535760405162461bcd60e51b8152600401620007369062001169565b505050565b6001600160a01b03821662000a815760405162461bcd60e51b8152600401620007369062001296565b62000a8c8162000c7c565b1562000aac5760405162461bcd60e51b81526004016200073690620011d9565b62000aba6000838362000c99565b6001600160a01b038216600090815260036020526040812080546001929062000ae590849062001320565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600062000b64846001600160a01b031662000d3d60201b620030861760201c565b1562000c70576001600160a01b03841663150b7a0262000b8362000d43565b8786866040518563ffffffff1660e01b815260040162000ba79493929190620010d2565b602060405180830381600087803b15801562000bc257600080fd5b505af192505050801562000bf5575060408051601f3d908101601f1916820190925262000bf291810190620010a1565b60015b62000c55573d80801562000c26576040519150601f19603f3d011682016040523d82523d6000602084013e62000c2b565b606091505b50805162000c4d5760405162461bcd60e51b8152600401620007369062001169565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905062000c74565b5060015b949350505050565b6000908152600260205260409020546001600160a01b0316151590565b62000cb183838362000a5360201b62000aa21760201c565b6001600160a01b03831662000cd15762000ccb8162000d47565b62000cf7565b816001600160a01b0316836001600160a01b03161462000cf75762000cf7838262000d8b565b6001600160a01b03821662000d175762000d118162000e38565b62000a53565b826001600160a01b0316826001600160a01b03161462000a535762000a53828262000f16565b3b151590565b3390565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6000600162000da58462000f6760201b6200118d1760201c565b62000db191906200133b565b60008381526007602052604090205490915080821462000e05576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009062000e4c906001906200133b565b6000838152600960205260408120546008805493945090928490811062000e8357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811062000eb357634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548062000efa57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600062000f2e8362000f6760201b6200118d1760201c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160a01b03821662000f925760405162461bcd60e51b815260040162000736906200124c565b506001600160a01b031660009081526003602052604090205490565b82805462000fbc9062001375565b90600052602060002090601f01602090048101928262000fe057600085556200102b565b82601f1062000ffb57805160ff19168380011785556200102b565b828001600101855582156200102b579182015b828111156200102b5782518255916020019190600101906200100e565b50620010399291506200108a565b5090565b60405180608001604052806060815260200160001515815260200160008152602001600060ff1681525090565b604080516060808201835281526000602082018190529181019190915290565b5b808211156200103957600081556001016200108b565b600060208284031215620010b3578081fd5b81516001600160e01b031981168114620010cb578182fd5b9392505050565b600060018060a01b0380871683526020818716818501528560408501526080606085015284519150816080850152825b82811015620011205785810182015185820160a00152810162001102565b8281111562001132578360a084870101525b5050601f01601f19169190910160a00195945050505050565b602080825260049082015263623a303160e01b604082015260600190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b602080825260049082015263623a303360e01b604082015260600190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b602080825260049082015263188e8c0d60e21b604082015260600190565b602080825260049082015263311d181b60e11b604082015260600190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b602080825260049082015263623a303560e01b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60008219821115620013365762001336620013d5565b500190565b600082821015620013505762001350620013d5565b500390565b600060ff8216806200136b576200136b620013d5565b6000190192915050565b6002810460018216806200138a57607f821691505b60208210811415620013ac57634e487b7160e01b600052602260045260246000fd5b50919050565b600060ff821660ff811415620013cc57620013cc620013d5565b60010192915050565b634e487b7160e01b600052601160045260246000fd5b615ad980620013fb6000396000f3fe60806040526004361061025c5760003560e01c80637cd2421f11610144578063b1111359116100b6578063c87b56dd1161007a578063c87b56dd14610704578063cc31583414610724578063d3488e5014610744578063e324c66414610772578063e985e9c514610792578063fc65ae82146107b25761025c565b8063b11113591461066f578063b4754d5114610684578063b88d4fde146106a4578063babcc539146106c4578063c0da9bcd146106e45761025c565b806395d89b411161010857806395d89b41146105ad57806399fae037146105c25780639a5ee811146105ef5780639f6b040b1461060f578063a22cb4651461062f578063a78d070f1461064f5761025c565b80637cd2421f146105235780637da80a1a1461053857806386099d45146105585780638d4d2b0c146105785780638e13a1461461058d5761025c565b806326bbf8d6116101dd5780634f6ccce7116101a15780634f6ccce71461046357806355f804b3146104835780636352211e146104a35780636470db2f146104c357806370a08231146104e357806378e25f81146105035761025c565b806326bbf8d6146103bf57806327511ec4146103e15780632f745c591461040e5780633c0f99041461042e57806342842e0e146104435761025c565b8063081812fc11610224578063081812fc1461032a578063095ea7b31461034a57806311242aa31461036a57806318160ddd1461037d57806323b872dd1461039f5761025c565b806301ffc9a7146102615780630631b9451461029757806306daaebd146102c457806306fdde03146102f1578063075d478214610313575b600080fd5b34801561026d57600080fd5b5061028161027c3660046149c2565b6107d2565b60405161028e9190615160565b60405180910390f35b3480156102a357600080fd5b506102b76102b2366004614ae0565b6107ff565b60405161028e91906150d2565b3480156102d057600080fd5b506102e46102df366004614ae0565b61089a565b60405161028e9190615081565b3480156102fd57600080fd5b506103066108e0565b60405161028e919061516b565b34801561031f57600080fd5b50610328610972565b005b34801561033657600080fd5b506102e4610345366004614ae0565b6109c3565b34801561035657600080fd5b506103286103653660046148bf565b610a0f565b610328610378366004614b90565b610aa7565b34801561038957600080fd5b50610392610f0b565b60405161028e91906157bb565b3480156103ab57600080fd5b506103286103ba36600461478a565b610f11565b3480156103cb57600080fd5b506103d4610f49565b60405161028e91906157c4565b3480156103ed57600080fd5b506104016103fc366004614ae0565b610f62565b60405161028e9190615781565b34801561041a57600080fd5b506103926104293660046148bf565b610ffa565b34801561043a57600080fd5b506103d461104c565b34801561044f57600080fd5b5061032861045e36600461478a565b611051565b34801561046f57600080fd5b5061039261047e366004614ae0565b61106c565b34801561048f57600080fd5b5061032861049e366004614a5a565b6110c7565b3480156104af57600080fd5b506102e46104be366004614ae0565b6110f5565b3480156104cf57600080fd5b506103286104de36600461473e565b61112a565b3480156104ef57600080fd5b506103926104fe36600461473e565b61118d565b34801561050f57600080fd5b5061032861051e366004614864565b6111d1565b34801561052f57600080fd5b506103d46112aa565b34801561054457600080fd5b50610392610553366004614ae0565b6112af565b34801561056457600080fd5b50610306610573366004614ae0565b61130b565b34801561058457600080fd5b506102816113c3565b34801561059957600080fd5b506103926105a836600461473e565b6113d1565b3480156105b957600080fd5b506103066113ef565b3480156105ce57600080fd5b506105e26105dd366004614ae0565b6113fe565b60405161028e919061511f565b3480156105fb57600080fd5b5061032861060a366004614af8565b611499565b34801561061b57600080fd5b5061028161062a366004614ae0565b6115ad565b34801561063b57600080fd5b5061032861064a36600461482a565b6115f0565b34801561065b57600080fd5b5061030661066a366004614ae0565b6116be565b34801561067b57600080fd5b506103286126f9565b34801561069057600080fd5b5061032861069f3660046149fa565b612780565b3480156106b057600080fd5b506103286106bf3660046147c5565b612a08565b3480156106d057600080fd5b506102816106df36600461473e565b612a47565b3480156106f057600080fd5b506103066106ff366004614ae0565b612a6d565b34801561071057600080fd5b5061030661071f366004614ae0565b612d62565b34801561073057600080fd5b506103d461073f36600461473e565b612de5565b34801561075057600080fd5b5061076461075f366004614ae0565b612e06565b60405161028e929190615073565b34801561077e57600080fd5b5061030661078d366004614ae0565b612e38565b34801561079e57600080fd5b506102816107ad366004614758565b613031565b3480156107be57600080fd5b506103066107cd36600461473e565b61305f565b60006001600160e01b0319821663780e9d6360e01b14806107f757506107f78261308c565b90505b919050565b610807614447565b737d2e3eba0119f38cca36a1cf4aeb9ffd38bf921063910bbd8161082a84612a6d565b6040518263ffffffff1660e01b8152600401610846919061516b565b60006040518083038186803b15801561085e57600080fd5b505af4158015610872573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107f791908101906148e8565b6000601082815481106108bd57634e487b7160e01b600052603260045260246000fd5b60009182526020909120600290910201600101546001600160a01b031692915050565b6060600080546108ef9061593e565b80601f016020809104026020016040519081016040528092919081815260200182805461091b9061593e565b80156109685780601f1061093d57610100808354040283529160200191610968565b820191906000526020600020905b81548152906001019060200180831161094b57829003601f168201915b5050505050905090565b600b546001600160a01b0316331461098957600080fd5b6012805461ff0019166101001790556040517fa5c49e57d43a67a13cd3aba09ccf12eaa3019b35cea872059e78db9c4a70f86c90600090a1565b60006109ce826130cc565b6109f35760405162461bcd60e51b81526004016109ea90615510565b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a1a826110f5565b9050806001600160a01b0316836001600160a01b03161415610a4e5760405162461bcd60e51b81526004016109ea906155f4565b806001600160a01b0316610a606130e9565b6001600160a01b03161480610a7c5750610a7c816107ad6130e9565b610a985760405162461bcd60e51b81526004016109ea906153eb565b610aa283836130ed565b505050565b6002600a541415610aca5760405162461bcd60e51b81526004016109ea9061574a565b6002600a5567016345785d8a00003414610ae357600080fd5b60125460ff610100909104161515600114610b105760405162461bcd60e51b81526004016109ea906153cd565b610b19826130cc565b8015610b295750610b29816130cc565b610b455760405162461bcd60e51b81526004016109ea9061572c565b80821415610b655760405162461bcd60e51b81526004016109ea9061517e565b6000610b70836112af565b11610b8d5760405162461bcd60e51b81526004016109ea9061570e565b610b96826115ad565b8015610ba65750610ba6816115ad565b610bc25760405162461bcd60e51b81526004016109ea90615635565b60008282604051602001610bd7929190615073565b60408051601f1981840301815291815281516020928301206000818152600e90935291205490915060ff1615610c1f5760405162461bcd60e51b81526004016109ea90615345565b6000610c29610f0b565b9050610c3361446e565b848152602081018490526010805486908110610c5f57634e487b7160e01b600052603260045260246000fd5b600091825260209091206002909102016001018054600160a01b900460ff16906014610c8a83615921565b825460ff9182166101009390930a928302919092021990911617905550600f805460018181018355600092835260408051808201909152818152602001928352610cf9927f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac8029092019190614488565b50610d02614508565b60408051602080820183526000808352918452918301819052338383015260108054600181018255915282518051849360029093027f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae6720192610d68928492910190614488565b506020828101516001928301805460409586015160ff16600160a01b0260ff60a01b196001600160a01b039094166001600160a01b031990921691909117929092169190911790556000868152600d8252838120865181558683015190840155878152600e90915291909120805460ff19169091179055610de9338461315b565b670136dcc951d8c000600c600060108981548110610e1757634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020016000206002016000828254610e6e919061586a565b92505081905550662c68af0bb14000600c600060108881548110610ea257634e487b7160e01b600052603260045260246000fd5b906000526020600020906002020160010160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b031681526020019081526020016000206002016000828254610ef9919061586a565b90915550506001600a55505050505050565b60085490565b610f22610f1c6130e9565b82613175565b610f3e5760405162461bcd60e51b81526004016109ea90615653565b610aa28383836131fa565b601254600090610f5d9060ff1660806158d2565b905090565b610f6a614528565b737d2e3eba0119f38cca36a1cf4aeb9ffd38bf921063a1ff2af9610f8d84612a6d565b6040518263ffffffff1660e01b8152600401610fa9919061516b565b6101806040518083038186803b158015610fc257600080fd5b505af4158015610fd6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107f79190614a8c565b60006110058361118d565b82106110235760405162461bcd60e51b81526004016109ea906151ba565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b601090565b610aa283838360405180602001604052806000815250612a08565b6000611076610f0b565b82106110945760405162461bcd60e51b81526004016109ea906156c2565b600882815481106110b557634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600b546001600160a01b031633146110de57600080fd5b80516110f1906011906020840190614488565b5050565b6000818152600260205260408120546001600160a01b0316806107f75760405162461bcd60e51b81526004016109ea90615492565b600b546001600160a01b0316331461114157600080fd5b6001600160a01b0381166000818152600c6020526040808220600101805460ff19169055517fbf808d3affba647e2a88e8384e53cdaa0ce5bccbb95329426a354cc82b1ef6bd9190a250565b60006001600160a01b0382166111b55760405162461bcd60e51b81526004016109ea90615448565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b031633146111e857600080fd5b6111f061455a565b828152600160208083019190915260ff831660608301526001600160a01b0385166000908152600c825260409020825180518493611232928492910190614488565b50602082015160018201805491151560ff1992831617905560408084015160028401556060909301516003909201805460ff9390931692909116919091179055516001600160a01b038516907f71371801a169701f6f13d082305afe9a82bb39e61d9ab9609b2cd86e91922a2390600090a250505050565b608090565b60006112ba826115ad565b6112c6575060006107fa565b601082815481106112e757634e487b7160e01b600052603260045260246000fd5b6000918252602090912060029091020160010154600160a01b900460ff1692915050565b6060600c600061131a8461089a565b6001600160a01b031681526020810191909152604001600020805461133e9061593e565b80601f016020809104026020016040519081016040528092919081815260200182805461136a9061593e565b80156113b75780601f1061138c576101008083540402835291602001916113b7565b820191906000526020600020905b81548152906001019060200180831161139a57829003601f168201915b50505050509050919050565b601254610100900460ff1681565b6001600160a01b03166000908152600c602052604090206002015490565b6060600180546108ef9061593e565b611406614587565b737d2e3eba0119f38cca36a1cf4aeb9ffd38bf9210632454e5fa61142984612a6d565b6040518263ffffffff1660e01b8152600401611445919061516b565b60006040518083038186803b15801561145d57600080fd5b505af4158015611471573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526107f79190810190614955565b600b546001600160a01b031633146114b057600080fd5b601254610100900460ff16156114d85760405162461bcd60e51b81526004016109ea9061519c565b80601083815481106114fa57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016000820151816000019080519060200190611524929190614488565b5060208201516001909101805460409384015160ff16600160a01b0260ff60a01b196001600160a01b039094166001600160a01b0319909216919091179290921691909117905551611577908290615029565b6040519081900381209083907fb8d847b645927395d16a8d0d962ac7d88585daa9a62884a9ab38a838cc0907f090600090a35050565b6000600f82815481106115d057634e487b7160e01b600052603260045260246000fd5b9060005260206000200180546115e59061593e565b61010c149392505050565b6115f86130e9565b6001600160a01b0316826001600160a01b031614156116295760405162461bcd60e51b81526004016109ea9061530e565b80600560006116366130e9565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561167a6130e9565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516116b29190615160565b60405180910390a35050565b606060006040518060a0016040528060808152602001615a2460809139604080516104408101825260016104008201818152600360fc1b610420840152825282518084018452818152603160f81b6020828101919091528084019190915283518085018552828152601960f91b818301528385015283518085018552828152603360f81b81830152606084015283518085018552828152600d60fa1b81830152608084015283518085018552828152603560f81b8183015260a084015283518085018552828152601b60f91b8183015260c084015283518085018552828152603760f81b8183015260e084015283518085018552828152600760fb1b8183015261010084015283518085018552918252603960f81b8282015261012083019190915282518084018452600280825261031360f41b828401526101408401919091528351808501855281815261313160f01b818401526101608401528351808501855281815261189960f11b818401526101808401528351808501855281815261313360f01b818401526101a084015283518085018552818152610c4d60f21b818401526101c08401528351808501855281815261313560f01b818401526101e08401528351808501855281815261189b60f11b818401526102008401528351808501855281815261313760f01b818401526102208401528351808501855281815261062760f31b818401526102408401528351808501855281815261313960f01b818401526102608401528351808501855281815261032360f41b818401526102808401528351808501855281815261323160f01b818401526102a08401528351808501855281815261191960f11b818401526102c08401528351808501855281815261323360f01b818401526102e084015283518085018552818152610c8d60f21b818401526103008401528351808501855281815261323560f01b818401526103208401528351808501855281815261191b60f11b818401526103408401528351808501855281815261323760f01b818401526103608401528351808501855281815261064760f31b818401526103808401528351808501855281815261323960f01b818401526103a08401528351808501855281815261033360f41b818401526103c08401528351808501909452835261333160f01b908301526103e0810191909152909150611a2f6145a1565b6000611a3a86612a6d565b905060006040518060800160405280611a8184600081518110611a6d57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916613327565b611aa585600181518110611a6d57634e487b7160e01b600052603260045260246000fd5b611ac986600281518110611a6d57634e487b7160e01b600052603260045260246000fd5b604051602001611adb93929190614fd3565b6040516020818303038152906040528152602001611b1384600381518110611a6d57634e487b7160e01b600052603260045260246000fd5b611b3785600481518110611a6d57634e487b7160e01b600052603260045260246000fd5b611b5b86600581518110611a6d57634e487b7160e01b600052603260045260246000fd5b604051602001611b6d93929190614fd3565b6040516020818303038152906040528152602001611ba584600681518110611a6d57634e487b7160e01b600052603260045260246000fd5b611bc985600781518110611a6d57634e487b7160e01b600052603260045260246000fd5b611bed86600881518110611a6d57634e487b7160e01b600052603260045260246000fd5b604051602001611bff93929190614fd3565b6040516020818303038152906040528152602001611c3784600981518110611a6d57634e487b7160e01b600052603260045260246000fd5b611c5b85600a81518110611a6d57634e487b7160e01b600052603260045260246000fd5b611c7f86600b81518110611a6d57634e487b7160e01b600052603260045260246000fd5b604051602001611c9193929190614fd3565b6040516020818303038152906040528152509050611cad6145dd565b600c5b61010c8110156126cb5782611cf6858381518110611cde57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319166006600761333a565b60048110611d1457634e487b7160e01b600052603260045260246000fd5b6020020151856040018190525082611d5d858381518110611d4557634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319166004600561333a565b60048110611d7b57634e487b7160e01b600052603260045260246000fd5b6020020151856060018190525082611dc4858381518110611dac57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319166002600361333a565b60048110611de257634e487b7160e01b600052603260045260246000fd5b6020020151856080018190525082611e2b858381518110611e1357634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319166000600161333a565b60048110611e4957634e487b7160e01b600052603260045260246000fd5b602002015160a0860152611e5d86866133c1565b825284516004908690611e71908390615882565b60ff1690525082611ea585611e8784600161586a565b81518110611cde57634e487b7160e01b600052603260045260246000fd5b60048110611ec357634e487b7160e01b600052603260045260246000fd5b6020020151604086015282611efb85611edd84600161586a565b81518110611d4557634e487b7160e01b600052603260045260246000fd5b60048110611f1957634e487b7160e01b600052603260045260246000fd5b6020020151606086015282611f5185611f3384600161586a565b81518110611dac57634e487b7160e01b600052603260045260246000fd5b60048110611f6f57634e487b7160e01b600052603260045260246000fd5b6020020151608086015282611fa785611f8984600161586a565b81518110611e1357634e487b7160e01b600052603260045260246000fd5b60048110611fc557634e487b7160e01b600052603260045260246000fd5b602002015160a0860152611fd986866133c1565b602083015284516004908690611ff0908390615882565b60ff169052508261200685611e8784600261586a565b6004811061202457634e487b7160e01b600052603260045260246000fd5b602002015160408601528261203e85611edd84600261586a565b6004811061205c57634e487b7160e01b600052603260045260246000fd5b602002015160608601528261207685611f3384600261586a565b6004811061209457634e487b7160e01b600052603260045260246000fd5b60200201516080860152826120ae85611f8984600261586a565b600481106120cc57634e487b7160e01b600052603260045260246000fd5b602002015160a08601526120e086866133c1565b6040830152845160049086906120f7908390615882565b60ff169052508261210d85611e8784600361586a565b6004811061212b57634e487b7160e01b600052603260045260246000fd5b602002015160408601528261214585611edd84600361586a565b6004811061216357634e487b7160e01b600052603260045260246000fd5b602002015160608601528261217d85611f3384600361586a565b6004811061219b57634e487b7160e01b600052603260045260246000fd5b60200201516080860152826121b585611f8984600361586a565b600481106121d357634e487b7160e01b600052603260045260246000fd5b602002015160a08601526121e786866133c1565b6060830152845160049086906121fe908390615882565b60ff169052508261221485611e8784600461586a565b6004811061223257634e487b7160e01b600052603260045260246000fd5b602002015160408601528261224c85611edd84600461586a565b6004811061226a57634e487b7160e01b600052603260045260246000fd5b602002015160608601528261228485611f3384600461586a565b600481106122a257634e487b7160e01b600052603260045260246000fd5b60200201516080860152826122bc85611f8984600461586a565b600481106122da57634e487b7160e01b600052603260045260246000fd5b602002015160a08601526122ee86866133c1565b608083015284516004908690612305908390615882565b60ff169052508261231b85611e8784600561586a565b6004811061233957634e487b7160e01b600052603260045260246000fd5b602002015160408601528261235385611edd84600561586a565b6004811061237157634e487b7160e01b600052603260045260246000fd5b602002015160608601528261238b85611f3384600561586a565b600481106123a957634e487b7160e01b600052603260045260246000fd5b60200201516080860152826123c385611f8984600561586a565b600481106123e157634e487b7160e01b600052603260045260246000fd5b602002015160a08601526123f586866133c1565b60a08301528451600490869061240c908390615882565b60ff169052508261242285611e8784600661586a565b6004811061244057634e487b7160e01b600052603260045260246000fd5b602002015160408601528261245a85611edd84600661586a565b6004811061247857634e487b7160e01b600052603260045260246000fd5b602002015160608601528261249285611f3384600661586a565b600481106124b057634e487b7160e01b600052603260045260246000fd5b60200201516080860152826124ca85611f8984600661586a565b600481106124e857634e487b7160e01b600052603260045260246000fd5b602002015160a08601526124fc86866133c1565b60c083015284516004908690612513908390615882565b60ff169052508261252985611e8784600761586a565b6004811061254757634e487b7160e01b600052603260045260246000fd5b602002015160408601528261256185611edd84600761586a565b6004811061257f57634e487b7160e01b600052603260045260246000fd5b602002015160608601528261259985611f3384600761586a565b600481106125b757634e487b7160e01b600052603260045260246000fd5b60200201516080860152826125d185611f8984600761586a565b600481106125ef57634e487b7160e01b600052603260045260246000fd5b602002015160a086015261260386866133c1565b60e08301528451600490869061261a908390615882565b60ff16905250868260006020020151836001602002015184600260200201518560036020020151866004602002015187600560200201518860066020020151896007602002015160405160200161267999989796959493929190614c96565b60405160208183030381529060405296506020856000015160ff16106126b95760008552602085018051600191906126b2908390615882565b60ff169052505b6126c460088261586a565b9050611cb0565b50856040516020016126dd9190614d92565b60408051808303601f1901815291905298975050505050505050565b6002600a54141561271c5760405162461bcd60e51b81526004016109ea9061574a565b6002600a5561272a33612a47565b61273357600080fd5b336000818152600c6020526040808220600201805490839055905190929183156108fc02918491818181858888f19350505050158015612777573d6000803e3d6000fd5b50506001600a55565b6002600a5414156127a35760405162461bcd60e51b81526004016109ea9061574a565b6002600a556127b133612a47565b6127ba57600080fd5b601254610100900460ff16156127e25760405162461bcd60e51b81526004016109ea9061519c565b601254608060ff909116106128095760405162461bcd60e51b81526004016109ea90615257565b815161010c1461282b5760405162461bcd60e51b81526004016109ea906152ac565b6000815111801561283d5750600b8151105b6128595760405162461bcd60e51b81526004016109ea906156a4565b336000908152600c602052604090206003015460ff1661288b5760405162461bcd60e51b81526004016109ea906153af565b6000612895610f0b565b600f805460018101825560009190915284519192506128dd917f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802909101906020860190614488565b506128e6614508565b82815260106040808301919091523360208084018290526000918252600c9052908120600301805460ff169161291b83615921565b825460ff9182166101009390930a928302919092021990911617905550601080546001810182556000919091528151805183926002027f1b6847dc741a1b0cd08d278845f9d819d87b734759afb55fe2de5cb82a9ae672019161298391839160200190614488565b50602082015160019190910180546040909301516001600160a01b03199093166001600160a01b039092169190911760ff60a01b1916600160a01b60ff93841602179055601280549091169060006129da83615994565b91906101000a81548160ff021916908360ff160217905550506129fd338361315b565b50506001600a555050565b612a19612a136130e9565b83613175565b612a355760405162461bcd60e51b81526004016109ea90615653565b612a41848484846135a1565b50505050565b6001600160a01b03166000908152600c6020526040902060019081015460ff1615151490565b60606000600f8381548110612a9257634e487b7160e01b600052603260045260246000fd5b906000526020600020018054612aa79061593e565b80601f0160208091040260200160405190810160405280929190818152602001828054612ad39061593e565b8015612b205780601f10612af557610100808354040283529160200191612b20565b820191906000526020600020905b815481529060010190602001808311612b0357829003601f168201915b50505050509050612b30836115ad565b15612b3c5790506107fa565b6000838152600d6020526040812054600f80549091908110612b6e57634e487b7160e01b600052603260045260246000fd5b906000526020600020018054612b839061593e565b80601f0160208091040260200160405190810160405280929190818152602001828054612baf9061593e565b8015612bfc5780601f10612bd157610100808354040283529160200191612bfc565b820191906000526020600020905b815481529060010190602001808311612bdf57829003601f168201915b505050505090506000600f600d60008781526020019081526020016000206001015481548110612c3c57634e487b7160e01b600052603260045260246000fd5b906000526020600020018054612c519061593e565b80601f0160208091040260200160405190810160405280929190818152602001828054612c7d9061593e565b8015612cca5780601f10612c9f57610100808354040283529160200191612cca565b820191906000526020600020905b815481529060010190602001808311612cad57829003601f168201915b5050505050905060005b600c8160ff161015612d5857818160ff1681518110612d0357634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b838260ff1681518110612d3157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612d5181615994565b9050612cd4565b5090949350505050565b6060612d6d826130cc565b612d895760405162461bcd60e51b81526004016109ea906155a5565b6000612d936135d4565b90506000815111612db35760405180602001604052806000815250612dde565b80612dbd846135e3565b604051602001612dce929190614c67565b6040516020818303038152906040525b9392505050565b6001600160a01b03166000908152600c602052604090206003015460ff1690565b600080612e12836115ad565b15612e1c57600080fd5b50506000908152600d6020526040902080546001909101549091565b606080612e44836115ad565b15612f0b5760108381548110612e6a57634e487b7160e01b600052603260045260246000fd5b90600052602060002090600202016000018054612e869061593e565b80601f0160208091040260200160405190810160405280929190818152602001828054612eb29061593e565b8015612eff5780601f10612ed457610100808354040283529160200191612eff565b820191906000526020600020905b815481529060010190602001808311612ee257829003601f168201915b50505050509050612f71565b6000838152600d60209081526040918290208251808401909352805480845260019091015491830191909152612f4090612e38565b612f4d8260200151612e38565b604051602001612f5e929190614d56565b6040516020818303038152906040529150505b6000612f7c826136fd565b9050606060005b82518160ff1610156130285760ff8116612fc957828160ff1681518110612fba57634e487b7160e01b600052603260045260246000fd5b60200260200101519150613018565b81838260ff1681518110612fed57634e487b7160e01b600052603260045260246000fd5b6020026020010151604051602001613006929190614d56565b60405160208183030381529060405291505b61302181615994565b9050612f83565b50949350505050565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6001600160a01b0381166000908152600c6020526040902080546060919061133e9061593e565b3b151590565b60006001600160e01b031982166380ac58cd60e01b14806130bd57506001600160e01b03198216635b5e139f60e01b145b806107f757506107f782613887565b6000908152600260205260409020546001600160a01b0316151590565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613122826110f5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6110f18282604051806020016040528060008152506138a0565b6000613180826130cc565b61319c5760405162461bcd60e51b81526004016109ea90615363565b60006131a7836110f5565b9050806001600160a01b0316846001600160a01b031614806131e25750836001600160a01b03166131d7846109c3565b6001600160a01b0316145b806131f257506131f28185613031565b949350505050565b826001600160a01b031661320d826110f5565b6001600160a01b0316146132335760405162461bcd60e51b81526004016109ea9061555c565b6001600160a01b0382166132595760405162461bcd60e51b81526004016109ea906152ca565b6132648383836138d3565b61326f6000826130ed565b6001600160a01b03831660009081526003602052604081208054600192906132989084906158bb565b90915550506001600160a01b03821660009081526003602052604081208054600192906132c690849061586a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60606107f76133358361395c565b613962565b60006133468483613ada565b801561335757506133578484613ada565b1561336457506003612dde565b61336e8483613ada565b8015613381575061337f8484613ada565b155b1561338e57506002612dde565b6133988483613ada565b1580156133aa57506133aa8484613ada565b156133b757506001612dde565b5060009392505050565b6060816040015183836000015160ff16602081106133ef57634e487b7160e01b600052603260045260246000fd5b602002015184846020015160ff166020811061341b57634e487b7160e01b600052603260045260246000fd5b6020020151606085015185518790613434906001615882565b60ff166020811061345557634e487b7160e01b600052603260045260246000fd5b602002015187876020015160ff166020811061348157634e487b7160e01b600052603260045260246000fd5b6020020151608088015188518a9061349a906002615882565b60ff16602081106134bb57634e487b7160e01b600052603260045260246000fd5b60200201518a8a6020015160ff16602081106134e757634e487b7160e01b600052603260045260246000fd5b602002015160a08b01518b518d90613500906003615882565b60ff166020811061352157634e487b7160e01b600052603260045260246000fd5b60200201518d8d6020015160ff166020811061354d57634e487b7160e01b600052603260045260246000fd5b602002015160405160200161356796959493929190614de5565b60408051601f198184030181529082905261358a97969594939291602001614ee1565b604051602081830303815290604052905092915050565b6135ac8484846131fa565b6135b884848484613aef565b612a415760405162461bcd60e51b81526004016109ea90615205565b6060601180546108ef9061593e565b60608161360857506040805180820190915260018152600360fc1b60208201526107fa565b8160005b8115613632578061361c81615979565b915061362b9050600a836158a7565b915061360c565b6000816001600160401b0381111561365a57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613684576020820181803683370190505b5090505b84156131f2576136996001836158bb565b91506136a6600a866159b4565b6136b190603061586a565b60f81b8183815181106136d457634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506136f6600a866158a7565b9450613688565b6060600061372483604051806040016040528060018152602001600160fd1b815250613c0a565b905060005b81518160ff16101561388057613768828260ff168151811061375b57634e487b7160e01b600052603260045260246000fd5b6020026020010151613e43565b61377157613870565b60006137a8838360ff168151811061379957634e487b7160e01b600052603260045260246000fd5b60200260200101516001613e47565b90506000613813848460ff16815181106137d257634e487b7160e01b600052603260045260246000fd5b60200260200101516001613802878760ff168151811061375b57634e487b7160e01b600052603260045260246000fd5b61380c91906158bb565b6001613e51565b905061381e82613f79565b81604051602001613830929190614c67565b604051602081830303815290604052848460ff168151811061386257634e487b7160e01b600052603260045260246000fd5b602002602001018190525050505b61387981615994565b9050613729565b5092915050565b6001600160e01b031981166301ffc9a760e01b14919050565b6138aa8383614008565b6138b76000848484613aef565b610aa25760405162461bcd60e51b81526004016109ea90615205565b6138de838383610aa2565b6001600160a01b0383166138fa576138f5816140e7565b61391d565b816001600160a01b0316836001600160a01b03161461391d5761391d838261412b565b6001600160a01b03821661393957613934816141c8565b610aa2565b826001600160a01b0316826001600160a01b031614610aa257610aa282826142a1565b60f81c90565b60606000825b801561398e578161397881615979565b925061398790506010826158a7565b9050613968565b6000826001600160401b038111156139b657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156139e0576020820181803683370190505b50905060005b83811015613a6d576139f96010876159b4565b9250613a04836142e5565b826001613a1184886158bb565b613a1b91906158bb565b81518110613a3957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350613a5b6010876158a7565b9550613a6681615979565b90506139e6565b5080518190613a9c5760405180604001604052806002815260200161030360f41b8152509450505050506107fa565b805160011415613ad15780604051602001613ab79190614dbc565b6040516020818303038152906040529450505050506107fa565b95945050505050565b600160f883901c60ff83161c81161492915050565b6000613b03846001600160a01b0316613086565b15613bff57836001600160a01b031663150b7a02613b1f6130e9565b8786866040518563ffffffff1660e01b8152600401613b419493929190615095565b602060405180830381600087803b158015613b5b57600080fd5b505af1925050508015613b8b575060408051601f3d908101601f19168201909252613b88918101906149de565b60015b613be5573d808015613bb9576040519150601f19603f3d011682016040523d82523d6000602084013e613bbe565b606091505b508051613bdd5760405162461bcd60e51b81526004016109ea90615205565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506131f2565b506001949350505050565b606082600060015b60018351613c2091906158bb565b821015613c67576000613c3487878561433b565b9050806000191415613c465750613c67565b81613c5081615979565b9250613c5f905081600161586a565b925050613c12565b806001600160401b03811115613c8d57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015613cc057816020015b6060815260200190600190039081613cab5790505b50935060009150600090505b60018351613cda91906158bb565b821015613e3a576000613cee87878561433b565b9050806000191415613cfe575082515b6000613d0a84836158bb565b6001600160401b03811115613d2f57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613d59576020820181803683370190505b509050806000855b84811015613dec57878181518110613d8957634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319168383613da381615979565b945081518110613dc357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535080613de481615979565b915050613d61565b50613df884600161586a565b9550818886613e0681615979565b975081518110613e2657634e487b7160e01b600052603260045260246000fd5b602002602001018190525050505050613ccc565b50505092915050565b5190565b6060612dde838360005b82516060908490613e628585615829565b1115613e7e57634e487b7160e01b600052600160045260246000fd5b6000846001600160401b03811115613ea657634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015613ed0576020820181803683370190505b509050806000855b613ee28888615829565b811015613f6c57848181518110613f0957634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b0319168383613f2381615979565b945081518110613f4357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535080613f6481615979565b915050613ed8565b5090979650505050505050565b60608160005b815181101561388057613fbf828281518110613fab57634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b031916614401565b828281518110613fdf57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053508061400081615979565b915050613f7f565b6001600160a01b03821661402e5760405162461bcd60e51b81526004016109ea906154db565b614037816130cc565b156140545760405162461bcd60e51b81526004016109ea90615275565b614060600083836138d3565b6001600160a01b038216600090815260036020526040812080546001929061408990849061586a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b600060016141388461118d565b61414291906158bb565b600083815260076020526040902054909150808214614195576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906141da906001906158bb565b6000838152600960205260408120546008805493945090928490811061421057634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061423f57634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061428557634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006142ac8361118d565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b600060098260ff1611614307576142fd826030615882565b60f81b90506107fa565b8160ff16600a1115801561431f5750600f8260ff1611155b1561025c57600a614331836061615882565b6142fd91906158d2565b81516000908490849060011461436157634e487b7160e01b600052600160045260246000fd5b835b82518110156143f3578160008151811061438d57634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b6001600160f81b0319168382815181106143c257634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191614156143e1579250612dde915050565b806143eb81615979565b915050614363565b506000199695505050505050565b6000606160f81b6001600160f81b031983161080159061442f5750603d60f91b6001600160f81b0319831611155b15614443576142fd602060f884901c6158d2565b5090565b60405180606001604052806003905b60608152602001906001900390816144565790505090565b604051806040016040528060008152602001600081525090565b8280546144949061593e565b90600052602060002090601f0160209004810192826144b657600085556144fc565b82601f106144cf57805160ff19168380011785556144fc565b828001600101855582156144fc579182015b828111156144fc5782518255916020019190600101906144e1565b506144439291506145f8565b604080516060808201835281526000602082018190529181019190915290565b604051806060016040528061453b61460d565b815260200161454861460d565b815260200161455561460d565b905290565b60405180608001604052806060815260200160001515815260200160008152602001600060ff1681525090565b604080516080810190915260608152600360208201614456565b6040518060c00160405280600060ff168152602001600060ff168152602001606081526020016060815260200160608152602001606081525090565b60408051610100810190915260608152600760208201614456565b5b8082111561444357600081556001016145f9565b60405180608001604052806004906020820280368337509192915050565b80356001600160a01b03811681146107fa57600080fd5b600082601f830112614652578081fd5b61465c60806157d2565b80838560808601111561466d578384fd5b835b600481101561468e57815184526020938401939091019060010161466f565b509095945050505050565b600082601f8301126146a9578081fd5b81356146bc6146b782615802565b6157d2565b8181528460208386010111156146d0578283fd5b816020850160208301379081016020019190915292915050565b600082601f8301126146fa578081fd5b81516147086146b782615802565b81815284602083860101111561471c578283fd5b6131f28260208301602087016158f5565b803560ff811681146107fa57600080fd5b60006020828403121561474f578081fd5b612dde8261462b565b6000806040838503121561476a578081fd5b6147738361462b565b91506147816020840161462b565b90509250929050565b60008060006060848603121561479e578081fd5b6147a78461462b565b92506147b56020850161462b565b9150604084013590509250925092565b600080600080608085870312156147da578182fd5b6147e38561462b565b93506147f16020860161462b565b92506040850135915060608501356001600160401b03811115614812578182fd5b61481e87828801614699565b91505092959194509250565b6000806040838503121561483c578182fd5b6148458361462b565b915060208301358015158114614859578182fd5b809150509250929050565b600080600060608486031215614878578081fd5b6148818461462b565b925060208401356001600160401b0381111561489b578182fd5b6148a786828701614699565b9250506148b66040850161472d565b90509250925092565b600080604083850312156148d1578182fd5b6148da8361462b565b946020939093013593505050565b600060208083850312156148fa578182fd5b82516001600160401b0381111561490f578283fd5b8301601f8101851361491f578283fd5b61492960606157d2565b8082855b6003811015613f6c5761494389835187016146ea565b8452928501929085019060010161492d565b60006020808385031215614967578182fd5b82516001600160401b0381111561497c578283fd5b8301601f8101851361498c578283fd5b61499660806157d2565b8082855b6004811015613f6c576149b089835187016146ea565b8452928501929085019060010161499a565b6000602082840312156149d3578081fd5b8135612dde81615a0a565b6000602082840312156149ef578081fd5b8151612dde81615a0a565b60008060408385031215614a0c578182fd5b82356001600160401b0380821115614a22578384fd5b614a2e86838701614699565b93506020850135915080821115614a43578283fd5b50614a5085828601614699565b9150509250929050565b600060208284031215614a6b578081fd5b81356001600160401b03811115614a80578182fd5b6131f284828501614699565b60006101808284031215614a9e578081fd5b614aa860606157d2565b614ab28484614642565b8152614ac18460808501614642565b6020820152614ad4846101008501614642565b60408201529392505050565b600060208284031215614af1578081fd5b5035919050565b60008060408385031215614b0a578182fd5b8235915060208301356001600160401b0380821115614b27578283fd5b9084019060608287031215614b3a578283fd5b614b4460606157d2565b823582811115614b52578485fd5b614b5e88828601614699565b825250614b6d6020840161462b565b6020820152614b7e6040840161472d565b60408201528093505050509250929050565b60008060408385031215614ba2578182fd5b50508035926020909101359150565b8060005b6004811015612a41578151845260209384019390910190600101614bb5565b60008151808452614bec8160208601602086016158f5565b601f01601f19169290920160200192915050565b60008151614c128185602086016158f5565b9290920192915050565b6411103c9e9160d91b815260050190565b7f222077696474683d22312e3522206865696768743d22312e3522202f3e0000008152601d0190565b6411103c1e9160d91b815260050190565b60008351614c798184602088016158f5565b835190830190614c8d8183602088016158f5565b01949350505050565b60008a51614ca8818460208f016158f5565b8a51614cba8183860160208f016158f5565b8a519184010190614ccf818360208e016158f5565b8951614ce18183850160208e016158f5565b8951929091010190614cf7818360208c016158f5565b8751910190614d0a818360208b016158f5565b8651614d1c8183850160208b016158f5565b8651929091010190614d328183602089016158f5565b8451614d4481838501602089016158f5565b9101019b9a5050505050505050505050565b60008351614d688184602088016158f5565b600160fd1b9083019081528351614d868160018401602088016158f5565b01600101949350505050565b60008251614da48184602087016158f5565b651e17b9bb339f60d11b920191825250600601919050565b6000600360fc1b82528251614dd88160018501602087016158f5565b9190910160010192915050565b60006b1e3932b1ba103334b6361e9160a11b8083528851614e0d81600c860160208d016158f5565b6411103c1e9160d91b600c9185019182018190528951614e34816011850160208e016158f5565b6411103c9e9160d91b601193909101928301528851614e5a816016850160208d016158f5565b8083019250507f222077696474683d22312e3522206865696768743d22312e3522202f3e000000601683015282603383015287519250614ea183603f840160208b016158f5565b828201925080603f8401525050614ed4614ecf614ec9614ec46044850189614c00565b614c1c565b86614c00565b614c2d565b9998505050505050505050565b60006b1e3932b1ba103334b6361e9160a11b8083528951614f0981600c860160208e016158f5565b6411103c1e9160d91b600c918501918201528951614f2e816011840160208e016158f5565b6411103c9e9160d91b601192909101918201528851614f54816016840160208d016158f5565b8082019150507f222077696474683d22312e3522206865696768743d22312e3522202f3e000000601682015281603382015287519150614f9b82603f830160208b016158f5565b614fc4614ec9614ecf614fbe614ec4614fb8603f88880101614c56565b8c614c00565b89614c00565b9b9a5050505050505050505050565b6000602360f81b82528451614fef8160018501602089016158f5565b8451908301906150068160018401602089016158f5565b845191019061501c8160018401602088016158f5565b0160010195945050505050565b60008251805161503d8185602085016158f5565b6020858101516001600160a01b0316601f92909201601f19169490940190815260409485015160ff169381019390935250500190565b918252602082015260400190565b6001600160a01b0391909116815260200190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906150c890830184614bd4565b9695505050505050565b60208082526000906080830183820185845b600381101561511357601f19878503018352615101848351614bd4565b935091840191908401906001016150e4565b50919695505050505050565b602080825260009060a0830183820185845b600481101561511357601f1987850301835261514e848351614bd4565b93509184019190840190600101615131565b901515815260200190565b600060208252612dde6020830184614bd4565b6020808252600490820152630c47460760e31b604082015260600190565b602080825260049082015263623a303160e01b604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b602080825260049082015263623a303360e01b604082015260600190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b602080825260049082015263188e8c0d60e21b604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b602080825260049082015263623a313160e01b604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b602080825260049082015263311d181b60e11b604082015260600190565b602080825260049082015263311d181960e11b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b6020808252602f908201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60408201526e3732bc34b9ba32b73a103a37b5b2b760891b606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b6020808252600490820152630623a31360e41b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b602080825260049082015263623a303560e01b604082015260600190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b602080825260049082015263623a303960e01b604082015260600190565b602080825260049082015263623a303760e01b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b600061018082019050615795828451614bb1565b60208301516157a76080840182614bb1565b506040830151613880610100840182614bb1565b90815260200190565b60ff91909116815260200190565b604051601f8201601f191681016001600160401b03811182821017156157fa576157fa6159f4565b604052919050565b60006001600160401b0382111561581b5761581b6159f4565b50601f01601f191660200190565b600080821280156001600160ff1b038490038513161561584b5761584b6159c8565b600160ff1b8390038412811615615864576158646159c8565b50500190565b6000821982111561587d5761587d6159c8565b500190565b600060ff821660ff84168060ff0382111561589f5761589f6159c8565b019392505050565b6000826158b6576158b66159de565b500490565b6000828210156158cd576158cd6159c8565b500390565b600060ff821660ff8416808210156158ec576158ec6159c8565b90039392505050565b60005b838110156159105781810151838201526020016158f8565b83811115612a415750506000910152565b600060ff821680615934576159346159c8565b6000190192915050565b60028104600182168061595257607f821691505b6020821081141561597357634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561598d5761598d6159c8565b5060010190565b600060ff821660ff8114156159ab576159ab6159c8565b60010192915050565b6000826159c3576159c36159de565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114615a2057600080fd5b5056fe3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d3822207374616e64616c6f6e653d226e6f223f3e3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667222076657273696f6e3d22312e31222076696577426f783d22302030203332203332223ea264697066735822122017a68f7598a4fe20c758aa1bd614ec698bc09466ad425e1726f6e0c42d6a8c3364736f6c634300080100330000000600ffd5719efff568000000000000000015555555555555541555555555555554140514555555555414451455555555541445045555555554144510555555555414451455555555541405145555555554155555555555555415555555555555541401114051451554145511445145155414550140514115541455114451441554145511445145155414011144514515541555555555555554155555555555555400000000000000002aaaaaaaaaaaaaa82aaaaaaaaaaaaaa800000000000000003ffffffffffffffc3ffffffffffffffc000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000068747470733a2f2f6170692e626c69746d61702e636f6d2f76312f6d657461646174612f

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.