Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
3,333 ClayNFT
Holders
1,937
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
0 ClayNFTLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
ClayNFT
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "./ERC721A.sol"; import "./extensions/ERC721AOwnersExplicit.sol"; /** ___ ___ /\__\ /\ \ /:/ / /::\ \ ___ /:/ / /:/\:\ \ /| | /:/ / ___ ___ ___ /:/ /::\ \ |:| | /:/__/ /\__\ /\ \ /\__\ /:/_/:/\:\__\ |:| | \:\ \ /:/ / \:\ \ /:/ / \:\/:/ \/__/ __|:|__| \:\ /:/ / \:\ /:/ / \::/__/ /::::\ \ \:\/:/ / \:\/:/ / \:\ \ ~~~~\:\ \ \::/ / \::/ / \:\__\ \:\__\ \/__/ \/__/ \/__/ \/__/ By Kai from nanoverseHQ Parts borrowed/inspired by: MouseDev https://etherscan.io/address/0xbad6186E92002E312078b5a1dAfd5ddf63d3f731#code 0xinuarashi https://etherscan.io/address/0x4956013f250758B73c3BBa4bC6539db7a0AD6B66#code */ interface IClayTraitModifier { function renderAttributes(uint256 _t) external view returns (string memory); } contract ClayNFT is Ownable, ERC721A, ERC721AOwnersExplicit, ReentrancyGuard { using ECDSA for bytes32; uint256 public immutable maxSupply = 3333; uint256 public wlPrice = 0.1 ether; uint256 public publicPrice = 0.15 ether; enum SalePhase { Locked, PreSale, PreSaleAndFreeMint, PublicSale } SalePhase public phase = SalePhase.Locked; address private wlMintSigner; address private freeMintSigner; string public baseHTML; string public placeholderHTML; string public endHTML; string public overrideAnimationUrl; string public overrideImageUrl; bool public usePlaceholder = true; uint256 public metadataSeed; address public traitModifierContract; struct Trait { string traitName; string traitType; } //Mappings mapping(uint256 => Trait[]) public traitTypes; mapping(address => uint256) private wlMintAlreadyMint; mapping(address => uint256) private freeMintAlreadyMint; //uint arrays uint16[][6] TIERS; constructor() ERC721A("ClayNFT", "ClayNFT") { //Base TIERS[0] = [4000, 3000, 2000, 1000]; //Ore TIERS[1] = [5000, 1500, 1500, 750, 750, 200, 200, 90, 10]; //HasEyes TIERS[2] = [8000, 2000]; //HasMouth TIERS[3] = [9000, 1000]; //BgColor TIERS[4] = [2000, 2000, 1500, 1500, 1500, 1500]; //LargeOre TIERS[5] = [7500, 2500]; } /*** * _______ __ __ _______ _______ __ __ _______ ___ ___ * | || | | || || | | | | || || | | | * |_ _|| |_| || _ || ___| | | | ||_ _|| | | | * | | | || |_| || |___ | |_| | | | | | | | * | | |_ _|| ___|| ___| | | | | | | | |___ * | | | | | | | |___ | | | | | | | | * |___| |___| |___| |_______| |_______| |___| |___| |_______| */ // Base64 Encoder string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function encodeBase64(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ""; string memory table = TABLE; uint256 encodedLen = 4 * ((data.length + 2) / 3); string memory result = new string(encodedLen + 32); assembly { mstore(result, encodedLen) let tablePtr := add(table, 1) let dataPtr := data let endPtr := add(dataPtr, mload(data)) let resultPtr := add(result, 32) for { } lt(dataPtr, endPtr) { } { dataPtr := add(dataPtr, 3) let input := mload(dataPtr) mstore( resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F)))) ) resultPtr := add(resultPtr, 1) mstore( resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F)))) ) resultPtr := add(resultPtr, 1) mstore( resultPtr, shl(248, mload(add(tablePtr, and(shr(6, input), 0x3F)))) ) resultPtr := add(resultPtr, 1) mstore( resultPtr, shl(248, mload(add(tablePtr, and(input, 0x3F)))) ) resultPtr := add(resultPtr, 1) } switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } function toString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } function parseInt(string memory _a) internal pure returns (uint8 _parsedInt) { bytes memory bresult = bytes(_a); uint8 mint = 0; for (uint8 i = 0; i < bresult.length; i++) { if ( (uint8(uint8(bresult[i])) >= 48) && (uint8(uint8(bresult[i])) <= 57) ) { mint *= 10; mint += uint8(bresult[i]) - 48; } } return mint; } function substring( string memory str, uint256 startIndex, uint256 endIndex ) internal pure returns (string memory) { bytes memory strBytes = bytes(str); bytes memory result = new bytes(endIndex - startIndex); for (uint256 i = startIndex; i < endIndex; i++) { result[i - startIndex] = strBytes[i]; } return string(result); } function isNotEmpty(string memory str) internal pure returns (bool) { return bytes(str).length > 0; } /*** * __ __ _______ _______ _______ ______ _______ _______ _______ * | |_| || || || _ || | | _ || || _ | * | || ___||_ _|| |_| || _ || |_| ||_ _|| |_| | * | || |___ | | | || | | || | | | | | * | || ___| | | | || |_| || | | | | | * | ||_|| || |___ | | | _ || || _ | | | | _ | * |_| |_||_______| |___| |__| |__||______| |__| |__| |___| |__| |__| */ function generateMetadataHash(uint256 _t, uint256 _c) internal view returns (string memory) { string memory currentHash = ""; for (uint8 i = 0; i < 6; i++) { uint16 _randinput = uint16( uint256(keccak256(abi.encodePacked(_t, _c))) % 10000 ); currentHash = string( abi.encodePacked(currentHash, rarityGen(_randinput, i)) ); } return currentHash; } function rarityGen(uint256 _randinput, uint8 _rarityTier) internal view returns (string memory) { uint16 currentLowerBound = 0; for (uint8 i = 0; i < TIERS[_rarityTier].length; i++) { uint16 thisPercentage = TIERS[_rarityTier][i]; if ( _randinput >= currentLowerBound && _randinput < currentLowerBound + thisPercentage ) return toString(i); currentLowerBound = currentLowerBound + thisPercentage; } revert(); } function renderAttributesFromHash(string memory _hash, uint256 _t) public view returns (string memory) { require(_t < totalSupply(), 'Token does not exist'); if(usePlaceholder) { return '[]'; } // Allows upgrade to trait metadata in later phases if(traitModifierContract != address(0)) { IClayTraitModifier c = IClayTraitModifier(traitModifierContract); return c.renderAttributes(_t); } uint256 seed = uint256(keccak256(abi.encodePacked(_t, metadataSeed))) % 100000; string memory metadataString; for (uint8 i = 0; i < 6; i++) { uint8 thisTraitIndex = parseInt(substring(_hash, i, i + 1)); metadataString = string( abi.encodePacked( metadataString, '{"trait_type":"', traitTypes[i][thisTraitIndex].traitType, '","value":"', traitTypes[i][thisTraitIndex].traitName, '"}' ) ); metadataString = string(abi.encodePacked(metadataString, ",")); } metadataString = string( abi.encodePacked( metadataString, '{"trait_type":"Seed","value":"', toString(seed), '"}' ) ); return string(abi.encodePacked("[", metadataString, "]")); } function renderAttributes(uint256 _t) public view returns (string memory) { string memory _hash = generateMetadataHash(_t, metadataSeed); return renderAttributesFromHash(_hash, _t); } string svgPrefix = 'data:image/svg+xml;base64,'; function renderSVGFromHash(string memory _hash) public view returns (string memory) { uint8 baseTraitIndex = parseInt(substring(_hash, 0, 1)); uint8 oreTraitIndex = parseInt(substring(_hash, 1, 2)); uint8 largeOreTraitIndex = parseInt(substring(_hash, 5, 6)); string[4] memory baseColors = [ "rgb(130,101,82)", "rgb(77,83,87)", "rgb(121,126,139)", "black" ]; string memory baseColor = baseColors[baseTraitIndex]; string[9] memory oreColors = [ baseColor, "rgb(70.9,195.5,82.8)", "rgb(181,129,68)", "rgb(170,218,170)", "rgb(195,155,65)", "rgb(255,0,30)", "rgb(39,100,255)", "rgb(148,42,235)", "white" ]; string memory oreColor = oreColors[oreTraitIndex]; string[2] memory oreSize = [ '<path d="M196.947 188.849l28.058-28.744 11.648 1.592-37.16 38.578z" fill="', '<path d="M197.01 188.792l28.057-28.743 23.784 3.167-47.196 47.095z" fill="' ]; bytes memory baseElement = abi.encodePacked( '<path d="M322.654 173.053L189.77 155.342l26.702 123.092-101.336 45.107 265.728 21.117-86.728-62.137z" fill="', baseColor, '"/>'); bytes memory oreElement = abi.encodePacked( oreSize[largeOreTraitIndex], oreColor, '"/>'); bytes memory svgString = abi.encodePacked( '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" width="500" height="500"><text font-family="sans-serif" font-size="56" font-weight="200" letter-spacing="-1.12" transform="translate(398.63 455.71)"><tspan x="-84.04" y="18.06">C</tspan><tspan x="-46.52" y="18.06">L</tspan><tspan x="-14.21" y="18.06">A</tspan><tspan x="19.9" y="18.06">Y</tspan><tspan x="55.29" y="18.06">_</tspan></text><text font-family="sans-serif" font-size="15" font-weight="300" transform="translate(248 19)"><tspan x="-66.87" y="2.28">Open to see 3D view</tspan></text>', usePlaceholder ? bytes('') : baseElement, usePlaceholder ? bytes('') : oreElement, '</svg>' ); return string(abi.encodePacked(svgPrefix, encodeBase64(svgString))); } function renderSVG(uint256 tokenId) public view returns (string memory) { string memory _hash = generateMetadataHash(tokenId, metadataSeed); return renderSVGFromHash(_hash); } string htmlPrefix = "data:text/html;base64,"; function getOnChainAnimationURIFromHash(string memory _hash, uint256 tokenId) public view virtual returns (string memory) { if (usePlaceholder) { return string( abi.encodePacked( htmlPrefix, encodeBase64(bytes(placeholderHTML)) ) ); } return string( abi.encodePacked( htmlPrefix, encodeBase64(bytes(abi.encodePacked( baseHTML, renderAttributesFromHash(_hash, tokenId), endHTML))) ) ); } function getOnChainAnimationURI(uint256 tokenId) public view virtual returns (string memory) { string memory _hash = generateMetadataHash(tokenId, metadataSeed); return getOnChainAnimationURIFromHash(_hash, tokenId); } string public constant _metaHeader = "data:application/json;base64,"; function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { string memory _hash = generateMetadataHash(tokenId, metadataSeed); string memory _metadata = string( abi.encodePacked( '{"name":"', abi.encodePacked("CLAY #", toString(tokenId)), '", "description":"CLAY is a fully on-chain 3D generative art project. The code is the art, the art is the code.", "image": "' ) ); _metadata = string( abi.encodePacked( _metadata, isNotEmpty(overrideImageUrl) ? string(abi.encodePacked(overrideImageUrl, tokenId)) : renderSVGFromHash(_hash), '","attributes": ' ) ); _metadata = string( abi.encodePacked(_metadata, renderAttributesFromHash(_hash, tokenId)) ); _metadata = string( abi.encodePacked( _metadata, ', "animation_url":"', isNotEmpty(overrideAnimationUrl) ? string(abi.encodePacked(overrideAnimationUrl, tokenId)) : getOnChainAnimationURIFromHash(_hash, tokenId), '"}' ) ); return string( abi.encodePacked(_metaHeader, encodeBase64(bytes(_metadata))) ); } /*** * _______ _ _ __ _ _______ ______ * | || | _ | || | | || || _ | * | _ || || || || |_| || ___|| | || * | | | || || || |___ | |_||_ * | |_| || || _ || ___|| __ | * | || _ || | | || |___ | | | | * |_______||__| |__||_| |__||_______||___| |_| */ function devMint(uint256 quantity) external onlyOwner { require(totalSupply() + quantity <= maxSupply, "reached max supply"); // It's dev mint so I don't care about gas for (uint256 i = 0; i < quantity; i++) { _safeMint(msg.sender, 1); } } //set signers function setSigners(address _wlMintSigner, address _freeMintSigner) external onlyOwner { wlMintSigner = _wlMintSigner; freeMintSigner = _freeMintSigner; } function setTraitModifierContract(address _traitModifierContract) public onlyOwner { traitModifierContract = _traitModifierContract; } function setBaseHTML(string calldata _baseHTML) public onlyOwner { baseHTML = _baseHTML; } function setEndHTML(string calldata _endHTML) public onlyOwner { endHTML = _endHTML; } function setPlaceholderHTML(string calldata _placeholderHTML) public onlyOwner { placeholderHTML = _placeholderHTML; } function setUsePlaceholder(bool _usePlaceholder) public onlyOwner { usePlaceholder = _usePlaceholder; } function setMetadataSeed(uint256 _metadataSeed) public onlyOwner { metadataSeed = _metadataSeed; } function setOverrideAnimationUrl(string calldata _overrideAnimationUrl) public onlyOwner { overrideAnimationUrl = _overrideAnimationUrl; } function setOverrideImageUrl(string calldata _overrideImageUrl) public onlyOwner { overrideImageUrl = _overrideImageUrl; } function setMintPhase(SalePhase phase_) external onlyOwner { phase = phase_; } function clearTraits() public onlyOwner { for (uint256 i = 0; i < 6; i++) { delete traitTypes[i]; } } function addTraitType(uint256 _traitTypeIndex, Trait[] memory traits) public onlyOwner { for (uint256 i = 0; i < traits.length; i++) { traitTypes[_traitTypeIndex].push( Trait(traits[i].traitName, traits[i].traitType) ); } return; } function withdraw() public onlyOwner { uint256 balance = address(this).balance; payable(msg.sender).transfer(balance); } /*** * __ __ ___ __ _ _______ ___ __ _ _______ * | |_| || | | | | || || | | | | || | * | || | | |_| ||_ _|| | | |_| || ___| * | || | | | | | | | | || | __ * | || | | _ | | | | | | _ || || | * | ||_|| || | | | | | | | | | | | | || |_| | * |_| |_||___| |_| |__| |___| |___| |_| |__||_______| */ function publicSaleMint() external payable callerIsUser { require( phase == SalePhase.PublicSale, "Public sale minting is not active" ); require( 1 + totalSupply() <= maxSupply, "Purchase would exceed max tokens" ); require( publicPrice <= msg.value, "Amount sent is insufficient" ); _safeMint(msg.sender, 1); } function wlMint(bytes calldata signature) external payable callerIsUser { require(phase == SalePhase.PreSale || phase == SalePhase.PreSaleAndFreeMint, "Presale minting not active"); require( 1 + totalSupply() <= maxSupply, "Purchase would exceed max tokens" ); require(wlPrice <= msg.value, "Amount sent is insufficient"); require( wlMintSigner == keccak256( abi.encodePacked( "\x19Ethereum Signed Message:\n32", bytes32(uint256(uint160(msg.sender))) ) ).recover(signature), "Signer address mismatch." ); require(wlMintAlreadyMint[msg.sender] == 0, "Already minted"); wlMintAlreadyMint[msg.sender] = 1; _safeMint(msg.sender, 1); } function freeMint(bytes calldata signature) external payable { require(phase == SalePhase.PreSaleAndFreeMint, "Free mint not active"); require( 1 + totalSupply() <= maxSupply, "Purchase would exceed max tokens" ); require( freeMintSigner == keccak256( abi.encodePacked( "\x19Ethereum Signed Message:\n32", bytes32(uint256(uint160(msg.sender))) ) ).recover(signature), "Signer address mismatch." ); require(freeMintAlreadyMint[msg.sender] == 0, "Already minted"); _safeMint(msg.sender, 1); freeMintAlreadyMint[msg.sender] = 1; } /*** * __ __ ___ _______ _______ * | |_| || | | || | * | || | | _____|| | * | || | | |_____ | | * | || | |_____ || _| * | ||_|| || | _____| || |_ * |_| |_||___| |_______||_______| */ function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant { _setOwnersExplicit(quantity); } function getOwnershipData(uint256 tokenId) external view returns (TokenOwnership memory) { return ownershipOf(tokenId); } function tokensOfOwner( address _owner, uint256 startId, uint256 endId ) external view returns (uint256[] memory) { uint256 tokenCount = balanceOf(_owner); if (tokenCount == 0) { return new uint256[](0); } else { uint256[] memory result = new uint256[](tokenCount); uint256 index = 0; for (uint256 tokenId = startId; tokenId < endId; tokenId++) { if (index == tokenCount) break; if (ownerOf(tokenId) == _owner) { result[index] = tokenId; index++; } } return result; } } modifier callerIsUser() { require(tx.origin == msg.sender, "The caller is another contract"); _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '@openzeppelin/contracts/token/ERC721/IERC721.sol'; import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol'; import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Context.sol'; import '@openzeppelin/contracts/utils/Strings.sol'; import '@openzeppelin/contracts/utils/introspection/ERC165.sol'; error ApprovalCallerNotOwnerNorApproved(); error ApprovalQueryForNonexistentToken(); error ApproveToCaller(); error ApprovalToCurrentOwner(); error BalanceQueryForZeroAddress(); error MintedQueryForZeroAddress(); error BurnedQueryForZeroAddress(); error MintToZeroAddress(); error MintZeroQuantity(); error OwnerIndexOutOfBounds(); error OwnerQueryForNonexistentToken(); error TokenIndexOutOfBounds(); error TransferCallerNotOwnerNorApproved(); error TransferFromIncorrectOwner(); error TransferToNonERC721ReceiverImplementer(); error TransferToZeroAddress(); error URIQueryForNonexistentToken(); /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata and Enumerable extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at 0 (e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Compiler will pack this into a single 256bit word. struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } // Compiler will pack this into a single 256bit word. struct AddressData { // Realistically, 2**64-1 is more than enough. uint64 balance; // Keeps track of mint count with minimal overhead for tokenomics. uint64 numberMinted; // Keeps track of burn count with minimal overhead for tokenomics. uint64 numberBurned; } // The tokenId of the next token to be minted. uint256 internal _currentIndex; // The number of tokens burned. uint256 internal _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. See ownershipOf implementation for details. mapping(uint256 => TokenOwnership) internal _ownerships; // Mapping owner address to address data mapping(address => AddressData) private _addressData; // 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; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than _currentIndex times unchecked { return _currentIndex - _burnCounter; } } /** * @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 override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return uint256(_addressData[owner].balance); } function _numberMinted(address owner) internal view returns (uint256) { if (owner == address(0)) revert MintedQueryForZeroAddress(); return uint256(_addressData[owner].numberMinted); } function _numberBurned(address owner) internal view returns (uint256) { if (owner == address(0)) revert BurnedQueryForZeroAddress(); return uint256(_addressData[owner].numberBurned); } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { uint256 curr = tokenId; unchecked { if (curr < _currentIndex) { TokenOwnership memory ownership = _ownerships[curr]; if (!ownership.burned) { if (ownership.addr != address(0)) { return ownership; } // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. while (true) { curr--; ownership = _ownerships[curr]; if (ownership.addr != address(0)) { return ownership; } } } } } revert OwnerQueryForNonexistentToken(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return ownershipOf(tokenId).addr; } /** * @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) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); 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 override { address owner = ERC721A.ownerOf(tokenId); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSender() != owner && !isApprovedForAll(owner, _msgSender())) { revert ApprovalCallerNotOwnerNorApproved(); } _approve(to, tokenId, owner); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public override { if (operator == _msgSender()) revert ApproveToCaller(); _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 { _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 { _transfer(from, to, tokenId); if (!_checkOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @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`), */ function _exists(uint256 tokenId) internal view returns (bool) { return tokenId < _currentIndex && !_ownerships[tokenId].burned; } function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { _mint(to, quantity, _data, true); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint( address to, uint256 quantity, bytes memory _data, bool safe ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { _addressData[to].balance += uint64(quantity); _addressData[to].numberMinted += uint64(quantity); _ownerships[startTokenId].addr = to; _ownerships[startTokenId].startTimestamp = uint64(block.timestamp); uint256 updatedIndex = startTokenId; for (uint256 i; i < quantity; i++) { emit Transfer(address(0), to, updatedIndex); if (safe && !_checkOnERC721Received(address(0), to, updatedIndex, _data)) { revert TransferToNonERC721ReceiverImplementer(); } updatedIndex++; } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) private { TokenOwnership memory prevOwnership = ownershipOf(tokenId); bool isApprovedOrOwner = (_msgSender() == prevOwnership.addr || isApprovedForAll(prevOwnership.addr, _msgSender()) || getApproved(tokenId) == _msgSender()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (prevOwnership.addr != from) revert TransferFromIncorrectOwner(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[from].balance -= 1; _addressData[to].balance += 1; _ownerships[tokenId].addr = to; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); // If the ownership slot of tokenId+1 is not explicitly set, that means the transfer initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @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 { TokenOwnership memory prevOwnership = ownershipOf(tokenId); _beforeTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Clear approvals from the previous owner _approve(address(0), tokenId, prevOwnership.addr); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { _addressData[prevOwnership.addr].balance -= 1; _addressData[prevOwnership.addr].numberBurned += 1; // Keep track of who burned the token, and the timestamp of burning. _ownerships[tokenId].addr = prevOwnership.addr; _ownerships[tokenId].startTimestamp = uint64(block.timestamp); _ownerships[tokenId].burned = true; // If the ownership slot of tokenId+1 is not explicitly set, that means the burn initiator owns it. // Set the slot of tokenId+1 explicitly in storage to maintain correctness for ownerOf(tokenId+1) calls. uint256 nextTokenId = tokenId + 1; if (_ownerships[nextTokenId].addr == address(0)) { // This will suffice for checking _exists(nextTokenId), // as a burned slot cannot contain the zero address. if (nextTokenId < _currentIndex) { _ownerships[nextTokenId].addr = prevOwnership.addr; _ownerships[nextTokenId].startTimestamp = prevOwnership.startTimestamp; } } } emit Transfer(prevOwnership.addr, address(0), tokenId); _afterTokenTransfers(prevOwnership.addr, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve( address to, uint256 tokenId, address owner ) private { _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * 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, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} }
// SPDX-License-Identifier: MIT // Creator: Chiru Labs pragma solidity ^0.8.4; import '../ERC721A.sol'; error AllOwnershipsHaveBeenSet(); error QuantityMustBeNonZero(); error NoTokensMintedYet(); abstract contract ERC721AOwnersExplicit is ERC721A { uint256 public nextOwnerToExplicitlySet; /** * @dev Explicitly set `owners` to eliminate loops in future calls of ownerOf(). */ function _setOwnersExplicit(uint256 quantity) internal { if (quantity == 0) revert QuantityMustBeNonZero(); if (_currentIndex == 0) revert NoTokensMintedYet(); uint256 _nextOwnerToExplicitlySet = nextOwnerToExplicitlySet; if (_nextOwnerToExplicitlySet >= _currentIndex) revert AllOwnershipsHaveBeenSet(); // Index underflow is impossible. // Counter or index overflow is incredibly unrealistic. unchecked { uint256 endIndex = _nextOwnerToExplicitlySet + quantity - 1; // Set the end index to be the last token index if (endIndex + 1 > _currentIndex) { endIndex = _currentIndex - 1; } for (uint256 i = _nextOwnerToExplicitlySet; i <= endIndex; i++) { if (_ownerships[i].addr == address(0) && !_ownerships[i].burned) { TokenOwnership memory ownership = ownershipOf(i); _ownerships[i].addr = ownership.addr; _ownerships[i].startTimestamp = ownership.startTimestamp; } } nextOwnerToExplicitlySet = endIndex + 1; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AllOwnershipsHaveBeenSet","type":"error"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NoTokensMintedYet","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"QuantityMustBeNonZero","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"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":"_metaHeader","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_traitTypeIndex","type":"uint256"},{"components":[{"internalType":"string","name":"traitName","type":"string"},{"internalType":"string","name":"traitType","type":"string"}],"internalType":"struct ClayNFT.Trait[]","name":"traits","type":"tuple[]"}],"name":"addTraitType","outputs":[],"stateMutability":"nonpayable","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":[],"name":"baseHTML","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"clearTraits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"devMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"endHTML","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"freeMint","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getOnChainAnimationURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_hash","type":"string"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getOnChainAnimationURIFromHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getOwnershipData","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"bool","name":"burned","type":"bool"}],"internalType":"struct ERC721A.TokenOwnership","name":"","type":"tuple"}],"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":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metadataSeed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextOwnerToExplicitlySet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"overrideAnimationUrl","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"overrideImageUrl","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":"phase","outputs":[{"internalType":"enum ClayNFT.SalePhase","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"placeholderHTML","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_t","type":"uint256"}],"name":"renderAttributes","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_hash","type":"string"},{"internalType":"uint256","name":"_t","type":"uint256"}],"name":"renderAttributesFromHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"renderSVG","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_hash","type":"string"}],"name":"renderSVGFromHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseHTML","type":"string"}],"name":"setBaseHTML","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_endHTML","type":"string"}],"name":"setEndHTML","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_metadataSeed","type":"uint256"}],"name":"setMetadataSeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum ClayNFT.SalePhase","name":"phase_","type":"uint8"}],"name":"setMintPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_overrideAnimationUrl","type":"string"}],"name":"setOverrideAnimationUrl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_overrideImageUrl","type":"string"}],"name":"setOverrideImageUrl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"setOwnersExplicit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_placeholderHTML","type":"string"}],"name":"setPlaceholderHTML","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wlMintSigner","type":"address"},{"internalType":"address","name":"_freeMintSigner","type":"address"}],"name":"setSigners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_traitModifierContract","type":"address"}],"name":"setTraitModifierContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_usePlaceholder","type":"bool"}],"name":"setUsePlaceholder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"uint256","name":"startId","type":"uint256"},{"internalType":"uint256","name":"endId","type":"uint256"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"traitModifierContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"traitTypes","outputs":[{"internalType":"string","name":"traitName","type":"string"},{"internalType":"string","name":"traitType","type":"string"}],"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":"usePlaceholder","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"wlMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"wlPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
610d0560805267016345785d8a0000600b55670214e8348c4f0000600c55600d805460ff1990811690915560148054909116600117905560e0604052601a60a08190527f646174613a696d6167652f7376672b786d6c3b6261736536342c00000000000060c090815262000077916020919062000309565b506040805180820190915260168082527f646174613a746578742f68746d6c3b6261736536342c000000000000000000006020909201918252620000be9160219162000309565b50348015620000cc57600080fd5b506040518060400160405280600781526020016610db185e53919560ca1b8152506040518060400160405280600781526020016610db185e53919560ca1b8152506200012762000121620002b560201b60201c565b620002b9565b81516200013c90600390602085019062000309565b5080516200015290600490602084019062000309565b50506001600a555060408051608081018252610fa08152610bb860208201526107d0918101919091526103e860608201526200019390601a90600462000398565b50604080516101208101825261138881526105dc60208201819052918101919091526102ee60608201819052608082015260c860a0820181905260c0820152605a60e0820152600a610100820152620001f190601b90600962000398565b5060408051808201909152611f4081526107d060208201526200021990601c90600262000398565b506040805180820190915261232881526103e860208201526200024190601d90600262000398565b506040805160c0810182526107d080825260208201526105dc918101829052606081018290526080810182905260a08101919091526200028690601e90600662000398565b5060408051808201909152611d4c81526109c46020820152620002ae90601f90600262000398565b5062000492565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620003179062000455565b90600052602060002090601f0160209004810192826200033b576000855562000386565b82601f106200035657805160ff191683800117855562000386565b8280016001018555821562000386579182015b828111156200038657825182559160200191906001019062000369565b50620003949291506200043e565b5090565b82805482825590600052602060002090600f01601090048101928215620003865791602002820160005b838211156200040457835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302620003c2565b8015620004345782816101000a81549061ffff021916905560020160208160010104928301926001030262000404565b5050620003949291505b5b808211156200039457600081556001016200043f565b600181811c908216806200046a57607f821691505b602082108114156200048c57634e487b7160e01b600052602260045260246000fd5b50919050565b608051614cd1620004ca600039600081816109fc015281816115740152818161186b01528181611ca701526122ec0152614cd16000f3fe6080604052600436106103815760003560e01c80638da5cb5b116101d1578063c07f345111610102578063d2eb86ee116100a0578063e985e9c51161006f578063e985e9c514610a54578063f2fde38b14610a9d578063fbd3c5bf14610abd578063fdb290e514610add57600080fd5b8063d2eb86ee146109e2578063d5abeb01146109ea578063d7224ba014610a1e578063dccb0f3514610a3457600080fd5b8063c839fe94116100dc578063c839fe9414610955578063c87b56dd14610982578063cbcf8cd8146109a2578063d12a4c98146109c257600080fd5b8063c07f345114610910578063c185427014610925578063c7f8d01a1461093f57600080fd5b8063a22cb4651161016f578063a9ebe90511610149578063a9ebe90514610894578063afc050da146108a9578063b1c9fe6e146108c9578063b88d4fde146108f057600080fd5b8063a22cb4651461084b578063a4513e921461086b578063a945bf801461087e57600080fd5b80639231ab2a116101ab5780639231ab2a146107a057806395d89b41146107f65780639c14ad251461080b5780639c9920a91461082b57600080fd5b80638da5cb5b146107425780638fdee2821461076057806391130aea1461078057600080fd5b80632fb098d2116102b65780636352211e11610254578063715018a611610223578063715018a6146106da5780637858fdfa146106ef5780637df3c9771461070f57806384ec43c01461072f57600080fd5b80636352211e1461063c5780636b3d94621461065c5780636fd6eef0146106a557806370a08231146106ba57600080fd5b8063375a069a11610290578063375a069a146105d25780633ccfd60b146105f257806342842e0e1461060757806349ea62e41461062757600080fd5b80632fb098d21461056457806331c07bbf14610592578063349d2748146105b257600080fd5b806318160ddd116103235780632343c1ef116102fd5780632343c1ef146104e457806323b872dd146105045780632536cfe5146105245780632d20fb601461054457600080fd5b806318160ddd146104815780631901a55a146104a45780631b7ce8e6146104c457600080fd5b80630701f7dc1161035f5780630701f7dc146103fd578063081812fc14610412578063095ea7b31461044a578063098afd4b1461046c57600080fd5b806301ffc9a7146103865780630574e52d146103bb57806306fdde03146103e8575b600080fd5b34801561039257600080fd5b506103a66103a1366004613a7f565b610af3565b60405190151581526020015b60405180910390f35b3480156103c757600080fd5b506103db6103d6366004613b8f565b610b45565b6040516103b29190613c1b565b3480156103f457600080fd5b506103db610f01565b34801561040957600080fd5b506103db610f93565b34801561041e57600080fd5b5061043261042d366004613c2e565b611021565b6040516001600160a01b0390911681526020016103b2565b34801561045657600080fd5b5061046a610465366004613c63565b611065565b005b34801561047857600080fd5b5061046a6110f3565b34801561048d57600080fd5b50600254600154035b6040519081526020016103b2565b3480156104b057600080fd5b5061046a6104bf366004613cce565b61115e565b3480156104d057600080fd5b5061046a6104df366004613c2e565b611194565b3480156104f057600080fd5b50601654610432906001600160a01b031681565b34801561051057600080fd5b5061046a61051f366004613d0f565b6111c3565b34801561053057600080fd5b5061046a61053f366004613d4b565b6111ce565b34801561055057600080fd5b5061046a61055f366004613c2e565b61121a565b34801561057057600080fd5b5061058461057f366004613d66565b6112ad565b6040516103b2929190613d88565b34801561059e57600080fd5b5061046a6105ad366004613db6565b6113fe565b3480156105be57600080fd5b5061046a6105cd366004613dd7565b61144f565b3480156105de57600080fd5b5061046a6105ed366004613c2e565b611548565b3480156105fe57600080fd5b5061046a611616565b34801561061357600080fd5b5061046a610622366004613d0f565b61166f565b34801561063357600080fd5b506103db61168a565b34801561064857600080fd5b50610432610657366004613c2e565b611697565b34801561066857600080fd5b506103db6040518060400160405280601d81526020017f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081525081565b3480156106b157600080fd5b506103db6116a9565b3480156106c657600080fd5b506104966106d5366004613d4b565b6116b6565b3480156106e657600080fd5b5061046a611704565b3480156106fb57600080fd5b5061046a61070a366004613cce565b61173a565b34801561071b57600080fd5b506103db61072a366004613c2e565b611770565b61046a61073d366004613cce565b611793565b34801561074e57600080fd5b506000546001600160a01b0316610432565b34801561076c57600080fd5b5061046a61077b366004613f0f565b611a72565b34801561078c57600080fd5b5061046a61079b366004613f2a565b611aaf565b3480156107ac57600080fd5b506107c06107bb366004613c2e565b611b11565b6040805182516001600160a01b031681526020808401516001600160401b031690820152918101511515908201526060016103b2565b34801561080257600080fd5b506103db611b37565b34801561081757600080fd5b5061046a610826366004613cce565b611b46565b34801561083757600080fd5b5061046a610846366004613cce565b611b7c565b34801561085757600080fd5b5061046a610866366004613f5d565b611bb2565b61046a610879366004613cce565b611c48565b34801561088a57600080fd5b50610496600c5481565b3480156108a057600080fd5b506103db611e36565b3480156108b557600080fd5b506103db6108c4366004613c2e565b611e43565b3480156108d557600080fd5b50600d546108e39060ff1681565b6040516103b29190613f9d565b3480156108fc57600080fd5b5061046a61090b366004613fc5565b611e5f565b34801561091c57600080fd5b506103db611e99565b34801561093157600080fd5b506014546103a69060ff1681565b34801561094b57600080fd5b50610496600b5481565b34801561096157600080fd5b50610975610970366004614040565b611ea6565b6040516103b29190614073565b34801561098e57600080fd5b506103db61099d366004613c2e565b611f9b565b3480156109ae57600080fd5b5061046a6109bd366004613cce565b6121da565b3480156109ce57600080fd5b506103db6109dd366004613c2e565b612210565b61046a61222b565b3480156109f657600080fd5b506104967f000000000000000000000000000000000000000000000000000000000000000081565b348015610a2a57600080fd5b5061049660095481565b348015610a4057600080fd5b506103db610a4f3660046140ab565b61239e565b348015610a6057600080fd5b506103a6610a6f366004613f2a565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b348015610aa957600080fd5b5061046a610ab8366004613d4b565b61265a565b348015610ac957600080fd5b506103db610ad83660046140ab565b6126f2565b348015610ae957600080fd5b5061049660155481565b60006001600160e01b031982166380ac58cd60e01b1480610b2457506001600160e01b03198216635b5e139f60e01b145b80610b3f57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000610b5e610b59846000600161281d565b6128e9565b90506000610b72610b59856001600261281d565b90506000610b86610b59866005600661281d565b6040805160c081018252600f608082019081526e726762283133302c3130312c38322960881b60a0830152815281518083018352600d81526c7267622837372c38332c38372960981b6020828101919091528083019190915282518084018452601081526f726762283132312c3132362c3133392960801b818301528284015282518084019093526005835264626c61636b60d81b90830152606081019190915290915060008160ff861660048110610c4157610c416140ef565b6020908102919091015160408051610120810182528281528151808301835260148152737267622837302e392c3139352e352c38322e382960601b818601528185015281518083018352600f8082526e726762283138312c3132392c36382960881b828701528284019190915282518084018452601081526f726762283137302c3231382c3137302960801b818701526060830152825180840184528181526e726762283139352c3135352c36352960881b81870152608083015282518084018452600d81526c726762283235352c302c33302960981b8187015260a0830152825180840184528181526e7267622833392c3130302c3235352960881b8187015260c0830152825180840184529081526e726762283134382c34322c3233352960881b8186015260e082015281518083019092526005825264776869746560d81b93820193909352610100830152915060008160ff871660098110610da857610da86140ef565b60200201519050600060405180604001604052806040518060800160405280604a8152602001614bc8604a913981526020016040518060800160405280604a8152602001614c52604a91398152509050600084604051602001610e0b9190614121565b60405160208183030381529060405290506000828860ff1660028110610e3357610e336140ef565b602002015184604051602001610e4a9291906141d4565b60408051601f1981840301815291905260145490915060009060ff16610e705782610e81565b604051806020016040528060008152505b60145460ff16610e915782610ea2565b604051806020016040528060008152505b604051602001610eb3929190614211565b60405160208183030381529060405290506020610ecf826129a7565b604051602001610ee09291906145c7565b6040516020818303038152906040529b505050505050505050505050919050565b606060038054610f10906144f2565b80601f0160208091040260200160405190810160405280929190818152602001828054610f3c906144f2565b8015610f895780601f10610f5e57610100808354040283529160200191610f89565b820191906000526020600020905b815481529060010190602001808311610f6c57829003601f168201915b5050505050905090565b60128054610fa0906144f2565b80601f0160208091040260200160405190810160405280929190818152602001828054610fcc906144f2565b80156110195780601f10610fee57610100808354040283529160200191611019565b820191906000526020600020905b815481529060010190602001808311610ffc57829003601f168201915b505050505081565b600061102c82612b0e565b611049576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b600061107082611697565b9050806001600160a01b0316836001600160a01b031614156110a55760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216148015906110c557506110c38133610a6f565b155b156110e3576040516367d9dca160e11b815260040160405180910390fd5b6110ee838383612b3a565b505050565b6000546001600160a01b031633146111265760405162461bcd60e51b815260040161111d906145ec565b60405180910390fd5b60005b600681101561115b576000818152601760205260408120611149916138d6565b8061115381614637565b915050611129565b50565b6000546001600160a01b031633146111885760405162461bcd60e51b815260040161111d906145ec565b6110ee601383836138f7565b6000546001600160a01b031633146111be5760405162461bcd60e51b815260040161111d906145ec565b601555565b6110ee838383612b96565b6000546001600160a01b031633146111f85760405162461bcd60e51b815260040161111d906145ec565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146112445760405162461bcd60e51b815260040161111d906145ec565b6002600a5414156112975760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161111d565b6002600a556112a581612daa565b506001600a55565b601760205281600052604060002081815481106112c957600080fd5b9060005260206000209060020201600091509150508060000180546112ed906144f2565b80601f0160208091040260200160405190810160405280929190818152602001828054611319906144f2565b80156113665780601f1061133b57610100808354040283529160200191611366565b820191906000526020600020905b81548152906001019060200180831161134957829003601f168201915b50505050509080600101805461137b906144f2565b80601f01602080910402602001604051908101604052809291908181526020018280546113a7906144f2565b80156113f45780601f106113c9576101008083540402835291602001916113f4565b820191906000526020600020905b8154815290600101906020018083116113d757829003601f168201915b5050505050905082565b6000546001600160a01b031633146114285760405162461bcd60e51b815260040161111d906145ec565b600d805482919060ff1916600183600381111561144757611447613f87565b021790555050565b6000546001600160a01b031633146114795760405162461bcd60e51b815260040161111d906145ec565b60005b81518110156110ee576017600084815260200190815260200160002060405180604001604052808484815181106114b5576114b56140ef565b60200260200101516000015181526020018484815181106114d8576114d86140ef565b602090810291909101810151810151909152825460018101845560009384529281902082518051939460020290910192611515928492019061397b565b50602082810151805161152e926001850192019061397b565b505050808061153c90614637565b91505061147c565b5050565b6000546001600160a01b031633146115725760405162461bcd60e51b815260040161111d906145ec565b7f0000000000000000000000000000000000000000000000000000000000000000816115a16002546001540390565b6115ab9190614652565b11156115ee5760405162461bcd60e51b815260206004820152601260248201527172656163686564206d617820737570706c7960701b604482015260640161111d565b60005b8181101561154457611604336001612ed8565b8061160e81614637565b9150506115f1565b6000546001600160a01b031633146116405760405162461bcd60e51b815260040161111d906145ec565b6040514790339082156108fc029083906000818181858888f19350505050158015611544573d6000803e3d6000fd5b6110ee83838360405180602001604052806000815250611e5f565b600f8054610fa0906144f2565b60006116a282612ef2565b5192915050565b60138054610fa0906144f2565b60006001600160a01b0382166116df576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6000546001600160a01b0316331461172e5760405162461bcd60e51b815260040161111d906145ec565b611738600061300d565b565b6000546001600160a01b031633146117645760405162461bcd60e51b815260040161111d906145ec565b6110ee601083836138f7565b606060006117808360155461305d565b905061178c81846126f2565b9392505050565b3233146117e25760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000604482015260640161111d565b6001600d5460ff1660038111156117fb576117fb613f87565b148061181d57506002600d5460ff16600381111561181b5761181b613f87565b145b6118695760405162461bcd60e51b815260206004820152601a60248201527f50726573616c65206d696e74696e67206e6f7420616374697665000000000000604482015260640161111d565b7f00000000000000000000000000000000000000000000000000000000000000006118976002546001540390565b6118a2906001614652565b11156118c05760405162461bcd60e51b815260040161111d9061466a565b34600b5411156119125760405162461bcd60e51b815260206004820152601b60248201527f416d6f756e742073656e7420697320696e73756666696369656e740000000000604482015260640161111d565b6119a882828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602082015233603c820152605c0191506119849050565b6040516020818303038152906040528051906020012061310990919063ffffffff16565b600d5461010090046001600160a01b03908116911614611a055760405162461bcd60e51b815260206004820152601860248201527729b4b3b732b91030b2323932b9b99036b4b9b6b0ba31b41760411b604482015260640161111d565b3360009081526018602052604090205415611a535760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b604482015260640161111d565b3360008181526018602052604090206001908190556115449190612ed8565b6000546001600160a01b03163314611a9c5760405162461bcd60e51b815260040161111d906145ec565b6014805460ff1916911515919091179055565b6000546001600160a01b03163314611ad95760405162461bcd60e51b815260040161111d906145ec565b600d8054610100600160a81b0319166101006001600160a01b0394851602179055600e80546001600160a01b03191691909216179055565b6040805160608101825260008082526020820181905291810191909152610b3f82612ef2565b606060048054610f10906144f2565b6000546001600160a01b03163314611b705760405162461bcd60e51b815260040161111d906145ec565b6110ee601183836138f7565b6000546001600160a01b03163314611ba65760405162461bcd60e51b815260040161111d906145ec565b6110ee601283836138f7565b6001600160a01b038216331415611bdc5760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6002600d5460ff166003811115611c6157611c61613f87565b14611ca55760405162461bcd60e51b815260206004820152601460248201527346726565206d696e74206e6f742061637469766560601b604482015260640161111d565b7f0000000000000000000000000000000000000000000000000000000000000000611cd36002546001540390565b611cde906001614652565b1115611cfc5760405162461bcd60e51b815260040161111d9061466a565b611d6e82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602082015233603c820152605c0191506119849050565b600e546001600160a01b03908116911614611dc65760405162461bcd60e51b815260206004820152601860248201527729b4b3b732b91030b2323932b9b99036b4b9b6b0ba31b41760411b604482015260640161111d565b3360009081526019602052604090205415611e145760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b604482015260640161111d565b611e1f336001612ed8565b505033600090815260196020526040902060019055565b60108054610fa0906144f2565b60606000611e538360155461305d565b905061178c818461239e565b611e6a848484612b96565b611e7684848484613125565b611e93576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60118054610fa0906144f2565b60606000611eb3856116b6565b905080611ed057505060408051600081526020810190915261178c565b6000816001600160401b03811115611eea57611eea613a9c565b604051908082528060200260200182016040528015611f13578160200160208202803683370190505b5090506000855b85811015611f8f5783821415611f2f57611f8f565b876001600160a01b0316611f4282611697565b6001600160a01b03161415611f7d5780838381518110611f6457611f646140ef565b602090810291909101015281611f7981614637565b9250505b80611f8781614637565b915050611f1a565b50909695505050505050565b60606000611fab8360155461305d565b90506000611fb884613234565b604051602001611fc8919061469f565b60408051601f1981840301815290829052611fe5916020016146cd565b60405160208183030381529060405290508061208b60138054612007906144f2565b80601f0160208091040260200160405190810160405280929190818152602001828054612033906144f2565b80156120805780601f1061205557610100808354040283529160200191612080565b820191906000526020600020905b81548152906001019060200180831161206357829003601f168201915b505050505051151590565b61209d5761209883610b45565b6120c1565b6013856040516020016120b1929190614798565b6040516020818303038152906040525b6040516020016120d29291906147b1565b6040516020818303038152906040529050806120ee838661239e565b6040516020016120ff9291906147fb565b60405160208183030381529060405290508061212160128054612007906144f2565b6121345761212f83866126f2565b612158565b601285604051602001612148929190614798565b6040516020818303038152906040525b604051602001612169929190614821565b60408051601f19818403018152828201909152601d82527f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000602083015291506121b1826129a7565b6040516020016121c29291906147fb565b60405160208183030381529060405292505050919050565b6000546001600160a01b031633146122045760405162461bcd60e51b815260040161111d906145ec565b6110ee600f83836138f7565b606060006122208360155461305d565b905061178c81610b45565b32331461227a5760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000604482015260640161111d565b6003600d5460ff16600381111561229357612293613f87565b146122ea5760405162461bcd60e51b815260206004820152602160248201527f5075626c69632073616c65206d696e74696e67206973206e6f742061637469766044820152606560f81b606482015260840161111d565b7f00000000000000000000000000000000000000000000000000000000000000006123186002546001540390565b612323906001614652565b11156123415760405162461bcd60e51b815260040161111d9061466a565b34600c5411156123935760405162461bcd60e51b815260206004820152601b60248201527f416d6f756e742073656e7420697320696e73756666696369656e740000000000604482015260640161111d565b611738336001612ed8565b60606123ad6002546001540390565b82106123f25760405162461bcd60e51b8152602060048201526014602482015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b604482015260640161111d565b60145460ff161561241c57506040805180820190915260028152615b5d60f01b6020820152610b3f565b6016546001600160a01b0316156124b7576016546040516357e0286d60e11b8152600481018490526001600160a01b0390911690819063afc050da9060240160006040518083038186803b15801561247357600080fd5b505afa158015612487573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526124af919081019061487e565b915050610b3f565b6000620186a0836015546040516020016124db929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6124fe9190614901565b9050606060005b60068160ff161015612603576000612531610b598860ff8516612529866001614915565b60ff1661281d565b905082601760008460ff1681526020019081526020016000208260ff168154811061255e5761255e6140ef565b9060005260206000209060020201600101601760008560ff1681526020019081526020016000208360ff1681548110612599576125996140ef565b90600052602060002090600202016000016040516020016125bc9392919061493a565b6040516020818303038152906040529250826040516020016125de91906149a7565b60405160208183030381529060405292505080806125fb906149cc565b915050612505565b508061260e83613234565b60405160200161261f9291906149ec565b6040516020818303038152906040529050806040516020016126419190614a53565b6040516020818303038152906040529250505092915050565b6000546001600160a01b031633146126845760405162461bcd60e51b815260040161111d906145ec565b6001600160a01b0381166126e95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161111d565b61115b8161300d565b60145460609060ff16156127bc57602161279560108054612712906144f2565b80601f016020809104026020016040519081016040528092919081815260200182805461273e906144f2565b801561278b5780601f106127605761010080835404028352916020019161278b565b820191906000526020600020905b81548152906001019060200180831161276e57829003601f168201915b50505050506129a7565b6040516020016127a69291906145c7565b6040516020818303038152906040529050610b3f565b60216127f5600f6127cd868661239e565b60116040516020016127e193929190614a87565b6040516020818303038152906040526129a7565b6040516020016128069291906145c7565b604051602081830303815290604052905092915050565b606083600061282c8585614aba565b6001600160401b0381111561284357612843613a9c565b6040519080825280601f01601f19166020018201604052801561286d576020820181803683370190505b509050845b848110156128df5782818151811061288c5761288c6140ef565b01602001516001600160f81b031916826128a68884614aba565b815181106128b6576128b66140ef565b60200101906001600160f81b031916908160001a905350806128d781614637565b915050612872565b5095945050505050565b60008181805b82518160ff16101561299f576030838260ff1681518110612912576129126140ef565b016020015160f81c1080159061294557506039838260ff168151811061293a5761293a6140ef565b016020015160f81c11155b1561298d57612955600a83614ad1565b91506030838260ff168151811061296e5761296e6140ef565b0160200151612980919060f81c614afa565b61298a9083614915565b91505b80612997816149cc565b9150506128ef565b509392505050565b60608151600014156129c757505060408051602081019091526000815290565b6000604051806060016040528060408152602001614c1260409139905060006003845160026129f69190614652565b612a009190614b1d565b612a0b906004614b31565b90506000612a1a826020614652565b6001600160401b03811115612a3157612a31613a9c565b6040519080825280601f01601f191660200182016040528015612a5b576020820181803683370190505b509050818152600183018586518101602084015b81831015612ac95760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b93820193909352600401612a6f565b600389510660018114612ae35760028114612af457612b00565b613d3d60f01b600119830152612b00565b603d60f81b6000198301525b509398975050505050505050565b600060015482108015610b3f575050600090815260056020526040902054600160e01b900460ff161590565b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000612ba182612ef2565b80519091506000906001600160a01b0316336001600160a01b03161480612bcf57508151612bcf9033610a6f565b80612bea575033612bdf84611021565b6001600160a01b0316145b905080612c0a57604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b031614612c3f5760405162a1148160e81b815260040160405180910390fd5b6001600160a01b038416612c6657604051633a954ecd60e21b815260040160405180910390fd5b612c766000848460000151612b3a565b6001600160a01b038581166000908152600660209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080546001600160e01b031916909417600160a01b429092169190910217909255908601808352912054909116612d6057600154811015612d6057825160008281526005602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b80612dc8576040516356be441560e01b815260040160405180910390fd5b600154612de85760405163c0367cab60e01b815260040160405180910390fd5b6009546001548110612e0d576040516370e89b1b60e01b815260040160405180910390fd5b6001548282016000198101911015612e285750600154600019015b815b818111612ecd576000818152600560205260409020546001600160a01b0316158015612e6c5750600081815260056020526040902054600160e01b900460ff16155b15612ec5576000612e7c82612ef2565b80516000848152600560209081526040909120805491909301516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b0390921691909117179055505b600101612e2a565b506001016009555050565b611544828260405180602001604052806000815250613331565b60408051606081018252600080825260208201819052918101919091526001548290811015612ff457600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290612ff25780516001600160a01b031615612f89579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215612fed579392505050565b612f89565b505b604051636f96cda160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60408051602081019091526000808252606091905b60068160ff16101561299f576000612710868660405160200161309f929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6130c29190614901565b9050826130d38261ffff168461333e565b6040516020016130e49291906147fb565b6040516020818303038152906040529250508080613101906149cc565b915050613072565b6000806000613118858561341a565b9150915061299f8161348a565b60006001600160a01b0384163b1561322857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613169903390899088908890600401614b50565b602060405180830381600087803b15801561318357600080fd5b505af19250505080156131b3575060408051601f3d908101601f191682019092526131b091810190614b8d565b60015b61320e573d8080156131e1576040519150601f19603f3d011682016040523d82523d6000602084013e6131e6565b606091505b508051613206576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061322c565b5060015b949350505050565b6060816132585750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613282578061326c81614637565b915061327b9050600a83614b1d565b915061325c565b6000816001600160401b0381111561329c5761329c613a9c565b6040519080825280601f01601f1916602001820160405280156132c6576020820181803683370190505b5090505b841561322c576132db600183614aba565b91506132e8600a86614901565b6132f3906030614652565b60f81b818381518110613308576133086140ef565b60200101906001600160f81b031916908160001a90535061332a600a86614b1d565b94506132ca565b6110ee8383836001613645565b60606000805b601a8460ff166006811061335a5761335a6140ef565b015460ff82161015613414576000601a8560ff166006811061337e5761337e6140ef565b018260ff1681548110613393576133936140ef565b90600052602060002090601091828204019190066002029054906101000a900461ffff1690508261ffff1686101580156133d957506133d28184614baa565b61ffff1686105b156133f4576133ea8260ff16613234565b9350505050610b3f565b6133fe8184614baa565b925050808061340c906149cc565b915050613344565b50600080fd5b6000808251604114156134515760208301516040840151606085015160001a613445878285856137b0565b94509450505050613483565b82516040141561347b576020830151604084015161347086838361389d565b935093505050613483565b506000905060025b9250929050565b600081600481111561349e5761349e613f87565b14156134a75750565b60018160048111156134bb576134bb613f87565b14156135095760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161111d565b600281600481111561351d5761351d613f87565b141561356b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161111d565b600381600481111561357f5761357f613f87565b14156135d85760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161111d565b60048160048111156135ec576135ec613f87565b141561115b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161111d565b6001546001600160a01b03851661366e57604051622e076360e81b815260040160405180910390fd5b8361368c5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260066020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526005909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b858110156137a75760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a483801561377d575061377b6000888488613125565b155b1561379b576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101613726565b50600155612da3565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156137e75750600090506003613894565b8460ff16601b141580156137ff57508460ff16601c14155b156138105750600090506004613894565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613864573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661388d57600060019250925050613894565b9150600090505b94509492505050565b6000806001600160ff1b038316816138ba60ff86901c601b614652565b90506138c8878288856137b0565b935093505050935093915050565b508054600082556002029060005260206000209081019061115b91906139ef565b828054613903906144f2565b90600052602060002090601f016020900481019282613925576000855561396b565b82601f1061393e5782800160ff1982351617855561396b565b8280016001018555821561396b579182015b8281111561396b578235825591602001919060010190613950565b50613977929150613a1a565b5090565b828054613987906144f2565b90600052602060002090601f0160209004810192826139a9576000855561396b565b82601f106139c257805160ff191683800117855561396b565b8280016001018555821561396b579182015b8281111561396b5782518255916020019190600101906139d4565b80821115613977576000613a038282613a2f565b613a11600183016000613a2f565b506002016139ef565b5b808211156139775760008155600101613a1b565b508054613a3b906144f2565b6000825580601f10613a4b575050565b601f01602090049060005260206000209081019061115b9190613a1a565b6001600160e01b03198116811461115b57600080fd5b600060208284031215613a9157600080fd5b813561178c81613a69565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715613ad457613ad4613a9c565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613b0257613b02613a9c565b604052919050565b60006001600160401b03821115613b2357613b23613a9c565b50601f01601f191660200190565b6000613b44613b3f84613b0a565b613ada565b9050828152838383011115613b5857600080fd5b828260208301376000602084830101529392505050565b600082601f830112613b8057600080fd5b61178c83833560208501613b31565b600060208284031215613ba157600080fd5b81356001600160401b03811115613bb757600080fd5b61322c84828501613b6f565b60005b83811015613bde578181015183820152602001613bc6565b83811115611e935750506000910152565b60008151808452613c07816020860160208601613bc3565b601f01601f19169290920160200192915050565b60208152600061178c6020830184613bef565b600060208284031215613c4057600080fd5b5035919050565b80356001600160a01b0381168114613c5e57600080fd5b919050565b60008060408385031215613c7657600080fd5b613c7f83613c47565b946020939093013593505050565b60008083601f840112613c9f57600080fd5b5081356001600160401b03811115613cb657600080fd5b60208301915083602082850101111561348357600080fd5b60008060208385031215613ce157600080fd5b82356001600160401b03811115613cf757600080fd5b613d0385828601613c8d565b90969095509350505050565b600080600060608486031215613d2457600080fd5b613d2d84613c47565b9250613d3b60208501613c47565b9150604084013590509250925092565b600060208284031215613d5d57600080fd5b61178c82613c47565b60008060408385031215613d7957600080fd5b50508035926020909101359150565b604081526000613d9b6040830185613bef565b8281036020840152613dad8185613bef565b95945050505050565b600060208284031215613dc857600080fd5b81356004811061178c57600080fd5b6000806040808486031215613deb57600080fd5b833592506020808501356001600160401b0380821115613e0a57600080fd5b818701915087601f830112613e1e57600080fd5b813581811115613e3057613e30613a9c565b8060051b613e3f858201613ada565b918252838101850191858101908b841115613e5957600080fd5b86860192505b83831015613eed57823585811115613e775760008081fd5b8601808d03601f1901891315613e8d5760008081fd5b613e95613ab2565b8882013587811115613ea75760008081fd5b613eb58f8b83860101613b6f565b8252508982013587811115613eca5760008081fd5b613ed88f8b83860101613b6f565b828b0152508352509186019190860190613e5f565b80985050505050505050509250929050565b80358015158114613c5e57600080fd5b600060208284031215613f2157600080fd5b61178c82613eff565b60008060408385031215613f3d57600080fd5b613f4683613c47565b9150613f5460208401613c47565b90509250929050565b60008060408385031215613f7057600080fd5b613f7983613c47565b9150613f5460208401613eff565b634e487b7160e01b600052602160045260246000fd5b6020810160048310613fbf57634e487b7160e01b600052602160045260246000fd5b91905290565b60008060008060808587031215613fdb57600080fd5b613fe485613c47565b9350613ff260208601613c47565b92506040850135915060608501356001600160401b0381111561401457600080fd5b8501601f8101871361402557600080fd5b61403487823560208401613b31565b91505092959194509250565b60008060006060848603121561405557600080fd5b61405e84613c47565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015611f8f5783518352928401929184019160010161408f565b600080604083850312156140be57600080fd5b82356001600160401b038111156140d457600080fd5b6140e085828601613b6f565b95602094909401359450505050565b634e487b7160e01b600052603260045260246000fd5b60008151614117818560208601613bc3565b9290920192915050565b7f3c7061746820643d224d3332322e363534203137332e3035334c3138392e373781527f203135352e3334326c32362e373032203132332e3039322d3130312e3333362060208201527f34352e313037203236352e3732382032312e3131372d38362e3732382d36322e60408201526b18999bbd11103334b6361e9160a11b6060820152600082516141ba81606c850160208701613bc3565b6211179f60e91b606c939091019283015250606f01919050565b600083516141e6818460208801613bc3565b8351908301906141fa818360208801613bc3565b6211179f60e91b9101908152600301949350505050565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f73766722207072657365727665417370656374526174696f3d22784d6960208201527f6e594d696e206d656574222077696474683d2235303022206865696768743d2260408201527f353030223e3c7465787420666f6e742d66616d696c793d2273616e732d73657260608201527f69662220666f6e742d73697a653d2235362220666f6e742d7765696768743d2260808201527f32303022206c65747465722d73706163696e673d222d312e313222207472616e60a08201527f73666f726d3d227472616e736c617465283339382e3633203435352e3731292260c08201527f3e3c747370616e20783d222d38342e30342220793d2231382e3036223e433c2f60e08201527f747370616e3e3c747370616e20783d222d34362e35322220793d2231382e30366101008201527f223e4c3c2f747370616e3e3c747370616e20783d222d31342e32312220793d226101208201527f31382e3036223e413c2f747370616e3e3c747370616e20783d2231392e3922206101408201527f793d2231382e3036223e593c2f747370616e3e3c747370616e20783d2235352e6101608201527f32392220793d2231382e3036223e5f3c2f747370616e3e3c2f746578743e3c746101808201527f65787420666f6e742d66616d696c793d2273616e732d73657269662220666f6e6101a08201527f742d73697a653d2231352220666f6e742d7765696768743d22333030222074726101c08201527f616e73666f726d3d227472616e736c6174652832343820313929223e3c7473706101e08201527f616e20783d222d36362e38372220793d22322e3238223e4f70656e20746f20736102008201527f656520334420766965773c2f747370616e3e3c2f746578743e00000000000000610220820152600061322c6144e06144da610239850187614105565b85614105565b651e17b9bb339f60d11b815260060190565b600181811c9082168061450657607f821691505b6020821081141561452757634e487b7160e01b600052602260045260246000fd5b50919050565b8054600090600181811c908083168061454757607f831692505b602080841082141561456957634e487b7160e01b600052602260045260246000fd5b81801561457d576001811461458e576145bb565b60ff198616895284890196506145bb565b60008881526020902060005b868110156145b35781548b82015290850190830161459a565b505084890196505b50505050505092915050565b60006145d3828561452d565b83516145e3818360208801613bc3565b01949350505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600060001982141561464b5761464b614621565b5060010190565b6000821982111561466557614665614621565b500190565b6020808252818101527f507572636861736520776f756c6420657863656564206d617820746f6b656e73604082015260600190565b65434c4159202360d01b8152600082516146c0816006850160208701613bc3565b9190910160060192915050565b683d913730b6b2911d1160b91b815281516000906146f2816009850160208701613bc3565b7f222c20226465736372697074696f6e223a22434c415920697320612066756c6c60099390910192830152507f79206f6e2d636861696e2033442067656e65726174697665206172742070726f60298201527f6a6563742e2054686520636f646520697320746865206172742c20746865206160498201527f72742069732074686520636f64652e222c2022696d616765223a2022000000006069820152608501919050565b60006147a4828561452d565b9283525050602001919050565b600083516147c3818460208801613bc3565b8351908301906147d7818360208801613bc3565b6f011161130ba3a3934b13aba32b9911d160851b9101908152601001949350505050565b6000835161480d818460208801613bc3565b8351908301906145e3818360208801613bc3565b60008351614833818460208801613bc3565b7216101130b734b6b0ba34b7b72fbab936111d1160691b9083019081528351614863816013840160208801613bc3565b61227d60f01b60139290910191820152601501949350505050565b60006020828403121561489057600080fd5b81516001600160401b038111156148a657600080fd5b8201601f810184136148b757600080fd5b80516148c5613b3f82613b0a565b8181528560208385010111156148da57600080fd5b613dad826020830160208601613bc3565b634e487b7160e01b600052601260045260246000fd5b600082614910576149106148eb565b500690565b600060ff821660ff84168060ff0382111561493257614932614621565b019392505050565b6000845161494c818460208901613bc3565b6e3d913a3930b4ba2fba3cb832911d1160891b908301908152614972600f82018661452d565b6a1116113b30b63ab2911d1160a91b81529050614992600b82018561452d565b61227d60f01b81526002019695505050505050565b600082516149b9818460208701613bc3565b600b60fa1b920191825250600101919050565b600060ff821660ff8114156149e3576149e3614621565b60010192915050565b600083516149fe818460208801613bc3565b7f7b2274726169745f74797065223a2253656564222c2276616c7565223a2200009083019081528351614a3881601e840160208801613bc3565b61227d60f01b601e9290910191820152602001949350505050565b605b60f81b815260008251614a6f816001850160208701613bc3565b605d60f81b6001939091019283015250600201919050565b6000614a93828661452d565b8451614aa3818360208901613bc3565b614aaf8183018661452d565b979650505050505050565b600082821015614acc57614acc614621565b500390565b600060ff821660ff84168160ff0481118215151615614af257614af2614621565b029392505050565b600060ff821660ff841680821015614b1457614b14614621565b90039392505050565b600082614b2c57614b2c6148eb565b500490565b6000816000190483118215151615614b4b57614b4b614621565b500290565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614b8390830184613bef565b9695505050505050565b600060208284031215614b9f57600080fd5b815161178c81613a69565b600061ffff8083168185168083038211156145e3576145e361462156fe3c7061746820643d224d3139362e393437203138382e3834396c32382e3035382d32382e3734342031312e36343820312e3539322d33372e31362033382e3537387a222066696c6c3d224142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c7061746820643d224d3139372e3031203138382e3739326c32382e3035372d32382e3734332032332e37383420332e3136372d34372e3139362034372e3039357a222066696c6c3d22a26469706673582212209ed409d0376349bad14e6ecd09a4e432afea83d07e87229edd47e3dc18d42e6a64736f6c63430008090033
Deployed Bytecode
0x6080604052600436106103815760003560e01c80638da5cb5b116101d1578063c07f345111610102578063d2eb86ee116100a0578063e985e9c51161006f578063e985e9c514610a54578063f2fde38b14610a9d578063fbd3c5bf14610abd578063fdb290e514610add57600080fd5b8063d2eb86ee146109e2578063d5abeb01146109ea578063d7224ba014610a1e578063dccb0f3514610a3457600080fd5b8063c839fe94116100dc578063c839fe9414610955578063c87b56dd14610982578063cbcf8cd8146109a2578063d12a4c98146109c257600080fd5b8063c07f345114610910578063c185427014610925578063c7f8d01a1461093f57600080fd5b8063a22cb4651161016f578063a9ebe90511610149578063a9ebe90514610894578063afc050da146108a9578063b1c9fe6e146108c9578063b88d4fde146108f057600080fd5b8063a22cb4651461084b578063a4513e921461086b578063a945bf801461087e57600080fd5b80639231ab2a116101ab5780639231ab2a146107a057806395d89b41146107f65780639c14ad251461080b5780639c9920a91461082b57600080fd5b80638da5cb5b146107425780638fdee2821461076057806391130aea1461078057600080fd5b80632fb098d2116102b65780636352211e11610254578063715018a611610223578063715018a6146106da5780637858fdfa146106ef5780637df3c9771461070f57806384ec43c01461072f57600080fd5b80636352211e1461063c5780636b3d94621461065c5780636fd6eef0146106a557806370a08231146106ba57600080fd5b8063375a069a11610290578063375a069a146105d25780633ccfd60b146105f257806342842e0e1461060757806349ea62e41461062757600080fd5b80632fb098d21461056457806331c07bbf14610592578063349d2748146105b257600080fd5b806318160ddd116103235780632343c1ef116102fd5780632343c1ef146104e457806323b872dd146105045780632536cfe5146105245780632d20fb601461054457600080fd5b806318160ddd146104815780631901a55a146104a45780631b7ce8e6146104c457600080fd5b80630701f7dc1161035f5780630701f7dc146103fd578063081812fc14610412578063095ea7b31461044a578063098afd4b1461046c57600080fd5b806301ffc9a7146103865780630574e52d146103bb57806306fdde03146103e8575b600080fd5b34801561039257600080fd5b506103a66103a1366004613a7f565b610af3565b60405190151581526020015b60405180910390f35b3480156103c757600080fd5b506103db6103d6366004613b8f565b610b45565b6040516103b29190613c1b565b3480156103f457600080fd5b506103db610f01565b34801561040957600080fd5b506103db610f93565b34801561041e57600080fd5b5061043261042d366004613c2e565b611021565b6040516001600160a01b0390911681526020016103b2565b34801561045657600080fd5b5061046a610465366004613c63565b611065565b005b34801561047857600080fd5b5061046a6110f3565b34801561048d57600080fd5b50600254600154035b6040519081526020016103b2565b3480156104b057600080fd5b5061046a6104bf366004613cce565b61115e565b3480156104d057600080fd5b5061046a6104df366004613c2e565b611194565b3480156104f057600080fd5b50601654610432906001600160a01b031681565b34801561051057600080fd5b5061046a61051f366004613d0f565b6111c3565b34801561053057600080fd5b5061046a61053f366004613d4b565b6111ce565b34801561055057600080fd5b5061046a61055f366004613c2e565b61121a565b34801561057057600080fd5b5061058461057f366004613d66565b6112ad565b6040516103b2929190613d88565b34801561059e57600080fd5b5061046a6105ad366004613db6565b6113fe565b3480156105be57600080fd5b5061046a6105cd366004613dd7565b61144f565b3480156105de57600080fd5b5061046a6105ed366004613c2e565b611548565b3480156105fe57600080fd5b5061046a611616565b34801561061357600080fd5b5061046a610622366004613d0f565b61166f565b34801561063357600080fd5b506103db61168a565b34801561064857600080fd5b50610432610657366004613c2e565b611697565b34801561066857600080fd5b506103db6040518060400160405280601d81526020017f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081525081565b3480156106b157600080fd5b506103db6116a9565b3480156106c657600080fd5b506104966106d5366004613d4b565b6116b6565b3480156106e657600080fd5b5061046a611704565b3480156106fb57600080fd5b5061046a61070a366004613cce565b61173a565b34801561071b57600080fd5b506103db61072a366004613c2e565b611770565b61046a61073d366004613cce565b611793565b34801561074e57600080fd5b506000546001600160a01b0316610432565b34801561076c57600080fd5b5061046a61077b366004613f0f565b611a72565b34801561078c57600080fd5b5061046a61079b366004613f2a565b611aaf565b3480156107ac57600080fd5b506107c06107bb366004613c2e565b611b11565b6040805182516001600160a01b031681526020808401516001600160401b031690820152918101511515908201526060016103b2565b34801561080257600080fd5b506103db611b37565b34801561081757600080fd5b5061046a610826366004613cce565b611b46565b34801561083757600080fd5b5061046a610846366004613cce565b611b7c565b34801561085757600080fd5b5061046a610866366004613f5d565b611bb2565b61046a610879366004613cce565b611c48565b34801561088a57600080fd5b50610496600c5481565b3480156108a057600080fd5b506103db611e36565b3480156108b557600080fd5b506103db6108c4366004613c2e565b611e43565b3480156108d557600080fd5b50600d546108e39060ff1681565b6040516103b29190613f9d565b3480156108fc57600080fd5b5061046a61090b366004613fc5565b611e5f565b34801561091c57600080fd5b506103db611e99565b34801561093157600080fd5b506014546103a69060ff1681565b34801561094b57600080fd5b50610496600b5481565b34801561096157600080fd5b50610975610970366004614040565b611ea6565b6040516103b29190614073565b34801561098e57600080fd5b506103db61099d366004613c2e565b611f9b565b3480156109ae57600080fd5b5061046a6109bd366004613cce565b6121da565b3480156109ce57600080fd5b506103db6109dd366004613c2e565b612210565b61046a61222b565b3480156109f657600080fd5b506104967f0000000000000000000000000000000000000000000000000000000000000d0581565b348015610a2a57600080fd5b5061049660095481565b348015610a4057600080fd5b506103db610a4f3660046140ab565b61239e565b348015610a6057600080fd5b506103a6610a6f366004613f2a565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b348015610aa957600080fd5b5061046a610ab8366004613d4b565b61265a565b348015610ac957600080fd5b506103db610ad83660046140ab565b6126f2565b348015610ae957600080fd5b5061049660155481565b60006001600160e01b031982166380ac58cd60e01b1480610b2457506001600160e01b03198216635b5e139f60e01b145b80610b3f57506301ffc9a760e01b6001600160e01b03198316145b92915050565b60606000610b5e610b59846000600161281d565b6128e9565b90506000610b72610b59856001600261281d565b90506000610b86610b59866005600661281d565b6040805160c081018252600f608082019081526e726762283133302c3130312c38322960881b60a0830152815281518083018352600d81526c7267622837372c38332c38372960981b6020828101919091528083019190915282518084018452601081526f726762283132312c3132362c3133392960801b818301528284015282518084019093526005835264626c61636b60d81b90830152606081019190915290915060008160ff861660048110610c4157610c416140ef565b6020908102919091015160408051610120810182528281528151808301835260148152737267622837302e392c3139352e352c38322e382960601b818601528185015281518083018352600f8082526e726762283138312c3132392c36382960881b828701528284019190915282518084018452601081526f726762283137302c3231382c3137302960801b818701526060830152825180840184528181526e726762283139352c3135352c36352960881b81870152608083015282518084018452600d81526c726762283235352c302c33302960981b8187015260a0830152825180840184528181526e7267622833392c3130302c3235352960881b8187015260c0830152825180840184529081526e726762283134382c34322c3233352960881b8186015260e082015281518083019092526005825264776869746560d81b93820193909352610100830152915060008160ff871660098110610da857610da86140ef565b60200201519050600060405180604001604052806040518060800160405280604a8152602001614bc8604a913981526020016040518060800160405280604a8152602001614c52604a91398152509050600084604051602001610e0b9190614121565b60405160208183030381529060405290506000828860ff1660028110610e3357610e336140ef565b602002015184604051602001610e4a9291906141d4565b60408051601f1981840301815291905260145490915060009060ff16610e705782610e81565b604051806020016040528060008152505b60145460ff16610e915782610ea2565b604051806020016040528060008152505b604051602001610eb3929190614211565b60405160208183030381529060405290506020610ecf826129a7565b604051602001610ee09291906145c7565b6040516020818303038152906040529b505050505050505050505050919050565b606060038054610f10906144f2565b80601f0160208091040260200160405190810160405280929190818152602001828054610f3c906144f2565b8015610f895780601f10610f5e57610100808354040283529160200191610f89565b820191906000526020600020905b815481529060010190602001808311610f6c57829003601f168201915b5050505050905090565b60128054610fa0906144f2565b80601f0160208091040260200160405190810160405280929190818152602001828054610fcc906144f2565b80156110195780601f10610fee57610100808354040283529160200191611019565b820191906000526020600020905b815481529060010190602001808311610ffc57829003601f168201915b505050505081565b600061102c82612b0e565b611049576040516333d1c03960e21b815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b600061107082611697565b9050806001600160a01b0316836001600160a01b031614156110a55760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b038216148015906110c557506110c38133610a6f565b155b156110e3576040516367d9dca160e11b815260040160405180910390fd5b6110ee838383612b3a565b505050565b6000546001600160a01b031633146111265760405162461bcd60e51b815260040161111d906145ec565b60405180910390fd5b60005b600681101561115b576000818152601760205260408120611149916138d6565b8061115381614637565b915050611129565b50565b6000546001600160a01b031633146111885760405162461bcd60e51b815260040161111d906145ec565b6110ee601383836138f7565b6000546001600160a01b031633146111be5760405162461bcd60e51b815260040161111d906145ec565b601555565b6110ee838383612b96565b6000546001600160a01b031633146111f85760405162461bcd60e51b815260040161111d906145ec565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b031633146112445760405162461bcd60e51b815260040161111d906145ec565b6002600a5414156112975760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161111d565b6002600a556112a581612daa565b506001600a55565b601760205281600052604060002081815481106112c957600080fd5b9060005260206000209060020201600091509150508060000180546112ed906144f2565b80601f0160208091040260200160405190810160405280929190818152602001828054611319906144f2565b80156113665780601f1061133b57610100808354040283529160200191611366565b820191906000526020600020905b81548152906001019060200180831161134957829003601f168201915b50505050509080600101805461137b906144f2565b80601f01602080910402602001604051908101604052809291908181526020018280546113a7906144f2565b80156113f45780601f106113c9576101008083540402835291602001916113f4565b820191906000526020600020905b8154815290600101906020018083116113d757829003601f168201915b5050505050905082565b6000546001600160a01b031633146114285760405162461bcd60e51b815260040161111d906145ec565b600d805482919060ff1916600183600381111561144757611447613f87565b021790555050565b6000546001600160a01b031633146114795760405162461bcd60e51b815260040161111d906145ec565b60005b81518110156110ee576017600084815260200190815260200160002060405180604001604052808484815181106114b5576114b56140ef565b60200260200101516000015181526020018484815181106114d8576114d86140ef565b602090810291909101810151810151909152825460018101845560009384529281902082518051939460020290910192611515928492019061397b565b50602082810151805161152e926001850192019061397b565b505050808061153c90614637565b91505061147c565b5050565b6000546001600160a01b031633146115725760405162461bcd60e51b815260040161111d906145ec565b7f0000000000000000000000000000000000000000000000000000000000000d05816115a16002546001540390565b6115ab9190614652565b11156115ee5760405162461bcd60e51b815260206004820152601260248201527172656163686564206d617820737570706c7960701b604482015260640161111d565b60005b8181101561154457611604336001612ed8565b8061160e81614637565b9150506115f1565b6000546001600160a01b031633146116405760405162461bcd60e51b815260040161111d906145ec565b6040514790339082156108fc029083906000818181858888f19350505050158015611544573d6000803e3d6000fd5b6110ee83838360405180602001604052806000815250611e5f565b600f8054610fa0906144f2565b60006116a282612ef2565b5192915050565b60138054610fa0906144f2565b60006001600160a01b0382166116df576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b03166000908152600660205260409020546001600160401b031690565b6000546001600160a01b0316331461172e5760405162461bcd60e51b815260040161111d906145ec565b611738600061300d565b565b6000546001600160a01b031633146117645760405162461bcd60e51b815260040161111d906145ec565b6110ee601083836138f7565b606060006117808360155461305d565b905061178c81846126f2565b9392505050565b3233146117e25760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000604482015260640161111d565b6001600d5460ff1660038111156117fb576117fb613f87565b148061181d57506002600d5460ff16600381111561181b5761181b613f87565b145b6118695760405162461bcd60e51b815260206004820152601a60248201527f50726573616c65206d696e74696e67206e6f7420616374697665000000000000604482015260640161111d565b7f0000000000000000000000000000000000000000000000000000000000000d056118976002546001540390565b6118a2906001614652565b11156118c05760405162461bcd60e51b815260040161111d9061466a565b34600b5411156119125760405162461bcd60e51b815260206004820152601b60248201527f416d6f756e742073656e7420697320696e73756666696369656e740000000000604482015260640161111d565b6119a882828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602082015233603c820152605c0191506119849050565b6040516020818303038152906040528051906020012061310990919063ffffffff16565b600d5461010090046001600160a01b03908116911614611a055760405162461bcd60e51b815260206004820152601860248201527729b4b3b732b91030b2323932b9b99036b4b9b6b0ba31b41760411b604482015260640161111d565b3360009081526018602052604090205415611a535760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b604482015260640161111d565b3360008181526018602052604090206001908190556115449190612ed8565b6000546001600160a01b03163314611a9c5760405162461bcd60e51b815260040161111d906145ec565b6014805460ff1916911515919091179055565b6000546001600160a01b03163314611ad95760405162461bcd60e51b815260040161111d906145ec565b600d8054610100600160a81b0319166101006001600160a01b0394851602179055600e80546001600160a01b03191691909216179055565b6040805160608101825260008082526020820181905291810191909152610b3f82612ef2565b606060048054610f10906144f2565b6000546001600160a01b03163314611b705760405162461bcd60e51b815260040161111d906145ec565b6110ee601183836138f7565b6000546001600160a01b03163314611ba65760405162461bcd60e51b815260040161111d906145ec565b6110ee601283836138f7565b6001600160a01b038216331415611bdc5760405163b06307db60e01b815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6002600d5460ff166003811115611c6157611c61613f87565b14611ca55760405162461bcd60e51b815260206004820152601460248201527346726565206d696e74206e6f742061637469766560601b604482015260640161111d565b7f0000000000000000000000000000000000000000000000000000000000000d05611cd36002546001540390565b611cde906001614652565b1115611cfc5760405162461bcd60e51b815260040161111d9061466a565b611d6e82828080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506040517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602082015233603c820152605c0191506119849050565b600e546001600160a01b03908116911614611dc65760405162461bcd60e51b815260206004820152601860248201527729b4b3b732b91030b2323932b9b99036b4b9b6b0ba31b41760411b604482015260640161111d565b3360009081526019602052604090205415611e145760405162461bcd60e51b815260206004820152600e60248201526d105b1c9958591e481b5a5b9d195960921b604482015260640161111d565b611e1f336001612ed8565b505033600090815260196020526040902060019055565b60108054610fa0906144f2565b60606000611e538360155461305d565b905061178c818461239e565b611e6a848484612b96565b611e7684848484613125565b611e93576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b60118054610fa0906144f2565b60606000611eb3856116b6565b905080611ed057505060408051600081526020810190915261178c565b6000816001600160401b03811115611eea57611eea613a9c565b604051908082528060200260200182016040528015611f13578160200160208202803683370190505b5090506000855b85811015611f8f5783821415611f2f57611f8f565b876001600160a01b0316611f4282611697565b6001600160a01b03161415611f7d5780838381518110611f6457611f646140ef565b602090810291909101015281611f7981614637565b9250505b80611f8781614637565b915050611f1a565b50909695505050505050565b60606000611fab8360155461305d565b90506000611fb884613234565b604051602001611fc8919061469f565b60408051601f1981840301815290829052611fe5916020016146cd565b60405160208183030381529060405290508061208b60138054612007906144f2565b80601f0160208091040260200160405190810160405280929190818152602001828054612033906144f2565b80156120805780601f1061205557610100808354040283529160200191612080565b820191906000526020600020905b81548152906001019060200180831161206357829003601f168201915b505050505051151590565b61209d5761209883610b45565b6120c1565b6013856040516020016120b1929190614798565b6040516020818303038152906040525b6040516020016120d29291906147b1565b6040516020818303038152906040529050806120ee838661239e565b6040516020016120ff9291906147fb565b60405160208183030381529060405290508061212160128054612007906144f2565b6121345761212f83866126f2565b612158565b601285604051602001612148929190614798565b6040516020818303038152906040525b604051602001612169929190614821565b60408051601f19818403018152828201909152601d82527f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000602083015291506121b1826129a7565b6040516020016121c29291906147fb565b60405160208183030381529060405292505050919050565b6000546001600160a01b031633146122045760405162461bcd60e51b815260040161111d906145ec565b6110ee600f83836138f7565b606060006122208360155461305d565b905061178c81610b45565b32331461227a5760405162461bcd60e51b815260206004820152601e60248201527f5468652063616c6c657220697320616e6f7468657220636f6e74726163740000604482015260640161111d565b6003600d5460ff16600381111561229357612293613f87565b146122ea5760405162461bcd60e51b815260206004820152602160248201527f5075626c69632073616c65206d696e74696e67206973206e6f742061637469766044820152606560f81b606482015260840161111d565b7f0000000000000000000000000000000000000000000000000000000000000d056123186002546001540390565b612323906001614652565b11156123415760405162461bcd60e51b815260040161111d9061466a565b34600c5411156123935760405162461bcd60e51b815260206004820152601b60248201527f416d6f756e742073656e7420697320696e73756666696369656e740000000000604482015260640161111d565b611738336001612ed8565b60606123ad6002546001540390565b82106123f25760405162461bcd60e51b8152602060048201526014602482015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b604482015260640161111d565b60145460ff161561241c57506040805180820190915260028152615b5d60f01b6020820152610b3f565b6016546001600160a01b0316156124b7576016546040516357e0286d60e11b8152600481018490526001600160a01b0390911690819063afc050da9060240160006040518083038186803b15801561247357600080fd5b505afa158015612487573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526124af919081019061487e565b915050610b3f565b6000620186a0836015546040516020016124db929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6124fe9190614901565b9050606060005b60068160ff161015612603576000612531610b598860ff8516612529866001614915565b60ff1661281d565b905082601760008460ff1681526020019081526020016000208260ff168154811061255e5761255e6140ef565b9060005260206000209060020201600101601760008560ff1681526020019081526020016000208360ff1681548110612599576125996140ef565b90600052602060002090600202016000016040516020016125bc9392919061493a565b6040516020818303038152906040529250826040516020016125de91906149a7565b60405160208183030381529060405292505080806125fb906149cc565b915050612505565b508061260e83613234565b60405160200161261f9291906149ec565b6040516020818303038152906040529050806040516020016126419190614a53565b6040516020818303038152906040529250505092915050565b6000546001600160a01b031633146126845760405162461bcd60e51b815260040161111d906145ec565b6001600160a01b0381166126e95760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161111d565b61115b8161300d565b60145460609060ff16156127bc57602161279560108054612712906144f2565b80601f016020809104026020016040519081016040528092919081815260200182805461273e906144f2565b801561278b5780601f106127605761010080835404028352916020019161278b565b820191906000526020600020905b81548152906001019060200180831161276e57829003601f168201915b50505050506129a7565b6040516020016127a69291906145c7565b6040516020818303038152906040529050610b3f565b60216127f5600f6127cd868661239e565b60116040516020016127e193929190614a87565b6040516020818303038152906040526129a7565b6040516020016128069291906145c7565b604051602081830303815290604052905092915050565b606083600061282c8585614aba565b6001600160401b0381111561284357612843613a9c565b6040519080825280601f01601f19166020018201604052801561286d576020820181803683370190505b509050845b848110156128df5782818151811061288c5761288c6140ef565b01602001516001600160f81b031916826128a68884614aba565b815181106128b6576128b66140ef565b60200101906001600160f81b031916908160001a905350806128d781614637565b915050612872565b5095945050505050565b60008181805b82518160ff16101561299f576030838260ff1681518110612912576129126140ef565b016020015160f81c1080159061294557506039838260ff168151811061293a5761293a6140ef565b016020015160f81c11155b1561298d57612955600a83614ad1565b91506030838260ff168151811061296e5761296e6140ef565b0160200151612980919060f81c614afa565b61298a9083614915565b91505b80612997816149cc565b9150506128ef565b509392505050565b60608151600014156129c757505060408051602081019091526000815290565b6000604051806060016040528060408152602001614c1260409139905060006003845160026129f69190614652565b612a009190614b1d565b612a0b906004614b31565b90506000612a1a826020614652565b6001600160401b03811115612a3157612a31613a9c565b6040519080825280601f01601f191660200182016040528015612a5b576020820181803683370190505b509050818152600183018586518101602084015b81831015612ac95760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b93820193909352600401612a6f565b600389510660018114612ae35760028114612af457612b00565b613d3d60f01b600119830152612b00565b603d60f81b6000198301525b509398975050505050505050565b600060015482108015610b3f575050600090815260056020526040902054600160e01b900460ff161590565b60008281526007602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000612ba182612ef2565b80519091506000906001600160a01b0316336001600160a01b03161480612bcf57508151612bcf9033610a6f565b80612bea575033612bdf84611021565b6001600160a01b0316145b905080612c0a57604051632ce44b5f60e11b815260040160405180910390fd5b846001600160a01b031682600001516001600160a01b031614612c3f5760405162a1148160e81b815260040160405180910390fd5b6001600160a01b038416612c6657604051633a954ecd60e21b815260040160405180910390fd5b612c766000848460000151612b3a565b6001600160a01b038581166000908152600660209081526040808320805467ffffffffffffffff198082166001600160401b0392831660001901831617909255898616808652838620805493841693831660019081018416949094179055898652600590945282852080546001600160e01b031916909417600160a01b429092169190910217909255908601808352912054909116612d6057600154811015612d6057825160008281526005602090815260409091208054918601516001600160401b0316600160a01b026001600160e01b03199092166001600160a01b03909316929092171790555b5082846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45b5050505050565b80612dc8576040516356be441560e01b815260040160405180910390fd5b600154612de85760405163c0367cab60e01b815260040160405180910390fd5b6009546001548110612e0d576040516370e89b1b60e01b815260040160405180910390fd5b6001548282016000198101911015612e285750600154600019015b815b818111612ecd576000818152600560205260409020546001600160a01b0316158015612e6c5750600081815260056020526040902054600160e01b900460ff16155b15612ec5576000612e7c82612ef2565b80516000848152600560209081526040909120805491909301516001600160401b0316600160a01b026001600160e01b03199091166001600160a01b0390921691909117179055505b600101612e2a565b506001016009555050565b611544828260405180602001604052806000815250613331565b60408051606081018252600080825260208201819052918101919091526001548290811015612ff457600081815260056020908152604091829020825160608101845290546001600160a01b0381168252600160a01b81046001600160401b031692820192909252600160e01b90910460ff16151591810182905290612ff25780516001600160a01b031615612f89579392505050565b5060001901600081815260056020908152604091829020825160608101845290546001600160a01b038116808352600160a01b82046001600160401b031693830193909352600160e01b900460ff1615159281019290925215612fed579392505050565b612f89565b505b604051636f96cda160e11b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60408051602081019091526000808252606091905b60068160ff16101561299f576000612710868660405160200161309f929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c6130c29190614901565b9050826130d38261ffff168461333e565b6040516020016130e49291906147fb565b6040516020818303038152906040529250508080613101906149cc565b915050613072565b6000806000613118858561341a565b9150915061299f8161348a565b60006001600160a01b0384163b1561322857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613169903390899088908890600401614b50565b602060405180830381600087803b15801561318357600080fd5b505af19250505080156131b3575060408051601f3d908101601f191682019092526131b091810190614b8d565b60015b61320e573d8080156131e1576040519150601f19603f3d011682016040523d82523d6000602084013e6131e6565b606091505b508051613206576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061322c565b5060015b949350505050565b6060816132585750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613282578061326c81614637565b915061327b9050600a83614b1d565b915061325c565b6000816001600160401b0381111561329c5761329c613a9c565b6040519080825280601f01601f1916602001820160405280156132c6576020820181803683370190505b5090505b841561322c576132db600183614aba565b91506132e8600a86614901565b6132f3906030614652565b60f81b818381518110613308576133086140ef565b60200101906001600160f81b031916908160001a90535061332a600a86614b1d565b94506132ca565b6110ee8383836001613645565b60606000805b601a8460ff166006811061335a5761335a6140ef565b015460ff82161015613414576000601a8560ff166006811061337e5761337e6140ef565b018260ff1681548110613393576133936140ef565b90600052602060002090601091828204019190066002029054906101000a900461ffff1690508261ffff1686101580156133d957506133d28184614baa565b61ffff1686105b156133f4576133ea8260ff16613234565b9350505050610b3f565b6133fe8184614baa565b925050808061340c906149cc565b915050613344565b50600080fd5b6000808251604114156134515760208301516040840151606085015160001a613445878285856137b0565b94509450505050613483565b82516040141561347b576020830151604084015161347086838361389d565b935093505050613483565b506000905060025b9250929050565b600081600481111561349e5761349e613f87565b14156134a75750565b60018160048111156134bb576134bb613f87565b14156135095760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161111d565b600281600481111561351d5761351d613f87565b141561356b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161111d565b600381600481111561357f5761357f613f87565b14156135d85760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161111d565b60048160048111156135ec576135ec613f87565b141561115b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161111d565b6001546001600160a01b03851661366e57604051622e076360e81b815260040160405180910390fd5b8361368c5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b038516600081815260066020908152604080832080546fffffffffffffffffffffffffffffffff1981166001600160401b038083168c0181169182176801000000000000000067ffffffffffffffff1990941690921783900481168c018116909202179091558584526005909252822080546001600160e01b031916909317600160a01b42909216919091021790915581905b858110156137a75760405182906001600160a01b038916906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a483801561377d575061377b6000888488613125565b155b1561379b576040516368d2bf6b60e11b815260040160405180910390fd5b60019182019101613726565b50600155612da3565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156137e75750600090506003613894565b8460ff16601b141580156137ff57508460ff16601c14155b156138105750600090506004613894565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613864573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661388d57600060019250925050613894565b9150600090505b94509492505050565b6000806001600160ff1b038316816138ba60ff86901c601b614652565b90506138c8878288856137b0565b935093505050935093915050565b508054600082556002029060005260206000209081019061115b91906139ef565b828054613903906144f2565b90600052602060002090601f016020900481019282613925576000855561396b565b82601f1061393e5782800160ff1982351617855561396b565b8280016001018555821561396b579182015b8281111561396b578235825591602001919060010190613950565b50613977929150613a1a565b5090565b828054613987906144f2565b90600052602060002090601f0160209004810192826139a9576000855561396b565b82601f106139c257805160ff191683800117855561396b565b8280016001018555821561396b579182015b8281111561396b5782518255916020019190600101906139d4565b80821115613977576000613a038282613a2f565b613a11600183016000613a2f565b506002016139ef565b5b808211156139775760008155600101613a1b565b508054613a3b906144f2565b6000825580601f10613a4b575050565b601f01602090049060005260206000209081019061115b9190613a1a565b6001600160e01b03198116811461115b57600080fd5b600060208284031215613a9157600080fd5b813561178c81613a69565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715613ad457613ad4613a9c565b60405290565b604051601f8201601f191681016001600160401b0381118282101715613b0257613b02613a9c565b604052919050565b60006001600160401b03821115613b2357613b23613a9c565b50601f01601f191660200190565b6000613b44613b3f84613b0a565b613ada565b9050828152838383011115613b5857600080fd5b828260208301376000602084830101529392505050565b600082601f830112613b8057600080fd5b61178c83833560208501613b31565b600060208284031215613ba157600080fd5b81356001600160401b03811115613bb757600080fd5b61322c84828501613b6f565b60005b83811015613bde578181015183820152602001613bc6565b83811115611e935750506000910152565b60008151808452613c07816020860160208601613bc3565b601f01601f19169290920160200192915050565b60208152600061178c6020830184613bef565b600060208284031215613c4057600080fd5b5035919050565b80356001600160a01b0381168114613c5e57600080fd5b919050565b60008060408385031215613c7657600080fd5b613c7f83613c47565b946020939093013593505050565b60008083601f840112613c9f57600080fd5b5081356001600160401b03811115613cb657600080fd5b60208301915083602082850101111561348357600080fd5b60008060208385031215613ce157600080fd5b82356001600160401b03811115613cf757600080fd5b613d0385828601613c8d565b90969095509350505050565b600080600060608486031215613d2457600080fd5b613d2d84613c47565b9250613d3b60208501613c47565b9150604084013590509250925092565b600060208284031215613d5d57600080fd5b61178c82613c47565b60008060408385031215613d7957600080fd5b50508035926020909101359150565b604081526000613d9b6040830185613bef565b8281036020840152613dad8185613bef565b95945050505050565b600060208284031215613dc857600080fd5b81356004811061178c57600080fd5b6000806040808486031215613deb57600080fd5b833592506020808501356001600160401b0380821115613e0a57600080fd5b818701915087601f830112613e1e57600080fd5b813581811115613e3057613e30613a9c565b8060051b613e3f858201613ada565b918252838101850191858101908b841115613e5957600080fd5b86860192505b83831015613eed57823585811115613e775760008081fd5b8601808d03601f1901891315613e8d5760008081fd5b613e95613ab2565b8882013587811115613ea75760008081fd5b613eb58f8b83860101613b6f565b8252508982013587811115613eca5760008081fd5b613ed88f8b83860101613b6f565b828b0152508352509186019190860190613e5f565b80985050505050505050509250929050565b80358015158114613c5e57600080fd5b600060208284031215613f2157600080fd5b61178c82613eff565b60008060408385031215613f3d57600080fd5b613f4683613c47565b9150613f5460208401613c47565b90509250929050565b60008060408385031215613f7057600080fd5b613f7983613c47565b9150613f5460208401613eff565b634e487b7160e01b600052602160045260246000fd5b6020810160048310613fbf57634e487b7160e01b600052602160045260246000fd5b91905290565b60008060008060808587031215613fdb57600080fd5b613fe485613c47565b9350613ff260208601613c47565b92506040850135915060608501356001600160401b0381111561401457600080fd5b8501601f8101871361402557600080fd5b61403487823560208401613b31565b91505092959194509250565b60008060006060848603121561405557600080fd5b61405e84613c47565b95602085013595506040909401359392505050565b6020808252825182820181905260009190848201906040850190845b81811015611f8f5783518352928401929184019160010161408f565b600080604083850312156140be57600080fd5b82356001600160401b038111156140d457600080fd5b6140e085828601613b6f565b95602094909401359450505050565b634e487b7160e01b600052603260045260246000fd5b60008151614117818560208601613bc3565b9290920192915050565b7f3c7061746820643d224d3332322e363534203137332e3035334c3138392e373781527f203135352e3334326c32362e373032203132332e3039322d3130312e3333362060208201527f34352e313037203236352e3732382032312e3131372d38362e3732382d36322e60408201526b18999bbd11103334b6361e9160a11b6060820152600082516141ba81606c850160208701613bc3565b6211179f60e91b606c939091019283015250606f01919050565b600083516141e6818460208801613bc3565b8351908301906141fa818360208801613bc3565b6211179f60e91b9101908152600301949350505050565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f73766722207072657365727665417370656374526174696f3d22784d6960208201527f6e594d696e206d656574222077696474683d2235303022206865696768743d2260408201527f353030223e3c7465787420666f6e742d66616d696c793d2273616e732d73657260608201527f69662220666f6e742d73697a653d2235362220666f6e742d7765696768743d2260808201527f32303022206c65747465722d73706163696e673d222d312e313222207472616e60a08201527f73666f726d3d227472616e736c617465283339382e3633203435352e3731292260c08201527f3e3c747370616e20783d222d38342e30342220793d2231382e3036223e433c2f60e08201527f747370616e3e3c747370616e20783d222d34362e35322220793d2231382e30366101008201527f223e4c3c2f747370616e3e3c747370616e20783d222d31342e32312220793d226101208201527f31382e3036223e413c2f747370616e3e3c747370616e20783d2231392e3922206101408201527f793d2231382e3036223e593c2f747370616e3e3c747370616e20783d2235352e6101608201527f32392220793d2231382e3036223e5f3c2f747370616e3e3c2f746578743e3c746101808201527f65787420666f6e742d66616d696c793d2273616e732d73657269662220666f6e6101a08201527f742d73697a653d2231352220666f6e742d7765696768743d22333030222074726101c08201527f616e73666f726d3d227472616e736c6174652832343820313929223e3c7473706101e08201527f616e20783d222d36362e38372220793d22322e3238223e4f70656e20746f20736102008201527f656520334420766965773c2f747370616e3e3c2f746578743e00000000000000610220820152600061322c6144e06144da610239850187614105565b85614105565b651e17b9bb339f60d11b815260060190565b600181811c9082168061450657607f821691505b6020821081141561452757634e487b7160e01b600052602260045260246000fd5b50919050565b8054600090600181811c908083168061454757607f831692505b602080841082141561456957634e487b7160e01b600052602260045260246000fd5b81801561457d576001811461458e576145bb565b60ff198616895284890196506145bb565b60008881526020902060005b868110156145b35781548b82015290850190830161459a565b505084890196505b50505050505092915050565b60006145d3828561452d565b83516145e3818360208801613bc3565b01949350505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600060001982141561464b5761464b614621565b5060010190565b6000821982111561466557614665614621565b500190565b6020808252818101527f507572636861736520776f756c6420657863656564206d617820746f6b656e73604082015260600190565b65434c4159202360d01b8152600082516146c0816006850160208701613bc3565b9190910160060192915050565b683d913730b6b2911d1160b91b815281516000906146f2816009850160208701613bc3565b7f222c20226465736372697074696f6e223a22434c415920697320612066756c6c60099390910192830152507f79206f6e2d636861696e2033442067656e65726174697665206172742070726f60298201527f6a6563742e2054686520636f646520697320746865206172742c20746865206160498201527f72742069732074686520636f64652e222c2022696d616765223a2022000000006069820152608501919050565b60006147a4828561452d565b9283525050602001919050565b600083516147c3818460208801613bc3565b8351908301906147d7818360208801613bc3565b6f011161130ba3a3934b13aba32b9911d160851b9101908152601001949350505050565b6000835161480d818460208801613bc3565b8351908301906145e3818360208801613bc3565b60008351614833818460208801613bc3565b7216101130b734b6b0ba34b7b72fbab936111d1160691b9083019081528351614863816013840160208801613bc3565b61227d60f01b60139290910191820152601501949350505050565b60006020828403121561489057600080fd5b81516001600160401b038111156148a657600080fd5b8201601f810184136148b757600080fd5b80516148c5613b3f82613b0a565b8181528560208385010111156148da57600080fd5b613dad826020830160208601613bc3565b634e487b7160e01b600052601260045260246000fd5b600082614910576149106148eb565b500690565b600060ff821660ff84168060ff0382111561493257614932614621565b019392505050565b6000845161494c818460208901613bc3565b6e3d913a3930b4ba2fba3cb832911d1160891b908301908152614972600f82018661452d565b6a1116113b30b63ab2911d1160a91b81529050614992600b82018561452d565b61227d60f01b81526002019695505050505050565b600082516149b9818460208701613bc3565b600b60fa1b920191825250600101919050565b600060ff821660ff8114156149e3576149e3614621565b60010192915050565b600083516149fe818460208801613bc3565b7f7b2274726169745f74797065223a2253656564222c2276616c7565223a2200009083019081528351614a3881601e840160208801613bc3565b61227d60f01b601e9290910191820152602001949350505050565b605b60f81b815260008251614a6f816001850160208701613bc3565b605d60f81b6001939091019283015250600201919050565b6000614a93828661452d565b8451614aa3818360208901613bc3565b614aaf8183018661452d565b979650505050505050565b600082821015614acc57614acc614621565b500390565b600060ff821660ff84168160ff0481118215151615614af257614af2614621565b029392505050565b600060ff821660ff841680821015614b1457614b14614621565b90039392505050565b600082614b2c57614b2c6148eb565b500490565b6000816000190483118215151615614b4b57614b4b614621565b500290565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614b8390830184613bef565b9695505050505050565b600060208284031215614b9f57600080fd5b815161178c81613a69565b600061ffff8083168185168083038211156145e3576145e361462156fe3c7061746820643d224d3139362e393437203138382e3834396c32382e3035382d32382e3734342031312e36343820312e3539322d33372e31362033382e3537387a222066696c6c3d224142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c7061746820643d224d3139372e3031203138382e3739326c32382e3035372d32382e3734332032332e37383420332e3136372d34372e3139362034372e3039357a222066696c6c3d22a26469706673582212209ed409d0376349bad14e6ecd09a4e432afea83d07e87229edd47e3dc18d42e6a64736f6c63430008090033
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.