ERC-721
NFT
Overview
Max Total Supply
4,000 QLTS
Holders
1,258
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 QLTSLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
Quilts
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense /// @title: Quilts on-chain smart contract /// @author: Quilt stitcher /* ++++++ - - - - - - - - - - - - - - - +++ - - - - - - - - - - - - - - - - ++++++ . . . quilts.art . . We like the Quilts! . . . ++++++ - - - - - - - - - - - - - - - +++ - - - - - - - - - - - - - - - - ++++++ . . . . . =##%%%%+ +%%%%%%+ +%%%%%%+ +%%%%%%+ +%%%%##= . . :%%%%%%%%%%%+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*%%%%%%%%%%%%: . . :#%%%%%%%%%%%+-%%%%%%%%%%%%%%+-%%%%%%%%%%%%%%+-%%%%%%%%%%%%%#. . . -%%%%%%%%%%%%%%=--%%%%%%%%%%%%%=--%%%%%%%%%%%%%=--%%%%%%%%%%%%%+#%%- . . %%%%%%%%%%%%%#=---%%%%%%%%%%%#=---%%%%%%%%%%%#=---%%%%%%%%%%%#=-%%%% . . %%%%%%%%%%%%#-----%%%%%%%%%%#-----%%%%%%%%%%#-----%%%%%%%%%%#---%%%% . . *%%%%%%%%%%*------%%%%%%%%%*------%%%%%%%%%*------%%%%%%%%%*----#%%* . . %%%%%%%%*-------%%%%%%%%*-------%%%%%%%%*-------%%%%%%%%*------- . . %%%%%%%+--------%%%%%%%+--------%%%%%%%+--------%%%%%%%+-------- . . *%%%%%%%+---------%%%%%%+---------%%%%%%+---------%%%%%%+-------*%%* . . %%%%%%%=----------%%%%%=----------%%%%%=----------%%%%%=--------%%%% . . %%%%%#=-----------%%%#=-----------%%%#=-----------%%%#=---------%%%% . . %%%%#-------------%%#-------------%%#-------------%%#-----------%%%% . . *%%*--------------%*--------------%*--------------%*------------*%%* . . *---------------*---------------*---------------*--------------- . . . . *%%* *%%* . . %%%% %%%% . . %%%% %%%% . . %%%% %%%% . . *%%* -+**+- -+**+- *%%* . . *%%%%%%* *%%%%%%* . . *%%%%%%* *%%%%%%* . . *%%* -+**+- -+**+- *%%* . . %%%% %%%% . . %%%% %%%% . . -%%* *%%- . . . . *%%%%%%+ +%%%%%%+ +%%%%%%+ +%%%%%%+ +%%%%%%* . . =##%%%%+ +%%%%%%+ +%%%%%%+ +%%%%%%+ +%%%%##= . . . . . ++++++ - - - - - - - - - - - - - - - +++ - - - - - - - - - - - - - - - - ++++++ */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./QuiltGenerator.sol"; contract Quilts is ERC721Enumerable, ReentrancyGuard, Ownable { uint256 public constant MAX_SUPPLY = 4000; uint256 public constant PRICE = 0.025 ether; uint256 public constant MAX_PER_TX = 10; uint256 public constant MAX_PER_ADDRESS = 20; uint256 public tokensMinted; bool public isSaleActive = false; bool public hasStitcherMinted = false; mapping(address => uint256) private _mintedPerAddress; function tokenURI(uint256 tokenId) public view override returns (string memory) { require(tokenId > 0 && tokenId <= tokensMinted, "Invalid token ID"); // Get the quilt data and generated SVG QuiltGenerator.QuiltStruct memory quilt; string memory svg; (quilt, svg) = QuiltGenerator.getQuiltForSeed( Strings.toString(tokenId * 4444) ); string[10] memory colorNames = [ "Pink panther", "Cherry blossom", "Desert", "Forest", "Mushroom", "Mint tea", "Fairy grove", "Pumpkin", "Twilight", "Black & white" ]; string[16] memory patchNames = [ "Quilty", "Waterfront", "Flow", "Bengal", "Sunbeam", "Spires", "Division", "Crashing waves", "Equilibrium", "Ichimatsu", "Highlands", "Log cabin", "Maiz", "Flying geese", "Pinwheel", "Kawaii" ]; string[4] memory backgroundNames = [ "Dusty", "Flags", "Electric", "Groovy" ]; string[4] memory calmnessNames = ["Serene", "Calm", "Wavey", "Chaotic"]; // Make a list of the quilt patch names for metadata // Array `traits` are not supported by OpenSea, but other tools could // use this data for some interesting analysis. string memory patches; for (uint256 col = 0; col < quilt.patchXCount; col++) { for (uint256 row = 0; row < quilt.patchYCount; row++) { patches = string( abi.encodePacked( patches, '"', patchNames[quilt.patches[col][row]], '"', col == quilt.patchXCount - 1 && row == quilt.patchYCount - 1 ? "" : "," ) ); } } // Build metadata attributes string memory attributes = string( abi.encodePacked( '[{"trait_type":"Background","value":"', backgroundNames[quilt.backgroundIndex], '"},{"trait_type":"Animated background","value":"', quilt.animatedBg ? "Yes" : "No", '"},{"trait_type":"Theme","value":"', colorNames[quilt.themeIndex], '"},{"trait_type":"Background theme","value":"', colorNames[quilt.backgroundThemeIndex], '"},{"trait_type":"Patches","value":[', patches, ']},{"trait_type":"Special patch","value":"', quilt.includesSpecialPatch ? "Yes" : "No", '"},{"trait_type":"Patch count","value":', Strings.toString(quilt.patchXCount * quilt.patchYCount) ) ); attributes = string( abi.encodePacked( attributes, '},{"trait_type":"Aspect ratio","value":"', Strings.toString(quilt.patchXCount), ":", Strings.toString(quilt.patchYCount), '"},{"trait_type":"Calmness","value":"', calmnessNames[quilt.calmnessFactor - 1], '"},{"trait_type":"Hovers","value":"', quilt.hovers ? "Yes" : "No", '"},{"trait_type":"Roundness","value":', Strings.toString(quilt.roundness), "}]" ) ); string memory json = Base64.encode( bytes( string( abi.encodePacked( '{"name":"Quilt #', Strings.toString(tokenId), '","description":"Generative cozy quilts stitched on-chain and stored on the Ethereum network, forever.","attributes":', attributes, ',"image":"data:image/svg+xml;base64,', Base64.encode(bytes(svg)), '"}' ) ) ) ); string memory output = string( abi.encodePacked("data:application/json;base64,", json) ); return output; } function _claim(uint256 numTokens) private { require(totalSupply() < MAX_SUPPLY, "All quilts minted"); require( totalSupply() + numTokens <= MAX_SUPPLY, "Minting exceeds max supply" ); require(numTokens <= MAX_PER_TX, "Mint fewer quilts"); require(numTokens > 0, "Must mint at least 1 quilt"); require( _mintedPerAddress[_msgSender()] + numTokens <= MAX_PER_ADDRESS, "Exceeds wallet limit" ); for (uint256 i = 0; i < numTokens; i++) { uint256 tokenId = tokensMinted + 1; _safeMint(_msgSender(), tokenId); tokensMinted += 1; _mintedPerAddress[_msgSender()] += 1; } } function claim(uint256 numTokens) public payable virtual { require(isSaleActive, "Sale not active"); require(PRICE * numTokens == msg.value, "ETH amount is incorrect"); _claim(numTokens); } function stitcherClaim() public onlyOwner { require(!hasStitcherMinted, "Stitcher already claimed quilts"); _claim(10); hasStitcherMinted = true; } function toggleSale() public onlyOwner { isSaleActive = !isSaleActive; } function withdrawAll() public payable nonReentrant onlyOwner { require(payable(_msgSender()).send(address(this).balance)); } constructor() ERC721("Quilts", "QLTS") {} } library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; uint256 encodedLen = 4 * ((len + 2) / 3); bytes memory result = new bytes(encodedLen + 32); bytes memory table = TABLE; assembly { let tablePtr := add(table, 1) let resultPtr := add(result, 32) for { let i := 0 } lt(i, len) { } { i := add(i, 3) let input := and(mload(add(data, i)), 0xffffff) let out := mload(add(tablePtr, and(shr(18, input), 0x3F))) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF) ) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF) ) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF) ) out := shl(224, out) mstore(resultPtr, out) resultPtr := add(resultPtr, 4) } switch mod(len, 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } mstore(result, encodedLen) } return string(result); } }
// 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 pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// 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: Unlicense /// @title: Quilt generator library /// @author: Quilt stitcher /* ++++++ - - - - - - - - - - - - - - - +++ - - - - - - - - - - - - - - - - ++++++ . . . quilts.art . . We like the Quilts! . . . ++++++ - - - - - - - - - - - - - - - +++ - - - - - - - - - - - - - - - - ++++++ . . . . . =##%%%%+ +%%%%%%+ +%%%%%%+ +%%%%%%+ +%%%%##= . . :%%%%%%%%%%%+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*%%%%%%%%%%%%: . . :#%%%%%%%%%%%+-%%%%%%%%%%%%%%+-%%%%%%%%%%%%%%+-%%%%%%%%%%%%%#. . . -%%%%%%%%%%%%%%=--%%%%%%%%%%%%%=--%%%%%%%%%%%%%=--%%%%%%%%%%%%%+#%%- . . %%%%%%%%%%%%%#=---%%%%%%%%%%%#=---%%%%%%%%%%%#=---%%%%%%%%%%%#=-%%%% . . %%%%%%%%%%%%#-----%%%%%%%%%%#-----%%%%%%%%%%#-----%%%%%%%%%%#---%%%% . . *%%%%%%%%%%*------%%%%%%%%%*------%%%%%%%%%*------%%%%%%%%%*----#%%* . . %%%%%%%%*-------%%%%%%%%*-------%%%%%%%%*-------%%%%%%%%*------- . . %%%%%%%+--------%%%%%%%+--------%%%%%%%+--------%%%%%%%+-------- . . *%%%%%%%+---------%%%%%%+---------%%%%%%+---------%%%%%%+-------*%%* . . %%%%%%%=----------%%%%%=----------%%%%%=----------%%%%%=--------%%%% . . %%%%%#=-----------%%%#=-----------%%%#=-----------%%%#=---------%%%% . . %%%%#-------------%%#-------------%%#-------------%%#-----------%%%% . . *%%*--------------%*--------------%*--------------%*------------*%%* . . *---------------*---------------*---------------*--------------- . . . . *%%* *%%* . . %%%% %%%% . . %%%% %%%% . . %%%% %%%% . . *%%* -+**+- -+**+- *%%* . . *%%%%%%* *%%%%%%* . . *%%%%%%* *%%%%%%* . . *%%* -+**+- -+**+- *%%* . . %%%% %%%% . . %%%% %%%% . . -%%* *%%- . . . . *%%%%%%+ +%%%%%%+ +%%%%%%+ +%%%%%%+ +%%%%%%* . . =##%%%%+ +%%%%%%+ +%%%%%%+ +%%%%%%+ +%%%%##= . . . . . ++++++ - - - - - - - - - - - - - - - +++ - - - - - - - - - - - - - - - - ++++++ */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Strings.sol"; library QuiltGenerator { struct QuiltStruct { uint256[5][5] patches; uint256 quiltX; uint256 quiltY; uint256 quiltW; uint256 quiltH; uint256 xOff; uint256 yOff; uint256 maxX; uint256 maxY; uint256 patchXCount; uint256 patchYCount; uint256 roundness; uint256 themeIndex; uint256 backgroundIndex; uint256 backgroundThemeIndex; uint256 calmnessFactor; bool includesSpecialPatch; bool hovers; bool animatedBg; } struct RandValues { uint256 x; uint256 y; uint256 roundness; uint256 theme; uint256 bg; uint256 cf; uint256 spX; uint256 spY; } function getQuiltForSeed(string memory seed) external pure returns (QuiltStruct memory, string memory) { QuiltStruct memory quilt; RandValues memory rand; // Determine how big the quilt is rand.x = random(seed, "X") % 100; rand.y = random(seed, "Y") % 100; if (rand.x < 1) { quilt.patchXCount = 1; } else if (rand.x < 10) { quilt.patchXCount = 2; } else if (rand.x < 60) { quilt.patchXCount = 3; } else if (rand.x < 90) { quilt.patchXCount = 4; } else { quilt.patchXCount = 5; } if (quilt.patchXCount == 1) { quilt.patchYCount = 1; } else if (rand.y < 10) { quilt.patchYCount = 2; } else if (rand.y < 60) { quilt.patchYCount = 3; } else if (rand.y < 90) { quilt.patchYCount = 4; } else { quilt.patchYCount = 5; } if (quilt.patchXCount == 2 && quilt.patchYCount == 5) { quilt.patchXCount = 3; } if (quilt.patchYCount == 2 && quilt.patchXCount == 5) { quilt.patchYCount = 3; } // Patch selection quilt.includesSpecialPatch = random(seed, "ISP") % 4000 > 3996; rand.spX = random(seed, "SPX") % quilt.patchXCount; rand.spY = random(seed, "SPY") % quilt.patchYCount; for (uint256 col = 0; col < quilt.patchXCount; col++) { for (uint256 row = 0; row < quilt.patchYCount; row++) { quilt.patches[col][row] = random(seed, string(abi.encodePacked("P", col, row))) % 15; if (quilt.includesSpecialPatch) { quilt.patches[rand.spX][rand.spY] = 15; } } } // Coordinates and dimensions for the quilts quilt.maxX = 64 * quilt.patchXCount + (quilt.patchXCount - 1) * 4; quilt.maxY = 64 * quilt.patchYCount + (quilt.patchYCount - 1) * 4; quilt.xOff = (500 - quilt.maxX) / 2; quilt.yOff = (500 - quilt.maxY) / 2; quilt.quiltW = quilt.maxX + 32; quilt.quiltH = quilt.maxY + 32; quilt.quiltX = quilt.xOff + 0 - 16; quilt.quiltY = quilt.yOff + 0 - 16; // Patch roundness rand.roundness = random(seed, "R") % 100; if (rand.roundness < 70) { quilt.roundness = 8; } else if (rand.roundness < 90) { quilt.roundness = 16; } else { quilt.roundness = 0; } // Color theme rand.theme = random(seed, "T") % 1000; if (rand.theme < 115) { quilt.themeIndex = 0; } else if (rand.theme < 230) { quilt.themeIndex = 1; } else if (rand.theme < 345) { quilt.themeIndex = 2; } else if (rand.theme < 460) { quilt.themeIndex = 3; } else if (rand.theme < 575) { quilt.themeIndex = 4; } else if (rand.theme < 690) { quilt.themeIndex = 5; } else if (rand.theme < 805) { quilt.themeIndex = 6; } else if (rand.theme < 930) { quilt.themeIndex = 7; } else if (rand.theme < 990) { quilt.themeIndex = 8; } else { quilt.themeIndex = 9; } quilt.backgroundThemeIndex = random(seed, "SBGT") % 100 > 33 ? random(seed, "SBGT") % 10 : quilt.themeIndex; // Background variant rand.bg = random(seed, "BG") % 100; if (rand.bg < 70) { quilt.backgroundIndex = 0; } else if (rand.bg < 80) { quilt.backgroundIndex = 1; } else if (rand.bg < 90) { quilt.backgroundIndex = 2; } else { quilt.backgroundIndex = 3; } // How calm or wavey a quilt is rand.cf = random(seed, "CF") % 100; if (rand.cf < 50) { quilt.calmnessFactor = 1; } else if (rand.cf < 70) { quilt.calmnessFactor = 2; } else if (rand.cf < 95) { quilt.calmnessFactor = 3; } else { quilt.calmnessFactor = 4; } // Animations quilt.hovers = random(seed, "H") % 100 > 90; quilt.animatedBg = random(seed, "ABG") % 100 > 70; string[4][10] memory colors = [ ["#5c457b", "#ff8fa4", "#f9bdbd", "#fbced6"], ["#006d77", "#ffafcc", "#ffe5ef", "#bde0fe"], ["#3d405b", "#f2cc8f", "#e07a5f", "#f4f1de"], ["#333d29", "#656d4a", "#dda15e", "#c2c5aa"], ["#6d2e46", "#d5b9b2", "#a26769", "#ece2d0"], ["#006d77", "#83c5be", "#ffddd2", "#edf6f9"], ["#351f39", "#726a95", "#719fb0", "#a0c1b8"], ["#472e2a", "#e78a46", "#fac459", "#fde3ae"], ["#0d1b2a", "#2f4865", "#7b88a7", "#b4c0d0"], ["#222222", "#eeeeee", "#bbbbbb", "#eeeeee"] ]; string[16] memory patches = [ '<path fill="url(#c3)" d="M0 0h64v64H0z"/><path fill="url(#c1)" d="M0 0h64v32H0z"/><path fill="url(#c2)" d="M0 32 16 0v32H0Zm16 0L32 0v32H16Zm16 0L48 0v32H32Zm16 0L64 0v32H48Z"/><circle cx="16" cy="48" r="4" fill="url(#c1)"/><circle cx="48" cy="48" r="4" fill="url(#c1)"/>', '<path fill="url(#c2)" d="M0 0h64v64H0z"/><path fill="url(#c1)" d="M32 0h32v64H32z"/><path fill="url(#c3)" d="M0 64 64 0v64H0Z"/><circle cx="46" cy="46" r="10" fill="url(#c2)"/>', '<path fill="url(#c2)" d="M0 0h64v64H0z"/><path fill="url(#c1)" d="m52 16 8-16h16l-8 16v16l8 16v16H60V48l-8-16V16Zm-64 0 8-16h16L4 16v16l8 16v16H-4V48l-8-16V16Z"/><path fill="url(#c3)" d="m4 16 8-16h16l-8 16v16l8 16v16H12V48L4 32V16Zm32 0 8-16h16l-8 16v16l8 16v16H44V48l-8-16V16Z"/>', '<path fill="url(#c1)" d="M0 0h64v64H0z"/><path fill="url(#c3)" d="M0 60h64v8H0zm0-16h64v8H0zm0-16h64v8H0zm0-16h64v8H0zM0-4h64v8H0z"/>', '<path fill="url(#c1)" d="M0 0h64v64H0z"/><path fill="url(#c3)" d="M16 0H8L0 8v8L16 0Zm16 0h-8L0 24v8L32 0Zm16 0h-8L0 40v8L48 0Zm16 0h-8L0 56v8L64 0Zm0 16V8L8 64h8l48-48Zm0 16v-8L24 64h8l32-32Zm0 16v-8L40 64h8l16-16Zm0 16v-8l-8 8h8Z"/>', '<path fill="url(#c3)" d="M0 0h64v64H0z"/><path fill="url(#c1)" d="M0 64 32 0v64H0Zm32 0L64 0v64H32Z"/>', '<path fill="url(#c1)" d="M0 0h64v64H0z"/><path fill="url(#c3)" d="M0 64 64 0v64H0Z"/>', '<path fill="url(#c3)" d="M0 0h64v64H0z"/><path fill="url(#c1)" d="M0 16V0h64L48 16V0L32 16V0L16 16V0L0 16Z"/><path fill="url(#c2)" d="M0 48V32h64L48 48V32L32 48V32L16 48V32L0 48Z"/>', '<path fill="url(#c3)" d="M0 0h64v64H0z"/><path fill="url(#c1)" d="M0 0h48v48H0z"/><path fill="url(#c2)" d="M0 48 48 0v48H0Z"/><circle cx="23" cy="25" r="8" fill="url(#c3)"/>', '<path fill="url(#c3)" d="M0 0h64v64H0z"/><path fill="url(#c1)" d="M0 0h32v32H0zm32 32h32v32H32z"/>', '<path fill="url(#c1)" d="M0 0h64v64H0z"/><path fill="url(#c3)" d="M16 0 0 16v16l16-16 16 16 16-16 16 16V16L48 0 32 16 16 0Zm0 32L0 48v16l16-16 16 16 16-16 16 16V48L48 32 32 48 16 32Z"/>', '<path fill="url(#c3)" d="M0 0h64v64H0z"/><path fill="url(#c1)" d="M8 8h40v8H8z"/><path fill="url(#c2)" d="M24 32h8v8h-8zm8-8h8v8h-8z"/><path fill="url(#c1)" d="M24 24h8v8h-8zm8 8h8v8h-8zM16 48h40v8H16z"/><path fill="url(#c2)" d="M8 16h8v40H8zm40-8h8v40h-8z"/>', '<path fill="url(#c3)" d="M0 0h64v64H0z"/><path fill="url(#c1)" d="m24 4 8 8-8 8V4Zm0 40 8 8-8 8V44Zm-4-20-8 8-8-8h16Zm40 0-8 8-8-8h16ZM40 4l-8 8 8 8V4Zm0 40-8 8 8 8V44Zm-20-4-8-8-8 8h16Zm40 0-8-8-8 8h16Z"/><path fill="url(#c2)" d="M24 24h16v16H24z"/>', '<path fill="url(#c1)" d="M0 0h64v64H0z"/><path fill="url(#c2)" d="m32 0 16 16-16 16V0Zm0 64L16 48l16-16v32ZM48 0l16 16-16 16V0ZM16 64 .0000014 48 16 32v32Z"/><path fill="url(#c3)" d="M0 16 16 2e-7 32 16H0Zm64 32L48 64 32 48h32ZM32 32 16 16 0 32h32Zm0 0 16 16 16-16H32Z"/>', '<path fill="url(#c2)" d="M0 0h64v64H0z"/><path fill="url(#c3)" d="M0 0h64v64H0z"/><path fill="url(#c2)" d="M32 32-.0000014.0000019 32 5e-7V32Zm0 0 32 32H32V32Z"/><path fill="url(#c1)" d="M32 32-.00000381 64l.0000028-32H32Zm0 0L64 0v32H32Z"/>', '<rect width="64" height="64" fill="url(#c2)"/><path fill="url(#c1)" d="M9 50v14h46V50h-2v-6h-2v-6h-2v-4h-2v-2h-4v2h-2v4H23v-4h-2v-2h-4v2h-2v4h-2v6h-2v6H9Z"/><path fill="url(#c3)" d="M11 50v14h42V50h-2v-6h-2v-6h-2v-4h-4v4h-2v2H23v-2h-2v-4h-4v4h-2v6h-2v6h-2Z"/><path fill="url(#c2)" d="M23 44v-4h4v4h-4Zm6 0v-4h6v4h-6Zm8 0v-4h4v4h-4ZM13 54h-2v8h2v-8Zm38 8v-8h2v8h-2Z"/><path fill="url(#c1)" d="M15 48v-2h2v2h2v2h-2v2h-2v-2h2v-2h-2Zm6 2v-4h4v4h-4Zm8 2v-2h2v-2h2v2h2v2h-6Zm10-2v-4h4v4h-4Zm8-4h2v2h-2v2h2v2h-2v-2h-2v-2h2v-2Z"/>' ]; string[4] memory backgrounds = [ string( abi.encodePacked( '<pattern id="bp" width="64" height="64" patternUnits="userSpaceOnUse"><circle cx="32" cy="32" r="8" fill="transparent" stroke="url(#c1)" stroke-width="1" opacity=".6"/></pattern><filter id="bf"><feTurbulence type="fractalNoise" baseFrequency="0.2" numOctaves="1" seed="', seed, '"/><feDisplacementMap in="SourceGraphic" xChannelSelector="B" scale="200"/></filter><g filter="url(#bf)"><rect x="-50%" y="-50%" width="200%" height="200%" fill="url(#bp)">', quilt.animatedBg ? '<animateTransform attributeName="transform" type="translate" dur="4s" values="0,0; 0,64;" repeatCount="indefinite"/>' : "", "</rect></g>" ) ), string( abi.encodePacked( '<pattern id="bp" width="128" height="128" patternUnits="userSpaceOnUse"><path d="m64 16 32 32H64V16ZM128 16l32 32h-32V16ZM0 16l32 32H0V16ZM128 76l-32 32h32V76ZM64 76l-32 32h32V76Z" fill="url(#c2)"/></pattern><filter id="bf"><feTurbulence type="fractalNoise" baseFrequency="0.002" numOctaves="1" seed="', seed, '"/><feDisplacementMap in="SourceGraphic" scale="100"/></filter><g filter="url(#bf)"><rect x="-50%" y="-50%" width="200%" height="200%" fill="url(#bp)" opacity=".2">', quilt.animatedBg ? '<animateTransform attributeName="transform" type="translate" dur="4s" values="0,0; 0,128;" repeatCount="indefinite"/>' : "", "</rect></g>" ) ), string( abi.encodePacked( '<pattern id="bp" width="64" height="64" patternUnits="userSpaceOnUse"><path d="M32 0L0 32V64L32 32L64 64V32L32 0Z" fill="url(#c1)" opacity=".1"/></pattern><filter id="bf"><feTurbulence type="fractalNoise" baseFrequency="0.004" numOctaves="1" seed="', seed, '"/><feDisplacementMap in="SourceGraphic" scale="200"/></filter><g filter="url(#bf)"><rect x="-50%" y="-50%" width="200%" height="200%" fill="url(#bp)">', quilt.animatedBg ? '<animateTransform attributeName="transform" type="translate" dur="4s" values="0,0; -128,0;" repeatCount="indefinite"/>' : "", "</rect></g>" ) ), string( abi.encodePacked( '<pattern id="bp" width="80" height="40" patternUnits="userSpaceOnUse"><path d="M0 20a20 20 0 1 1 0 1M40 0a20 20 0 1 0 40 0m0 40a20 20 0 1 0 -40 0" fill="url(#c2)" opacity=".2"/></pattern><filter id="bf"><feTurbulence type="fractalNoise" baseFrequency="0.02" numOctaves="1" seed="', seed, '"/><feDisplacementMap in="SourceGraphic" scale="200"/></filter><g filter="url(#bf)"><rect x="-50%" y="-50%" width="200%" height="200%" fill="url(#bp)">', quilt.animatedBg ? '<animateTransform attributeName="transform" type="translate" dur="4s" values="0,0; 0,-80;" repeatCount="indefinite"/>' : "", "</rect></g>" ) ) ]; // Build the SVG from various parts string[7] memory svgParts; for (uint256 col = 0; col < quilt.patchXCount; col++) { for (uint256 row = 0; row < quilt.patchYCount; row++) { uint256 x = quilt.xOff + 68 * col; uint256 y = quilt.yOff + 68 * row; uint256 patchPartIndex = quilt.patches[col][row]; // Patch masks svgParts[0] = string( abi.encodePacked( svgParts[0], '<mask id="s', Strings.toString(col + 1), Strings.toString(row + 1), '"><rect rx="', Strings.toString(quilt.roundness), '" x="', Strings.toString(x), '" y="', Strings.toString(y), '" width="64" height="64" fill="white"/></mask>' ) ); // Patches svgParts[5] = string( abi.encodePacked( svgParts[5], '<g mask="url(#s', Strings.toString(col + 1), Strings.toString(row + 1), ')"><g transform="translate(', Strings.toString(x), " ", Strings.toString(y), ')">', patches[patchPartIndex], "</g></g>" ) ); // Patch stitches svgParts[6] = string( abi.encodePacked( svgParts[6], '<rect rx="', Strings.toString(quilt.roundness), '" stroke-width="2" stroke-linecap="round" stroke="url(#c1)" stroke-dasharray="4 4" x="', Strings.toString(x), '" y="', Strings.toString(y), '" width="64" height="64" fill="transparent"/>' ) ); } } // Color theme svgParts[1] = string( abi.encodePacked( '<linearGradient id="c1"><stop stop-color="', colors[quilt.themeIndex][0], '"/></linearGradient><linearGradient id="c2"><stop stop-color="', colors[quilt.themeIndex][1], '"/></linearGradient><linearGradient id="c3"><stop stop-color="', colors[quilt.themeIndex][2], '"/></linearGradient><linearGradient id="c4"><stop stop-color="', colors[quilt.backgroundThemeIndex][3], '"/></linearGradient>' ) ); // Image background svgParts[2] = backgrounds[quilt.backgroundIndex]; // Quilt shadow svgParts[3] = string( abi.encodePacked( '<rect transform="translate(', Strings.toString(quilt.quiltX + 8), " ", Strings.toString(quilt.quiltY + 8), ')" x="0" y="0" width="', Strings.toString(quilt.quiltW), '" height="', Strings.toString(quilt.quiltH), '" rx="', Strings.toString( quilt.roundness == 0 ? 0 : quilt.roundness + 8 ), '" fill="url(#c1)"/>' ) ); // Quilt background svgParts[4] = string( abi.encodePacked( '<rect x="', Strings.toString(quilt.quiltX), '" y="', Strings.toString(quilt.quiltY), '" width="', Strings.toString(quilt.quiltW), '" height="', Strings.toString(quilt.quiltH), '" rx="', Strings.toString( quilt.roundness == 0 ? 0 : quilt.roundness + 8 ), '" fill="url(#c2)" stroke="url(#c1)" stroke-width="2"/>' ) ); string memory svg = string( abi.encodePacked( '<svg width="500" height="500" viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg"><defs>', svgParts[0], // Patch masks svgParts[1], // Color theme '</defs><rect width="500" height="500" fill="url(#c4)"/>', svgParts[2], // Image background '<filter id="f" x="-50%" y="-50%" width="200%" height="200%"><feTurbulence baseFrequency="', quilt.calmnessFactor * 3 >= 10 ? "0.0" : "0.00", Strings.toString(quilt.calmnessFactor * 3), '" seed="', seed, '"/><feDisplacementMap in="SourceGraphic" scale="10"/></filter><g><g filter="url(#f)">', svgParts[3] // Quilt shadow ) ); svg = string( abi.encodePacked( svg, quilt.hovers ? '<animateTransform attributeName="transform" type="scale" additive="sum" dur="4s" values="1 1; 1.005 1.02; 1 1;" calcMode="spline" keySplines="0.45, 0, 0.55, 1; 0.45, 0, 0.55, 1;" repeatCount="indefinite"/>' : "", '</g><g filter="url(#f)">', svgParts[4], // Quilt background svgParts[5], // Patches svgParts[6], // Patch stitches quilt.hovers ? '<animateTransform attributeName="transform" type="translate" dur="4s" values="0,0; -4,-16; 0,0;" calcMode="spline" keySplines="0.45, 0, 0.55, 1; 0.45, 0, 0.55, 1;" repeatCount="indefinite"/>' : "", "</g></g></svg>" ) ); return (quilt, svg); } function random(string memory seed, string memory key) internal pure returns (uint256) { return uint256(keccak256(abi.encodePacked(key, seed))); } }
// 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; /** * @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; /** * @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 "./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", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": { "contracts/QuiltGenerator.sol": { "QuiltGenerator": "0xb9f8163690b9694ac695afe26076d4d403276c55" } } }
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":"MAX_PER_ADDRESS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PER_TX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"numTokens","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hasStitcherMinted","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":[],"name":"isSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"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":[],"name":"stitcherClaim","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":[],"name":"toggleSale","outputs":[],"stateMutability":"nonpayable","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":"tokensMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAll","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
6080604052600d805461ffff191690553480156200001c57600080fd5b5060408051808201825260068152655175696c747360d01b602080830191825283518085019094526004845263514c545360e01b9084015281519192916200006791600091620000e8565b5080516200007d906001906020840190620000e8565b50506001600a5550620000903362000096565b620001cb565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620000f6906200018e565b90600052602060002090601f0160209004810192826200011a576000855562000165565b82601f106200013557805160ff191683800117855562000165565b8280016001018555821562000165579182015b828111156200016557825182559160200191906001019062000148565b506200017392915062000177565b5090565b5b8082111562000173576000815560010162000178565b600181811c90821680620001a357607f821691505b60208210811415620001c557634e487b7160e01b600052602260045260246000fd5b50919050565b61349880620001db6000396000f3fe6080604052600436106101cd5760003560e01c80636de9f32b116100f75780638da5cb5b11610095578063c87b56dd11610064578063c87b56dd146104c8578063e985e9c5146104e8578063f2fde38b14610531578063f43a22dc1461055157600080fd5b80638da5cb5b1461045557806395d89b4114610473578063a22cb46514610488578063b88d4fde146104a857600080fd5b80637d8966e4116100d15780637d8966e414610408578063806d06861461041d578063853828b6146104325780638d859f3e1461043a57600080fd5b80636de9f32b146103bd57806370a08231146103d3578063715018a6146103f357600080fd5b806323b872dd1161016f57806342842e0e1161013e57806342842e0e146103435780634f6ccce714610363578063564566a8146103835780636352211e1461039d57600080fd5b806323b872dd146102da5780632f745c59146102fa57806332cb6b0c1461031a578063379607f51461033057600080fd5b8063095ea7b3116101ab578063095ea7b3146102615780630aaef2851461028357806318160ddd146102a657806319499b3b146102bb57600080fd5b806301ffc9a7146101d257806306fdde0314610207578063081812fc14610229575b600080fd5b3480156101de57600080fd5b506101f26101ed3660046129b6565b610566565b60405190151581526020015b60405180910390f35b34801561021357600080fd5b5061021c610591565b6040516101fe9190613133565b34801561023557600080fd5b50610249610244366004612b3d565b610623565b6040516001600160a01b0390911681526020016101fe565b34801561026d57600080fd5b5061028161027c36600461298d565b6106bd565b005b34801561028f57600080fd5b50610298601481565b6040519081526020016101fe565b3480156102b257600080fd5b50600854610298565b3480156102c757600080fd5b50600d546101f290610100900460ff1681565b3480156102e657600080fd5b506102816102f536600461287e565b6107d3565b34801561030657600080fd5b5061029861031536600461298d565b610804565b34801561032657600080fd5b50610298610fa081565b61028161033e366004612b3d565b61089a565b34801561034f57600080fd5b5061028161035e36600461287e565b610949565b34801561036f57600080fd5b5061029861037e366004612b3d565b610964565b34801561038f57600080fd5b50600d546101f29060ff1681565b3480156103a957600080fd5b506102496103b8366004612b3d565b610a05565b3480156103c957600080fd5b50610298600c5481565b3480156103df57600080fd5b506102986103ee36600461282b565b610a7c565b3480156103ff57600080fd5b50610281610b03565b34801561041457600080fd5b50610281610b39565b34801561042957600080fd5b50610281610b77565b610281610c14565b34801561044657600080fd5b506102986658d15e1762800081565b34801561046157600080fd5b50600b546001600160a01b0316610249565b34801561047f57600080fd5b5061021c610cc1565b34801561049457600080fd5b506102816104a3366004612957565b610cd0565b3480156104b457600080fd5b506102816104c33660046128b9565b610d95565b3480156104d457600080fd5b5061021c6104e3366004612b3d565b610dcd565b3480156104f457600080fd5b506101f261050336600461284c565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561053d57600080fd5b5061028161054c36600461282b565b6117e0565b34801561055d57600080fd5b50610298600a81565b60006001600160e01b0319821663780e9d6360e01b148061058b575061058b82611878565b92915050565b6060600080546105a090613352565b80601f01602080910402602001604051908101604052809291908181526020018280546105cc90613352565b80156106195780601f106105ee57610100808354040283529160200191610619565b820191906000526020600020905b8154815290600101906020018083116105fc57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166106a15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006106c882610a05565b9050806001600160a01b0316836001600160a01b031614156107365760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610698565b336001600160a01b038216148061075257506107528133610503565b6107c45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610698565b6107ce83836118c8565b505050565b6107dd3382611936565b6107f95760405162461bcd60e51b8152600401610698906131cd565b6107ce838383611a2d565b600061080f83610a7c565b82106108715760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610698565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600d5460ff166108de5760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b6044820152606401610698565b346108f0826658d15e176280006132f0565b1461093d5760405162461bcd60e51b815260206004820152601760248201527f45544820616d6f756e7420697320696e636f72726563740000000000000000006044820152606401610698565b61094681611bd8565b50565b6107ce83838360405180602001604052806000815250610d95565b600061096f60085490565b82106109d25760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610698565b600882815481106109f357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b03168061058b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610698565b60006001600160a01b038216610ae75760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610698565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b03163314610b2d5760405162461bcd60e51b815260040161069890613198565b610b376000611e00565b565b600b546001600160a01b03163314610b635760405162461bcd60e51b815260040161069890613198565b600d805460ff19811660ff90911615179055565b600b546001600160a01b03163314610ba15760405162461bcd60e51b815260040161069890613198565b600d54610100900460ff1615610bf95760405162461bcd60e51b815260206004820152601f60248201527f537469746368657220616c726561647920636c61696d6564207175696c7473006044820152606401610698565b610c03600a611bd8565b600d805461ff001916610100179055565b6002600a541415610c675760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610698565b6002600a55600b546001600160a01b03163314610c965760405162461bcd60e51b815260040161069890613198565b60405133904780156108fc02916000818181858888f19350505050610cba57600080fd5b6001600a55565b6060600180546105a090613352565b6001600160a01b038216331415610d295760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610698565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610d9f3383611936565b610dbb5760405162461bcd60e51b8152600401610698906131cd565b610dc784848484611e52565b50505050565b6060600082118015610de15750600c548211155b610e205760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081d1bdad95b88125160821b6044820152606401610698565b610e2861262d565b606073b9f8163690b9694ac695afe26076d4d403276c55635b38fa7c610e58610e538761115c6132f0565b611e85565b6040518263ffffffff1660e01b8152600401610e749190613133565b60006040518083038186803b158015610e8c57600080fd5b505af4158015610ea0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ec891908101906129ee565b809250819350505060006040518061014001604052806040518060400160405280600c81526020016b2834b735903830b73a3432b960a11b81525081526020016040518060400160405280600e81526020016d43686572727920626c6f73736f6d60901b81525081526020016040518060400160405280600681526020016511195cd95c9d60d21b815250815260200160405180604001604052806006815260200165119bdc995cdd60d21b8152508152602001604051806040016040528060088152602001674d757368726f6f6d60c01b8152508152602001604051806040016040528060088152602001674d696e742074656160c01b81525081526020016040518060400160405280600b81526020016a46616972792067726f766560a81b815250815260200160405180604001604052806007815260200166283ab6b835b4b760c91b815250815260200160405180604001604052806008815260200167151dda5b1a59da1d60c21b81525081526020016040518060400160405280600d81526020016c426c61636b202620776869746560981b81525081525090506000604051806102000160405280604051806040016040528060068152602001655175696c747960d01b81525081526020016040518060400160405280600a81526020016915d85d195c999c9bdb9d60b21b815250815260200160405180604001604052806004815260200163466c6f7760e01b81525081526020016040518060400160405280600681526020016510995b99d85b60d21b81525081526020016040518060400160405280600781526020016653756e6265616d60c81b81525081526020016040518060400160405280600681526020016553706972657360d01b8152508152602001604051806040016040528060088152602001672234bb34b9b4b7b760c11b81525081526020016040518060400160405280600e81526020016d4372617368696e6720776176657360901b81525081526020016040518060400160405280600b81526020016a457175696c69627269756d60a81b815250815260200160405180604001604052806009815260200168496368696d6174737560b81b815250815260200160405180604001604052806009815260200168486967686c616e647360b81b8152508152602001604051806040016040528060098152602001682637b39031b0b134b760b91b81525081526020016040518060400160405280600481526020016326b0b4bd60e11b81525081526020016040518060400160405280600c81526020016b466c79696e6720676565736560a01b815250815260200160405180604001604052806008815260200167141a5b9dda19595b60c21b8152508152602001604051806040016040528060068152602001654b617761696960d01b81525081525090506000604051806080016040528060405180604001604052806005815260200164447573747960d81b815250815260200160405180604001604052806005815260200164466c61677360d81b815250815260200160405180604001604052806008815260200167456c65637472696360c01b81525081526020016040518060400160405280600681526020016547726f6f767960d01b81525081525090506000604051806080016040528060405180604001604052806006815260200165536572656e6560d01b81525081526020016040518060400160405280600481526020016343616c6d60e01b815250815260200160405180604001604052806005815260200164576176657960d81b8152508152602001604051806040016040528060078152602001664368616f74696360c81b8152508152509050606060005b87610120015181101561154f5760005b88610140015181101561153c5782868a60000151846005811061145657634e487b7160e01b600052603260045260246000fd5b6020020151836005811061147a57634e487b7160e01b600052603260045260246000fd5b60200201516010811061149d57634e487b7160e01b600052603260045260246000fd5b602002015160018b61012001516114b4919061330f565b841480156114d2575060018b61014001516114cf919061330f565b83145b6114f557604051806040016040528060018152602001600b60fa1b815250611506565b604051806020016040528060008152505b60405160200161151893929190612b9d565b604051602081830303815290604052925080806115349061338d565b915050611423565b50806115478161338d565b915050611413565b50600083886101a001516004811061157757634e487b7160e01b600052603260045260246000fd5b60200201518861024001516115a657604051806040016040528060028152602001614e6f60f01b8152506115c3565b6040518060400160405280600381526020016259657360e81b8152505b878a6101800151600a81106115e857634e487b7160e01b600052603260045260246000fd5b6020020151888b6101c00151600a811061161257634e487b7160e01b600052603260045260246000fd5b6020020151858c610200015161164257604051806040016040528060028152602001614e6f60f01b81525061165f565b6040518060400160405280600381526020016259657360e81b8152505b6116788e61014001518f6101200151610e5391906132f0565b60405160200161168e9796959493929190612ee8565b6040516020818303038152906040529050806116ae896101200151611e85565b6116bc8a6101400151611e85565b8560018c6101e001516116cf919061330f565b600481106116ed57634e487b7160e01b600052603260045260246000fd5b60200201518b610220015161171c57604051806040016040528060028152602001614e6f60f01b815250611739565b6040518060400160405280600381526020016259657360e81b8152505b6117478d6101600151611e85565b60405160200161175c96959493929190612bf8565b604051602081830303815290604052905060006117ab61177b8c611e85565b836117858b611f9f565b60405160200161179793929190612d69565b604051602081830303815290604052611f9f565b90506000816040516020016117c09190612ea3565b60408051601f198184030181529190529c9b505050505050505050505050565b600b546001600160a01b0316331461180a5760405162461bcd60e51b815260040161069890613198565b6001600160a01b03811661186f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610698565b61094681611e00565b60006001600160e01b031982166380ac58cd60e01b14806118a957506001600160e01b03198216635b5e139f60e01b145b8061058b57506301ffc9a760e01b6001600160e01b031983161461058b565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906118fd82610a05565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166119af5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610698565b60006119ba83610a05565b9050806001600160a01b0316846001600160a01b031614806119f55750836001600160a01b03166119ea84610623565b6001600160a01b0316145b80611a2557506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611a4082610a05565b6001600160a01b031614611aa85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610698565b6001600160a01b038216611b0a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610698565b611b15838383612113565b611b206000826118c8565b6001600160a01b0383166000908152600360205260408120805460019290611b4990849061330f565b90915550506001600160a01b0382166000908152600360205260408120805460019290611b779084906132c4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b610fa0611be460085490565b10611c255760405162461bcd60e51b8152602060048201526011602482015270105b1b081c5d5a5b1d1cc81b5a5b9d1959607a1b6044820152606401610698565b610fa081611c3260085490565b611c3c91906132c4565b1115611c8a5760405162461bcd60e51b815260206004820152601a60248201527f4d696e74696e672065786365656473206d617820737570706c790000000000006044820152606401610698565b600a811115611ccf5760405162461bcd60e51b81526020600482015260116024820152704d696e74206665776572207175696c747360781b6044820152606401610698565b60008111611d1f5760405162461bcd60e51b815260206004820152601a60248201527f4d757374206d696e74206174206c656173742031207175696c740000000000006044820152606401610698565b336000908152600e6020526040902054601490611d3d9083906132c4565b1115611d825760405162461bcd60e51b8152602060048201526014602482015273115e18d959591cc81dd85b1b195d081b1a5b5a5d60621b6044820152606401610698565b60005b81811015611dfc576000600c546001611d9e91906132c4565b9050611daa33826121cb565b6001600c6000828254611dbd91906132c4565b9091555050336000908152600e60205260408120805460019290611de29084906132c4565b90915550829150611df490508161338d565b915050611d85565b5050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611e5d848484611a2d565b611e69848484846121e5565b610dc75760405162461bcd60e51b815260040161069890613146565b606081611ea95750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611ed35780611ebd8161338d565b9150611ecc9050600a836132dc565b9150611ead565b60008167ffffffffffffffff811115611efc57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611f26576020820181803683370190505b5090505b8415611a2557611f3b60018361330f565b9150611f48600a866133a8565b611f539060306132c4565b60f81b818381518110611f7657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611f98600a866132dc565b9450611f2a565b805160609080611fbf575050604080516020810190915260008152919050565b60006003611fce8360026132c4565b611fd891906132dc565b611fe39060046132f0565b90506000611ff28260206132c4565b67ffffffffffffffff81111561201857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612042576020820181803683370190505b5090506000604051806060016040528060408152602001613423604091399050600181016020830160005b868110156120ce576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b83526004909201910161206d565b5060038606600181146120e857600281146120f957612105565b613d3d60f01b600119830152612105565b603d60f81b6000198301525b505050918152949350505050565b6001600160a01b03831661216e5761216981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612191565b816001600160a01b0316836001600160a01b0316146121915761219183826122f2565b6001600160a01b0382166121a8576107ce8161238f565b826001600160a01b0316826001600160a01b0316146107ce576107ce8282612468565b611dfc8282604051806020016040528060008152506124ac565b60006001600160a01b0384163b156122e757604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906122299033908990889088906004016130f6565b602060405180830381600087803b15801561224357600080fd5b505af1925050508015612273575060408051601f3d908101601f19168201909252612270918101906129d2565b60015b6122cd573d8080156122a1576040519150601f19603f3d011682016040523d82523d6000602084013e6122a6565b606091505b5080516122c55760405162461bcd60e51b815260040161069890613146565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611a25565b506001949350505050565b600060016122ff84610a7c565b612309919061330f565b60008381526007602052604090205490915080821461235c576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906123a19060019061330f565b600083815260096020526040812054600880549394509092849081106123d757634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061240657634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061244c57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061247383610a7c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6124b683836124df565b6124c360008484846121e5565b6107ce5760405162461bcd60e51b815260040161069890613146565b6001600160a01b0382166125355760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610698565b6000818152600260205260409020546001600160a01b03161561259a5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610698565b6125a660008383612113565b6001600160a01b03821660009081526003602052604081208054600192906125cf9084906132c4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6040518061026001604052806126416126cb565b81526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581526020016000151581525090565b6040518060a001604052806005905b6126e26126f8565b8152602001906001900390816126da5790505090565b6040518060a001604052806005906020820280368337509192915050565b80356001600160a01b038116811461272d57600080fd5b919050565b6000601f8381840112612743578182fd5b61274b613248565b8084866103208701111561275d578485fd5b845b600580821061276e57506127cc565b888684011261277b578687fd5b612783613248565b808460a086018c811115612795578a8bfd5b8a5b858110156127b5578251855260209485019490920191600101612797565b50918852506020909601959350505060010161275f565b50909695505050505050565b805161272d816133fe565b600082601f8301126127f3578081fd5b81516128066128018261329c565b61326b565b81815284602083860101111561281a578283fd5b611a25826020830160208701613326565b60006020828403121561283c578081fd5b61284582612716565b9392505050565b6000806040838503121561285e578081fd5b61286783612716565b915061287560208401612716565b90509250929050565b600080600060608486031215612892578081fd5b61289b84612716565b92506128a960208501612716565b9150604084013590509250925092565b600080600080608085870312156128ce578081fd5b6128d785612716565b93506128e560208601612716565b925060408501359150606085013567ffffffffffffffff811115612907578182fd5b8501601f81018713612917578182fd5b80356129256128018261329c565b818152886020838501011115612939578384fd5b81602084016020830137908101602001929092525092959194509250565b60008060408385031215612969578182fd5b61297283612716565b91506020830135612982816133fe565b809150509250929050565b6000806040838503121561299f578182fd5b6129a883612716565b946020939093013593505050565b6000602082840312156129c7578081fd5b81356128458161340c565b6000602082840312156129e3578081fd5b81516128458161340c565b600080828403610580811215612a02578283fd5b61056080821215612a11578384fd5b612a1961321e565b9150612a258686612732565b825261032085015160208301526103408501516040830152610360850151606083015261038085015160808301526103a085015160a08301526103c085015160c08301526103e085015160e08301526104008501516101008301526104208501516101208301526104408501516101408301526104608501516101608301526104808501516101808301526104a08501516101a08301526104c08501516101c08301526104e08501516101e0830152612ae161050086016127d8565b610200830152612af461052086016127d8565b610220830152612b0761054086016127d8565b61024083015284015190925067ffffffffffffffff811115612b27578182fd5b612b33858286016127e3565b9150509250929050565b600060208284031215612b4e578081fd5b5035919050565b60008151808452612b6d816020860160208601613326565b601f01601f19169290920160200192915050565b60008151612b93818560208601613326565b9290920192915050565b60008451612baf818460208901613326565b601160f91b9083018181528551909190612bd0816001850160208a01613326565b60019201918201528351612beb816002840160208801613326565b0160020195945050505050565b60008751612c0a818460208c01613326565b80830190507f7d2c7b2274726169745f74797065223a2241737065637420726174696f222c228152673b30b63ab2911d1160c11b60208201528751612c56816028840160208c01613326565b601d60f91b602892909101918201528651612c78816029840160208b01613326565b7f227d2c7b2274726169745f74797065223a2243616c6d6e657373222c2276616c60299290910191820152643ab2911d1160d91b60498201528551612cc481604e840160208a01613326565b7f227d2c7b2274726169745f74797065223a22486f76657273222c2276616c7565604e929091019182015262111d1160e91b606e820152612d5c612d4e612d48612d116071850189612b81565b7f227d2c7b2274726169745f74797065223a22526f756e646e657373222c227661815264363ab2911d60d91b602082015260250190565b86612b81565b617d5d60f01b815260020190565b9998505050505050505050565b6f7b226e616d65223a225175696c74202360801b81528351600090612d95816010850160208901613326565b7f222c226465736372697074696f6e223a2247656e6572617469766520636f7a796010918401918201527f207175696c7473207374697463686564206f6e2d636861696e20616e6420737460308201527f6f726564206f6e2074686520457468657265756d206e6574776f726b2c20666f6050820152743932bb32b91711161130ba3a3934b13aba32b9911d60591b60708201528451612e3c816085840160208901613326565b7f2c22696d616765223a22646174613a696d6167652f7376672b786d6c3b6261736085929091019182015263194d8d0b60e21b60a58201528351612e878160a9840160208801613326565b61227d60f01b60a9929091019182015260ab0195945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251612edb81601d850160208701613326565b91909101601d0192915050565b7f5b7b2274726169745f74797065223a224261636b67726f756e64222c2276616c8152643ab2911d1160d91b602082015260008851612f2e816025850160208d01613326565b7f227d2c7b2274726169745f74797065223a22416e696d61746564206261636b676025918401918201526f3937bab7321116113b30b63ab2911d1160811b60458201528851612f84816055840160208d01613326565b7f227d2c7b2274726169745f74797065223a225468656d65222c2276616c75652260559290910191820152611d1160f11b60758201528751612fcd816077840160208c01613326565b6130e7612d486130ae6130a861306c61306661303061302a6077898b01017f227d2c7b2274726169745f74797065223a224261636b67726f756e642074686581526c36b29116113b30b63ab2911d1160991b6020820152602d0190565b8f612b81565b7f227d2c7b2274726169745f74797065223a2250617463686573222c2276616c7581526365223a5b60e01b602082015260240190565b8c612b81565b7f5d7d2c7b2274726169745f74797065223a225370656369616c2070617463682281526916113b30b63ab2911d1160b11b6020820152602a0190565b89612b81565b7f227d2c7b2274726169745f74797065223a22506174636820636f756e74222c228152663b30b63ab2911d60c91b602082015260270190565b9b9a5050505050505050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061312990830184612b55565b9695505050505050565b6020815260006128456020830184612b55565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051610260810167ffffffffffffffff81118282101715613242576132426133e8565b60405290565b60405160a0810167ffffffffffffffff81118282101715613242576132426133e8565b604051601f8201601f1916810167ffffffffffffffff81118282101715613294576132946133e8565b604052919050565b600067ffffffffffffffff8211156132b6576132b66133e8565b50601f01601f191660200190565b600082198211156132d7576132d76133bc565b500190565b6000826132eb576132eb6133d2565b500490565b600081600019048311821515161561330a5761330a6133bc565b500290565b600082821015613321576133216133bc565b500390565b60005b83811015613341578181015183820152602001613329565b83811115610dc75750506000910152565b600181811c9082168061336657607f821691505b6020821081141561338757634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156133a1576133a16133bc565b5060010190565b6000826133b7576133b76133d2565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461094657600080fd5b6001600160e01b03198116811461094657600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212206a09ef5bf5d850c9ac14f21848c441e1c703d4c3edd133871450b9dd1b8e14bd64736f6c63430008040033
Deployed Bytecode
0x6080604052600436106101cd5760003560e01c80636de9f32b116100f75780638da5cb5b11610095578063c87b56dd11610064578063c87b56dd146104c8578063e985e9c5146104e8578063f2fde38b14610531578063f43a22dc1461055157600080fd5b80638da5cb5b1461045557806395d89b4114610473578063a22cb46514610488578063b88d4fde146104a857600080fd5b80637d8966e4116100d15780637d8966e414610408578063806d06861461041d578063853828b6146104325780638d859f3e1461043a57600080fd5b80636de9f32b146103bd57806370a08231146103d3578063715018a6146103f357600080fd5b806323b872dd1161016f57806342842e0e1161013e57806342842e0e146103435780634f6ccce714610363578063564566a8146103835780636352211e1461039d57600080fd5b806323b872dd146102da5780632f745c59146102fa57806332cb6b0c1461031a578063379607f51461033057600080fd5b8063095ea7b3116101ab578063095ea7b3146102615780630aaef2851461028357806318160ddd146102a657806319499b3b146102bb57600080fd5b806301ffc9a7146101d257806306fdde0314610207578063081812fc14610229575b600080fd5b3480156101de57600080fd5b506101f26101ed3660046129b6565b610566565b60405190151581526020015b60405180910390f35b34801561021357600080fd5b5061021c610591565b6040516101fe9190613133565b34801561023557600080fd5b50610249610244366004612b3d565b610623565b6040516001600160a01b0390911681526020016101fe565b34801561026d57600080fd5b5061028161027c36600461298d565b6106bd565b005b34801561028f57600080fd5b50610298601481565b6040519081526020016101fe565b3480156102b257600080fd5b50600854610298565b3480156102c757600080fd5b50600d546101f290610100900460ff1681565b3480156102e657600080fd5b506102816102f536600461287e565b6107d3565b34801561030657600080fd5b5061029861031536600461298d565b610804565b34801561032657600080fd5b50610298610fa081565b61028161033e366004612b3d565b61089a565b34801561034f57600080fd5b5061028161035e36600461287e565b610949565b34801561036f57600080fd5b5061029861037e366004612b3d565b610964565b34801561038f57600080fd5b50600d546101f29060ff1681565b3480156103a957600080fd5b506102496103b8366004612b3d565b610a05565b3480156103c957600080fd5b50610298600c5481565b3480156103df57600080fd5b506102986103ee36600461282b565b610a7c565b3480156103ff57600080fd5b50610281610b03565b34801561041457600080fd5b50610281610b39565b34801561042957600080fd5b50610281610b77565b610281610c14565b34801561044657600080fd5b506102986658d15e1762800081565b34801561046157600080fd5b50600b546001600160a01b0316610249565b34801561047f57600080fd5b5061021c610cc1565b34801561049457600080fd5b506102816104a3366004612957565b610cd0565b3480156104b457600080fd5b506102816104c33660046128b9565b610d95565b3480156104d457600080fd5b5061021c6104e3366004612b3d565b610dcd565b3480156104f457600080fd5b506101f261050336600461284c565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561053d57600080fd5b5061028161054c36600461282b565b6117e0565b34801561055d57600080fd5b50610298600a81565b60006001600160e01b0319821663780e9d6360e01b148061058b575061058b82611878565b92915050565b6060600080546105a090613352565b80601f01602080910402602001604051908101604052809291908181526020018280546105cc90613352565b80156106195780601f106105ee57610100808354040283529160200191610619565b820191906000526020600020905b8154815290600101906020018083116105fc57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166106a15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006106c882610a05565b9050806001600160a01b0316836001600160a01b031614156107365760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610698565b336001600160a01b038216148061075257506107528133610503565b6107c45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610698565b6107ce83836118c8565b505050565b6107dd3382611936565b6107f95760405162461bcd60e51b8152600401610698906131cd565b6107ce838383611a2d565b600061080f83610a7c565b82106108715760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610698565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600d5460ff166108de5760405162461bcd60e51b815260206004820152600f60248201526e53616c65206e6f742061637469766560881b6044820152606401610698565b346108f0826658d15e176280006132f0565b1461093d5760405162461bcd60e51b815260206004820152601760248201527f45544820616d6f756e7420697320696e636f72726563740000000000000000006044820152606401610698565b61094681611bd8565b50565b6107ce83838360405180602001604052806000815250610d95565b600061096f60085490565b82106109d25760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610698565b600882815481106109f357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b03168061058b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610698565b60006001600160a01b038216610ae75760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610698565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b03163314610b2d5760405162461bcd60e51b815260040161069890613198565b610b376000611e00565b565b600b546001600160a01b03163314610b635760405162461bcd60e51b815260040161069890613198565b600d805460ff19811660ff90911615179055565b600b546001600160a01b03163314610ba15760405162461bcd60e51b815260040161069890613198565b600d54610100900460ff1615610bf95760405162461bcd60e51b815260206004820152601f60248201527f537469746368657220616c726561647920636c61696d6564207175696c7473006044820152606401610698565b610c03600a611bd8565b600d805461ff001916610100179055565b6002600a541415610c675760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610698565b6002600a55600b546001600160a01b03163314610c965760405162461bcd60e51b815260040161069890613198565b60405133904780156108fc02916000818181858888f19350505050610cba57600080fd5b6001600a55565b6060600180546105a090613352565b6001600160a01b038216331415610d295760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610698565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610d9f3383611936565b610dbb5760405162461bcd60e51b8152600401610698906131cd565b610dc784848484611e52565b50505050565b6060600082118015610de15750600c548211155b610e205760405162461bcd60e51b815260206004820152601060248201526f125b9d985b1a59081d1bdad95b88125160821b6044820152606401610698565b610e2861262d565b606073b9f8163690b9694ac695afe26076d4d403276c55635b38fa7c610e58610e538761115c6132f0565b611e85565b6040518263ffffffff1660e01b8152600401610e749190613133565b60006040518083038186803b158015610e8c57600080fd5b505af4158015610ea0573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610ec891908101906129ee565b809250819350505060006040518061014001604052806040518060400160405280600c81526020016b2834b735903830b73a3432b960a11b81525081526020016040518060400160405280600e81526020016d43686572727920626c6f73736f6d60901b81525081526020016040518060400160405280600681526020016511195cd95c9d60d21b815250815260200160405180604001604052806006815260200165119bdc995cdd60d21b8152508152602001604051806040016040528060088152602001674d757368726f6f6d60c01b8152508152602001604051806040016040528060088152602001674d696e742074656160c01b81525081526020016040518060400160405280600b81526020016a46616972792067726f766560a81b815250815260200160405180604001604052806007815260200166283ab6b835b4b760c91b815250815260200160405180604001604052806008815260200167151dda5b1a59da1d60c21b81525081526020016040518060400160405280600d81526020016c426c61636b202620776869746560981b81525081525090506000604051806102000160405280604051806040016040528060068152602001655175696c747960d01b81525081526020016040518060400160405280600a81526020016915d85d195c999c9bdb9d60b21b815250815260200160405180604001604052806004815260200163466c6f7760e01b81525081526020016040518060400160405280600681526020016510995b99d85b60d21b81525081526020016040518060400160405280600781526020016653756e6265616d60c81b81525081526020016040518060400160405280600681526020016553706972657360d01b8152508152602001604051806040016040528060088152602001672234bb34b9b4b7b760c11b81525081526020016040518060400160405280600e81526020016d4372617368696e6720776176657360901b81525081526020016040518060400160405280600b81526020016a457175696c69627269756d60a81b815250815260200160405180604001604052806009815260200168496368696d6174737560b81b815250815260200160405180604001604052806009815260200168486967686c616e647360b81b8152508152602001604051806040016040528060098152602001682637b39031b0b134b760b91b81525081526020016040518060400160405280600481526020016326b0b4bd60e11b81525081526020016040518060400160405280600c81526020016b466c79696e6720676565736560a01b815250815260200160405180604001604052806008815260200167141a5b9dda19595b60c21b8152508152602001604051806040016040528060068152602001654b617761696960d01b81525081525090506000604051806080016040528060405180604001604052806005815260200164447573747960d81b815250815260200160405180604001604052806005815260200164466c61677360d81b815250815260200160405180604001604052806008815260200167456c65637472696360c01b81525081526020016040518060400160405280600681526020016547726f6f767960d01b81525081525090506000604051806080016040528060405180604001604052806006815260200165536572656e6560d01b81525081526020016040518060400160405280600481526020016343616c6d60e01b815250815260200160405180604001604052806005815260200164576176657960d81b8152508152602001604051806040016040528060078152602001664368616f74696360c81b8152508152509050606060005b87610120015181101561154f5760005b88610140015181101561153c5782868a60000151846005811061145657634e487b7160e01b600052603260045260246000fd5b6020020151836005811061147a57634e487b7160e01b600052603260045260246000fd5b60200201516010811061149d57634e487b7160e01b600052603260045260246000fd5b602002015160018b61012001516114b4919061330f565b841480156114d2575060018b61014001516114cf919061330f565b83145b6114f557604051806040016040528060018152602001600b60fa1b815250611506565b604051806020016040528060008152505b60405160200161151893929190612b9d565b604051602081830303815290604052925080806115349061338d565b915050611423565b50806115478161338d565b915050611413565b50600083886101a001516004811061157757634e487b7160e01b600052603260045260246000fd5b60200201518861024001516115a657604051806040016040528060028152602001614e6f60f01b8152506115c3565b6040518060400160405280600381526020016259657360e81b8152505b878a6101800151600a81106115e857634e487b7160e01b600052603260045260246000fd5b6020020151888b6101c00151600a811061161257634e487b7160e01b600052603260045260246000fd5b6020020151858c610200015161164257604051806040016040528060028152602001614e6f60f01b81525061165f565b6040518060400160405280600381526020016259657360e81b8152505b6116788e61014001518f6101200151610e5391906132f0565b60405160200161168e9796959493929190612ee8565b6040516020818303038152906040529050806116ae896101200151611e85565b6116bc8a6101400151611e85565b8560018c6101e001516116cf919061330f565b600481106116ed57634e487b7160e01b600052603260045260246000fd5b60200201518b610220015161171c57604051806040016040528060028152602001614e6f60f01b815250611739565b6040518060400160405280600381526020016259657360e81b8152505b6117478d6101600151611e85565b60405160200161175c96959493929190612bf8565b604051602081830303815290604052905060006117ab61177b8c611e85565b836117858b611f9f565b60405160200161179793929190612d69565b604051602081830303815290604052611f9f565b90506000816040516020016117c09190612ea3565b60408051601f198184030181529190529c9b505050505050505050505050565b600b546001600160a01b0316331461180a5760405162461bcd60e51b815260040161069890613198565b6001600160a01b03811661186f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610698565b61094681611e00565b60006001600160e01b031982166380ac58cd60e01b14806118a957506001600160e01b03198216635b5e139f60e01b145b8061058b57506301ffc9a760e01b6001600160e01b031983161461058b565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906118fd82610a05565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166119af5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610698565b60006119ba83610a05565b9050806001600160a01b0316846001600160a01b031614806119f55750836001600160a01b03166119ea84610623565b6001600160a01b0316145b80611a2557506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611a4082610a05565b6001600160a01b031614611aa85760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610698565b6001600160a01b038216611b0a5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610698565b611b15838383612113565b611b206000826118c8565b6001600160a01b0383166000908152600360205260408120805460019290611b4990849061330f565b90915550506001600160a01b0382166000908152600360205260408120805460019290611b779084906132c4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b610fa0611be460085490565b10611c255760405162461bcd60e51b8152602060048201526011602482015270105b1b081c5d5a5b1d1cc81b5a5b9d1959607a1b6044820152606401610698565b610fa081611c3260085490565b611c3c91906132c4565b1115611c8a5760405162461bcd60e51b815260206004820152601a60248201527f4d696e74696e672065786365656473206d617820737570706c790000000000006044820152606401610698565b600a811115611ccf5760405162461bcd60e51b81526020600482015260116024820152704d696e74206665776572207175696c747360781b6044820152606401610698565b60008111611d1f5760405162461bcd60e51b815260206004820152601a60248201527f4d757374206d696e74206174206c656173742031207175696c740000000000006044820152606401610698565b336000908152600e6020526040902054601490611d3d9083906132c4565b1115611d825760405162461bcd60e51b8152602060048201526014602482015273115e18d959591cc81dd85b1b195d081b1a5b5a5d60621b6044820152606401610698565b60005b81811015611dfc576000600c546001611d9e91906132c4565b9050611daa33826121cb565b6001600c6000828254611dbd91906132c4565b9091555050336000908152600e60205260408120805460019290611de29084906132c4565b90915550829150611df490508161338d565b915050611d85565b5050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611e5d848484611a2d565b611e69848484846121e5565b610dc75760405162461bcd60e51b815260040161069890613146565b606081611ea95750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611ed35780611ebd8161338d565b9150611ecc9050600a836132dc565b9150611ead565b60008167ffffffffffffffff811115611efc57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611f26576020820181803683370190505b5090505b8415611a2557611f3b60018361330f565b9150611f48600a866133a8565b611f539060306132c4565b60f81b818381518110611f7657634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611f98600a866132dc565b9450611f2a565b805160609080611fbf575050604080516020810190915260008152919050565b60006003611fce8360026132c4565b611fd891906132dc565b611fe39060046132f0565b90506000611ff28260206132c4565b67ffffffffffffffff81111561201857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612042576020820181803683370190505b5090506000604051806060016040528060408152602001613423604091399050600181016020830160005b868110156120ce576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b83526004909201910161206d565b5060038606600181146120e857600281146120f957612105565b613d3d60f01b600119830152612105565b603d60f81b6000198301525b505050918152949350505050565b6001600160a01b03831661216e5761216981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612191565b816001600160a01b0316836001600160a01b0316146121915761219183826122f2565b6001600160a01b0382166121a8576107ce8161238f565b826001600160a01b0316826001600160a01b0316146107ce576107ce8282612468565b611dfc8282604051806020016040528060008152506124ac565b60006001600160a01b0384163b156122e757604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906122299033908990889088906004016130f6565b602060405180830381600087803b15801561224357600080fd5b505af1925050508015612273575060408051601f3d908101601f19168201909252612270918101906129d2565b60015b6122cd573d8080156122a1576040519150601f19603f3d011682016040523d82523d6000602084013e6122a6565b606091505b5080516122c55760405162461bcd60e51b815260040161069890613146565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611a25565b506001949350505050565b600060016122ff84610a7c565b612309919061330f565b60008381526007602052604090205490915080821461235c576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906123a19060019061330f565b600083815260096020526040812054600880549394509092849081106123d757634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061240657634e487b7160e01b600052603260045260246000fd5b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061244c57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b600061247383610a7c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6124b683836124df565b6124c360008484846121e5565b6107ce5760405162461bcd60e51b815260040161069890613146565b6001600160a01b0382166125355760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610698565b6000818152600260205260409020546001600160a01b03161561259a5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610698565b6125a660008383612113565b6001600160a01b03821660009081526003602052604081208054600192906125cf9084906132c4565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6040518061026001604052806126416126cb565b81526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581526020016000151581525090565b6040518060a001604052806005905b6126e26126f8565b8152602001906001900390816126da5790505090565b6040518060a001604052806005906020820280368337509192915050565b80356001600160a01b038116811461272d57600080fd5b919050565b6000601f8381840112612743578182fd5b61274b613248565b8084866103208701111561275d578485fd5b845b600580821061276e57506127cc565b888684011261277b578687fd5b612783613248565b808460a086018c811115612795578a8bfd5b8a5b858110156127b5578251855260209485019490920191600101612797565b50918852506020909601959350505060010161275f565b50909695505050505050565b805161272d816133fe565b600082601f8301126127f3578081fd5b81516128066128018261329c565b61326b565b81815284602083860101111561281a578283fd5b611a25826020830160208701613326565b60006020828403121561283c578081fd5b61284582612716565b9392505050565b6000806040838503121561285e578081fd5b61286783612716565b915061287560208401612716565b90509250929050565b600080600060608486031215612892578081fd5b61289b84612716565b92506128a960208501612716565b9150604084013590509250925092565b600080600080608085870312156128ce578081fd5b6128d785612716565b93506128e560208601612716565b925060408501359150606085013567ffffffffffffffff811115612907578182fd5b8501601f81018713612917578182fd5b80356129256128018261329c565b818152886020838501011115612939578384fd5b81602084016020830137908101602001929092525092959194509250565b60008060408385031215612969578182fd5b61297283612716565b91506020830135612982816133fe565b809150509250929050565b6000806040838503121561299f578182fd5b6129a883612716565b946020939093013593505050565b6000602082840312156129c7578081fd5b81356128458161340c565b6000602082840312156129e3578081fd5b81516128458161340c565b600080828403610580811215612a02578283fd5b61056080821215612a11578384fd5b612a1961321e565b9150612a258686612732565b825261032085015160208301526103408501516040830152610360850151606083015261038085015160808301526103a085015160a08301526103c085015160c08301526103e085015160e08301526104008501516101008301526104208501516101208301526104408501516101408301526104608501516101608301526104808501516101808301526104a08501516101a08301526104c08501516101c08301526104e08501516101e0830152612ae161050086016127d8565b610200830152612af461052086016127d8565b610220830152612b0761054086016127d8565b61024083015284015190925067ffffffffffffffff811115612b27578182fd5b612b33858286016127e3565b9150509250929050565b600060208284031215612b4e578081fd5b5035919050565b60008151808452612b6d816020860160208601613326565b601f01601f19169290920160200192915050565b60008151612b93818560208601613326565b9290920192915050565b60008451612baf818460208901613326565b601160f91b9083018181528551909190612bd0816001850160208a01613326565b60019201918201528351612beb816002840160208801613326565b0160020195945050505050565b60008751612c0a818460208c01613326565b80830190507f7d2c7b2274726169745f74797065223a2241737065637420726174696f222c228152673b30b63ab2911d1160c11b60208201528751612c56816028840160208c01613326565b601d60f91b602892909101918201528651612c78816029840160208b01613326565b7f227d2c7b2274726169745f74797065223a2243616c6d6e657373222c2276616c60299290910191820152643ab2911d1160d91b60498201528551612cc481604e840160208a01613326565b7f227d2c7b2274726169745f74797065223a22486f76657273222c2276616c7565604e929091019182015262111d1160e91b606e820152612d5c612d4e612d48612d116071850189612b81565b7f227d2c7b2274726169745f74797065223a22526f756e646e657373222c227661815264363ab2911d60d91b602082015260250190565b86612b81565b617d5d60f01b815260020190565b9998505050505050505050565b6f7b226e616d65223a225175696c74202360801b81528351600090612d95816010850160208901613326565b7f222c226465736372697074696f6e223a2247656e6572617469766520636f7a796010918401918201527f207175696c7473207374697463686564206f6e2d636861696e20616e6420737460308201527f6f726564206f6e2074686520457468657265756d206e6574776f726b2c20666f6050820152743932bb32b91711161130ba3a3934b13aba32b9911d60591b60708201528451612e3c816085840160208901613326565b7f2c22696d616765223a22646174613a696d6167652f7376672b786d6c3b6261736085929091019182015263194d8d0b60e21b60a58201528351612e878160a9840160208801613326565b61227d60f01b60a9929091019182015260ab0195945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251612edb81601d850160208701613326565b91909101601d0192915050565b7f5b7b2274726169745f74797065223a224261636b67726f756e64222c2276616c8152643ab2911d1160d91b602082015260008851612f2e816025850160208d01613326565b7f227d2c7b2274726169745f74797065223a22416e696d61746564206261636b676025918401918201526f3937bab7321116113b30b63ab2911d1160811b60458201528851612f84816055840160208d01613326565b7f227d2c7b2274726169745f74797065223a225468656d65222c2276616c75652260559290910191820152611d1160f11b60758201528751612fcd816077840160208c01613326565b6130e7612d486130ae6130a861306c61306661303061302a6077898b01017f227d2c7b2274726169745f74797065223a224261636b67726f756e642074686581526c36b29116113b30b63ab2911d1160991b6020820152602d0190565b8f612b81565b7f227d2c7b2274726169745f74797065223a2250617463686573222c2276616c7581526365223a5b60e01b602082015260240190565b8c612b81565b7f5d7d2c7b2274726169745f74797065223a225370656369616c2070617463682281526916113b30b63ab2911d1160b11b6020820152602a0190565b89612b81565b7f227d2c7b2274726169745f74797065223a22506174636820636f756e74222c228152663b30b63ab2911d60c91b602082015260270190565b9b9a5050505050505050505050565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061312990830184612b55565b9695505050505050565b6020815260006128456020830184612b55565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051610260810167ffffffffffffffff81118282101715613242576132426133e8565b60405290565b60405160a0810167ffffffffffffffff81118282101715613242576132426133e8565b604051601f8201601f1916810167ffffffffffffffff81118282101715613294576132946133e8565b604052919050565b600067ffffffffffffffff8211156132b6576132b66133e8565b50601f01601f191660200190565b600082198211156132d7576132d76133bc565b500190565b6000826132eb576132eb6133d2565b500490565b600081600019048311821515161561330a5761330a6133bc565b500290565b600082821015613321576133216133bc565b500390565b60005b83811015613341578181015183820152602001613329565b83811115610dc75750506000910152565b600181811c9082168061336657607f821691505b6020821081141561338757634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156133a1576133a16133bc565b5060010190565b6000826133b7576133b76133d2565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b801515811461094657600080fd5b6001600160e01b03198116811461094657600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212206a09ef5bf5d850c9ac14f21848c441e1c703d4c3edd133871450b9dd1b8e14bd64736f6c63430008040033
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.