ERC-721
Overview
Max Total Supply
2,133 SPIRALS
Holders
555
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 SPIRALSLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
TheSpirals
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; pragma abicoder v2; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import 'base64-sol/base64.sol'; import './TheColors.sol'; import './INFTOwner.sol'; /** * @title TheSpirals contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract TheSpirals is ERC721Enumerable, Ownable { using Strings for uint256; using Strings for uint32; using Strings for uint8; struct SpiralTraits { uint8 direction; uint8 strokeWidth; uint8 spiralSize; uint8 stepDuration; uint8 duration; } string public PROVENANCE_HASH = ""; address constant public THE_COLORS = address(0x9fdb31F8CE3cB8400C7cCb2299492F2A498330a4); mapping(uint256 => bool) public hasClaimed; constructor() ERC721("The Spirals (thecolors.art)", "SPIRALS") {} function tokenURI(uint256 tokenId) public view virtual override(ERC721) returns (string memory) { require(hasClaimed[tokenId], "ERC721Metadata: URI query for nonexistent token"); string memory svgData = generateSVGImage(tokenId); string memory image = Base64.encode(bytes(svgData)); return string( abi.encodePacked( 'data:application/json;base64,', Base64.encode( bytes( abi.encodePacked( '{', '"image":"', 'data:image/svg+xml;base64,', image, '",', generateNameDescription(tokenId), generateAttributes(tokenId), '}' ) ) ) ) ); } function getTokenMetadata(uint256 tokenId) public view returns (string memory) { string memory image = Base64.encode(bytes(generateSVGImage(tokenId))); return string( abi.encodePacked( 'data:application/json', '{', '"image":"', 'data:image/svg+xml;base64,', image, '",', generateNameDescription(tokenId), generateAttributes(tokenId), '}' ) ); } function getTokenSVG(uint256 tokenId) public view returns (string memory) { return generateSVGImage(tokenId); } function getBase64TokenSVG(uint256 tokenId) public view returns (string memory) { string memory image = Base64.encode(bytes(generateSVGImage(tokenId))); return string( abi.encodePacked( 'data:application/json;base64', image ) ); } function getColorsOwnedByUser(address user) public view returns (uint256[] memory tokenIds) { uint256[] memory tokenIds = new uint256[](4317); uint index = 0; for (uint i = 0; i < 4317; i++) { address tokenOwner = INFTOwner(THE_COLORS).ownerOf(i); if (user == tokenOwner) { tokenIds[index] = i; index += 1; } } uint left = 4317 - index; for (uint i = 0; i < left; i++) { tokenIds[index] = 9999; index += 1; } return tokenIds; } function getUnmintedSpiralsByUser(address user) public view returns (uint256[] memory tokenIds) { uint256[] memory tokenIds = new uint256[](4317); uint index = 0; for (uint i = 0; i < 4317; i++) { address tokenOwner = INFTOwner(THE_COLORS).ownerOf(i); if (user == tokenOwner && !hasClaimed[i]) { tokenIds[index] = i; index += 1; } } uint left = 4317 - index; for (uint i = 0; i < left; i++) { tokenIds[index] = 9999; index += 1; } return tokenIds; } function withdraw() public onlyOwner { uint balance = address(this).balance; payable(msg.sender).transfer(balance); } /* * Set provenance once it's calculated */ function setProvenanceHash(string memory provenanceHash) public onlyOwner { PROVENANCE_HASH = provenanceHash; } /** * Mints The Spirals */ function mintSpiral(uint256 tokenId) public { address tokenOwner = INFTOwner(THE_COLORS).ownerOf(tokenId); require(!hasClaimed[tokenId], "Color has already claimed their Spiral."); require(msg.sender == tokenOwner, "Only token owner can mint their Spiral."); uint32 r = TheColors(THE_COLORS).getRed(tokenId); uint32 g = TheColors(THE_COLORS).getGreen(tokenId); uint32 b = TheColors(THE_COLORS).getBlue(tokenId); _safeMint(msg.sender, tokenId); generateColorSpectrum(tokenId, r, g, b); hasClaimed[tokenId] = true; } function mintBatch(uint256[] memory tokenIds) public { for (uint256 i = 0; i < tokenIds.length; i++) { mintSpiral(tokenIds[i]); } } function generateNameDescription(uint256 tokenId) internal view returns (string memory) { string memory hexCode = TheColors(THE_COLORS).getHexColor(tokenId); return string( abi.encodePacked( '"external_url":"https://thecolors.art",', unicode'"description":"The Spirals are a set of 4,317 iconic designs generated and stored entirely on-chain, given to The Colors holders.', '\\nToken id: #', tokenId.toString(), '",', '"name":"The ', hexCode, ' Spiral",' ) ); } function generateAttributes(uint256 tokenId) internal view returns (string memory) { string memory hexCode = TheColors(THE_COLORS).getHexColor(tokenId); uint32 r = TheColors(THE_COLORS).getRed(tokenId); uint32 g = TheColors(THE_COLORS).getGreen(tokenId); uint32 b = TheColors(THE_COLORS).getBlue(tokenId); SpiralTraits memory traits = generateTraits(tokenId, r, g, b); bytes memory buffer = abi.encodePacked( '"attributes":[', '{"trait_type":"Background color","value":"', hexCode, '"},', '{"trait_type":"Type","value":"', getType(traits.direction), '"},', '{"trait_type":"Stroke","value":"', getStroke(traits.strokeWidth), '"},' ); return string( abi.encodePacked( buffer, '{"trait_type":"Size","value":"', getSize(traits.spiralSize), '"},', '{"trait_type":"Speed","value":"', getSpeed(traits.stepDuration), '"},', '{"trait_type":"Duration","value":"', traits.duration.toString(), 's"}', ']' ) ); } function getSpeed(uint8 stepDuration) internal view returns (string memory) { if (stepDuration == 1) { return "Fast"; } else if (stepDuration == 2) { return "Medium"; } else { return "Slow"; } } function getSize(uint8 spiralSize) internal view returns (string memory) { if (spiralSize == 5) { return "Small"; } else if (spiralSize == 6) { return "Kinda Small"; } else if (spiralSize == 7) { return "Small Medium"; } else if (spiralSize == 8) { return "Large Medium"; } else if (spiralSize == 9) { return "Kinda Large"; } else { return "Large"; } } function getType(uint8 direction) internal view returns (string memory) { if (direction == 2) { return "Flat"; } else if (direction == 3) { return "Semi-Flat"; } else if (direction == 4) { return "Semi-Straight"; } else { return "Straight"; } } function getStroke(uint8 strokeWidth) internal view returns (string memory) { if (strokeWidth < 3) { return "Thin"; } else if (strokeWidth < 5) { return "Semi-Thin"; } else if (strokeWidth < 7) { return "Semi-Thick"; } else { return "Thick"; } } function generateSVGImage(uint256 tokenId) internal view returns (string memory) { string memory hexCode = TheColors(THE_COLORS).getHexColor(tokenId); uint32 r = TheColors(THE_COLORS).getRed(tokenId); uint32 g = TheColors(THE_COLORS).getGreen(tokenId); uint32 b = TheColors(THE_COLORS).getBlue(tokenId); SpiralTraits memory traits = generateTraits(tokenId, r, g, b); string memory pathD = generatePathD(traits.direction, traits.spiralSize); bytes memory svgPartA = generateSVGPartA(tokenId, r, g, b, pathD, traits.strokeWidth, traits.stepDuration); bytes memory svgPartB = generateSVGPartB(pathD, traits.strokeWidth, traits.stepDuration, traits.duration); return string( abi.encodePacked( '<svg fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="500" height="500" style="background-color:', hexCode, '">', svgPartA, svgPartB, '</svg>' ) ); } function generateSVGPartB(string memory pathD, uint8 strokeWidth, uint8 stepDuration, uint8 duration) internal view returns (bytes memory) { bytes memory bufferA = abi.encodePacked( '<animate id="step5" begin="step4.end+0.5s" attributeType="XML" attributeName="stroke-dasharray" to="3217" dur="', stepDuration.toString(), 's" fill="freeze" />', '<animate id="step6" begin="step5.end+0.5s" attributeType="XML" attributeName="stroke-dasharray" to="6434" dur="', stepDuration.toString(), 's" fill="freeze" />', '</path>' '<path id="spiral" stroke-dasharray="0" stroke-dashoffset="0" stroke="#0000ff" stroke-width="' ); bytes memory bufferB = abi.encodePacked( strokeWidth.toString(), '" d="', pathD, '">' '<animate id="start" attributeType="XML" attributeName="stroke" begin="0.5s;end.end+0.5s" to="#0000ff" dur="', duration.toString(), '.5s" fill="freeze" />', '<animate attributeType="XML" attributeName="stroke-dashoffset" begin="start.begin" to="6434" dur="', duration.toString() ); bytes memory bufferC = abi.encodePacked( 's" fill="freeze" />', '<animate attributeType="XML" attributeName="stroke-dasharray" begin="start.begin" to="6434" dur="', duration.toString(), 's" fill="freeze" />', '<animate attributeType="XML" attributeName="stroke-dashoffset" begin="step6.end+1" to="0" dur="0.3s" fill="freeze" />', '<animate id="end" attributeType="XML" attributeName="stroke-dasharray" begin="step6.end+1" to="0" dur="0.3s" fill="freeze" />', '</path>' ); return abi.encodePacked(bufferA, bufferB, bufferC); } function generateSVGPartA(uint256 tokenId, uint32 r, uint32 g, uint32 b, string memory pathD, uint8 strokeWidth, uint8 stepDuration) internal view returns (bytes memory) { (string memory rHexCode, string memory gHexCode, string memory bHexCode) = generateColorSpectrum(tokenId, r, g, b); bytes memory bufferA = abi.encodePacked( '<path id="spiral" stroke-dasharray="6434" stroke-dashoffset="6434" stroke="', rHexCode, '" stroke-width="', strokeWidth.toString(), '" d="', pathD, '">', '<animate begin="start.begin" attributeType="XML" attributeName="stroke" to="', rHexCode, '" dur="0.3s" fill="freeze" />' ); bytes memory bufferB = abi.encodePacked( '<animate id="step1" begin="start.begin+0.5s" attributeType="XML" attributeName="stroke-dashoffset" to="0" dur="', stepDuration.toString(), 's" fill="freeze" />' '<animate id="step2" begin="step1.end+0.5s" attributeType="XML" attributeName="stroke-dasharray" to="0" dur="', stepDuration.toString(), 's" fill="freeze" />' '<animate begin="start.begin+6.5s" attributeType="XML" attributeName="stroke" to="', gHexCode, '" dur="0.3s" fill="freeze" />' ); bytes memory bufferC = abi.encodePacked( '<animate id="step3" begin="step2.end+1s" attributeType="XML" attributeName="stroke-dasharray" to="1608" dur="', stepDuration.toString(), 's" fill="freeze" />', '<animate id="step4" begin="step3.end+0.5s" attributeType="XML" attributeName="stroke-dashoffset" to="6434" dur="', stepDuration.toString(), 's" fill="freeze" />', '<animate begin="start.begin+13s" attributeType="XML" attributeName="stroke" to="', bHexCode, '" dur="0.3s" fill="freeze" />' ); return abi.encodePacked(bufferA, bufferB, bufferC); } function generatePathD(uint8 direction, uint8 spiralSize) internal view returns (string memory) { bytes memory pathD = abi.encodePacked("M250,250 a5,"); for (uint i = 0; i < 38; i++) { pathD = abi.encodePacked( pathD, direction.toString(), ' 0 1,1 ', i % 2 == 1 ? '-' : '', ((i + 2) * spiralSize).toString(), ',0 5,' ); } return string( abi.encodePacked( pathD, '0' ) ); } function generateTraits(uint256 tokenId, uint32 r, uint32 g, uint32 b) internal view returns (SpiralTraits memory) { SpiralTraits memory traits; traits.direction = uint8((_rng(tokenId, r + g + b) % 4) + 2); traits.strokeWidth = uint8((_rng(tokenId, r) % 8) + 1); traits.spiralSize = uint8((_rng(tokenId, g) % 6) + 5); traits.stepDuration = uint8((_rng(tokenId, b) % 3) + 1); traits.duration = uint8((_rng(tokenId, r + g) % 16) + 21); return traits; } function generateColorSpectrum(uint256 tokenId, uint32 r, uint32 g, uint32 b) internal view returns (string memory, string memory, string memory) { return ( string( abi.encodePacked( '#', uintToHexString(uint256(_rng(tokenId, r) % 16777215)) ) ), string( abi.encodePacked( '#', uintToHexString(uint256(_rng(tokenId, g) % 16777215)) ) ), string( abi.encodePacked( '#', uintToHexString(uint256(_rng(tokenId, b) % 16777215)) ) ) ); } function uintToHexString(uint256 number) public pure returns(string memory) { bytes32 value = bytes32(number); bytes memory alphabet = "0123456789abcdef"; bytes memory str = new bytes(6); for (uint i = 0; i < 3; i++) { str[i*2] = alphabet[uint(uint8(value[i + 29] >> 4))]; str[1+i*2] = alphabet[uint(uint8(value[i + 29] & 0x0f))]; } return string(str); } function _rng(uint256 tokenId, uint256 seed) internal view returns(uint256) { uint256 _tokenId = tokenId + 1; return uint256(keccak256(abi.encodePacked(_tokenId.toString(), seed.toString()))) + uint256(_tokenId * seed); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// 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(); } }
// SPDX-License-Identifier: MIT /// @title Base64 /// @author Brecht Devos - <[email protected]> /// @notice Provides a function for encoding some bytes in base64 library Base64 { string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { dataPtr := add(dataPtr, 3) // read 3 bytes let input := mload(dataPtr) // write 4 characters mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F))))) resultPtr := add(resultPtr, 1) mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F))))) resultPtr := add(resultPtr, 1) mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr( 6, input), 0x3F))))) resultPtr := add(resultPtr, 1) mstore(resultPtr, shl(248, mload(add(tablePtr, and( input, 0x3F))))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; pragma abicoder v2; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol'; import 'base64-sol/base64.sol'; import './INFTOwner.sol'; /** * @title TheColors contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation */ contract TheColors is ERC721Enumerable, Ownable { using Strings for uint256; using Strings for uint32; string public PROVENANCE_HASH = ""; address constant public THE_COLORS_LEGACY = address(0xc22f6c6f04c24Fac546A43Eb2E2eB10b1D2953DA); uint256 constant public MAX_COLORS = 4317; mapping(uint256 => uint32) private _hexColors; mapping(uint32 => bool) public existingHexColors; constructor() ERC721("The Colors (thecolors.art)", "COLORS") {} function tokenURI(uint256 tokenId) public view virtual override(ERC721) returns (string memory) { require(_hexColors[tokenId] > 0, "ERC721Metadata: URI query for nonexistent token"); uint32 hexColor = _hexColors[tokenId]; string memory hexString = uintToHexString(hexColor); string memory image = Base64.encode(bytes(generateSVGImage(hexString))); return string( abi.encodePacked( 'data:application/json;base64,', Base64.encode( bytes( abi.encodePacked( '{', '"image":"', 'data:image/svg+xml;base64,', image, '",', '"image_data":"', escapeQuotes(generateSVGImage(hexString)), '",', generateNameDescription(tokenId, hexString), generateAttributes(hexColor, hexString), '}' ) ) ) ) ); } function getTokenMetadata(uint256 tokenId) public view returns (string memory) { uint32 hexColor = _hexColors[tokenId]; string memory hexString = uintToHexString(hexColor); string memory image = Base64.encode(bytes(generateSVGImage(hexString))); return string( abi.encodePacked( 'data:application/json', '{', '"image":"', 'data:image/svg+xml;base64,', image, '",', '"image_data":"', escapeQuotes(generateSVGImage(hexString)), '",', generateNameDescription(tokenId, hexString), generateAttributes(hexColor, hexString), '}' ) ); } function getTokenSVG(uint256 tokenId) public view returns (string memory) { uint32 hexColor = _hexColors[tokenId]; string memory hexString = uintToHexString(hexColor); return generateSVGImage(hexString); } function getBase64TokenSVG(uint256 tokenId) public view returns (string memory) { uint32 hexColor = _hexColors[tokenId]; string memory hexString = uintToHexString(hexColor); string memory image = Base64.encode(bytes(generateSVGImage(hexString))); return string( abi.encodePacked( 'data:application/json;base64', image ) ); } function getHexColor(uint256 tokenId) public view returns (string memory) { uint32 hexColor = _hexColors[tokenId]; string memory hexString = uintToHexString(hexColor); return string( abi.encodePacked( '#', hexString ) ); } function getRGB(uint256 tokenId) public view returns (string memory) { string memory r = getRed(tokenId).toString(); string memory g = getGreen(tokenId).toString(); string memory b = getBlue(tokenId).toString(); return string(abi.encodePacked('rgb(', r, ',', g, ',', b, ')')); } function getRed(uint256 tokenId) public view returns (uint32) { uint32 hexColor = _hexColors[tokenId]; return ((hexColor >> 16) & 0xFF); // Extract the RR byte } function getGreen(uint256 tokenId) public view returns (uint32) { uint32 hexColor = _hexColors[tokenId]; return ((hexColor >> 8) & 0xFF); // Extract the GG byte } function getBlue(uint256 tokenId) public view returns (uint32) { uint32 hexColor = _hexColors[tokenId]; return ((hexColor) & 0xFF); // Extract the BB byte } /* * Set provenance once it's calculated */ function setProvenanceHash(string memory provenanceHash) public onlyOwner { PROVENANCE_HASH = provenanceHash; } /** * Mints The Colors to The Colors Legacy holders */ function mintNextColors(uint256 numberOfTokens) public onlyOwner { require(totalSupply() + numberOfTokens <= MAX_COLORS, "Purchase would exceed max supply of Colors"); uint256 mintIndex; address tokenOwner; for(uint i = 0; i < numberOfTokens; i++) { mintIndex = totalSupply(); if (totalSupply() < MAX_COLORS) { tokenOwner = INFTOwner(THE_COLORS_LEGACY).ownerOf(mintIndex); _safeMint(tokenOwner, mintIndex); generateRandomHexColor(mintIndex); } } } function generateNameDescription(uint256 tokenId, string memory hexString) internal pure returns (string memory) { return string( abi.encodePacked( '"external_url":"https://thecolors.art",', unicode'"description":"The Colors are a set of 8,888 iconic shades generated and stored entirely on-chain to be used as a primitive and for color field vibes. ~ A Color is Forever ∞', '\\nHex: #', hexString, '\\n\\nToken id: #', tokenId.toString(), '",', '"name":"#', hexString, '",' ) ); } function generateAttributes(uint32 hexColor, string memory hexString) internal pure returns (string memory) { string memory r = ((hexColor >> 16) & 0xFF).toString(); // Extract the RR byte string memory g = ((hexColor >> 8) & 0xFF).toString(); // Extract the GG byte string memory b = ((hexColor) & 0xFF).toString(); // Extract the BB byte string memory rgb = string(abi.encodePacked('rgb(', r, ',', g, ',', b, ')')); return string( abi.encodePacked( '"attributes":[', '{"trait_type":"Hex code","value":"#', hexString, '"},' '{"trait_type":"RGB","value":"', rgb, '"},', '{"trait_type":"Red","value":"', r, '"},', '{"trait_type":"Green","value":"', g, '"},', '{"trait_type":"Blue","value":"', b, '"}', ']' ) ); } function generateSVGImage(string memory hexString) internal pure returns (string memory) { return string( abi.encodePacked( '<svg width="690" height="690" xmlns="http://www.w3.org/2000/svg" style="background-color:#', hexString, '">', '</svg>' ) ); } function generateRandomHexColor(uint256 tokenId) internal returns (uint32) { uint32 hexColor = uint32(_rng() % 16777215); while (existingHexColors[hexColor]) { hexColor = uint32(uint256(hexColor + block.timestamp * tokenId) % 16777215); } existingHexColors[hexColor] = true; _hexColors[tokenId] = hexColor; return hexColor; } function uintToHexString(uint256 number) public pure returns(string memory) { bytes32 value = bytes32(number); bytes memory alphabet = "0123456789abcdef"; bytes memory str = new bytes(6); for (uint i = 0; i < 3; i++) { str[i*2] = alphabet[uint(uint8(value[i + 29] >> 4))]; str[1+i*2] = alphabet[uint(uint8(value[i + 29] & 0x0f))]; } return string(str); } function escapeQuotes(string memory symbol) internal pure returns (string memory) { bytes memory symbolBytes = bytes(symbol); uint quotesCount = 0; for (uint i = 0; i < symbolBytes.length; i++) { if (symbolBytes[i] == '"') { quotesCount++; } } if (quotesCount > 0) { bytes memory escapedBytes = new bytes(symbolBytes.length + (quotesCount)); uint256 index; for (uint i = 0; i < symbolBytes.length; i++) { if (symbolBytes[i] == '"') { escapedBytes[index++] = '\\'; } escapedBytes[index++] = symbolBytes[i]; } return string(escapedBytes); } return symbol; } function _rng() internal view returns(uint256) { return uint256(keccak256(abi.encodePacked(block.timestamp + block.difficulty))) + uint256(keccak256(abi.encodePacked(block.coinbase))) / block.number + block.gaslimit; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; interface INFTOwner { function ownerOf(uint256 tokenId) external view returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// 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); }
// 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; }
// 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); }
// 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); }
// 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; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// 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; } }
// 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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"PROVENANCE_HASH","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"THE_COLORS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getBase64TokenSVG","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getColorsOwnedByUser","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenMetadata","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenSVG","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getUnmintedSpiralsByUser","outputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"hasClaimed","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":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mintSpiral","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"provenanceHash","type":"string"}],"name":"setProvenanceHash","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"number","type":"uint256"}],"name":"uintToHexString","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040819052600060808190526200001b91600b916200011d565b503480156200002957600080fd5b50604080518082018252601b81527f5468652053706972616c732028746865636f6c6f72732e61727429000000000060208083019182528351808501909452600784526653504952414c5360c81b9084015281519192916200008e916000916200011d565b508051620000a49060019060208401906200011d565b505050620000c1620000bb620000c760201b60201c565b620000cb565b62000200565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200012b90620001c3565b90600052602060002090601f0160209004810192826200014f57600085556200019a565b82601f106200016a57805160ff19168380011785556200019a565b828001600101855582156200019a579182015b828111156200019a5782518255916020019190600101906200017d565b50620001a8929150620001ac565b5090565b5b80821115620001a85760008155600101620001ad565b600181811c90821680620001d857607f821691505b60208210811415620001fa57634e487b7160e01b600052602260045260246000fd5b50919050565b614a4d80620002106000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c80638da5cb5b1161010f578063cc4ef120116100a2578063e985e9c511610071578063e985e9c514610435578063f2fde38b14610471578063ff1b655614610484578063ffb2b55a1461048c57600080fd5b8063cc4ef120146103cc578063ce02f823146103ec578063ce516507146103ff578063d18b60071461042257600080fd5b8063bf035307116100de578063bf0353071461037e578063c7ab2dbc14610391578063c87b56dd146103a4578063c8f8b613146103b757600080fd5b80638da5cb5b1461033f57806395d89b4114610350578063a22cb46514610358578063b88d4fde1461036b57600080fd5b80632f745c5911610187578063603168011161015657806360316801146102fe5780636352211e1461031157806370a0823114610324578063715018a61461033757600080fd5b80632f745c59146102bd5780633ccfd60b146102d057806342842e0e146102d85780634f6ccce7146102eb57600080fd5b806310969523116101c3578063109695231461027257806318160ddd14610285578063232f06b71461029757806323b872dd146102aa57600080fd5b806301ffc9a7146101f557806306fdde031461021d578063081812fc14610232578063095ea7b31461025d575b600080fd5b6102086102033660046132a9565b61049f565b60405190151581526020015b60405180910390f35b6102256104ca565b60405161021491906146c3565b6102456102403660046133a3565b61055c565b6040516001600160a01b039091168152602001610214565b61027061026b3660046131d0565b6105f6565b005b6102706102803660046132e3565b61070c565b6008545b604051908152602001610214565b6102256102a53660046133a3565b61074d565b6102706102b83660046130dc565b6108c7565b6102896102cb3660046131d0565b6108f8565b61027061098e565b6102706102e63660046130dc565b6109e7565b6102896102f93660046133a3565b610a02565b61022561030c3660046133a3565b610a95565b61024561031f3660046133a3565b610ae8565b610289610332366004613062565b610b5f565b610270610be6565b600a546001600160a01b0316610245565b610225610c1c565b61027061036636600461319d565b610c2b565b61027061037936600461311d565b610cf0565b61027061038c3660046133a3565b610d28565b61022561039f3660046133a3565b611042565b6102256103b23660046133a3565b61104d565b6102456000805160206149f883398151915281565b6103df6103da366004613062565b611144565b604051610214919061467f565b6102256103fa3660046133a3565b6112d9565b61020861040d3660046133a3565b600c6020526000908152604090205460ff1681565b6103df610430366004613062565b6112fc565b6102086104433660046130a3565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61027061047f366004613062565b61146c565b610225611507565b61027061049a3660046131fc565b611595565b60006001600160e01b0319821663780e9d6360e01b14806104c457506104c4826115d5565b92915050565b6060600080546104d9906148b4565b80601f0160208091040260200160405190810160405280929190818152602001828054610505906148b4565b80156105525780601f1061052757610100808354040283529160200191610552565b820191906000526020600020905b81548152906001019060200180831161053557829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166105da5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061060182610ae8565b9050806001600160a01b0316836001600160a01b0316141561066f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105d1565b336001600160a01b038216148061068b575061068b8133610443565b6106fd5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016105d1565b6107078383611625565b505050565b600a546001600160a01b031633146107365760405162461bcd60e51b81526004016105d190614728565b805161074990600b906020840190612f8b565b5050565b604080518082018252601081526f181899199a1a9b1b9c1cb0b131b232b360811b60208201528151600680825281840190935260609284929160009160208201818036833701905050905060005b60038110156108be57826004856107b384601d614807565b602081106107c3576107c3614960565b1a60f81b6001600160f81b031916901c60f81c60ff16815181106107e9576107e9614960565b01602001516001600160f81b03191682610804836002614852565b8151811061081457610814614960565b60200101906001600160f81b031916908160001a905350828461083883601d614807565b6020811061084857610848614960565b825191901a600f1690811061085f5761085f614960565b01602001516001600160f81b0319168261087a836002614852565b610885906001614807565b8151811061089557610895614960565b60200101906001600160f81b031916908160001a905350806108b6816148ef565b91505061079b565b50949350505050565b6108d13382611693565b6108ed5760405162461bcd60e51b81526004016105d19061475d565b61070783838361178a565b600061090383610b5f565b82106109655760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105d1565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b031633146109b85760405162461bcd60e51b81526004016105d190614728565b6040514790339082156108fc029083906000818181858888f19350505050158015610749573d6000803e3d6000fd5b61070783838360405180602001604052806000815250610cf0565b6000610a0d60085490565b8210610a705760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105d1565b60088281548110610a8357610a83614960565b90600052602060002001549050919050565b60606000610aaa610aa584611935565b611bd7565b905080610ab684611d3f565b610abf85611de3565b604051602001610ad193929190614020565b604051602081830303815290604052915050919050565b6000818152600260205260408120546001600160a01b0316806104c45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105d1565b60006001600160a01b038216610bca5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105d1565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314610c105760405162461bcd60e51b81526004016105d190614728565b610c1a600061209f565b565b6060600180546104d9906148b4565b6001600160a01b038216331415610c845760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105d1565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610cfa3383611693565b610d165760405162461bcd60e51b81526004016105d19061475d565b610d22848484846120f1565b50505050565b6040516331a9108f60e11b8152600481018290526000906000805160206149f883398151915290636352211e9060240160206040518083038186803b158015610d7057600080fd5b505afa158015610d84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da89190613086565b6000838152600c602052604090205490915060ff1615610e1a5760405162461bcd60e51b815260206004820152602760248201527f436f6c6f722068617320616c726561647920636c61696d65642074686569722060448201526629b834b930b61760c91b60648201526084016105d1565b336001600160a01b03821614610e825760405162461bcd60e51b815260206004820152602760248201527f4f6e6c7920746f6b656e206f776e65722063616e206d696e742074686569722060448201526629b834b930b61760c91b60648201526084016105d1565b604051637a8013c360e01b8152600481018390526000906000805160206149f883398151915290637a8013c39060240160206040518083038186803b158015610eca57600080fd5b505afa158015610ede573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0291906133bc565b6040516382afe39f60e01b8152600481018590529091506000906000805160206149f8833981519152906382afe39f9060240160206040518083038186803b158015610f4d57600080fd5b505afa158015610f61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8591906133bc565b60405163469a6ed560e01b8152600481018690529091506000906000805160206149f88339815191529063469a6ed59060240160206040518083038186803b158015610fd057600080fd5b505afa158015610fe4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100891906133bc565b90506110143386612124565b6110208584848461213e565b50505060009485525050600c602052505060409020805460ff19166001179055565b60606104c482611935565b6000818152600c602052604090205460609060ff166110c65760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016105d1565b60006110d183611935565b905060006110de82611bd7565b905061111c816110ed86611d3f565b6110f687611de3565b604051602001611108939291906140e6565b604051602081830303815290604052611bd7565b60405160200161112c91906142d2565b60405160208183030381529060405292505050919050565b604080516110dd80825262021bc08201909252606091600091906020820162021ba0803683370190505090506000805b6110dd811015611274576040516331a9108f60e11b8152600481018290526000906000805160206149f883398151915290636352211e9060240160206040518083038186803b1580156111c657600080fd5b505afa1580156111da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fe9190613086565b9050806001600160a01b0316866001600160a01b031614801561123057506000828152600c602052604090205460ff16155b15611261578184848151811061124857611248614960565b602090810291909101015261125e600184614807565b92505b508061126c816148ef565b915050611174565b506000611283826110dd614871565b905060005b818110156112cf5761270f8484815181106112a5576112a5614960565b60209081029190910101526112bb600184614807565b9250806112c7816148ef565b915050611288565b5091949350505050565b606060006112e9610aa584611935565b905080604051602001610ad19190614317565b604080516110dd80825262021bc08201909252606091600091906020820162021ba0803683370190505090506000805b6110dd811015611411576040516331a9108f60e11b8152600481018290526000906000805160206149f883398151915290636352211e9060240160206040518083038186803b15801561137e57600080fd5b505afa158015611392573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b69190613086565b9050806001600160a01b0316866001600160a01b031614156113fe57818484815181106113e5576113e5614960565b60209081029190910101526113fb600184614807565b92505b5080611409816148ef565b91505061132c565b506000611420826110dd614871565b905060005b818110156112cf5761270f84848151811061144257611442614960565b6020908102919091010152611458600184614807565b925080611464816148ef565b915050611425565b600a546001600160a01b031633146114965760405162461bcd60e51b81526004016105d190614728565b6001600160a01b0381166114fb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105d1565b6115048161209f565b50565b600b8054611514906148b4565b80601f0160208091040260200160405190810160405280929190818152602001828054611540906148b4565b801561158d5780601f106115625761010080835404028352916020019161158d565b820191906000526020600020905b81548152906001019060200180831161157057829003601f168201915b505050505081565b60005b8151811015610749576115c38282815181106115b6576115b6614960565b6020026020010151610d28565b806115cd816148ef565b915050611598565b60006001600160e01b031982166380ac58cd60e01b148061160657506001600160e01b03198216635b5e139f60e01b145b806104c457506301ffc9a760e01b6001600160e01b03198316146104c4565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061165a82610ae8565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661170c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105d1565b600061171783610ae8565b9050806001600160a01b0316846001600160a01b031614806117525750836001600160a01b03166117478461055c565b6001600160a01b0316145b8061178257506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661179d82610ae8565b6001600160a01b0316146118055760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016105d1565b6001600160a01b0382166118675760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105d1565b6118728383836121ff565b61187d600082611625565b6001600160a01b03831660009081526003602052604081208054600192906118a6908490614871565b90915550506001600160a01b03821660009081526003602052604081208054600192906118d4908490614807565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60405163e01c8fa160e01b8152600481018290526060906000906000805160206149f88339815191529063e01c8fa19060240160006040518083038186803b15801561198057600080fd5b505afa158015611994573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119bc919081019061332c565b604051637a8013c360e01b8152600481018590529091506000906000805160206149f883398151915290637a8013c39060240160206040518083038186803b158015611a0757600080fd5b505afa158015611a1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3f91906133bc565b6040516382afe39f60e01b8152600481018690529091506000906000805160206149f8833981519152906382afe39f9060240160206040518083038186803b158015611a8a57600080fd5b505afa158015611a9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ac291906133bc565b60405163469a6ed560e01b8152600481018790529091506000906000805160206149f88339815191529063469a6ed59060240160206040518083038186803b158015611b0d57600080fd5b505afa158015611b21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b4591906133bc565b90506000611b55878585856122b7565b90506000611b6b82600001518360400151612410565b90506000611b86898787878688602001518960600151612524565b90506000611ba283856020015186606001518760800151612625565b9050878282604051602001611bb9939291906141b7565b60405160208183030381529060405298505050505050505050919050565b6060815160001415611bf757505060408051602081019091526000815290565b60006040518060600160405280604081526020016149b86040913990506000600384516002611c269190614807565b611c30919061483e565b611c3b906004614852565b90506000611c4a826020614807565b67ffffffffffffffff811115611c6257611c62614976565b6040519080825280601f01601f191660200182016040528015611c8c576020820181803683370190505b509050818152600183018586518101602084015b81831015611cfa5760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b93820193909352600401611ca0565b600389510660018114611d145760028114611d2557611d31565b613d3d60f01b600119830152611d31565b603d60f81b6000198301525b509398975050505050505050565b60405163e01c8fa160e01b8152600481018290526060906000906000805160206149f88339815191529063e01c8fa19060240160006040518083038186803b158015611d8a57600080fd5b505afa158015611d9e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611dc6919081019061332c565b9050611dd18361270e565b81604051602001610ad1929190613b28565b60405163e01c8fa160e01b8152600481018290526060906000906000805160206149f88339815191529063e01c8fa19060240160006040518083038186803b158015611e2e57600080fd5b505afa158015611e42573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611e6a919081019061332c565b604051637a8013c360e01b8152600481018590529091506000906000805160206149f883398151915290637a8013c39060240160206040518083038186803b158015611eb557600080fd5b505afa158015611ec9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eed91906133bc565b6040516382afe39f60e01b8152600481018690529091506000906000805160206149f8833981519152906382afe39f9060240160206040518083038186803b158015611f3857600080fd5b505afa158015611f4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7091906133bc565b60405163469a6ed560e01b8152600481018790529091506000906000805160206149f88339815191529063469a6ed59060240160206040518083038186803b158015611fbb57600080fd5b505afa158015611fcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff391906133bc565b90506000612003878585856122b7565b9050600085612015836000015161280c565b61202284602001516128c4565b60405160200161203493929190614547565b6040516020818303038152906040529050806120538360400151612976565b6120608460600151612a94565b612070856080015160ff1661270e565b6040516020016120839493929190613511565b6040516020818303038152906040529650505050505050919050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6120fc84848461178a565b61210884848484612b10565b610d225760405162461bcd60e51b81526004016105d1906146d6565b610749828260405180602001604052806000815250612c1a565b606080606061216462ffffff61215a898963ffffffff16612c4d565b6102a5919061490a565b604051602001612174919061418e565b60405160208183030381529060405261219a62ffffff61215a8a8963ffffffff16612c4d565b6040516020016121aa919061418e565b6040516020818303038152906040526121d062ffffff61215a8b8963ffffffff16612c4d565b6040516020016121e0919061418e565b6040516020818303038152906040529250925092509450945094915050565b6001600160a01b03831661225a5761225581600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61227d565b816001600160a01b0316836001600160a01b03161461227d5761227d8382612cad565b6001600160a01b0382166122945761070781612d4a565b826001600160a01b0316826001600160a01b031614610707576107078282612df9565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526004612333878561231e888a61481f565b612328919061481f565b63ffffffff16612c4d565b61233d919061490a565b612348906002614807565b60ff168152600861235f8763ffffffff8816612c4d565b612369919061490a565b612374906001614807565b60ff166020820152600661238e8763ffffffff8716612c4d565b612398919061490a565b6123a3906005614807565b60ff16604082015260036123bd8763ffffffff8616612c4d565b6123c7919061490a565b6123d2906001614807565b60ff16606082015260106123ea87612328878961481f565b6123f4919061490a565b6123ff906015614807565b60ff16608082015295945050505050565b60606000604051602001612436906b134c8d4c0b0c8d4c08184d4b60a21b8152600c0190565b604051602081830303815290604052905060005b60268110156124fa57816124608660ff1661270e565b61246b60028461490a565b60011461248757604051806020016040528060008152506124a2565b604051806040016040528060018152602001602d60f81b8152505b6124c360ff88166124b4866002614807565b6124be9190614852565b61270e565b6040516020016124d6949392919061346d565b604051602081830303815290604052915080806124f2906148ef565b91505061244a565b508060405160200161250c91906134ec565b60405160208183030381529060405291505092915050565b606060008060006125378b8b8b8b61213e565b92509250925060008361254c8860ff1661270e565b898660405160200161256194939291906139b6565b604051602081830303815290604052905060006125808760ff1661270e565b61258c8860ff1661270e565b8560405160200161259f93929190613e3c565b604051602081830303815290604052905060006125be8860ff1661270e565b6125ca8960ff1661270e565b856040516020016125dd9392919061435c565b60405160208183030381529060405290508282826040516020016126039392919061342a565b6040516020818303038152906040529650505050505050979650505050505050565b606060006126358460ff1661270e565b6126418560ff1661270e565b604051602001612652929190613c71565b604051602081830303815290604052905060006126718660ff1661270e565b8761267e8660ff1661270e565b61268a8760ff1661270e565b60405160200161269d949392919061364f565b604051602081830303815290604052905060006126bc8560ff1661270e565b6040516020016126cc91906137d0565b60405160208183030381529060405290508282826040516020016126f29392919061342a565b6040516020818303038152906040529350505050949350505050565b6060816127325750506040805180820190915260018152600360fc1b602082015290565b8160005b811561275c5780612746816148ef565b91506127559050600a8361483e565b9150612736565b60008167ffffffffffffffff81111561277757612777614976565b6040519080825280601f01601f1916602001820160405280156127a1576020820181803683370190505b5090505b8415611782576127b6600183614871565b91506127c3600a8661490a565b6127ce906030614807565b60f81b8183815181106127e3576127e3614960565b60200101906001600160f81b031916908160001a905350612805600a8661483e565b94506127a5565b60608160ff166002141561283a575050604080518082019091526004815263119b185d60e21b602082015290565b8160ff166003141561286b57505060408051808201909152600981526814d95b5a4b519b185d60ba1b602082015290565b8160ff16600414156128a057505060408051808201909152600d81526c14d95b5a4b54dd1c985a59da1d609a1b602082015290565b505060408051808201909152600881526714dd1c985a59da1d60c21b602082015290565b606060038260ff1610156128f25750506040805180820190915260048152632a3434b760e11b602082015290565b60058260ff16101561292357505060408051808201909152600981526829b2b6b496aa3434b760b91b602082015290565b60078260ff16101561295557505060408051808201909152600a81526953656d692d546869636b60b01b602082015290565b5050604080518082019091526005815264546869636b60d81b602082015290565b60608160ff16600514156129a557505060408051808201909152600581526414db585b1b60da1b602082015290565b8160ff16600614156129d857505060408051808201909152600b81526a12da5b99184814db585b1b60aa1b602082015290565b8160ff1660071415612a0c57505060408051808201909152600c81526b536d616c6c204d656469756d60a01b602082015290565b8160ff1660081415612a4057505060408051808201909152600c81526b4c61726765204d656469756d60a01b602082015290565b8160ff1660091415612a7357505060408051808201909152600b81526a4b696e6461204c6172676560a81b602082015290565b50506040805180820190915260058152644c6172676560d81b602082015290565b60608160ff1660011415612ac257505060408051808201909152600481526311985cdd60e21b602082015290565b8160ff1660021415612af05750506040805180820190915260068152654d656469756d60d01b602082015290565b5050604080518082019091526004815263536c6f7760e01b602082015290565b60006001600160a01b0384163b15612c1257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612b5490339089908890889060040161464c565b602060405180830381600087803b158015612b6e57600080fd5b505af1925050508015612b9e575060408051601f3d908101601f19168201909252612b9b918101906132c6565b60015b612bf8573d808015612bcc576040519150601f19603f3d011682016040523d82523d6000602084013e612bd1565b606091505b508051612bf05760405162461bcd60e51b81526004016105d1906146d6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611782565b506001611782565b612c248383612e3d565b612c316000848484612b10565b6107075760405162461bcd60e51b81526004016105d1906146d6565b600080612c5b846001614807565b9050612c678382614852565b612c708261270e565b612c798561270e565b604051602001612c8a929190613620565b6040516020818303038152906040528051906020012060001c6117829190614807565b60006001612cba84610b5f565b612cc49190614871565b600083815260076020526040902054909150808214612d17576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612d5c90600190614871565b60008381526009602052604081205460088054939450909284908110612d8457612d84614960565b906000526020600020015490508060088381548110612da557612da5614960565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612ddd57612ddd61494a565b6001900381819060005260206000200160009055905550505050565b6000612e0483610b5f565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216612e935760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105d1565b6000818152600260205260409020546001600160a01b031615612ef85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105d1565b612f04600083836121ff565b6001600160a01b0382166000908152600360205260408120805460019290612f2d908490614807565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612f97906148b4565b90600052602060002090601f016020900481019282612fb95760008555612fff565b82601f10612fd257805160ff1916838001178555612fff565b82800160010185558215612fff579182015b82811115612fff578251825591602001919060010190612fe4565b5061300b92915061300f565b5090565b5b8082111561300b5760008155600101613010565b6000613037613032846147df565b6147ae565b905082815283838301111561304b57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561307457600080fd5b813561307f8161498c565b9392505050565b60006020828403121561309857600080fd5b815161307f8161498c565b600080604083850312156130b657600080fd5b82356130c18161498c565b915060208301356130d18161498c565b809150509250929050565b6000806000606084860312156130f157600080fd5b83356130fc8161498c565b9250602084013561310c8161498c565b929592945050506040919091013590565b6000806000806080858703121561313357600080fd5b843561313e8161498c565b9350602085013561314e8161498c565b925060408501359150606085013567ffffffffffffffff81111561317157600080fd5b8501601f8101871361318257600080fd5b61319187823560208401613024565b91505092959194509250565b600080604083850312156131b057600080fd5b82356131bb8161498c565b9150602083013580151581146130d157600080fd5b600080604083850312156131e357600080fd5b82356131ee8161498c565b946020939093013593505050565b6000602080838503121561320f57600080fd5b823567ffffffffffffffff8082111561322757600080fd5b818501915085601f83011261323b57600080fd5b81358181111561324d5761324d614976565b8060051b915061325e8483016147ae565b8181528481019084860184860187018a101561327957600080fd5b600095505b8386101561329c57803583526001959095019491860191860161327e565b5098975050505050505050565b6000602082840312156132bb57600080fd5b813561307f816149a1565b6000602082840312156132d857600080fd5b815161307f816149a1565b6000602082840312156132f557600080fd5b813567ffffffffffffffff81111561330c57600080fd5b8201601f8101841361331d57600080fd5b61178284823560208401613024565b60006020828403121561333e57600080fd5b815167ffffffffffffffff81111561335557600080fd5b8201601f8101841361336657600080fd5b8051613374613032826147df565b81815285602083850101111561338957600080fd5b61339a826020830160208601614888565b95945050505050565b6000602082840312156133b557600080fd5b5035919050565b6000602082840312156133ce57600080fd5b815163ffffffff8116811461307f57600080fd5b600081518084526133fa816020860160208601614888565b601f01601f19169290920160200192915050565b60008151613420818560208601614888565b9290920192915050565b6000845161343c818460208901614888565b845190830190613450818360208901614888565b8451910190613463818360208801614888565b0195945050505050565b6000855161347f818460208a01614888565b855190830190613493818360208a01614888565b660101810189618960cd1b910190815284516134b6816007840160208901614888565b84519101906134cc816007840160208801614888565b640b0c080d4b60da1b60079290910191820152600c019695505050505050565b600082516134fe818460208701614888565b600360fc1b920191825250600101919050565b60008551613523818460208a01614888565b7f7b2274726169745f74797065223a2253697a65222c2276616c7565223a220000908301908152855161355d81601e840160208a01614888565b62089f4b60ea1b601e929091019182018190527f7b2274726169745f74797065223a225370656564222c2276616c7565223a2200602183015285516135a9816040850160208a01614888565b60409201918201527f7b2274726169745f74797065223a224475726174696f6e222c2276616c7565226043820152611d1160f11b606382015283516135f5816065840160208801614888565b6273227d60e81b91016065810191909152605d60f81b6068820152606981015b979650505050505050565b60008351613632818460208801614888565b835190830190613646818360208801614888565b01949350505050565b60008551613661818460208a01614888565b641110321e9160d91b9083019081528551613683816005840160208a01614888565b7f223e3c616e696d6174652069643d227374617274222061747472696275746554600592909101918201527f7970653d22584d4c22206174747269627574654e616d653d227374726f6b652260258201527f20626567696e3d22302e35733b656e642e656e642b302e35732220746f3d222360458201526c1818181833331110323ab91e9160991b60658201528451613723816072840160208901614888565b74171ab991103334b6361e91333932b2bd329110179f60591b607292909101918201527f3c616e696d61746520617474726962757465547970653d22584d4c222061747460878201527f7269627574654e616d653d227374726f6b652d646173686f666673657422206260a78201527f6567696e3d2273746172742e626567696e2220746f3d2236343334222064757260c7820152611e9160f11b60e782015261361560e982018561340e565b6000723991103334b6361e91333932b2bd329110179f60691b8083527f3c616e696d61746520617474726962757465547970653d22584d4c22206174748060138501527f7269627574654e616d653d227374726f6b652d6461736861727261792220626560338501527f67696e3d2273746172742e626567696e2220746f3d223634333422206475723d6053850152601160f91b6073850152845161387c816074870160208901614888565b840160748101839052608781018290527f7269627574654e616d653d227374726f6b652d646173686f666673657422206260a78201527f6567696e3d2273746570362e656e642b312220746f3d223022206475723d223060c7820152741719b991103334b6361e91333932b2bd329110179f60591b60e78201527f3c616e696d6174652069643d22656e642220617474726962757465547970653d60fc8201527f22584d4c22206174747269627574654e616d653d227374726f6b652d6461736861011c8201527f61727261792220626567696e3d2273746570362e656e642b312220746f3d223061013c8201527f22206475723d22302e3373222066696c6c3d22667265657a6522202f3e00000061015c8201526139ac6101798201661e17b830ba341f60c91b815260070190565b9695505050505050565b7f3c706174682069643d2273706972616c22207374726f6b652d6461736861727281527f61793d223634333422207374726f6b652d646173686f66667365743d2236343360208201526a1a111039ba3937b5b29e9160a91b604082015260008551613a2881604b850160208a01614888565b6f111039ba3937b5b296bbb4b23a341e9160811b604b918401918201528551613a5881605b840160208a01614888565b641110321e9160d91b605b92909101918201528451613a7e816060840160208901614888565b61111f60f11b606092909101918201527f3c616e696d61746520626567696e3d2273746172742e626567696e222061747460628201527f726962757465547970653d22584d4c22206174747269627574654e616d653d2260828201526b39ba3937b5b291103a379e9160a11b60a2820152613615613aff60ae83018661340e565b7f22206475723d22302e3373222066696c6c3d22667265657a6522202f3e0000008152601d0190565b7f2265787465726e616c5f75726c223a2268747470733a2f2f746865636f6c6f728152661ccb985c9d088b60ca1b60208201527f226465736372697074696f6e223a225468652053706972616c7320617265206160278201527f20736574206f6620342c3331372069636f6e69632064657369676e732067656e60478201527f65726174656420616e642073746f72656420656e746972656c79206f6e2d636860678201527f61696e2c20676976656e20746f2054686520436f6c6f727320686f6c646572736087820152601760f91b60a78201526c5c6e546f6b656e2069643a202360981b60a882015260008351613c288160b5850160208801614888565b61088b60f21b60b5918401918201526b0113730b6b2911d112a3432960a51b60b782015261339a613c5c60c383018661340e565b680814dc1a5c985b088b60ba1b815260090190565b7f3c616e696d6174652069643d2273746570352220626567696e3d227374657034815260007f2e656e642b302e35732220617474726962757465547970653d22584d4c2220618060208401527f74747269627574654e616d653d227374726f6b652d64617368617272617922208060408501526e3a379e911999189b9110323ab91e9160891b60608501528551613d0f81606f870160208a01614888565b723991103334b6361e91333932b2bd329110179f60691b606f918601918201527f3c616e696d6174652069643d2273746570362220626567696e3d227374657035608282015260a281019290925260c282018190526e3a379e911b1a199a1110323ab91e9160891b60e2830152845191613d908360f1830160208901614888565b613615613dbb60f185840101723991103334b6361e91333932b2bd329110179f60691b815260130190565b7f3c2f706174683e3c706174682069643d2273706972616c22207374726f6b652d81527f6461736861727261793d223022207374726f6b652d646173686f66667365743d60208201527f223022207374726f6b653d222330303030666622207374726f6b652d77696474604082015262341e9160e91b606082015260630190565b7f3c616e696d6174652069643d2273746570312220626567696e3d22737461727481527f2e626567696e2b302e35732220617474726962757465547970653d22584d4c2260208201527f206174747269627574654e616d653d227374726f6b652d646173686f6666736560408201526f3a1110103a379e91181110323ab91e9160811b606082015260008451613ed9816070850160208901614888565b7f73222066696c6c3d22667265657a6522202f3e3c616e696d6174652069643d226070918401918201527f73746570322220626567696e3d2273746570312e656e642b302e35732220617460908201527f74726962757465547970653d22584d4c22206174747269627574654e616d653d60b08201527f227374726f6b652d6461736861727261792220746f3d223022206475723d220060d08201528451613f888160ef840160208901614888565b7f73222066696c6c3d22667265657a6522202f3e3c616e696d617465206265676960ef92909101918201527f6e3d2273746172742e626567696e2b362e35732220617474726962757465547961010f8201527f70653d22584d4c22206174747269627574654e616d653d227374726f6b65222061012f820152633a379e9160e11b61014f8201526139ac613aff61015383018661340e565b743230ba309d30b8383634b1b0ba34b7b717b539b7b760591b8152607b60f81b6015820152681134b6b0b3b2911d1160b91b60168201527f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000601f8201528351600090614093816039850160208901614888565b61088b60f21b60399184019182015284516140b581603b840160208901614888565b84519101906140cb81603b840160208801614888565b607d60f81b603b9290910191820152603c0195945050505050565b607b60f81b8152681134b6b0b3b2911d1160b91b60018201527f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000600a820152835160009061413b816024850160208901614888565b61088b60f21b602491840191820152845161415d816026840160208901614888565b8451910190614173816026840160208801614888565b607d60f81b6026929091019182015260270195945050505050565b602360f81b8152600082516141aa816001850160208701614888565b9190910160010192915050565b7f3c7376672066696c6c3d226e6f6e652220786d6c6e733d22687474703a2f2f7781527f77772e77332e6f72672f323030302f7376672220786d6c6e733a786c696e6b3d60208201527f22687474703a2f2f7777772e77332e6f72672f313939392f786c696e6b22207760408201527f696474683d2235303022206865696768743d2235303022207374796c653d226260608201526f30b1b5b3b937bab73216b1b7b637b91d60811b60808201526000845161427a816090850160208901614888565b61111f60f11b609091840191820152845161429c816092840160208901614888565b84519101906142b2816092840160208801614888565b651e17b9bb339f60d11b6092929091019182015260980195945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161430a81601d850160208701614888565b91909101601d0192915050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536340000000081526000825161434f81601c850160208701614888565b91909101601c0192915050565b7f3c616e696d6174652069643d2273746570332220626567696e3d22737465703281527f2e656e642b31732220617474726962757465547970653d22584d4c222061747460208201527f7269627574654e616d653d227374726f6b652d6461736861727261792220746f60408201526c1e91189b181c1110323ab91e9160991b6060820152600084516143f681606d850160208901614888565b723991103334b6361e91333932b2bd329110179f60691b606d918401918201527f3c616e696d6174652069643d2273746570342220626567696e3d22737465703360808201527f2e656e642b302e35732220617474726962757465547970653d22584d4c22206160a08201527f74747269627574654e616d653d227374726f6b652d646173686f66667365742260c08201526f103a379e911b1a199a1110323ab91e9160811b60e08201526139ac613aff6145416144d96144ba60f086018a61340e565b723991103334b6361e91333932b2bd329110179f60691b815260130190565b7f3c616e696d61746520626567696e3d2273746172742e626567696e2b3133732281527f20617474726962757465547970653d22584d4c22206174747269627574654e6160208201526f36b29e9139ba3937b5b291103a379e9160811b604082015260500190565b8661340e565b6d2261747472696275746573223a5b60901b81527f7b2274726169745f74797065223a224261636b67726f756e6420636f6c6f7222600e8201526916113b30b63ab2911d1160b11b602e82015283516000906145aa816038850160208901614888565b62089f4b60ea1b60389184019182018190527f7b2274726169745f74797065223a2254797065222c2276616c7565223a220000603b83015285516145f5816059850160208a01614888565b605992019182018190527f7b2274726169745f74797065223a225374726f6b65222c2276616c7565223a22605c830152845161463881607c850160208901614888565b607c920191820152607f0195945050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906139ac908301846133e2565b6020808252825182820181905260009190848201906040850190845b818110156146b75783518352928401929184019160010161469b565b50909695505050505050565b60208152600061307f60208301846133e2565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff811182821017156147d7576147d7614976565b604052919050565b600067ffffffffffffffff8211156147f9576147f9614976565b50601f01601f191660200190565b6000821982111561481a5761481a61491e565b500190565b600063ffffffff8083168185168083038211156136465761364661491e565b60008261484d5761484d614934565b500490565b600081600019048311821515161561486c5761486c61491e565b500290565b6000828210156148835761488361491e565b500390565b60005b838110156148a357818101518382015260200161488b565b83811115610d225750506000910152565b600181811c908216806148c857607f821691505b602082108114156148e957634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156149035761490361491e565b5060010190565b60008261491957614919614934565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461150457600080fd5b6001600160e01b03198116811461150457600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f0000000000000000000000009fdb31f8ce3cb8400c7ccb2299492f2a498330a4a2646970667358221220683901986a743b3963fa4883b633dbaf3a8554ef2e8819b5fe0a95d29a6a966664736f6c63430008070033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101f05760003560e01c80638da5cb5b1161010f578063cc4ef120116100a2578063e985e9c511610071578063e985e9c514610435578063f2fde38b14610471578063ff1b655614610484578063ffb2b55a1461048c57600080fd5b8063cc4ef120146103cc578063ce02f823146103ec578063ce516507146103ff578063d18b60071461042257600080fd5b8063bf035307116100de578063bf0353071461037e578063c7ab2dbc14610391578063c87b56dd146103a4578063c8f8b613146103b757600080fd5b80638da5cb5b1461033f57806395d89b4114610350578063a22cb46514610358578063b88d4fde1461036b57600080fd5b80632f745c5911610187578063603168011161015657806360316801146102fe5780636352211e1461031157806370a0823114610324578063715018a61461033757600080fd5b80632f745c59146102bd5780633ccfd60b146102d057806342842e0e146102d85780634f6ccce7146102eb57600080fd5b806310969523116101c3578063109695231461027257806318160ddd14610285578063232f06b71461029757806323b872dd146102aa57600080fd5b806301ffc9a7146101f557806306fdde031461021d578063081812fc14610232578063095ea7b31461025d575b600080fd5b6102086102033660046132a9565b61049f565b60405190151581526020015b60405180910390f35b6102256104ca565b60405161021491906146c3565b6102456102403660046133a3565b61055c565b6040516001600160a01b039091168152602001610214565b61027061026b3660046131d0565b6105f6565b005b6102706102803660046132e3565b61070c565b6008545b604051908152602001610214565b6102256102a53660046133a3565b61074d565b6102706102b83660046130dc565b6108c7565b6102896102cb3660046131d0565b6108f8565b61027061098e565b6102706102e63660046130dc565b6109e7565b6102896102f93660046133a3565b610a02565b61022561030c3660046133a3565b610a95565b61024561031f3660046133a3565b610ae8565b610289610332366004613062565b610b5f565b610270610be6565b600a546001600160a01b0316610245565b610225610c1c565b61027061036636600461319d565b610c2b565b61027061037936600461311d565b610cf0565b61027061038c3660046133a3565b610d28565b61022561039f3660046133a3565b611042565b6102256103b23660046133a3565b61104d565b6102456000805160206149f883398151915281565b6103df6103da366004613062565b611144565b604051610214919061467f565b6102256103fa3660046133a3565b6112d9565b61020861040d3660046133a3565b600c6020526000908152604090205460ff1681565b6103df610430366004613062565b6112fc565b6102086104433660046130a3565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61027061047f366004613062565b61146c565b610225611507565b61027061049a3660046131fc565b611595565b60006001600160e01b0319821663780e9d6360e01b14806104c457506104c4826115d5565b92915050565b6060600080546104d9906148b4565b80601f0160208091040260200160405190810160405280929190818152602001828054610505906148b4565b80156105525780601f1061052757610100808354040283529160200191610552565b820191906000526020600020905b81548152906001019060200180831161053557829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166105da5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061060182610ae8565b9050806001600160a01b0316836001600160a01b0316141561066f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105d1565b336001600160a01b038216148061068b575061068b8133610443565b6106fd5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016105d1565b6107078383611625565b505050565b600a546001600160a01b031633146107365760405162461bcd60e51b81526004016105d190614728565b805161074990600b906020840190612f8b565b5050565b604080518082018252601081526f181899199a1a9b1b9c1cb0b131b232b360811b60208201528151600680825281840190935260609284929160009160208201818036833701905050905060005b60038110156108be57826004856107b384601d614807565b602081106107c3576107c3614960565b1a60f81b6001600160f81b031916901c60f81c60ff16815181106107e9576107e9614960565b01602001516001600160f81b03191682610804836002614852565b8151811061081457610814614960565b60200101906001600160f81b031916908160001a905350828461083883601d614807565b6020811061084857610848614960565b825191901a600f1690811061085f5761085f614960565b01602001516001600160f81b0319168261087a836002614852565b610885906001614807565b8151811061089557610895614960565b60200101906001600160f81b031916908160001a905350806108b6816148ef565b91505061079b565b50949350505050565b6108d13382611693565b6108ed5760405162461bcd60e51b81526004016105d19061475d565b61070783838361178a565b600061090383610b5f565b82106109655760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105d1565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b031633146109b85760405162461bcd60e51b81526004016105d190614728565b6040514790339082156108fc029083906000818181858888f19350505050158015610749573d6000803e3d6000fd5b61070783838360405180602001604052806000815250610cf0565b6000610a0d60085490565b8210610a705760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105d1565b60088281548110610a8357610a83614960565b90600052602060002001549050919050565b60606000610aaa610aa584611935565b611bd7565b905080610ab684611d3f565b610abf85611de3565b604051602001610ad193929190614020565b604051602081830303815290604052915050919050565b6000818152600260205260408120546001600160a01b0316806104c45760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105d1565b60006001600160a01b038216610bca5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105d1565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b03163314610c105760405162461bcd60e51b81526004016105d190614728565b610c1a600061209f565b565b6060600180546104d9906148b4565b6001600160a01b038216331415610c845760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105d1565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610cfa3383611693565b610d165760405162461bcd60e51b81526004016105d19061475d565b610d22848484846120f1565b50505050565b6040516331a9108f60e11b8152600481018290526000906000805160206149f883398151915290636352211e9060240160206040518083038186803b158015610d7057600080fd5b505afa158015610d84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610da89190613086565b6000838152600c602052604090205490915060ff1615610e1a5760405162461bcd60e51b815260206004820152602760248201527f436f6c6f722068617320616c726561647920636c61696d65642074686569722060448201526629b834b930b61760c91b60648201526084016105d1565b336001600160a01b03821614610e825760405162461bcd60e51b815260206004820152602760248201527f4f6e6c7920746f6b656e206f776e65722063616e206d696e742074686569722060448201526629b834b930b61760c91b60648201526084016105d1565b604051637a8013c360e01b8152600481018390526000906000805160206149f883398151915290637a8013c39060240160206040518083038186803b158015610eca57600080fd5b505afa158015610ede573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f0291906133bc565b6040516382afe39f60e01b8152600481018590529091506000906000805160206149f8833981519152906382afe39f9060240160206040518083038186803b158015610f4d57600080fd5b505afa158015610f61573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f8591906133bc565b60405163469a6ed560e01b8152600481018690529091506000906000805160206149f88339815191529063469a6ed59060240160206040518083038186803b158015610fd057600080fd5b505afa158015610fe4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100891906133bc565b90506110143386612124565b6110208584848461213e565b50505060009485525050600c602052505060409020805460ff19166001179055565b60606104c482611935565b6000818152600c602052604090205460609060ff166110c65760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016105d1565b60006110d183611935565b905060006110de82611bd7565b905061111c816110ed86611d3f565b6110f687611de3565b604051602001611108939291906140e6565b604051602081830303815290604052611bd7565b60405160200161112c91906142d2565b60405160208183030381529060405292505050919050565b604080516110dd80825262021bc08201909252606091600091906020820162021ba0803683370190505090506000805b6110dd811015611274576040516331a9108f60e11b8152600481018290526000906000805160206149f883398151915290636352211e9060240160206040518083038186803b1580156111c657600080fd5b505afa1580156111da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111fe9190613086565b9050806001600160a01b0316866001600160a01b031614801561123057506000828152600c602052604090205460ff16155b15611261578184848151811061124857611248614960565b602090810291909101015261125e600184614807565b92505b508061126c816148ef565b915050611174565b506000611283826110dd614871565b905060005b818110156112cf5761270f8484815181106112a5576112a5614960565b60209081029190910101526112bb600184614807565b9250806112c7816148ef565b915050611288565b5091949350505050565b606060006112e9610aa584611935565b905080604051602001610ad19190614317565b604080516110dd80825262021bc08201909252606091600091906020820162021ba0803683370190505090506000805b6110dd811015611411576040516331a9108f60e11b8152600481018290526000906000805160206149f883398151915290636352211e9060240160206040518083038186803b15801561137e57600080fd5b505afa158015611392573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113b69190613086565b9050806001600160a01b0316866001600160a01b031614156113fe57818484815181106113e5576113e5614960565b60209081029190910101526113fb600184614807565b92505b5080611409816148ef565b91505061132c565b506000611420826110dd614871565b905060005b818110156112cf5761270f84848151811061144257611442614960565b6020908102919091010152611458600184614807565b925080611464816148ef565b915050611425565b600a546001600160a01b031633146114965760405162461bcd60e51b81526004016105d190614728565b6001600160a01b0381166114fb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105d1565b6115048161209f565b50565b600b8054611514906148b4565b80601f0160208091040260200160405190810160405280929190818152602001828054611540906148b4565b801561158d5780601f106115625761010080835404028352916020019161158d565b820191906000526020600020905b81548152906001019060200180831161157057829003601f168201915b505050505081565b60005b8151811015610749576115c38282815181106115b6576115b6614960565b6020026020010151610d28565b806115cd816148ef565b915050611598565b60006001600160e01b031982166380ac58cd60e01b148061160657506001600160e01b03198216635b5e139f60e01b145b806104c457506301ffc9a760e01b6001600160e01b03198316146104c4565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061165a82610ae8565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661170c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105d1565b600061171783610ae8565b9050806001600160a01b0316846001600160a01b031614806117525750836001600160a01b03166117478461055c565b6001600160a01b0316145b8061178257506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661179d82610ae8565b6001600160a01b0316146118055760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016105d1565b6001600160a01b0382166118675760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105d1565b6118728383836121ff565b61187d600082611625565b6001600160a01b03831660009081526003602052604081208054600192906118a6908490614871565b90915550506001600160a01b03821660009081526003602052604081208054600192906118d4908490614807565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60405163e01c8fa160e01b8152600481018290526060906000906000805160206149f88339815191529063e01c8fa19060240160006040518083038186803b15801561198057600080fd5b505afa158015611994573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119bc919081019061332c565b604051637a8013c360e01b8152600481018590529091506000906000805160206149f883398151915290637a8013c39060240160206040518083038186803b158015611a0757600080fd5b505afa158015611a1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a3f91906133bc565b6040516382afe39f60e01b8152600481018690529091506000906000805160206149f8833981519152906382afe39f9060240160206040518083038186803b158015611a8a57600080fd5b505afa158015611a9e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ac291906133bc565b60405163469a6ed560e01b8152600481018790529091506000906000805160206149f88339815191529063469a6ed59060240160206040518083038186803b158015611b0d57600080fd5b505afa158015611b21573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b4591906133bc565b90506000611b55878585856122b7565b90506000611b6b82600001518360400151612410565b90506000611b86898787878688602001518960600151612524565b90506000611ba283856020015186606001518760800151612625565b9050878282604051602001611bb9939291906141b7565b60405160208183030381529060405298505050505050505050919050565b6060815160001415611bf757505060408051602081019091526000815290565b60006040518060600160405280604081526020016149b86040913990506000600384516002611c269190614807565b611c30919061483e565b611c3b906004614852565b90506000611c4a826020614807565b67ffffffffffffffff811115611c6257611c62614976565b6040519080825280601f01601f191660200182016040528015611c8c576020820181803683370190505b509050818152600183018586518101602084015b81831015611cfa5760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b93820193909352600401611ca0565b600389510660018114611d145760028114611d2557611d31565b613d3d60f01b600119830152611d31565b603d60f81b6000198301525b509398975050505050505050565b60405163e01c8fa160e01b8152600481018290526060906000906000805160206149f88339815191529063e01c8fa19060240160006040518083038186803b158015611d8a57600080fd5b505afa158015611d9e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611dc6919081019061332c565b9050611dd18361270e565b81604051602001610ad1929190613b28565b60405163e01c8fa160e01b8152600481018290526060906000906000805160206149f88339815191529063e01c8fa19060240160006040518083038186803b158015611e2e57600080fd5b505afa158015611e42573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611e6a919081019061332c565b604051637a8013c360e01b8152600481018590529091506000906000805160206149f883398151915290637a8013c39060240160206040518083038186803b158015611eb557600080fd5b505afa158015611ec9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eed91906133bc565b6040516382afe39f60e01b8152600481018690529091506000906000805160206149f8833981519152906382afe39f9060240160206040518083038186803b158015611f3857600080fd5b505afa158015611f4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f7091906133bc565b60405163469a6ed560e01b8152600481018790529091506000906000805160206149f88339815191529063469a6ed59060240160206040518083038186803b158015611fbb57600080fd5b505afa158015611fcf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ff391906133bc565b90506000612003878585856122b7565b9050600085612015836000015161280c565b61202284602001516128c4565b60405160200161203493929190614547565b6040516020818303038152906040529050806120538360400151612976565b6120608460600151612a94565b612070856080015160ff1661270e565b6040516020016120839493929190613511565b6040516020818303038152906040529650505050505050919050565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6120fc84848461178a565b61210884848484612b10565b610d225760405162461bcd60e51b81526004016105d1906146d6565b610749828260405180602001604052806000815250612c1a565b606080606061216462ffffff61215a898963ffffffff16612c4d565b6102a5919061490a565b604051602001612174919061418e565b60405160208183030381529060405261219a62ffffff61215a8a8963ffffffff16612c4d565b6040516020016121aa919061418e565b6040516020818303038152906040526121d062ffffff61215a8b8963ffffffff16612c4d565b6040516020016121e0919061418e565b6040516020818303038152906040529250925092509450945094915050565b6001600160a01b03831661225a5761225581600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61227d565b816001600160a01b0316836001600160a01b03161461227d5761227d8382612cad565b6001600160a01b0382166122945761070781612d4a565b826001600160a01b0316826001600160a01b031614610707576107078282612df9565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526040805160a0810182526000808252602082018190529181018290526060810182905260808101919091526004612333878561231e888a61481f565b612328919061481f565b63ffffffff16612c4d565b61233d919061490a565b612348906002614807565b60ff168152600861235f8763ffffffff8816612c4d565b612369919061490a565b612374906001614807565b60ff166020820152600661238e8763ffffffff8716612c4d565b612398919061490a565b6123a3906005614807565b60ff16604082015260036123bd8763ffffffff8616612c4d565b6123c7919061490a565b6123d2906001614807565b60ff16606082015260106123ea87612328878961481f565b6123f4919061490a565b6123ff906015614807565b60ff16608082015295945050505050565b60606000604051602001612436906b134c8d4c0b0c8d4c08184d4b60a21b8152600c0190565b604051602081830303815290604052905060005b60268110156124fa57816124608660ff1661270e565b61246b60028461490a565b60011461248757604051806020016040528060008152506124a2565b604051806040016040528060018152602001602d60f81b8152505b6124c360ff88166124b4866002614807565b6124be9190614852565b61270e565b6040516020016124d6949392919061346d565b604051602081830303815290604052915080806124f2906148ef565b91505061244a565b508060405160200161250c91906134ec565b60405160208183030381529060405291505092915050565b606060008060006125378b8b8b8b61213e565b92509250925060008361254c8860ff1661270e565b898660405160200161256194939291906139b6565b604051602081830303815290604052905060006125808760ff1661270e565b61258c8860ff1661270e565b8560405160200161259f93929190613e3c565b604051602081830303815290604052905060006125be8860ff1661270e565b6125ca8960ff1661270e565b856040516020016125dd9392919061435c565b60405160208183030381529060405290508282826040516020016126039392919061342a565b6040516020818303038152906040529650505050505050979650505050505050565b606060006126358460ff1661270e565b6126418560ff1661270e565b604051602001612652929190613c71565b604051602081830303815290604052905060006126718660ff1661270e565b8761267e8660ff1661270e565b61268a8760ff1661270e565b60405160200161269d949392919061364f565b604051602081830303815290604052905060006126bc8560ff1661270e565b6040516020016126cc91906137d0565b60405160208183030381529060405290508282826040516020016126f29392919061342a565b6040516020818303038152906040529350505050949350505050565b6060816127325750506040805180820190915260018152600360fc1b602082015290565b8160005b811561275c5780612746816148ef565b91506127559050600a8361483e565b9150612736565b60008167ffffffffffffffff81111561277757612777614976565b6040519080825280601f01601f1916602001820160405280156127a1576020820181803683370190505b5090505b8415611782576127b6600183614871565b91506127c3600a8661490a565b6127ce906030614807565b60f81b8183815181106127e3576127e3614960565b60200101906001600160f81b031916908160001a905350612805600a8661483e565b94506127a5565b60608160ff166002141561283a575050604080518082019091526004815263119b185d60e21b602082015290565b8160ff166003141561286b57505060408051808201909152600981526814d95b5a4b519b185d60ba1b602082015290565b8160ff16600414156128a057505060408051808201909152600d81526c14d95b5a4b54dd1c985a59da1d609a1b602082015290565b505060408051808201909152600881526714dd1c985a59da1d60c21b602082015290565b606060038260ff1610156128f25750506040805180820190915260048152632a3434b760e11b602082015290565b60058260ff16101561292357505060408051808201909152600981526829b2b6b496aa3434b760b91b602082015290565b60078260ff16101561295557505060408051808201909152600a81526953656d692d546869636b60b01b602082015290565b5050604080518082019091526005815264546869636b60d81b602082015290565b60608160ff16600514156129a557505060408051808201909152600581526414db585b1b60da1b602082015290565b8160ff16600614156129d857505060408051808201909152600b81526a12da5b99184814db585b1b60aa1b602082015290565b8160ff1660071415612a0c57505060408051808201909152600c81526b536d616c6c204d656469756d60a01b602082015290565b8160ff1660081415612a4057505060408051808201909152600c81526b4c61726765204d656469756d60a01b602082015290565b8160ff1660091415612a7357505060408051808201909152600b81526a4b696e6461204c6172676560a81b602082015290565b50506040805180820190915260058152644c6172676560d81b602082015290565b60608160ff1660011415612ac257505060408051808201909152600481526311985cdd60e21b602082015290565b8160ff1660021415612af05750506040805180820190915260068152654d656469756d60d01b602082015290565b5050604080518082019091526004815263536c6f7760e01b602082015290565b60006001600160a01b0384163b15612c1257604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612b5490339089908890889060040161464c565b602060405180830381600087803b158015612b6e57600080fd5b505af1925050508015612b9e575060408051601f3d908101601f19168201909252612b9b918101906132c6565b60015b612bf8573d808015612bcc576040519150601f19603f3d011682016040523d82523d6000602084013e612bd1565b606091505b508051612bf05760405162461bcd60e51b81526004016105d1906146d6565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611782565b506001611782565b612c248383612e3d565b612c316000848484612b10565b6107075760405162461bcd60e51b81526004016105d1906146d6565b600080612c5b846001614807565b9050612c678382614852565b612c708261270e565b612c798561270e565b604051602001612c8a929190613620565b6040516020818303038152906040528051906020012060001c6117829190614807565b60006001612cba84610b5f565b612cc49190614871565b600083815260076020526040902054909150808214612d17576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612d5c90600190614871565b60008381526009602052604081205460088054939450909284908110612d8457612d84614960565b906000526020600020015490508060088381548110612da557612da5614960565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612ddd57612ddd61494a565b6001900381819060005260206000200160009055905550505050565b6000612e0483610b5f565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216612e935760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105d1565b6000818152600260205260409020546001600160a01b031615612ef85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105d1565b612f04600083836121ff565b6001600160a01b0382166000908152600360205260408120805460019290612f2d908490614807565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612f97906148b4565b90600052602060002090601f016020900481019282612fb95760008555612fff565b82601f10612fd257805160ff1916838001178555612fff565b82800160010185558215612fff579182015b82811115612fff578251825591602001919060010190612fe4565b5061300b92915061300f565b5090565b5b8082111561300b5760008155600101613010565b6000613037613032846147df565b6147ae565b905082815283838301111561304b57600080fd5b828260208301376000602084830101529392505050565b60006020828403121561307457600080fd5b813561307f8161498c565b9392505050565b60006020828403121561309857600080fd5b815161307f8161498c565b600080604083850312156130b657600080fd5b82356130c18161498c565b915060208301356130d18161498c565b809150509250929050565b6000806000606084860312156130f157600080fd5b83356130fc8161498c565b9250602084013561310c8161498c565b929592945050506040919091013590565b6000806000806080858703121561313357600080fd5b843561313e8161498c565b9350602085013561314e8161498c565b925060408501359150606085013567ffffffffffffffff81111561317157600080fd5b8501601f8101871361318257600080fd5b61319187823560208401613024565b91505092959194509250565b600080604083850312156131b057600080fd5b82356131bb8161498c565b9150602083013580151581146130d157600080fd5b600080604083850312156131e357600080fd5b82356131ee8161498c565b946020939093013593505050565b6000602080838503121561320f57600080fd5b823567ffffffffffffffff8082111561322757600080fd5b818501915085601f83011261323b57600080fd5b81358181111561324d5761324d614976565b8060051b915061325e8483016147ae565b8181528481019084860184860187018a101561327957600080fd5b600095505b8386101561329c57803583526001959095019491860191860161327e565b5098975050505050505050565b6000602082840312156132bb57600080fd5b813561307f816149a1565b6000602082840312156132d857600080fd5b815161307f816149a1565b6000602082840312156132f557600080fd5b813567ffffffffffffffff81111561330c57600080fd5b8201601f8101841361331d57600080fd5b61178284823560208401613024565b60006020828403121561333e57600080fd5b815167ffffffffffffffff81111561335557600080fd5b8201601f8101841361336657600080fd5b8051613374613032826147df565b81815285602083850101111561338957600080fd5b61339a826020830160208601614888565b95945050505050565b6000602082840312156133b557600080fd5b5035919050565b6000602082840312156133ce57600080fd5b815163ffffffff8116811461307f57600080fd5b600081518084526133fa816020860160208601614888565b601f01601f19169290920160200192915050565b60008151613420818560208601614888565b9290920192915050565b6000845161343c818460208901614888565b845190830190613450818360208901614888565b8451910190613463818360208801614888565b0195945050505050565b6000855161347f818460208a01614888565b855190830190613493818360208a01614888565b660101810189618960cd1b910190815284516134b6816007840160208901614888565b84519101906134cc816007840160208801614888565b640b0c080d4b60da1b60079290910191820152600c019695505050505050565b600082516134fe818460208701614888565b600360fc1b920191825250600101919050565b60008551613523818460208a01614888565b7f7b2274726169745f74797065223a2253697a65222c2276616c7565223a220000908301908152855161355d81601e840160208a01614888565b62089f4b60ea1b601e929091019182018190527f7b2274726169745f74797065223a225370656564222c2276616c7565223a2200602183015285516135a9816040850160208a01614888565b60409201918201527f7b2274726169745f74797065223a224475726174696f6e222c2276616c7565226043820152611d1160f11b606382015283516135f5816065840160208801614888565b6273227d60e81b91016065810191909152605d60f81b6068820152606981015b979650505050505050565b60008351613632818460208801614888565b835190830190613646818360208801614888565b01949350505050565b60008551613661818460208a01614888565b641110321e9160d91b9083019081528551613683816005840160208a01614888565b7f223e3c616e696d6174652069643d227374617274222061747472696275746554600592909101918201527f7970653d22584d4c22206174747269627574654e616d653d227374726f6b652260258201527f20626567696e3d22302e35733b656e642e656e642b302e35732220746f3d222360458201526c1818181833331110323ab91e9160991b60658201528451613723816072840160208901614888565b74171ab991103334b6361e91333932b2bd329110179f60591b607292909101918201527f3c616e696d61746520617474726962757465547970653d22584d4c222061747460878201527f7269627574654e616d653d227374726f6b652d646173686f666673657422206260a78201527f6567696e3d2273746172742e626567696e2220746f3d2236343334222064757260c7820152611e9160f11b60e782015261361560e982018561340e565b6000723991103334b6361e91333932b2bd329110179f60691b8083527f3c616e696d61746520617474726962757465547970653d22584d4c22206174748060138501527f7269627574654e616d653d227374726f6b652d6461736861727261792220626560338501527f67696e3d2273746172742e626567696e2220746f3d223634333422206475723d6053850152601160f91b6073850152845161387c816074870160208901614888565b840160748101839052608781018290527f7269627574654e616d653d227374726f6b652d646173686f666673657422206260a78201527f6567696e3d2273746570362e656e642b312220746f3d223022206475723d223060c7820152741719b991103334b6361e91333932b2bd329110179f60591b60e78201527f3c616e696d6174652069643d22656e642220617474726962757465547970653d60fc8201527f22584d4c22206174747269627574654e616d653d227374726f6b652d6461736861011c8201527f61727261792220626567696e3d2273746570362e656e642b312220746f3d223061013c8201527f22206475723d22302e3373222066696c6c3d22667265657a6522202f3e00000061015c8201526139ac6101798201661e17b830ba341f60c91b815260070190565b9695505050505050565b7f3c706174682069643d2273706972616c22207374726f6b652d6461736861727281527f61793d223634333422207374726f6b652d646173686f66667365743d2236343360208201526a1a111039ba3937b5b29e9160a91b604082015260008551613a2881604b850160208a01614888565b6f111039ba3937b5b296bbb4b23a341e9160811b604b918401918201528551613a5881605b840160208a01614888565b641110321e9160d91b605b92909101918201528451613a7e816060840160208901614888565b61111f60f11b606092909101918201527f3c616e696d61746520626567696e3d2273746172742e626567696e222061747460628201527f726962757465547970653d22584d4c22206174747269627574654e616d653d2260828201526b39ba3937b5b291103a379e9160a11b60a2820152613615613aff60ae83018661340e565b7f22206475723d22302e3373222066696c6c3d22667265657a6522202f3e0000008152601d0190565b7f2265787465726e616c5f75726c223a2268747470733a2f2f746865636f6c6f728152661ccb985c9d088b60ca1b60208201527f226465736372697074696f6e223a225468652053706972616c7320617265206160278201527f20736574206f6620342c3331372069636f6e69632064657369676e732067656e60478201527f65726174656420616e642073746f72656420656e746972656c79206f6e2d636860678201527f61696e2c20676976656e20746f2054686520436f6c6f727320686f6c646572736087820152601760f91b60a78201526c5c6e546f6b656e2069643a202360981b60a882015260008351613c288160b5850160208801614888565b61088b60f21b60b5918401918201526b0113730b6b2911d112a3432960a51b60b782015261339a613c5c60c383018661340e565b680814dc1a5c985b088b60ba1b815260090190565b7f3c616e696d6174652069643d2273746570352220626567696e3d227374657034815260007f2e656e642b302e35732220617474726962757465547970653d22584d4c2220618060208401527f74747269627574654e616d653d227374726f6b652d64617368617272617922208060408501526e3a379e911999189b9110323ab91e9160891b60608501528551613d0f81606f870160208a01614888565b723991103334b6361e91333932b2bd329110179f60691b606f918601918201527f3c616e696d6174652069643d2273746570362220626567696e3d227374657035608282015260a281019290925260c282018190526e3a379e911b1a199a1110323ab91e9160891b60e2830152845191613d908360f1830160208901614888565b613615613dbb60f185840101723991103334b6361e91333932b2bd329110179f60691b815260130190565b7f3c2f706174683e3c706174682069643d2273706972616c22207374726f6b652d81527f6461736861727261793d223022207374726f6b652d646173686f66667365743d60208201527f223022207374726f6b653d222330303030666622207374726f6b652d77696474604082015262341e9160e91b606082015260630190565b7f3c616e696d6174652069643d2273746570312220626567696e3d22737461727481527f2e626567696e2b302e35732220617474726962757465547970653d22584d4c2260208201527f206174747269627574654e616d653d227374726f6b652d646173686f6666736560408201526f3a1110103a379e91181110323ab91e9160811b606082015260008451613ed9816070850160208901614888565b7f73222066696c6c3d22667265657a6522202f3e3c616e696d6174652069643d226070918401918201527f73746570322220626567696e3d2273746570312e656e642b302e35732220617460908201527f74726962757465547970653d22584d4c22206174747269627574654e616d653d60b08201527f227374726f6b652d6461736861727261792220746f3d223022206475723d220060d08201528451613f888160ef840160208901614888565b7f73222066696c6c3d22667265657a6522202f3e3c616e696d617465206265676960ef92909101918201527f6e3d2273746172742e626567696e2b362e35732220617474726962757465547961010f8201527f70653d22584d4c22206174747269627574654e616d653d227374726f6b65222061012f820152633a379e9160e11b61014f8201526139ac613aff61015383018661340e565b743230ba309d30b8383634b1b0ba34b7b717b539b7b760591b8152607b60f81b6015820152681134b6b0b3b2911d1160b91b60168201527f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000601f8201528351600090614093816039850160208901614888565b61088b60f21b60399184019182015284516140b581603b840160208901614888565b84519101906140cb81603b840160208801614888565b607d60f81b603b9290910191820152603c0195945050505050565b607b60f81b8152681134b6b0b3b2911d1160b91b60018201527f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000600a820152835160009061413b816024850160208901614888565b61088b60f21b602491840191820152845161415d816026840160208901614888565b8451910190614173816026840160208801614888565b607d60f81b6026929091019182015260270195945050505050565b602360f81b8152600082516141aa816001850160208701614888565b9190910160010192915050565b7f3c7376672066696c6c3d226e6f6e652220786d6c6e733d22687474703a2f2f7781527f77772e77332e6f72672f323030302f7376672220786d6c6e733a786c696e6b3d60208201527f22687474703a2f2f7777772e77332e6f72672f313939392f786c696e6b22207760408201527f696474683d2235303022206865696768743d2235303022207374796c653d226260608201526f30b1b5b3b937bab73216b1b7b637b91d60811b60808201526000845161427a816090850160208901614888565b61111f60f11b609091840191820152845161429c816092840160208901614888565b84519101906142b2816092840160208801614888565b651e17b9bb339f60d11b6092929091019182015260980195945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161430a81601d850160208701614888565b91909101601d0192915050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536340000000081526000825161434f81601c850160208701614888565b91909101601c0192915050565b7f3c616e696d6174652069643d2273746570332220626567696e3d22737465703281527f2e656e642b31732220617474726962757465547970653d22584d4c222061747460208201527f7269627574654e616d653d227374726f6b652d6461736861727261792220746f60408201526c1e91189b181c1110323ab91e9160991b6060820152600084516143f681606d850160208901614888565b723991103334b6361e91333932b2bd329110179f60691b606d918401918201527f3c616e696d6174652069643d2273746570342220626567696e3d22737465703360808201527f2e656e642b302e35732220617474726962757465547970653d22584d4c22206160a08201527f74747269627574654e616d653d227374726f6b652d646173686f66667365742260c08201526f103a379e911b1a199a1110323ab91e9160811b60e08201526139ac613aff6145416144d96144ba60f086018a61340e565b723991103334b6361e91333932b2bd329110179f60691b815260130190565b7f3c616e696d61746520626567696e3d2273746172742e626567696e2b3133732281527f20617474726962757465547970653d22584d4c22206174747269627574654e6160208201526f36b29e9139ba3937b5b291103a379e9160811b604082015260500190565b8661340e565b6d2261747472696275746573223a5b60901b81527f7b2274726169745f74797065223a224261636b67726f756e6420636f6c6f7222600e8201526916113b30b63ab2911d1160b11b602e82015283516000906145aa816038850160208901614888565b62089f4b60ea1b60389184019182018190527f7b2274726169745f74797065223a2254797065222c2276616c7565223a220000603b83015285516145f5816059850160208a01614888565b605992019182018190527f7b2274726169745f74797065223a225374726f6b65222c2276616c7565223a22605c830152845161463881607c850160208901614888565b607c920191820152607f0195945050505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906139ac908301846133e2565b6020808252825182820181905260009190848201906040850190845b818110156146b75783518352928401929184019160010161469b565b50909695505050505050565b60208152600061307f60208301846133e2565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff811182821017156147d7576147d7614976565b604052919050565b600067ffffffffffffffff8211156147f9576147f9614976565b50601f01601f191660200190565b6000821982111561481a5761481a61491e565b500190565b600063ffffffff8083168185168083038211156136465761364661491e565b60008261484d5761484d614934565b500490565b600081600019048311821515161561486c5761486c61491e565b500290565b6000828210156148835761488361491e565b500390565b60005b838110156148a357818101518382015260200161488b565b83811115610d225750506000910152565b600181811c908216806148c857607f821691505b602082108114156148e957634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156149035761490361491e565b5060010190565b60008261491957614919614934565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461150457600080fd5b6001600160e01b03198116811461150457600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f0000000000000000000000009fdb31f8ce3cb8400c7ccb2299492f2a498330a4a2646970667358221220683901986a743b3963fa4883b633dbaf3a8554ef2e8819b5fe0a95d29a6a966664736f6c63430008070033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.