Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
2,000 DERP
Holders
739
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 DERPLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
OnChainKevin
Compiler Version
v0.8.12+commit.f00d7308
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.12; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "./OnChainKevinLib.sol"; import "./interfaces/IOnChainKevinRenderer.sol"; // ______ __ __ ______ __ __ ______ __ __ __ __ __ ______ __ __ __ __ __ // /\ __ \ /\ "-.\ \ /\ ___\ /\ \_\ \ /\ __ \ /\ \ /\ "-.\ \ /\ \/ / /\ ___\ /\ \ / / /\ \ /\ "-.\ \ // \ \ \/\ \ \ \ \-. \ \ \ \____ \ \ __ \ \ \ __ \ \ \ \ \ \ \-. \ \ \ _"-. \ \ __\ \ \ \'/ \ \ \ \ \ \-. \ // \ \_____\ \ \_\\"\_\ \ \_____\ \ \_\ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_\ \_\ \ \_____\ \ \__| \ \_\ \ \_\\"\_\ // \/_____/ \/_/ \/_/ \/_____/ \/_/\/_/ \/_/\/_/ \/_/ \/_/ \/_/ \/_/\/_/ \/_____/ \/_/ \/_/ \/_/ \/_/ contract OnChainKevin is ERC721Enumerable, ReentrancyGuard { using OnChainKevinLib for uint8; using Counters for Counters.Counter; Counters.Counter private tokenIds; mapping(uint256 => string) internal _tokenIdToHash; mapping(string => bool) public hashToMinted; mapping(address => uint256) public addressMintedCounts; address public renderingContractAddress; //uint256s uint256 SEED_NONCE = 0; uint256 private constant MAX_KEVINS = 2000; uint256 private constant V1_FOUNDER_KEVINS = 50; uint256 private constant MAX_PUBLIC_MINT = MAX_KEVINS - V1_FOUNDER_KEVINS; uint256 private constant NUM_LAYERS = 9; string[] private TRAIT_INDEX_NAME = [ "Lasers", "Head Accessory", "Mouth", "Face Accessory", "Eyes", "Nose", "Shirt", "Skin", "Background" ]; string public baseURI = "https://onchainkevin.com/api/v4/"; uint256 internal v1PublicKevins = 521; uint256 internal maxPerAddress = 5; uint16[][NUM_LAYERS] private TIERS; bool public isMintingPaused = true; address _owner; constructor() ERC721("OnChainKevin", "DERP") { _owner = msg.sender; // *SHOUTOUT* to Anonymice and Chain Runners for the inspiration. //Lasers TIERS[0] = [2, 5, 10, 30, 40, 50, 1863]; //Head Accessory TIERS[1] = [10, 15, 20, 35, 50, 60, 65, 70, 75, 80, 90, 95, 150, 170, 180, 190, 200, 215, 230]; //Mouth TIERS[2] = [40, 80, 100, 120, 160, 200, 250, 300, 350, 400]; //Face Accessory TIERS[3] = [10, 15, 20, 35, 50, 60, 70, 75, 80, 110, 115, 160, 220, 230, 240, 250, 260]; //Eyes TIERS[4] = [200, 250, 280, 290, 300, 330, 350]; //Nose TIERS[5] = [200, 300, 400, 500, 600]; //Shirt TIERS[6] = [40, 45, 55, 65, 80, 85, 95, 100, 110, 115, 120, 150, 220, 230, 240, 250]; //Skin TIERS[7] = [50, 750, 1200]; //Background TIERS[8] = [10, 80, 100, 180, 200, 210, 220, 230, 240, 260, 270]; } modifier whenPublicMintActive() { require(isPublicMintActive(), "Public sale not open"); _; } /* __ __ _ _ _ ___ _ _ | \/ (_)_ _| |_(_)_ _ __ _ | __| _ _ _ __| |_(_)___ _ _ ___ | |\/| | | ' \ _| | ' \/ _` | | _| || | ' \/ _| _| / _ \ ' \(_-< |_| |_|_|_||_\__|_|_||_\__, | |_| \_,_|_||_\__|\__|_\___/_||_/__/ |___/ */ 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 i.toString(); currentLowerBound = currentLowerBound + thisPercentage; } revert(); } function hash( uint256 _t, address _a, uint256 _c ) internal returns (string memory) { require(_c < 19, "Too many layers"); // This will generate a 18 character string. string memory currentHash = ""; for (uint8 i = 0; i < NUM_LAYERS; i++) { SEED_NONCE++; uint16 _randinput = uint16( uint256( keccak256( abi.encodePacked( block.timestamp, block.difficulty, _t, _a, _c, SEED_NONCE ) ) ) % MAX_KEVINS ); string memory rarity = rarityGen(_randinput, i); if (OnChainKevinLib.parseInt(rarity) < 10) { currentHash = string( abi.encodePacked(currentHash, "0", rarity) ); } else { currentHash = string( abi.encodePacked(currentHash, rarity) ); } } if (hashToMinted[currentHash]) return hash(_t, _a, _c + 1); return currentHash; } function mint(uint256 tokenId) internal { _tokenIdToHash[tokenId] = hash(tokenId, msg.sender, 0); hashToMinted[_tokenIdToHash[tokenId]] = true; _safeMint(msg.sender, tokenId); } function mintKevin(uint256 _count) external whenPublicMintActive returns (uint256, uint256) { require(_count > 0, "Invalid Kevin count"); require(tokenIds.current() + v1PublicKevins + _count <= MAX_PUBLIC_MINT, "All OnChainKevins are gone"); uint256 userMintedAmount = addressMintedCounts[msg.sender] + _count; require(userMintedAmount <= maxPerAddress, "Exceeded max mints allowed."); uint256 firstMintedId = tokenIds.current() + v1PublicKevins + 1; for (uint256 i = 0; i < _count; i++) { tokenIds.increment(); mint(tokenIds.current() + v1PublicKevins); } addressMintedCounts[msg.sender] = userMintedAmount; return (firstMintedId, _count); } /* ____ ___ ____ ___ _____ __ __ ____ __ ______ ____ ___ ____ _____ | \ / _] / || \ | || | || \ / ] || |/ \ | \ / ___/ | D ) / [_ | o || \ | __|| | || _ | / /| | | || || _ ( \_ | / | _]| || D | | |_ | | || | |/ / |_| |_| | || O || | |\__ | | \ | [_ | _ || | | _] | : || | / \_ | | | || || | |/ \ | | . \| || | || | | | | || | \ | | | | || || | |\ | |__|\_||_____||__|__||_____| |__| \__,_||__|__|\____| |__| |____|\___/ |__|__| \___| */ function isPublicMintActive() public view returns (bool) { return tokenIds.current() + v1PublicKevins < MAX_PUBLIC_MINT && isMintingPaused == false; } function hashToSVG(string memory _hash) public view returns (string memory) { if (renderingContractAddress == address(0)) { return ''; } IOnChainKevinRenderer renderer = IOnChainKevinRenderer(renderingContractAddress); return renderer.hashToSVG(_hash); } function hashToMetadata(string memory _hash) public view returns (string memory) { if (renderingContractAddress == address(0)) { return ''; } IOnChainKevinRenderer renderer = IOnChainKevinRenderer(renderingContractAddress); return renderer.hashToMetadata(_hash); } function tokenURI(uint256 _tokenId) public view override returns (string memory) { require(_exists(_tokenId), "Invalid token"); if (_tokenId > v1PublicKevins && _tokenId <= MAX_PUBLIC_MINT) { return string(abi.encodePacked(baseURI, OnChainKevinLib.toString(_tokenId), "?dna=", _tokenIdToHash[_tokenId])); } if (renderingContractAddress == address(0)) { return ''; } IOnChainKevinRenderer renderer = IOnChainKevinRenderer(renderingContractAddress); return string(abi.encodePacked(baseURI, OnChainKevinLib.toString(_tokenId), "?dna=", renderer._tokenIdToHash(_tokenId))); } function tokenIdToHash(uint256 _tokenId) public view returns (string memory) { if (_tokenId > v1PublicKevins && _tokenId <= MAX_PUBLIC_MINT) { return _tokenIdToHash[_tokenId]; } if (renderingContractAddress == address(0)) { return ''; } IOnChainKevinRenderer renderer = IOnChainKevinRenderer(renderingContractAddress); return renderer._tokenIdToHash(_tokenId); } function walletOfOwner(address _wallet) public view returns (uint256[] memory) { uint256 tokenCount = balanceOf(_wallet); uint256[] memory tokensId = new uint256[](tokenCount); for (uint256 i; i < tokenCount; i++) { tokensId[i] = tokenOfOwnerByIndex(_wallet, i); } return tokensId; } /* ___ __ __ ____ ___ ____ _____ __ __ ____ __ ______ ____ ___ ____ _____ / \ | |__| || \ / _]| \ | || | || \ / ] || |/ \ | \ / ___/ | || | | || _ | / [_ | D ) | __|| | || _ | / /| | | || || _ ( \_ | O || | | || | || _]| / | |_ | | || | |/ / |_| |_| | || O || | |\__ | | || ` ' || | || [_ | \ | _] | : || | / \_ | | | || || | |/ \ | | | \ / | | || || . \ | | | || | \ | | | | || || | |\ | \___/ \_/\_/ |__|__||_____||__|\_| |__| \__,_||__|__|\____| |__| |____|\___/ |__|__| \___| */ function setRenderingContractAddress(address _renderingContractAddress) external onlyOwner { renderingContractAddress = _renderingContractAddress; } function changeMaxPerAddress(uint256 _maxPerAddress) external onlyOwner { maxPerAddress = _maxPerAddress; } function changeBaseURI(string memory _baseURI) external onlyOwner { baseURI = _baseURI; } function changeV1PublicKevins(uint256 _v1PublicKevins) external onlyOwner { v1PublicKevins = _v1PublicKevins; } function airdropKevins(address[] memory _to, uint256[] memory _tokenIds, string[] memory _hashes) external onlyOwner returns (uint256) { uint256 length = _to.length; for (uint256 i = 0; i < length; i++) { hashToMinted[_hashes[i]] = true; _mint(_to[i], _tokenIds[i]); } return length; } function toggleMinting() external onlyOwner { isMintingPaused = !isMintingPaused; } function transferOwnership(address _newOwner) external onlyOwner { _owner = _newOwner; } modifier onlyOwner() { require(_owner == msg.sender); _; } function withdraw() external onlyOwner nonReentrant { (bool success,) = msg.sender.call{value : address(this).balance}(''); require(success, "Withdrawal failed"); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.12; interface IOnChainKevinRenderer { function _tokenIdToHash(uint256 tokenId) external view returns (string memory); function hashToSVG(string memory _hash) external view returns (string memory); function hashToMetadata(string memory _hash) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.12; library OnChainKevinLib { string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ""; // load the table into memory string memory table = TABLE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for { } lt(dataPtr, endPtr) { } { dataPtr := add(dataPtr, 3) // read 3 bytes let input := mload(dataPtr) // write 4 characters mstore( resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F)))) ) resultPtr := add(resultPtr, 1) mstore( resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F)))) ) resultPtr := add(resultPtr, 1) mstore( resultPtr, shl(248, mload(add(tablePtr, and(shr(6, input), 0x3F)))) ) resultPtr := add(resultPtr, 1) mstore( resultPtr, shl(248, mload(add(tablePtr, and(input, 0x3F)))) ) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ 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 isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// 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 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// 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) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// 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 (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/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 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 (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 (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 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 (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" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressMintedCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"_hashes","type":"string[]"}],"name":"airdropKevins","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_baseURI","type":"string"}],"name":"changeBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxPerAddress","type":"uint256"}],"name":"changeMaxPerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_v1PublicKevins","type":"uint256"}],"name":"changeV1PublicKevins","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_hash","type":"string"}],"name":"hashToMetadata","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"hashToMinted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_hash","type":"string"}],"name":"hashToSVG","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"isMintingPaused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPublicMintActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_count","type":"uint256"}],"name":"mintKevin","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderingContractAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":"address","name":"_renderingContractAddress","type":"address"}],"name":"setRenderingContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenIdToHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
600060105560066101a0908152654c617365727360d01b6101c0526080908152600e6101e08181526d48656164204163636573736f727960901b6102005260a05260056102208181526409adeeae8d60db1b6102405260c0526102609182526d46616365204163636573736f727960901b6102805260e09190915260046102a0818152634579657360e01b6102c052610100526102e0818152634e6f736560e01b61030052610120526103209182526414da1a5c9d60da1b61034052610140919091526103609081526329b5b4b760e11b61038052610160526103e0604052600a6103a090815269109858dad9dc9bdd5b9960b21b6103c052610180526200010c906011906009620005bf565b506040805180820190915260208082527f68747470733a2f2f6f6e636861696e6b6576696e2e636f6d2f6170692f76342f918101918252620001519160129162000623565b506102096013556005601455601e805460ff191660011790553480156200017757600080fd5b50604080518082018252600c81526b27b721b430b4b725b2bb34b760a11b6020808301918252835180850190945260048452630444552560e41b908401528151919291620001c89160009162000623565b508051620001de90600190602084019062000623565b50506001600a908155601e8054610100600160a81b03191633610100021781556040805160e081018252600281526005602082015290810192909252606082015260286080820152603260a082015261074760c08201526200024691506015906007620006ae565b506040805161026081018252600a8152600f60208201526014918101919091526023606082015260326080820152603c60a0820152604160c0820152604660e0820152604b6101008201526050610120820152605a610140820152605f610160820152609661018082015260aa6101a082015260b46101c082015260be6101e082015260c861020082015260d761022082015260e6610240820152620002f190601690601362000759565b50604080516101408101825260288152605060208201526064918101919091526078606082015260a06080820181905260c89082015260fa60c082015261012c60e082015261015e6101008201526101906101208201526200035890601790600a620006ae565b506040805161022081018252600a8152600f60208201526014918101919091526023606082015260326080820152603c60a080830191909152604660c0830152604b60e08301526050610100830152606e610120830152607361014083015261016082015260dc61018082015260e66101a082015260f06101c082015260fa6101e0820152610104610200820152620003f6906018906011620006ae565b506040805160e08101825260c8815260fa602082015261011891810191909152610122606082015261012c608082015261014a60a082015261015e60c082015262000446906019906007620006ae565b506040805160a08101825260c8815261012c6020820152610190918101919091526101f4606082015261025860808201526200048790601a906005620006ae565b50604080516102008101825260288152602d60208201526037918101919091526041606082015260506080820152605560a0820152605f60c0820152606460e0820152606e61010082015260736101208201526078610140820152609661016082015260dc61018082015260e66101a082015260f06101c082015260fa6101e08201526200051a90601b90601062000759565b5060408051606081018252603281526102ee60208201526104b0918101919091526200054b90601c906003620006ae565b506040805161016081018252600a81526050602082015260649181019190915260b4606082015260c8608082015260d260a082015260dc60c082015260e660e082015260f061010082015261010461012082015261010e610140820152620005b890601d90600b620006ae565b506200087b565b82805482825590600052602060002090810192821562000611579160200282015b828111156200061157825180516200060091849160209091019062000623565b5091602001919060010190620005e0565b506200061f929150620007c4565b5090565b82805462000631906200083e565b90600052602060002090601f016020900481019282620006555760008555620006a0565b82601f106200067057805160ff1916838001178555620006a0565b82800160010185558215620006a0579182015b82811115620006a057825182559160200191906001019062000683565b506200061f929150620007e5565b82805482825590600052602060002090600f01601090048101928215620006a05791602002820160005b838211156200071a57835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302620006d8565b80156200074a5782816101000a81549061ffff02191690556002016020816001010492830192600103026200071a565b50506200061f929150620007e5565b82805482825590600052602060002090600f01601090048101928215620006a05791602002820160005b838211156200071a57835183826101000a81548161ffff021916908360ff160217905550926020019260020160208160010104928301926001030262000783565b808211156200061f576000620007db8282620007fc565b50600101620007c4565b5b808211156200061f5760008155600101620007e6565b5080546200080a906200083e565b6000825580601f106200081b575050565b601f0160209004906000526020600020908101906200083b9190620007e5565b50565b600181811c908216806200085357607f821691505b602082108114156200087557634e487b7160e01b600052602260045260246000fd5b50919050565b612d6d806200088b6000396000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c80636352211e11610125578063b88d4fde116100ad578063e96978f51161007c578063e96978f514610465578063e985e9c514610485578063f1b46738146104c1578063f2fde38b146104d4578063fc889733146104e757600080fd5b8063b88d4fde14610419578063c074f4121461042c578063c87b56dd1461043f578063c973abd31461045257600080fd5b80637d55094d116100f45780637d55094d146103bb57806389ce3074146103c357806395d89b41146103d6578063a22cb465146103de578063b51a1e75146103f157600080fd5b80636352211e1461037a57806366e338701461038d5780636c0360eb146103a057806370a08231146103a857600080fd5b80632e105b42116101a857806342842e0e1161017757806342842e0e1461030e578063438b6300146103215780634f6ccce714610341578063579d9b4014610354578063621a1f741461036757600080fd5b80632e105b42146102d35780632f745c59146102e057806339a0c6f9146102f35780633ccfd60b1461030657600080fd5b806312b40a9f116101e457806312b40a9f1461029357806318160ddd146102a657806323b872dd146102b85780632d6b6224146102cb57600080fd5b806301ffc9a71461021657806306fdde031461023e578063081812fc14610253578063095ea7b31461027e575b600080fd5b610229610224366004612305565b610515565b60405190151581526020015b60405180910390f35b610246610540565b604051610235919061237a565b61026661026136600461238d565b6105d2565b6040516001600160a01b039091168152602001610235565b61029161028c3660046123c2565b61066c565b005b6102916102a13660046123ec565b610782565b6008545b604051908152602001610235565b6102916102c6366004612407565b6107c0565b6102296107f1565b601e546102299060ff1681565b6102aa6102ee3660046123c2565b610825565b610291610301366004612510565b6108bb565b6102916108ee565b61029161031c366004612407565b6109f6565b61033461032f3660046123ec565b610a11565b6040516102359190612545565b6102aa61034f36600461238d565b610ab3565b61029161036236600461238d565b610b46565b61024661037536600461238d565b610b67565b61026661038836600461238d565b610cc6565b61024661039b366004612510565b610d3d565b610246610d96565b6102aa6103b63660046123ec565b610e24565b610291610eab565b6102466103d1366004612510565b610edb565b610246610f34565b6102916103ec366004612589565b610f43565b6104046103ff36600461238d565b610f4e565b60408051928352602083019190915201610235565b6102916104273660046125c5565b611155565b600f54610266906001600160a01b031681565b61024661044d36600461238d565b61118d565b6102aa61046036600461274b565b611317565b6102aa6104733660046123ec565b600e6020526000908152604090205481565b61022961049336600461282f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102916104cf36600461238d565b6113ea565b6102916104e23660046123ec565b61140b565b6102296104f5366004612510565b8051602081830181018051600d8252928201919093012091525460ff1681565b60006001600160e01b0319821663780e9d6360e01b148061053a575061053a8261144f565b92915050565b60606000805461054f90612862565b80601f016020809104026020016040519081016040528092919081815260200182805461057b90612862565b80156105c85780601f1061059d576101008083540402835291602001916105c8565b820191906000526020600020905b8154815290600101906020018083116105ab57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166106505760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061067782610cc6565b9050806001600160a01b0316836001600160a01b031614156106e55760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610647565b336001600160a01b038216148061070157506107018133610493565b6107735760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610647565b61077d838361149f565b505050565b601e5461010090046001600160a01b0316331461079e57600080fd5b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b6107ca338261150d565b6107e65760405162461bcd60e51b81526004016106479061289d565b61077d838383611604565b600061080060326107d0612904565b601354600b54610810919061291b565b1080156108205750601e5460ff16155b905090565b600061083083610e24565b82106108925760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610647565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b601e5461010090046001600160a01b031633146108d757600080fd5b80516108ea906012906020840190612256565b5050565b601e5461010090046001600160a01b0316331461090a57600080fd5b6002600a54141561095d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610647565b6002600a55604051600090339047908381818185875af1925050503d80600081146109a4576040519150601f19603f3d011682016040523d82523d6000602084013e6109a9565b606091505b50509050806109ee5760405162461bcd60e51b815260206004820152601160248201527015da5d1a191c985dd85b0819985a5b1959607a1b6044820152606401610647565b506001600a55565b61077d83838360405180602001604052806000815250611155565b60606000610a1e83610e24565b905060008167ffffffffffffffff811115610a3b57610a3b612443565b604051908082528060200260200182016040528015610a64578160200160208202803683370190505b50905060005b82811015610aab57610a7c8582610825565b828281518110610a8e57610a8e612933565b602090810291909101015280610aa381612949565b915050610a6a565b509392505050565b6000610abe60085490565b8210610b215760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610647565b60088281548110610b3457610b34612933565b90600052602060002001549050919050565b601e5461010090046001600160a01b03163314610b6257600080fd5b601455565b606060135482118015610b865750610b8260326107d0612904565b8211155b15610c29576000828152600c602052604090208054610ba490612862565b80601f0160208091040260200160405190810160405280929190818152602001828054610bd090612862565b8015610c1d5780601f10610bf257610100808354040283529160200191610c1d565b820191906000526020600020905b815481529060010190602001808311610c0057829003601f168201915b50505050509050919050565b600f546001600160a01b0316610c4d57505060408051602081019091526000815290565b600f54604051625ea30760e01b8152600481018490526001600160a01b03909116908190625ea307906024015b600060405180830381865afa158015610c97573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610cbf9190810190612964565b9392505050565b6000818152600260205260408120546001600160a01b03168061053a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610647565b600f546060906001600160a01b0316610d6457505060408051602081019091526000815290565b600f5460405163066e338760e41b81526001600160a01b039091169081906366e3387090610c7a90869060040161237a565b60128054610da390612862565b80601f0160208091040260200160405190810160405280929190818152602001828054610dcf90612862565b8015610e1c5780601f10610df157610100808354040283529160200191610e1c565b820191906000526020600020905b815481529060010190602001808311610dff57829003601f168201915b505050505081565b60006001600160a01b038216610e8f5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610647565b506001600160a01b031660009081526003602052604090205490565b601e5461010090046001600160a01b03163314610ec757600080fd5b601e805460ff19811660ff90911615179055565b600f546060906001600160a01b0316610f0257505060408051602081019091526000815290565b600f546040516322738c1d60e21b81526001600160a01b039091169081906389ce307490610c7a90869060040161237a565b60606001805461054f90612862565b6108ea3383836117ab565b600080610f596107f1565b610f9c5760405162461bcd60e51b8152602060048201526014602482015273283ab13634b19039b0b632903737ba1037b832b760611b6044820152606401610647565b60008311610fe25760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a590812d95d9a5b8818dbdd5b9d606a1b6044820152606401610647565b610fef60326107d0612904565b83601354610ffc600b5490565b611006919061291b565b611010919061291b565b111561105e5760405162461bcd60e51b815260206004820152601a60248201527f416c6c204f6e436861696e4b6576696e732061726520676f6e650000000000006044820152606401610647565b336000908152600e602052604081205461107990859061291b565b90506014548111156110cd5760405162461bcd60e51b815260206004820152601b60248201527f4578636565646564206d6178206d696e747320616c6c6f7765642e00000000006044820152606401610647565b60006013546110db600b5490565b6110e5919061291b565b6110f090600161291b565b905060005b8581101561113b5761110b600b80546001019055565b61112960135461111a600b5490565b611124919061291b565b61187a565b8061113381612949565b9150506110f5565b50336000908152600e602052604090209190915593915050565b61115f338361150d565b61117b5760405162461bcd60e51b81526004016106479061289d565b611187848484846118fb565b50505050565b6000818152600260205260409020546060906001600160a01b03166111e45760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610647565b6013548211801561120157506111fd60326107d0612904565b8211155b156112485760126112118361192e565b6000848152600c602090815260409182902091516112329493929101612a75565b6040516020818303038152906040529050919050565b600f546001600160a01b031661126c57505060408051602081019091526000815290565b600f546001600160a01b031660126112838461192e565b604051625ea30760e01b8152600481018690526001600160a01b03841690625ea30790602401600060405180830381865afa1580156112c6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112ee9190810190612964565b60405160200161130093929190612ab6565b604051602081830303815290604052915050919050565b601e5460009061010090046001600160a01b0316331461133657600080fd5b835160005b818110156113e1576001600d85838151811061135957611359612933565b602002602001015160405161136e9190612b00565b908152602001604051809103902060006101000a81548160ff0219169083151502179055506113cf8682815181106113a8576113a8612933565b60200260200101518683815181106113c2576113c2612933565b6020026020010151611a2c565b806113d981612949565b91505061133b565b50949350505050565b601e5461010090046001600160a01b0316331461140657600080fd5b601355565b601e5461010090046001600160a01b0316331461142757600080fd5b601e80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60006001600160e01b031982166380ac58cd60e01b148061148057506001600160e01b03198216635b5e139f60e01b145b8061053a57506301ffc9a760e01b6001600160e01b031983161461053a565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906114d482610cc6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166115865760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610647565b600061159183610cc6565b9050806001600160a01b0316846001600160a01b031614806115cc5750836001600160a01b03166115c1846105d2565b6001600160a01b0316145b806115fc57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661161782610cc6565b6001600160a01b03161461167b5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610647565b6001600160a01b0382166116dd5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610647565b6116e8838383611b7a565b6116f360008261149f565b6001600160a01b038316600090815260036020526040812080546001929061171c908490612904565b90915550506001600160a01b038216600090815260036020526040812080546001929061174a90849061291b565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b0316141561180d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610647565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61188681336000611c32565b6000828152600c6020908152604090912082516118a99391929190910190612256565b506001600d600c60008481526020019081526020016000206040516118ce9190612b1c565b908152604051908190036020019020805491151560ff199092169190911790556118f83382611de9565b50565b611906848484611604565b61191284848484611e03565b6111875760405162461bcd60e51b815260040161064790612b28565b6060816119525750506040805180820190915260018152600360fc1b602082015290565b8160005b811561197c578061196681612949565b91506119759050600a83612b90565b9150611956565b60008167ffffffffffffffff81111561199757611997612443565b6040519080825280601f01601f1916602001820160405280156119c1576020820181803683370190505b5090505b84156115fc576119d6600183612904565b91506119e3600a86612ba4565b6119ee90603061291b565b60f81b818381518110611a0357611a03612933565b60200101906001600160f81b031916908160001a905350611a25600a86612b90565b94506119c5565b6001600160a01b038216611a825760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610647565b6000818152600260205260409020546001600160a01b031615611ae75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610647565b611af360008383611b7a565b6001600160a01b0382166000908152600360205260408120805460019290611b1c90849061291b565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b038316611bd557611bd081600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611bf8565b816001600160a01b0316836001600160a01b031614611bf857611bf88382611f01565b6001600160a01b038216611c0f5761077d81611f9e565b826001600160a01b0316826001600160a01b03161461077d5761077d828261204d565b606060138210611c765760405162461bcd60e51b815260206004820152600f60248201526e546f6f206d616e79206c617965727360881b6044820152606401610647565b604080516020810190915260008082525b60098160ff161015611da35760108054906000611ca383612949565b9091555050601054604080514260208201524491810191909152606080820189905287901b6bffffffffffffffffffffffff191660808201526094810186905260b48101919091526000906107d09060d4016040516020818303038152906040528051906020012060001c611d189190612ba4565b90506000611d2a8261ffff1684612091565b9050600a611d378261216d565b60ff161015611d69578381604051602001611d53929190612bb8565b6040516020818303038152906040529350611d8e565b8381604051602001611d7c929190612bf4565b60405160208183030381529060405293505b50508080611d9b90612c23565b915050611c87565b50600d81604051611db49190612b00565b9081526040519081900360200190205460ff16156115fc57611de18585611ddc86600161291b565b611c32565b915050610cbf565b6108ea828260405180602001604052806000815250612223565b60006001600160a01b0384163b15611ef657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611e47903390899088908890600401612c43565b6020604051808303816000875af1925050508015611e82575060408051601f3d908101601f19168201909252611e7f91810190612c76565b60015b611edc573d808015611eb0576040519150601f19603f3d011682016040523d82523d6000602084013e611eb5565b606091505b508051611ed45760405162461bcd60e51b815260040161064790612b28565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506115fc565b506001949350505050565b60006001611f0e84610e24565b611f189190612904565b600083815260076020526040902054909150808214611f6b576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090611fb090600190612904565b60008381526009602052604081205460088054939450909284908110611fd857611fd8612933565b906000526020600020015490508060088381548110611ff957611ff9612933565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061203157612031612c93565b6001900381819060005260206000200160009055905550505050565b600061205883610e24565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60606000805b60158460ff16600981106120ad576120ad612933565b015460ff8216101561216757600060158560ff16600981106120d1576120d1612933565b018260ff16815481106120e6576120e6612933565b90600052602060002090601091828204019190066002029054906101000a900461ffff1690508261ffff16861015801561212c57506121258184612ca9565b61ffff1686105b156121475761213d8260ff1661192e565b935050505061053a565b6121518184612ca9565b925050808061215f90612c23565b915050612097565b50600080fd5b60008181805b82518160ff161015610aab576030838260ff168151811061219657612196612933565b016020015160f81c108015906121c957506039838260ff16815181106121be576121be612933565b016020015160f81c11155b15612211576121d9600a83612cc6565b91506030838260ff16815181106121f2576121f2612933565b0160200151612204919060f81c612cef565b61220e9083612d12565b91505b8061221b81612c23565b915050612173565b61222d8383611a2c565b61223a6000848484611e03565b61077d5760405162461bcd60e51b815260040161064790612b28565b82805461226290612862565b90600052602060002090601f01602090048101928261228457600085556122ca565b82601f1061229d57805160ff19168380011785556122ca565b828001600101855582156122ca579182015b828111156122ca5782518255916020019190600101906122af565b506122d69291506122da565b5090565b5b808211156122d657600081556001016122db565b6001600160e01b0319811681146118f857600080fd5b60006020828403121561231757600080fd5b8135610cbf816122ef565b60005b8381101561233d578181015183820152602001612325565b838111156111875750506000910152565b60008151808452612366816020860160208601612322565b601f01601f19169290920160200192915050565b602081526000610cbf602083018461234e565b60006020828403121561239f57600080fd5b5035919050565b80356001600160a01b03811681146123bd57600080fd5b919050565b600080604083850312156123d557600080fd5b6123de836123a6565b946020939093013593505050565b6000602082840312156123fe57600080fd5b610cbf826123a6565b60008060006060848603121561241c57600080fd5b612425846123a6565b9250612433602085016123a6565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561248257612482612443565b604052919050565b600067ffffffffffffffff8211156124a4576124a4612443565b50601f01601f191660200190565b60006124c56124c08461248a565b612459565b90508281528383830111156124d957600080fd5b828260208301376000602084830101529392505050565b600082601f83011261250157600080fd5b610cbf838335602085016124b2565b60006020828403121561252257600080fd5b813567ffffffffffffffff81111561253957600080fd5b6115fc848285016124f0565b6020808252825182820181905260009190848201906040850190845b8181101561257d57835183529284019291840191600101612561565b50909695505050505050565b6000806040838503121561259c57600080fd5b6125a5836123a6565b9150602083013580151581146125ba57600080fd5b809150509250929050565b600080600080608085870312156125db57600080fd5b6125e4856123a6565b93506125f2602086016123a6565b925060408501359150606085013567ffffffffffffffff81111561261557600080fd5b8501601f8101871361262657600080fd5b612635878235602084016124b2565b91505092959194509250565b600067ffffffffffffffff82111561265b5761265b612443565b5060051b60200190565b600082601f83011261267657600080fd5b813560206126866124c083612641565b82815260059290921b840181019181810190868411156126a557600080fd5b8286015b848110156126c057803583529183019183016126a9565b509695505050505050565b600082601f8301126126dc57600080fd5b813560206126ec6124c083612641565b82815260059290921b8401810191818101908684111561270b57600080fd5b8286015b848110156126c057803567ffffffffffffffff81111561272f5760008081fd5b61273d8986838b01016124f0565b84525091830191830161270f565b60008060006060848603121561276057600080fd5b833567ffffffffffffffff8082111561277857600080fd5b818601915086601f83011261278c57600080fd5b8135602061279c6124c083612641565b82815260059290921b8401810191818101908a8411156127bb57600080fd5b948201945b838610156127e0576127d1866123a6565b825294820194908201906127c0565b975050870135925050808211156127f657600080fd5b61280287838801612665565b9350604086013591508082111561281857600080fd5b50612825868287016126cb565b9150509250925092565b6000806040838503121561284257600080fd5b61284b836123a6565b9150612859602084016123a6565b90509250929050565b600181811c9082168061287657607f821691505b6020821081141561289757634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015612916576129166128ee565b500390565b6000821982111561292e5761292e6128ee565b500190565b634e487b7160e01b600052603260045260246000fd5b600060001982141561295d5761295d6128ee565b5060010190565b60006020828403121561297657600080fd5b815167ffffffffffffffff81111561298d57600080fd5b8201601f8101841361299e57600080fd5b80516129ac6124c08261248a565b8181528560208385010111156129c157600080fd5b6129d2826020830160208601612322565b95945050505050565b8054600090600181811c90808316806129f557607f831692505b6020808410821415612a1757634e487b7160e01b600052602260045260246000fd5b818015612a2b5760018114612a3c57612a69565b60ff19861689528489019650612a69565b60008881526020902060005b86811015612a615781548b820152908501908301612a48565b505084890196505b50505050505092915050565b6000612a8182866129db565b8451612a91818360208901612322565b643f646e613d60d81b9101908152612aac60058201856129db565b9695505050505050565b6000612ac282866129db565b8451612ad2818360208901612322565b643f646e613d60d81b91019081528351612af3816005840160208801612322565b0160050195945050505050565b60008251612b12818460208701612322565b9190910192915050565b6000610cbf82846129db565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612b9f57612b9f612b7a565b500490565b600082612bb357612bb3612b7a565b500690565b60008351612bca818460208801612322565b600360fc1b9083019081528351612be8816001840160208801612322565b01600101949350505050565b60008351612c06818460208801612322565b835190830190612c1a818360208801612322565b01949350505050565b600060ff821660ff811415612c3a57612c3a6128ee565b60010192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612aac9083018461234e565b600060208284031215612c8857600080fd5b8151610cbf816122ef565b634e487b7160e01b600052603160045260246000fd5b600061ffff808316818516808303821115612c1a57612c1a6128ee565b600060ff821660ff84168160ff0481118215151615612ce757612ce76128ee565b029392505050565b600060ff821660ff841680821015612d0957612d096128ee565b90039392505050565b600060ff821660ff84168060ff03821115612d2f57612d2f6128ee565b01939250505056fea264697066735822122040ca998ab40e18f118d70acb680219840f070e30aa21c784007aa00d0412220564736f6c634300080c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102115760003560e01c80636352211e11610125578063b88d4fde116100ad578063e96978f51161007c578063e96978f514610465578063e985e9c514610485578063f1b46738146104c1578063f2fde38b146104d4578063fc889733146104e757600080fd5b8063b88d4fde14610419578063c074f4121461042c578063c87b56dd1461043f578063c973abd31461045257600080fd5b80637d55094d116100f45780637d55094d146103bb57806389ce3074146103c357806395d89b41146103d6578063a22cb465146103de578063b51a1e75146103f157600080fd5b80636352211e1461037a57806366e338701461038d5780636c0360eb146103a057806370a08231146103a857600080fd5b80632e105b42116101a857806342842e0e1161017757806342842e0e1461030e578063438b6300146103215780634f6ccce714610341578063579d9b4014610354578063621a1f741461036757600080fd5b80632e105b42146102d35780632f745c59146102e057806339a0c6f9146102f35780633ccfd60b1461030657600080fd5b806312b40a9f116101e457806312b40a9f1461029357806318160ddd146102a657806323b872dd146102b85780632d6b6224146102cb57600080fd5b806301ffc9a71461021657806306fdde031461023e578063081812fc14610253578063095ea7b31461027e575b600080fd5b610229610224366004612305565b610515565b60405190151581526020015b60405180910390f35b610246610540565b604051610235919061237a565b61026661026136600461238d565b6105d2565b6040516001600160a01b039091168152602001610235565b61029161028c3660046123c2565b61066c565b005b6102916102a13660046123ec565b610782565b6008545b604051908152602001610235565b6102916102c6366004612407565b6107c0565b6102296107f1565b601e546102299060ff1681565b6102aa6102ee3660046123c2565b610825565b610291610301366004612510565b6108bb565b6102916108ee565b61029161031c366004612407565b6109f6565b61033461032f3660046123ec565b610a11565b6040516102359190612545565b6102aa61034f36600461238d565b610ab3565b61029161036236600461238d565b610b46565b61024661037536600461238d565b610b67565b61026661038836600461238d565b610cc6565b61024661039b366004612510565b610d3d565b610246610d96565b6102aa6103b63660046123ec565b610e24565b610291610eab565b6102466103d1366004612510565b610edb565b610246610f34565b6102916103ec366004612589565b610f43565b6104046103ff36600461238d565b610f4e565b60408051928352602083019190915201610235565b6102916104273660046125c5565b611155565b600f54610266906001600160a01b031681565b61024661044d36600461238d565b61118d565b6102aa61046036600461274b565b611317565b6102aa6104733660046123ec565b600e6020526000908152604090205481565b61022961049336600461282f565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6102916104cf36600461238d565b6113ea565b6102916104e23660046123ec565b61140b565b6102296104f5366004612510565b8051602081830181018051600d8252928201919093012091525460ff1681565b60006001600160e01b0319821663780e9d6360e01b148061053a575061053a8261144f565b92915050565b60606000805461054f90612862565b80601f016020809104026020016040519081016040528092919081815260200182805461057b90612862565b80156105c85780601f1061059d576101008083540402835291602001916105c8565b820191906000526020600020905b8154815290600101906020018083116105ab57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166106505760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061067782610cc6565b9050806001600160a01b0316836001600160a01b031614156106e55760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610647565b336001600160a01b038216148061070157506107018133610493565b6107735760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610647565b61077d838361149f565b505050565b601e5461010090046001600160a01b0316331461079e57600080fd5b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b6107ca338261150d565b6107e65760405162461bcd60e51b81526004016106479061289d565b61077d838383611604565b600061080060326107d0612904565b601354600b54610810919061291b565b1080156108205750601e5460ff16155b905090565b600061083083610e24565b82106108925760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610647565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b601e5461010090046001600160a01b031633146108d757600080fd5b80516108ea906012906020840190612256565b5050565b601e5461010090046001600160a01b0316331461090a57600080fd5b6002600a54141561095d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610647565b6002600a55604051600090339047908381818185875af1925050503d80600081146109a4576040519150601f19603f3d011682016040523d82523d6000602084013e6109a9565b606091505b50509050806109ee5760405162461bcd60e51b815260206004820152601160248201527015da5d1a191c985dd85b0819985a5b1959607a1b6044820152606401610647565b506001600a55565b61077d83838360405180602001604052806000815250611155565b60606000610a1e83610e24565b905060008167ffffffffffffffff811115610a3b57610a3b612443565b604051908082528060200260200182016040528015610a64578160200160208202803683370190505b50905060005b82811015610aab57610a7c8582610825565b828281518110610a8e57610a8e612933565b602090810291909101015280610aa381612949565b915050610a6a565b509392505050565b6000610abe60085490565b8210610b215760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610647565b60088281548110610b3457610b34612933565b90600052602060002001549050919050565b601e5461010090046001600160a01b03163314610b6257600080fd5b601455565b606060135482118015610b865750610b8260326107d0612904565b8211155b15610c29576000828152600c602052604090208054610ba490612862565b80601f0160208091040260200160405190810160405280929190818152602001828054610bd090612862565b8015610c1d5780601f10610bf257610100808354040283529160200191610c1d565b820191906000526020600020905b815481529060010190602001808311610c0057829003601f168201915b50505050509050919050565b600f546001600160a01b0316610c4d57505060408051602081019091526000815290565b600f54604051625ea30760e01b8152600481018490526001600160a01b03909116908190625ea307906024015b600060405180830381865afa158015610c97573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610cbf9190810190612964565b9392505050565b6000818152600260205260408120546001600160a01b03168061053a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610647565b600f546060906001600160a01b0316610d6457505060408051602081019091526000815290565b600f5460405163066e338760e41b81526001600160a01b039091169081906366e3387090610c7a90869060040161237a565b60128054610da390612862565b80601f0160208091040260200160405190810160405280929190818152602001828054610dcf90612862565b8015610e1c5780601f10610df157610100808354040283529160200191610e1c565b820191906000526020600020905b815481529060010190602001808311610dff57829003601f168201915b505050505081565b60006001600160a01b038216610e8f5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610647565b506001600160a01b031660009081526003602052604090205490565b601e5461010090046001600160a01b03163314610ec757600080fd5b601e805460ff19811660ff90911615179055565b600f546060906001600160a01b0316610f0257505060408051602081019091526000815290565b600f546040516322738c1d60e21b81526001600160a01b039091169081906389ce307490610c7a90869060040161237a565b60606001805461054f90612862565b6108ea3383836117ab565b600080610f596107f1565b610f9c5760405162461bcd60e51b8152602060048201526014602482015273283ab13634b19039b0b632903737ba1037b832b760611b6044820152606401610647565b60008311610fe25760405162461bcd60e51b8152602060048201526013602482015272125b9d985b1a590812d95d9a5b8818dbdd5b9d606a1b6044820152606401610647565b610fef60326107d0612904565b83601354610ffc600b5490565b611006919061291b565b611010919061291b565b111561105e5760405162461bcd60e51b815260206004820152601a60248201527f416c6c204f6e436861696e4b6576696e732061726520676f6e650000000000006044820152606401610647565b336000908152600e602052604081205461107990859061291b565b90506014548111156110cd5760405162461bcd60e51b815260206004820152601b60248201527f4578636565646564206d6178206d696e747320616c6c6f7765642e00000000006044820152606401610647565b60006013546110db600b5490565b6110e5919061291b565b6110f090600161291b565b905060005b8581101561113b5761110b600b80546001019055565b61112960135461111a600b5490565b611124919061291b565b61187a565b8061113381612949565b9150506110f5565b50336000908152600e602052604090209190915593915050565b61115f338361150d565b61117b5760405162461bcd60e51b81526004016106479061289d565b611187848484846118fb565b50505050565b6000818152600260205260409020546060906001600160a01b03166111e45760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b2103a37b5b2b760991b6044820152606401610647565b6013548211801561120157506111fd60326107d0612904565b8211155b156112485760126112118361192e565b6000848152600c602090815260409182902091516112329493929101612a75565b6040516020818303038152906040529050919050565b600f546001600160a01b031661126c57505060408051602081019091526000815290565b600f546001600160a01b031660126112838461192e565b604051625ea30760e01b8152600481018690526001600160a01b03841690625ea30790602401600060405180830381865afa1580156112c6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112ee9190810190612964565b60405160200161130093929190612ab6565b604051602081830303815290604052915050919050565b601e5460009061010090046001600160a01b0316331461133657600080fd5b835160005b818110156113e1576001600d85838151811061135957611359612933565b602002602001015160405161136e9190612b00565b908152602001604051809103902060006101000a81548160ff0219169083151502179055506113cf8682815181106113a8576113a8612933565b60200260200101518683815181106113c2576113c2612933565b6020026020010151611a2c565b806113d981612949565b91505061133b565b50949350505050565b601e5461010090046001600160a01b0316331461140657600080fd5b601355565b601e5461010090046001600160a01b0316331461142757600080fd5b601e80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60006001600160e01b031982166380ac58cd60e01b148061148057506001600160e01b03198216635b5e139f60e01b145b8061053a57506301ffc9a760e01b6001600160e01b031983161461053a565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906114d482610cc6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166115865760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610647565b600061159183610cc6565b9050806001600160a01b0316846001600160a01b031614806115cc5750836001600160a01b03166115c1846105d2565b6001600160a01b0316145b806115fc57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661161782610cc6565b6001600160a01b03161461167b5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610647565b6001600160a01b0382166116dd5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610647565b6116e8838383611b7a565b6116f360008261149f565b6001600160a01b038316600090815260036020526040812080546001929061171c908490612904565b90915550506001600160a01b038216600090815260036020526040812080546001929061174a90849061291b565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b0316141561180d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610647565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61188681336000611c32565b6000828152600c6020908152604090912082516118a99391929190910190612256565b506001600d600c60008481526020019081526020016000206040516118ce9190612b1c565b908152604051908190036020019020805491151560ff199092169190911790556118f83382611de9565b50565b611906848484611604565b61191284848484611e03565b6111875760405162461bcd60e51b815260040161064790612b28565b6060816119525750506040805180820190915260018152600360fc1b602082015290565b8160005b811561197c578061196681612949565b91506119759050600a83612b90565b9150611956565b60008167ffffffffffffffff81111561199757611997612443565b6040519080825280601f01601f1916602001820160405280156119c1576020820181803683370190505b5090505b84156115fc576119d6600183612904565b91506119e3600a86612ba4565b6119ee90603061291b565b60f81b818381518110611a0357611a03612933565b60200101906001600160f81b031916908160001a905350611a25600a86612b90565b94506119c5565b6001600160a01b038216611a825760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610647565b6000818152600260205260409020546001600160a01b031615611ae75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610647565b611af360008383611b7a565b6001600160a01b0382166000908152600360205260408120805460019290611b1c90849061291b565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b038316611bd557611bd081600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611bf8565b816001600160a01b0316836001600160a01b031614611bf857611bf88382611f01565b6001600160a01b038216611c0f5761077d81611f9e565b826001600160a01b0316826001600160a01b03161461077d5761077d828261204d565b606060138210611c765760405162461bcd60e51b815260206004820152600f60248201526e546f6f206d616e79206c617965727360881b6044820152606401610647565b604080516020810190915260008082525b60098160ff161015611da35760108054906000611ca383612949565b9091555050601054604080514260208201524491810191909152606080820189905287901b6bffffffffffffffffffffffff191660808201526094810186905260b48101919091526000906107d09060d4016040516020818303038152906040528051906020012060001c611d189190612ba4565b90506000611d2a8261ffff1684612091565b9050600a611d378261216d565b60ff161015611d69578381604051602001611d53929190612bb8565b6040516020818303038152906040529350611d8e565b8381604051602001611d7c929190612bf4565b60405160208183030381529060405293505b50508080611d9b90612c23565b915050611c87565b50600d81604051611db49190612b00565b9081526040519081900360200190205460ff16156115fc57611de18585611ddc86600161291b565b611c32565b915050610cbf565b6108ea828260405180602001604052806000815250612223565b60006001600160a01b0384163b15611ef657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290611e47903390899088908890600401612c43565b6020604051808303816000875af1925050508015611e82575060408051601f3d908101601f19168201909252611e7f91810190612c76565b60015b611edc573d808015611eb0576040519150601f19603f3d011682016040523d82523d6000602084013e611eb5565b606091505b508051611ed45760405162461bcd60e51b815260040161064790612b28565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506115fc565b506001949350505050565b60006001611f0e84610e24565b611f189190612904565b600083815260076020526040902054909150808214611f6b576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090611fb090600190612904565b60008381526009602052604081205460088054939450909284908110611fd857611fd8612933565b906000526020600020015490508060088381548110611ff957611ff9612933565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061203157612031612c93565b6001900381819060005260206000200160009055905550505050565b600061205883610e24565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60606000805b60158460ff16600981106120ad576120ad612933565b015460ff8216101561216757600060158560ff16600981106120d1576120d1612933565b018260ff16815481106120e6576120e6612933565b90600052602060002090601091828204019190066002029054906101000a900461ffff1690508261ffff16861015801561212c57506121258184612ca9565b61ffff1686105b156121475761213d8260ff1661192e565b935050505061053a565b6121518184612ca9565b925050808061215f90612c23565b915050612097565b50600080fd5b60008181805b82518160ff161015610aab576030838260ff168151811061219657612196612933565b016020015160f81c108015906121c957506039838260ff16815181106121be576121be612933565b016020015160f81c11155b15612211576121d9600a83612cc6565b91506030838260ff16815181106121f2576121f2612933565b0160200151612204919060f81c612cef565b61220e9083612d12565b91505b8061221b81612c23565b915050612173565b61222d8383611a2c565b61223a6000848484611e03565b61077d5760405162461bcd60e51b815260040161064790612b28565b82805461226290612862565b90600052602060002090601f01602090048101928261228457600085556122ca565b82601f1061229d57805160ff19168380011785556122ca565b828001600101855582156122ca579182015b828111156122ca5782518255916020019190600101906122af565b506122d69291506122da565b5090565b5b808211156122d657600081556001016122db565b6001600160e01b0319811681146118f857600080fd5b60006020828403121561231757600080fd5b8135610cbf816122ef565b60005b8381101561233d578181015183820152602001612325565b838111156111875750506000910152565b60008151808452612366816020860160208601612322565b601f01601f19169290920160200192915050565b602081526000610cbf602083018461234e565b60006020828403121561239f57600080fd5b5035919050565b80356001600160a01b03811681146123bd57600080fd5b919050565b600080604083850312156123d557600080fd5b6123de836123a6565b946020939093013593505050565b6000602082840312156123fe57600080fd5b610cbf826123a6565b60008060006060848603121561241c57600080fd5b612425846123a6565b9250612433602085016123a6565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff8111828210171561248257612482612443565b604052919050565b600067ffffffffffffffff8211156124a4576124a4612443565b50601f01601f191660200190565b60006124c56124c08461248a565b612459565b90508281528383830111156124d957600080fd5b828260208301376000602084830101529392505050565b600082601f83011261250157600080fd5b610cbf838335602085016124b2565b60006020828403121561252257600080fd5b813567ffffffffffffffff81111561253957600080fd5b6115fc848285016124f0565b6020808252825182820181905260009190848201906040850190845b8181101561257d57835183529284019291840191600101612561565b50909695505050505050565b6000806040838503121561259c57600080fd5b6125a5836123a6565b9150602083013580151581146125ba57600080fd5b809150509250929050565b600080600080608085870312156125db57600080fd5b6125e4856123a6565b93506125f2602086016123a6565b925060408501359150606085013567ffffffffffffffff81111561261557600080fd5b8501601f8101871361262657600080fd5b612635878235602084016124b2565b91505092959194509250565b600067ffffffffffffffff82111561265b5761265b612443565b5060051b60200190565b600082601f83011261267657600080fd5b813560206126866124c083612641565b82815260059290921b840181019181810190868411156126a557600080fd5b8286015b848110156126c057803583529183019183016126a9565b509695505050505050565b600082601f8301126126dc57600080fd5b813560206126ec6124c083612641565b82815260059290921b8401810191818101908684111561270b57600080fd5b8286015b848110156126c057803567ffffffffffffffff81111561272f5760008081fd5b61273d8986838b01016124f0565b84525091830191830161270f565b60008060006060848603121561276057600080fd5b833567ffffffffffffffff8082111561277857600080fd5b818601915086601f83011261278c57600080fd5b8135602061279c6124c083612641565b82815260059290921b8401810191818101908a8411156127bb57600080fd5b948201945b838610156127e0576127d1866123a6565b825294820194908201906127c0565b975050870135925050808211156127f657600080fd5b61280287838801612665565b9350604086013591508082111561281857600080fd5b50612825868287016126cb565b9150509250925092565b6000806040838503121561284257600080fd5b61284b836123a6565b9150612859602084016123a6565b90509250929050565b600181811c9082168061287657607f821691505b6020821081141561289757634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b600082821015612916576129166128ee565b500390565b6000821982111561292e5761292e6128ee565b500190565b634e487b7160e01b600052603260045260246000fd5b600060001982141561295d5761295d6128ee565b5060010190565b60006020828403121561297657600080fd5b815167ffffffffffffffff81111561298d57600080fd5b8201601f8101841361299e57600080fd5b80516129ac6124c08261248a565b8181528560208385010111156129c157600080fd5b6129d2826020830160208601612322565b95945050505050565b8054600090600181811c90808316806129f557607f831692505b6020808410821415612a1757634e487b7160e01b600052602260045260246000fd5b818015612a2b5760018114612a3c57612a69565b60ff19861689528489019650612a69565b60008881526020902060005b86811015612a615781548b820152908501908301612a48565b505084890196505b50505050505092915050565b6000612a8182866129db565b8451612a91818360208901612322565b643f646e613d60d81b9101908152612aac60058201856129db565b9695505050505050565b6000612ac282866129db565b8451612ad2818360208901612322565b643f646e613d60d81b91019081528351612af3816005840160208801612322565b0160050195945050505050565b60008251612b12818460208701612322565b9190910192915050565b6000610cbf82846129db565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612b9f57612b9f612b7a565b500490565b600082612bb357612bb3612b7a565b500690565b60008351612bca818460208801612322565b600360fc1b9083019081528351612be8816001840160208801612322565b01600101949350505050565b60008351612c06818460208801612322565b835190830190612c1a818360208801612322565b01949350505050565b600060ff821660ff811415612c3a57612c3a6128ee565b60010192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612aac9083018461234e565b600060208284031215612c8857600080fd5b8151610cbf816122ef565b634e487b7160e01b600052603160045260246000fd5b600061ffff808316818516808303821115612c1a57612c1a6128ee565b600060ff821660ff84168160ff0481118215151615612ce757612ce76128ee565b029392505050565b600060ff821660ff841680821015612d0957612d096128ee565b90039392505050565b600060ff821660ff84168060ff03821115612d2f57612d2f6128ee565b01939250505056fea264697066735822122040ca998ab40e18f118d70acb680219840f070e30aa21c784007aa00d0412220564736f6c634300080c0033
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.