Feature Tip: Add private address tag to any address under My Name Tag !
Overview
TokenID
7
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
SpriteOnsenNft
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; /** * @author Brewlabs * This contract has been developed by brewlabs.info */ import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {SafeERC20, IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import {ERC721, ERC721Enumerable, IERC721} from "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {DefaultOperatorFilterer} from "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract SpriteOnsenNft is Ownable, ERC721Enumerable, ReentrancyGuard, DefaultOperatorFilterer { using SafeERC20 for IERC20; using Strings for uint256; uint256 private constant MAX_SUPPLY = 5000; bool public mintAllowed = false; string private _tokenBaseURI = ""; uint256 public oneTimeMintLimit = 10; address public feeWallet; IERC20 public feeToken = IERC20(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); uint256 public mintPrice = 1000 * 10 ** 6; uint256 public materialSaleTime = 1685620800; IERC20[] public materialTokens; uint256[] public materialPrices; event MintEnabled(); event MoveToNextPhase(uint256 phase); event Mint(address indexed user, uint256 tokenId); event BaseURIUpdated(string uri); event SetMintPrice(uint256 price); event SetFeeToken(address token); event SetOneTimeMintLimit(uint256 limit); event SetFeeWallet(address wallet); event SetMaterialSaleTime(uint256 timestamp); event SetMaterialToken(uint256 index, address indexed token, uint256 price); event RemoveMaterialToken(address indexed token); event AdminTokenRecovered(address tokenRecovered, uint256 amount); modifier onlyMintable() { require(mintAllowed && totalSupply() < MAX_SUPPLY, "cannot mint"); _; } constructor() ERC721("Sprite Onsen Pass", "SOP") { feeWallet = msg.sender; } function setApprovalForAll(address operator, bool approved) public override (ERC721, IERC721) onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom(address from, address to, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public override (ERC721, IERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override (ERC721, IERC721) onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } function mint(uint256 _numToMint) external onlyMintable nonReentrant { require(_numToMint > 0, "invalid amount"); require(_numToMint <= oneTimeMintLimit, "exceed one-time mint limit"); require( (totalSupply() + _numToMint <= 200 && block.timestamp < materialSaleTime) || (totalSupply() + _numToMint <= MAX_SUPPLY && block.timestamp >= materialSaleTime), "Exceed current phase limit" ); uint256 price = mintPrice * _numToMint; feeToken.safeTransferFrom(msg.sender, feeWallet, price); if (block.timestamp >= materialSaleTime) { for (uint256 i = 0; i < materialTokens.length; i++) { uint256 amount = materialPrices[i] * _numToMint; materialTokens[i].safeTransferFrom(msg.sender, feeWallet, amount); } } for (uint256 i = 0; i < _numToMint; i++) { uint256 tokenId = totalSupply() + 1; _safeMint(msg.sender, tokenId); emit Mint(msg.sender, tokenId); } if (totalSupply() == MAX_SUPPLY) mintAllowed = false; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "SpriteOnsenNft: URI query for nonexistent token"); string memory base = _baseURI(); string memory metadata = string( abi.encodePacked( '{"name": "', name(), " #", tokenId.toString(), '", "description": "Sprite Onsen Pass holders gain exclusive access to the first AI NFT yield earning protocol in defi.", ', '"image":"', base, '", "attributes":[{"trait_type":"Pass Type", "value":"Ordinary"}]}' ) ); return string(abi.encodePacked("data:application/json;base64,", _base64(bytes(metadata)))); } function materialTokenCount() external view returns (uint256) { return materialTokens.length; } function enableMint() external onlyOwner { require(!mintAllowed, "already enabled"); mintAllowed = true; emit MintEnabled(); } function setMintPrice(uint256 _price) external onlyOwner { mintPrice = _price; emit SetMintPrice(_price); } function setFeeToken(address _token) external onlyOwner { require(_token != address(0x0), "invalid token"); require(_token != address(feeToken), "already set"); require(!mintAllowed, "mint was enabled"); feeToken = IERC20(_token); emit SetFeeToken(_token); } function setMaterialSaleTime(uint256 _timestamp) external onlyOwner { require(block.timestamp < materialSaleTime, "already started"); require(block.timestamp < _timestamp, "can set only upcoming timestamp"); materialSaleTime = _timestamp; emit SetMaterialSaleTime(_timestamp); } function addMaterialTokens(IERC20[] memory _tokens, uint256[] memory _prices) external onlyOwner { require(_tokens.length == _prices.length, "mismatch tokens and prices"); for (uint256 i = 0; i < _tokens.length; i++) { require(!_tokenExists(_tokens[i], materialTokens.length), "token already taken"); materialTokens.push(_tokens[i]); materialPrices.push(_prices[i]); emit SetMaterialToken(materialTokens.length - 1, address(_tokens[i]), _prices[i]); } } function setMaterialToken(uint256 _index, IERC20 _token, uint256 _price) external onlyOwner { require(_index < materialTokens.length, "invalid index"); require(!_tokenExists(_token, _index), "token already taken"); materialTokens[_index] = _token; materialPrices[_index] = _price; emit SetMaterialToken(_index, address(_token), _price); } function removeMaterialToken(uint256 _index) external onlyOwner { require(_index < materialTokens.length, "invalid index"); address _token = address(materialTokens[_index]); materialTokens[_index] = materialTokens[materialTokens.length - 1]; materialPrices[_index] = materialPrices[materialTokens.length - 1]; materialTokens.pop(); materialPrices.pop(); emit RemoveMaterialToken(_token); } function setOneTimeMintLimit(uint256 _limit) external onlyOwner { require(_limit <= 150, "cannot exceed 150"); oneTimeMintLimit = _limit; emit SetOneTimeMintLimit(_limit); } function setAdminWallet(address _wallet) external onlyOwner { require(_wallet != address(0x0), "invalid address"); feeWallet = _wallet; emit SetFeeWallet(_wallet); } function rescueTokens(address _token, uint256 _amount) external onlyOwner { if (_token == address(0x0)) { payable(msg.sender).transfer(_amount); } else { IERC20(_token).transfer(address(msg.sender), _amount); } emit AdminTokenRecovered(_token, _amount); } function setTokenBaseUri(string memory _uri) external onlyOwner { _tokenBaseURI = _uri; emit BaseURIUpdated(_uri); } function _tokenExists(IERC20 _token, uint256 _index) internal view returns (bool) { for (uint256 i = 0; i < materialTokens.length; i++) { if (i != _index && materialTokens[i] == _token) return true; } return false; } function _baseURI() internal view override returns (string memory) { return _tokenBaseURI; } function _base64(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ""; // load the table into memory string memory table = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; // 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; } receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// 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.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. * @dev Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { /// @dev The constructor that is called when the contract is being deployed. constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {} }
// 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.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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: address zero is not a valid owner"); 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: invalid token ID"); 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) { _requireMinted(tokenId); 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 overridden 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 token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); 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: caller is not token 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: caller is not token 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) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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 an {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 an {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 Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @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 { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` 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 (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.7.0) (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`. * * 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; /** * @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 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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. * Please note that if your token contract does not provide an owner with EIP-173, it must provide * administration methods on the contract itself to interact with the registry otherwise the subscription * will be locked to the options set during construction. */ abstract contract OperatorFilterer { /// @dev Emitted when an operator is not allowed. error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS); /// @dev The constructor that is called when the contract is being deployed. constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } /** * @dev A helper function to check if an operator is allowed. */ modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } /** * @dev A helper function to check if an operator approval is allowed. */ modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } /** * @dev A helper function to check if an operator is allowed. */ function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { // under normal circumstances, this function will revert rather than return false, but inheriting contracts // may specify their own OperatorFilterRegistry implementations, which may behave differently if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E; address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { /** * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns * true if supplied registrant address is not registered. */ function isOperatorAllowed(address registrant, address operator) external view returns (bool); /** * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner. */ function register(address registrant) external; /** * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes. */ function registerAndSubscribe(address registrant, address subscription) external; /** * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another * address without subscribing. */ function registerAndCopyEntries(address registrant, address registrantToCopy) external; /** * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner. * Note that this does not remove any filtered addresses or codeHashes. * Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes. */ function unregister(address addr) external; /** * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered. */ function updateOperator(address registrant, address operator, bool filtered) external; /** * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates. */ function updateOperators(address registrant, address[] calldata operators, bool filtered) external; /** * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered. */ function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; /** * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates. */ function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; /** * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous * subscription if present. * Note that accounts with subscriptions may go on to subscribe to other accounts - in this case, * subscriptions will not be forwarded. Instead the former subscription's existing entries will still be * used. */ function subscribe(address registrant, address registrantToSubscribe) external; /** * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes. */ function unsubscribe(address registrant, bool copyExistingEntries) external; /** * @notice Get the subscription address of a given registrant, if any. */ function subscriptionOf(address addr) external returns (address registrant); /** * @notice Get the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscribers(address registrant) external returns (address[] memory); /** * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant. * Note that order is not guaranteed as updates are made. */ function subscriberAt(address registrant, uint256 index) external returns (address); /** * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr. */ function copyEntriesOf(address registrant, address registrantToCopy) external; /** * @notice Returns true if operator is filtered by a given address or its subscription. */ function isOperatorFiltered(address registrant, address operator) external returns (bool); /** * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription. */ function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); /** * @notice Returns true if a codeHash is filtered by a given address or its subscription. */ function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); /** * @notice Returns a list of filtered operators for a given address or its subscription. */ function filteredOperators(address addr) external returns (address[] memory); /** * @notice Returns the set of filtered codeHashes for a given address or its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashes(address addr) external returns (bytes32[] memory); /** * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredOperatorAt(address registrant, uint256 index) external returns (address); /** * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or * its subscription. * Note that order is not guaranteed as updates are made. */ function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); /** * @notice Returns true if an address has registered */ function isRegistered(address addr) external returns (bool); /** * @dev Convenience method to compute the code hash of an arbitrary contract */ function codeHashOf(address addr) external returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenRecovered","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AdminTokenRecovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"BaseURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[],"name":"MintEnabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"phase","type":"uint256"}],"name":"MoveToNextPhase","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"}],"name":"RemoveMaterialToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"SetFeeToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"wallet","type":"address"}],"name":"SetFeeWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"SetMaterialSaleTime","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"SetMaterialToken","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"SetMintPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"SetOneTimeMintLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20[]","name":"_tokens","type":"address[]"},{"internalType":"uint256[]","name":"_prices","type":"uint256[]"}],"name":"addMaterialTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","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":"enableMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"materialPrices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"materialSaleTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"materialTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"materialTokens","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_numToMint","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oneTimeMintLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"removeMaterialToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"rescueTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"}],"name":"setAdminWallet","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":"_token","type":"address"}],"name":"setFeeToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_timestamp","type":"uint256"}],"name":"setMaterialSaleTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_index","type":"uint256"},{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setMaterialToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_limit","type":"uint256"}],"name":"setOneTimeMintLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setTokenBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
600c805460ff1916905560a06040819052600060808190526200002591600d91620002cc565b50600a600e55601080546001600160a01b03191673a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48179055633b9aca0060115563647888406012553480156200006e57600080fd5b50733cc6cdda760b79bafa08df41ecfa224f810dceb6600160405180604001604052806011815260200170537072697465204f6e73656e205061737360781b815250604051806040016040528060038152602001620534f560ec1b815250620000e6620000e06200027860201b60201c565b6200027c565b8151620000fb906001906020850190620002cc565b50805162000111906002906020840190620002cc565b50506001600b55506daaeb6d7670e522a718067333cd4e3b156200025e578015620001ac57604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200018d57600080fd5b505af1158015620001a2573d6000803e3d6000fd5b505050506200025e565b6001600160a01b03821615620001fd5760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000172565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200024457600080fd5b505af115801562000259573d6000803e3d6000fd5b505050505b5050600f80546001600160a01b03191633179055620003ae565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620002da9062000372565b90600052602060002090601f016020900481019282620002fe576000855562000349565b82601f106200031957805160ff191683800117855562000349565b8280016001018555821562000349579182015b82811115620003495782518255916020019190600101906200032c565b50620003579291506200035b565b5090565b5b808211156200035757600081556001016200035c565b600181811c908216806200038757607f821691505b602082108103620003a857634e487b7160e01b600052602260045260246000fd5b50919050565b61357b80620003be6000396000f3fe60806040526004361061024a5760003560e01c80636352211e11610139578063a0712d68116100b6578063c467201e1161007a578063c467201e14610691578063c87b56dd146106ab578063e985e9c5146106cb578063f25f4b56146106eb578063f2fde38b1461070b578063f4a0a5281461072b57600080fd5b8063a0712d68146105fb578063a22cb4651461061b578063a47e483e1461063b578063b82a3ea114610651578063b88d4fde1461067157600080fd5b806370a08231116100fd57806370a0823114610573578063715018a6146105935780638da5cb5b146105a857806392f30a70146105c657806395d89b41146105e657600080fd5b80636352211e146104e7578063647846a51461050757806364d4b23d146105275780636817c76c146105475780636cd2784c1461055d57600080fd5b80632f745c59116101c757806342842e0e1161018b57806342842e0e1461045257806344b28d59146104725780634f6ccce71461048757806354ac322a146104a757806357376198146104c757600080fd5b80632f745c59146103bb5780632fea187c146103db57806335082933146103f05780633f87db251461041057806341f434341461043057600080fd5b806315cce2241161020e57806315cce2241461031c57806318160ddd1461033c57806319ad7ff91461035b57806323b872dd1461037b5780632abcc6cf1461039b57600080fd5b806301ffc9a71461025657806305c655df1461028b57806306fdde03146102b8578063081812fc146102da578063095ea7b3146102fa57600080fd5b3661025157005b600080fd5b34801561026257600080fd5b50610276610271366004612bd6565b61074b565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102ab6102a6366004612bf3565b610776565b6040516102829190612c0c565b3480156102c457600080fd5b506102cd6107a0565b6040516102829190612c78565b3480156102e657600080fd5b506102ab6102f5366004612bf3565b610832565b34801561030657600080fd5b5061031a610315366004612ca0565b610859565b005b34801561032857600080fd5b5061031a610337366004612ccc565b610872565b34801561034857600080fd5b506009545b604051908152602001610282565b34801561036757600080fd5b5061031a610376366004612bf3565b6109ad565b34801561038757600080fd5b5061031a610396366004612ce9565b610a7c565b3480156103a757600080fd5b5061031a6103b6366004612bf3565b610aa7565b3480156103c757600080fd5b5061034d6103d6366004612ca0565b610c54565b3480156103e757600080fd5b5060135461034d565b3480156103fc57600080fd5b5061031a61040b366004612ccc565b610cea565b34801561041c57600080fd5b5061031a61042b366004612dc7565b610d85565b34801561043c57600080fd5b506102ab6daaeb6d7670e522a718067333cd4e81565b34801561045e57600080fd5b5061031a61046d366004612ce9565b610dd0565b34801561047e57600080fd5b5061031a610df5565b34801561049357600080fd5b5061034d6104a2366004612bf3565b610e7a565b3480156104b357600080fd5b5061031a6104c2366004612e0f565b610f0d565b3480156104d357600080fd5b5061031a6104e2366004612ca0565b611012565b3480156104f357600080fd5b506102ab610502366004612bf3565b611114565b34801561051357600080fd5b506010546102ab906001600160a01b031681565b34801561053357600080fd5b5061031a610542366004612bf3565b611149565b34801561055357600080fd5b5061034d60115481565b34801561056957600080fd5b5061034d60125481565b34801561057f57600080fd5b5061034d61058e366004612ccc565b6111cb565b34801561059f57600080fd5b5061031a611251565b3480156105b457600080fd5b506000546001600160a01b03166102ab565b3480156105d257600080fd5b5061034d6105e1366004612bf3565b611265565b3480156105f257600080fd5b506102cd611286565b34801561060757600080fd5b5061031a610616366004612bf3565b611295565b34801561062757600080fd5b5061031a610636366004612e44565b6115db565b34801561064757600080fd5b5061034d600e5481565b34801561065d57600080fd5b5061031a61066c366004612f0b565b6115ef565b34801561067d57600080fd5b5061031a61068c366004612fcc565b6117c1565b34801561069d57600080fd5b50600c546102769060ff1681565b3480156106b757600080fd5b506102cd6106c6366004612bf3565b6117ee565b3480156106d757600080fd5b506102766106e636600461304b565b6118d1565b3480156106f757600080fd5b50600f546102ab906001600160a01b031681565b34801561071757600080fd5b5061031a610726366004612ccc565b6118ff565b34801561073757600080fd5b5061031a610746366004612bf3565b611978565b60006001600160e01b0319821663780e9d6360e01b14806107705750610770826119b5565b92915050565b6013818154811061078657600080fd5b6000918252602090912001546001600160a01b0316905081565b6060600180546107af90613079565b80601f01602080910402602001604051908101604052809291908181526020018280546107db90613079565b80156108285780601f106107fd57610100808354040283529160200191610828565b820191906000526020600020905b81548152906001019060200180831161080b57829003601f168201915b5050505050905090565b600061083d82611a05565b506000908152600560205260409020546001600160a01b031690565b8161086381611a2a565b61086d8383611ada565b505050565b61087a611bea565b6001600160a01b0381166108c55760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b2103a37b5b2b760991b60448201526064015b60405180910390fd5b6010546001600160a01b03908116908216036109115760405162461bcd60e51b815260206004820152600b60248201526a185b1c9958591e481cd95d60aa1b60448201526064016108bc565b600c5460ff16156109575760405162461bcd60e51b815260206004820152601060248201526f1b5a5b9d081dd85cc8195b98589b195960821b60448201526064016108bc565b601080546001600160a01b0319166001600160a01b0383161790556040517f0842bcbb92ca6d47ae89816778a843992dff9b876fad009865e1c5df73d46d1f906109a2908390612c0c565b60405180910390a150565b6109b5611bea565b60125442106109f85760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e481cdd185c9d1959608a1b60448201526064016108bc565b804210610a475760405162461bcd60e51b815260206004820152601f60248201527f63616e20736574206f6e6c79207570636f6d696e672074696d657374616d700060448201526064016108bc565b60128190556040518181527f3e16ff5fa917428b582391b62cc3c8286528a1e43122a09e5149df01a9dcef46906020016109a2565b826001600160a01b0381163314610a9657610a9633611a2a565b610aa1848484611c44565b50505050565b610aaf611bea565b6013548110610ad05760405162461bcd60e51b81526004016108bc906130b3565b600060138281548110610ae557610ae56130da565b600091825260209091200154601380546001600160a01b03909216925090610b0f90600190613106565b81548110610b1f57610b1f6130da565b600091825260209091200154601380546001600160a01b039092169184908110610b4b57610b4b6130da565b600091825260209091200180546001600160a01b0319166001600160a01b0392909216919091179055601354601490610b8690600190613106565b81548110610b9657610b966130da565b906000526020600020015460148381548110610bb457610bb46130da565b6000918252602090912001556013805480610bd157610bd161311d565b600082815260209020810160001990810180546001600160a01b03191690550190556014805480610c0457610c0461311d565b60019003818190600052602060002001600090559055806001600160a01b03167f67852c341aa05ed2a5468a24971f606153437cbbee9c49b5abf2d60034774e0f60405160405180910390a25050565b6000610c5f836111cb565b8210610cc15760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108bc565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b610cf2611bea565b6001600160a01b038116610d3a5760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206164647265737360881b60448201526064016108bc565b600f80546001600160a01b0319166001600160a01b0383161790556040517f3d21e5a2b633291bd1ff5f9c654e402d063783c95759d2ea521b31fb30e4da41906109a2908390612c0c565b610d8d611bea565b8051610da090600d906020840190612b27565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad816040516109a29190612c78565b826001600160a01b0381163314610dea57610dea33611a2a565b610aa1848484611c75565b610dfd611bea565b600c5460ff1615610e425760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e48195b98589b1959608a1b60448201526064016108bc565b600c805460ff191660011790556040517f7d4c15f0a1a76cde938e0b5d3a1c1e9905f57401c4aed53ae344801d156736e690600090a1565b6000610e8560095490565b8210610ee85760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108bc565b60098281548110610efb57610efb6130da565b90600052602060002001549050919050565b610f15611bea565b6013548310610f365760405162461bcd60e51b81526004016108bc906130b3565b610f408284611c90565b15610f5d5760405162461bcd60e51b81526004016108bc90613133565b8160138481548110610f7157610f716130da565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508060148481548110610fb357610fb36130da565b9060005260206000200181905550816001600160a01b03167f1a85cf14d716d157222539579a3c9714398d1f2466f760da41f797d8f9a6300a8483604051611005929190918252602082015260400190565b60405180910390a2505050565b61101a611bea565b6001600160a01b03821661105b57604051339082156108fc029083906000818181858888f19350505050158015611055573d6000803e3d6000fd5b506110ce565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af11580156110a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cc9190613160565b505b604080516001600160a01b0384168152602081018390527f74f5dcd55c394cb1c6d3b9da22c2464bcc46c38cc3865bd629ed75823249b40b910160405180910390a15050565b6000818152600360205260408120546001600160a01b0316806107705760405162461bcd60e51b81526004016108bc9061317d565b611151611bea565b60968111156111965760405162461bcd60e51b8152602060048201526011602482015270063616e6e6f74206578636565642031353607c1b60448201526064016108bc565b600e8190556040518181527fd77359630618dd32a2fafd6311a2670e53617d7d6ea23eeac8f3a14b3110b6b1906020016109a2565b60006001600160a01b0382166112355760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016108bc565b506001600160a01b031660009081526004602052604090205490565b611259611bea565b6112636000611d08565b565b6014818154811061127557600080fd5b600091825260209091200154905081565b6060600280546107af90613079565b600c5460ff1680156112b057506113886112ae60095490565b105b6112ea5760405162461bcd60e51b815260206004820152600b60248201526a18d85b9b9bdd081b5a5b9d60aa1b60448201526064016108bc565b6002600b540361133c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108bc565b6002600b558061137f5760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a5908185b5bdd5b9d60921b60448201526064016108bc565b600e548111156113d15760405162461bcd60e51b815260206004820152601a60248201527f657863656564206f6e652d74696d65206d696e74206c696d697400000000000060448201526064016108bc565b60c8816113dd60095490565b6113e791906131af565b111580156113f6575060125442105b8061142357506113888161140960095490565b61141391906131af565b1115801561142357506012544210155b61146f5760405162461bcd60e51b815260206004820152601a60248201527f4578636565642063757272656e74207068617365206c696d697400000000000060448201526064016108bc565b60008160115461147f91906131c7565b600f546010549192506114a1916001600160a01b039081169133911684611d58565b60125442106115405760005b60135481101561153e57600083601483815481106114cd576114cd6130da565b90600052602060002001546114e291906131c7565b600f546013805492935061152b9233926001600160a01b03169185918790811061150e5761150e6130da565b6000918252602090912001546001600160a01b0316929190611d58565b5080611536816131e6565b9150506114ad565b505b60005b828110156115b557600061155660095490565b6115619060016131af565b905061156d3382611db2565b60405181815233907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a250806115ad816131e6565b915050611543565b506113886115c260095490565b036115d257600c805460ff191690555b50506001600b55565b816115e581611a2a565b61086d8383611dd0565b6115f7611bea565b80518251146116485760405162461bcd60e51b815260206004820152601a60248201527f6d69736d6174636820746f6b656e7320616e642070726963657300000000000060448201526064016108bc565b60005b825181101561086d5761167c838281518110611669576116696130da565b6020026020010151601380549050611c90565b156116995760405162461bcd60e51b81526004016108bc90613133565b60138382815181106116ad576116ad6130da565b60209081029190910181015182546001810184556000938452919092200180546001600160a01b0319166001600160a01b0390921691909117905581516014908390839081106116ff576116ff6130da565b602090810291909101810151825460018101845560009384529190922001558251839082908110611732576117326130da565b60200260200101516001600160a01b03167f1a85cf14d716d157222539579a3c9714398d1f2466f760da41f797d8f9a6300a60016013805490506117769190613106565b848481518110611788576117886130da565b60200260200101516040516117a7929190918252602082015260400190565b60405180910390a2806117b9816131e6565b91505061164b565b836001600160a01b03811633146117db576117db33611a2a565b6117e785858585611ddb565b5050505050565b60606117f982611e0d565b61185d5760405162461bcd60e51b815260206004820152602f60248201527f5370726974654f6e73656e4e66743a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108bc565b6000611867611e2a565b905060006118736107a0565b61187c85611e39565b8360405160200161188f939291906131ff565b60405160208183030381529060405290506118a981611f41565b6040516020016118b9919061336c565b60405160208183030381529060405292505050919050565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b611907611bea565b6001600160a01b03811661196c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108bc565b61197581611d08565b50565b611980611bea565b60118190556040518181527f02ebcb79e897ca3a22313ba6de8fc964409964de565fb4bb6a0927871756b88c906020016109a2565b60006001600160e01b031982166380ac58cd60e01b14806119e657506001600160e01b03198216635b5e139f60e01b145b8061077057506301ffc9a760e01b6001600160e01b0319831614610770565b611a0e81611e0d565b6119755760405162461bcd60e51b81526004016108bc9061317d565b6daaeb6d7670e522a718067333cd4e3b1561197557604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611a97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abb9190613160565b6119755780604051633b79c77360e21b81526004016108bc9190612c0c565b6000611ae582611114565b9050806001600160a01b0316836001600160a01b031603611b525760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108bc565b336001600160a01b0382161480611b6e5750611b6e81336118d1565b611be05760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016108bc565b61086d83836120a7565b6000546001600160a01b031633146112635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108bc565b611c4e3382612115565b611c6a5760405162461bcd60e51b81526004016108bc906133b1565b61086d838383612173565b61086d838383604051806020016040528060008152506117c1565b6000805b601354811015611cfe57828114158015611cdd5750836001600160a01b031660138281548110611cc657611cc66130da565b6000918252602090912001546001600160a01b0316145b15611cec576001915050610770565b80611cf6816131e6565b915050611c94565b5060009392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610aa190859061231a565b611dcc8282604051806020016040528060008152506123ec565b5050565b611dcc33838361241f565b611de53383612115565b611e015760405162461bcd60e51b81526004016108bc906133b1565b610aa1848484846124e9565b6000908152600360205260409020546001600160a01b0316151590565b6060600d80546107af90613079565b606081600003611e605750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611e8a5780611e74816131e6565b9150611e839050600a83613415565b9150611e64565b6000816001600160401b03811115611ea457611ea4612d2a565b6040519080825280601f01601f191660200182016040528015611ece576020820181803683370190505b5090505b8415611f3957611ee3600183613106565b9150611ef0600a86613429565b611efb9060306131af565b60f81b818381518110611f1057611f106130da565b60200101906001600160f81b031916908160001a905350611f32600a86613415565b9450611ed2565b949350505050565b60608151600003611f6057505060408051602081019091526000815290565b60006040518060600160405280604081526020016135066040913990506000600384516002611f8f91906131af565b611f999190613415565b611fa49060046131c7565b90506000611fb38260206131af565b6001600160401b03811115611fca57611fca612d2a565b6040519080825280601f01601f191660200182016040528015611ff4576020820181803683370190505b509050818152600183018586518101602084015b818310156120625760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b93820193909352600401612008565b60038951066001811461207c576002811461208d57612099565b613d3d60f01b600119830152612099565b603d60f81b6000198301525b509398975050505050505050565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906120dc82611114565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061212183611114565b9050806001600160a01b0316846001600160a01b03161480612148575061214881856118d1565b80611f395750836001600160a01b031661216184610832565b6001600160a01b031614949350505050565b826001600160a01b031661218682611114565b6001600160a01b0316146121ea5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108bc565b6001600160a01b03821661224c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108bc565b61225783838361251c565b6122626000826120a7565b6001600160a01b038316600090815260046020526040812080546001929061228b908490613106565b90915550506001600160a01b03821660009081526004602052604081208054600192906122b99084906131af565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061236f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166125d49092919063ffffffff16565b80519091501561086d578080602001905181019061238d9190613160565b61086d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108bc565b6123f683836125ed565b612403600084848461272c565b61086d5760405162461bcd60e51b81526004016108bc9061343d565b816001600160a01b0316836001600160a01b03160361247c5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016108bc565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6124f4848484612173565b6125008484848461272c565b610aa15760405162461bcd60e51b81526004016108bc9061343d565b6001600160a01b0383166125775761257281600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b61259a565b816001600160a01b0316836001600160a01b03161461259a5761259a838261282d565b6001600160a01b0382166125b15761086d816128ca565b826001600160a01b0316826001600160a01b03161461086d5761086d8282612979565b60606125e384846000856129bd565b90505b9392505050565b6001600160a01b0382166126435760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108bc565b61264c81611e0d565b156126995760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108bc565b6126a56000838361251c565b6001600160a01b03821660009081526004602052604081208054600192906126ce9084906131af565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561282257604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061277090339089908890889060040161348f565b6020604051808303816000875af19250505080156127ab575060408051601f3d908101601f191682019092526127a8918101906134cc565b60015b612808573d8080156127d9576040519150601f19603f3d011682016040523d82523d6000602084013e6127de565b606091505b5080516000036128005760405162461bcd60e51b81526004016108bc9061343d565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611f39565b506001949350505050565b6000600161283a846111cb565b6128449190613106565b600083815260086020526040902054909150808214612897576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906128dc90600190613106565b6000838152600a602052604081205460098054939450909284908110612904576129046130da565b906000526020600020015490508060098381548110612925576129256130da565b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061295d5761295d61311d565b6001900381819060005260206000200160009055905550505050565b6000612984836111cb565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b606082471015612a1e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016108bc565b6001600160a01b0385163b612a755760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108bc565b600080866001600160a01b03168587604051612a9191906134e9565b60006040518083038185875af1925050503d8060008114612ace576040519150601f19603f3d011682016040523d82523d6000602084013e612ad3565b606091505b5091509150612ae3828286612aee565b979650505050505050565b60608315612afd5750816125e6565b825115612b0d5782518084602001fd5b8160405162461bcd60e51b81526004016108bc9190612c78565b828054612b3390613079565b90600052602060002090601f016020900481019282612b555760008555612b9b565b82601f10612b6e57805160ff1916838001178555612b9b565b82800160010185558215612b9b579182015b82811115612b9b578251825591602001919060010190612b80565b50612ba7929150612bab565b5090565b5b80821115612ba75760008155600101612bac565b6001600160e01b03198116811461197557600080fd5b600060208284031215612be857600080fd5b81356125e681612bc0565b600060208284031215612c0557600080fd5b5035919050565b6001600160a01b0391909116815260200190565b60005b83811015612c3b578181015183820152602001612c23565b83811115610aa15750506000910152565b60008151808452612c64816020860160208601612c20565b601f01601f19169290920160200192915050565b6020815260006125e66020830184612c4c565b6001600160a01b038116811461197557600080fd5b60008060408385031215612cb357600080fd5b8235612cbe81612c8b565b946020939093013593505050565b600060208284031215612cde57600080fd5b81356125e681612c8b565b600080600060608486031215612cfe57600080fd5b8335612d0981612c8b565b92506020840135612d1981612c8b565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612d6857612d68612d2a565b604052919050565b60006001600160401b03831115612d8957612d89612d2a565b612d9c601f8401601f1916602001612d40565b9050828152838383011115612db057600080fd5b828260208301376000602084830101529392505050565b600060208284031215612dd957600080fd5b81356001600160401b03811115612def57600080fd5b8201601f81018413612e0057600080fd5b611f3984823560208401612d70565b600080600060608486031215612e2457600080fd5b833592506020840135612d1981612c8b565b801515811461197557600080fd5b60008060408385031215612e5757600080fd5b8235612e6281612c8b565b91506020830135612e7281612e36565b809150509250929050565b60006001600160401b03821115612e9657612e96612d2a565b5060051b60200190565b600082601f830112612eb157600080fd5b81356020612ec6612ec183612e7d565b612d40565b82815260059290921b84018101918181019086841115612ee557600080fd5b8286015b84811015612f005780358352918301918301612ee9565b509695505050505050565b60008060408385031215612f1e57600080fd5b82356001600160401b0380821115612f3557600080fd5b818501915085601f830112612f4957600080fd5b81356020612f59612ec183612e7d565b82815260059290921b84018101918181019089841115612f7857600080fd5b948201945b83861015612f9f578535612f9081612c8b565b82529482019490820190612f7d565b96505086013592505080821115612fb557600080fd5b50612fc285828601612ea0565b9150509250929050565b60008060008060808587031215612fe257600080fd5b8435612fed81612c8b565b93506020850135612ffd81612c8b565b92506040850135915060608501356001600160401b0381111561301f57600080fd5b8501601f8101871361303057600080fd5b61303f87823560208401612d70565b91505092959194509250565b6000806040838503121561305e57600080fd5b823561306981612c8b565b91506020830135612e7281612c8b565b600181811c9082168061308d57607f821691505b6020821081036130ad57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600d908201526c0d2dcecc2d8d2c840d2dcc8caf609b1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082821015613118576131186130f0565b500390565b634e487b7160e01b600052603160045260246000fd5b6020808252601390820152723a37b5b2b71030b63932b0b23c903a30b5b2b760691b604082015260600190565b60006020828403121561317257600080fd5b81516125e681612e36565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b600082198211156131c2576131c26130f0565b500190565b60008160001904831182151516156131e1576131e16130f0565b500290565b6000600182016131f8576131f86130f0565b5060010190565b693d913730b6b2911d101160b11b8152835160009061322581600a850160208901612c20565b61202360f01b600a91840191820152845161324781600c840160208901612c20565b7f222c20226465736372697074696f6e223a2022537072697465204f6e73656e20600c92909101918201527f5061737320686f6c64657273206761696e206578636c75736976652061636365602c8201527f737320746f20746865206669727374204149204e4654207969656c6420656172604c8201527803734b73390383937ba37b1b7b61034b7103232b3349711161603d1b606c820152681134b6b0b3b2911d1160b91b6085820152835161330581608e840160208801612c20565b7f222c202261747472696275746573223a5b7b2274726169745f74797065223a22608e92909101918201527f506173732054797065222c202276616c7565223a224f7264696e617279227d5d60ae820152607d60f81b60ce82015260cf0195945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516133a481601d850160208701612c20565b91909101601d0192915050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082613424576134246133ff565b500490565b600082613438576134386133ff565b500690565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906134c290830184612c4c565b9695505050505050565b6000602082840312156134de57600080fd5b81516125e681612bc0565b600082516134fb818460208701612c20565b919091019291505056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220b86a572e64baeed1a0e0453368cbb6258cc841da75c08d6a044870629056f9ae64736f6c634300080e0033
Deployed Bytecode
0x60806040526004361061024a5760003560e01c80636352211e11610139578063a0712d68116100b6578063c467201e1161007a578063c467201e14610691578063c87b56dd146106ab578063e985e9c5146106cb578063f25f4b56146106eb578063f2fde38b1461070b578063f4a0a5281461072b57600080fd5b8063a0712d68146105fb578063a22cb4651461061b578063a47e483e1461063b578063b82a3ea114610651578063b88d4fde1461067157600080fd5b806370a08231116100fd57806370a0823114610573578063715018a6146105935780638da5cb5b146105a857806392f30a70146105c657806395d89b41146105e657600080fd5b80636352211e146104e7578063647846a51461050757806364d4b23d146105275780636817c76c146105475780636cd2784c1461055d57600080fd5b80632f745c59116101c757806342842e0e1161018b57806342842e0e1461045257806344b28d59146104725780634f6ccce71461048757806354ac322a146104a757806357376198146104c757600080fd5b80632f745c59146103bb5780632fea187c146103db57806335082933146103f05780633f87db251461041057806341f434341461043057600080fd5b806315cce2241161020e57806315cce2241461031c57806318160ddd1461033c57806319ad7ff91461035b57806323b872dd1461037b5780632abcc6cf1461039b57600080fd5b806301ffc9a71461025657806305c655df1461028b57806306fdde03146102b8578063081812fc146102da578063095ea7b3146102fa57600080fd5b3661025157005b600080fd5b34801561026257600080fd5b50610276610271366004612bd6565b61074b565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102ab6102a6366004612bf3565b610776565b6040516102829190612c0c565b3480156102c457600080fd5b506102cd6107a0565b6040516102829190612c78565b3480156102e657600080fd5b506102ab6102f5366004612bf3565b610832565b34801561030657600080fd5b5061031a610315366004612ca0565b610859565b005b34801561032857600080fd5b5061031a610337366004612ccc565b610872565b34801561034857600080fd5b506009545b604051908152602001610282565b34801561036757600080fd5b5061031a610376366004612bf3565b6109ad565b34801561038757600080fd5b5061031a610396366004612ce9565b610a7c565b3480156103a757600080fd5b5061031a6103b6366004612bf3565b610aa7565b3480156103c757600080fd5b5061034d6103d6366004612ca0565b610c54565b3480156103e757600080fd5b5060135461034d565b3480156103fc57600080fd5b5061031a61040b366004612ccc565b610cea565b34801561041c57600080fd5b5061031a61042b366004612dc7565b610d85565b34801561043c57600080fd5b506102ab6daaeb6d7670e522a718067333cd4e81565b34801561045e57600080fd5b5061031a61046d366004612ce9565b610dd0565b34801561047e57600080fd5b5061031a610df5565b34801561049357600080fd5b5061034d6104a2366004612bf3565b610e7a565b3480156104b357600080fd5b5061031a6104c2366004612e0f565b610f0d565b3480156104d357600080fd5b5061031a6104e2366004612ca0565b611012565b3480156104f357600080fd5b506102ab610502366004612bf3565b611114565b34801561051357600080fd5b506010546102ab906001600160a01b031681565b34801561053357600080fd5b5061031a610542366004612bf3565b611149565b34801561055357600080fd5b5061034d60115481565b34801561056957600080fd5b5061034d60125481565b34801561057f57600080fd5b5061034d61058e366004612ccc565b6111cb565b34801561059f57600080fd5b5061031a611251565b3480156105b457600080fd5b506000546001600160a01b03166102ab565b3480156105d257600080fd5b5061034d6105e1366004612bf3565b611265565b3480156105f257600080fd5b506102cd611286565b34801561060757600080fd5b5061031a610616366004612bf3565b611295565b34801561062757600080fd5b5061031a610636366004612e44565b6115db565b34801561064757600080fd5b5061034d600e5481565b34801561065d57600080fd5b5061031a61066c366004612f0b565b6115ef565b34801561067d57600080fd5b5061031a61068c366004612fcc565b6117c1565b34801561069d57600080fd5b50600c546102769060ff1681565b3480156106b757600080fd5b506102cd6106c6366004612bf3565b6117ee565b3480156106d757600080fd5b506102766106e636600461304b565b6118d1565b3480156106f757600080fd5b50600f546102ab906001600160a01b031681565b34801561071757600080fd5b5061031a610726366004612ccc565b6118ff565b34801561073757600080fd5b5061031a610746366004612bf3565b611978565b60006001600160e01b0319821663780e9d6360e01b14806107705750610770826119b5565b92915050565b6013818154811061078657600080fd5b6000918252602090912001546001600160a01b0316905081565b6060600180546107af90613079565b80601f01602080910402602001604051908101604052809291908181526020018280546107db90613079565b80156108285780601f106107fd57610100808354040283529160200191610828565b820191906000526020600020905b81548152906001019060200180831161080b57829003601f168201915b5050505050905090565b600061083d82611a05565b506000908152600560205260409020546001600160a01b031690565b8161086381611a2a565b61086d8383611ada565b505050565b61087a611bea565b6001600160a01b0381166108c55760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b2103a37b5b2b760991b60448201526064015b60405180910390fd5b6010546001600160a01b03908116908216036109115760405162461bcd60e51b815260206004820152600b60248201526a185b1c9958591e481cd95d60aa1b60448201526064016108bc565b600c5460ff16156109575760405162461bcd60e51b815260206004820152601060248201526f1b5a5b9d081dd85cc8195b98589b195960821b60448201526064016108bc565b601080546001600160a01b0319166001600160a01b0383161790556040517f0842bcbb92ca6d47ae89816778a843992dff9b876fad009865e1c5df73d46d1f906109a2908390612c0c565b60405180910390a150565b6109b5611bea565b60125442106109f85760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e481cdd185c9d1959608a1b60448201526064016108bc565b804210610a475760405162461bcd60e51b815260206004820152601f60248201527f63616e20736574206f6e6c79207570636f6d696e672074696d657374616d700060448201526064016108bc565b60128190556040518181527f3e16ff5fa917428b582391b62cc3c8286528a1e43122a09e5149df01a9dcef46906020016109a2565b826001600160a01b0381163314610a9657610a9633611a2a565b610aa1848484611c44565b50505050565b610aaf611bea565b6013548110610ad05760405162461bcd60e51b81526004016108bc906130b3565b600060138281548110610ae557610ae56130da565b600091825260209091200154601380546001600160a01b03909216925090610b0f90600190613106565b81548110610b1f57610b1f6130da565b600091825260209091200154601380546001600160a01b039092169184908110610b4b57610b4b6130da565b600091825260209091200180546001600160a01b0319166001600160a01b0392909216919091179055601354601490610b8690600190613106565b81548110610b9657610b966130da565b906000526020600020015460148381548110610bb457610bb46130da565b6000918252602090912001556013805480610bd157610bd161311d565b600082815260209020810160001990810180546001600160a01b03191690550190556014805480610c0457610c0461311d565b60019003818190600052602060002001600090559055806001600160a01b03167f67852c341aa05ed2a5468a24971f606153437cbbee9c49b5abf2d60034774e0f60405160405180910390a25050565b6000610c5f836111cb565b8210610cc15760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108bc565b506001600160a01b03919091166000908152600760209081526040808320938352929052205490565b610cf2611bea565b6001600160a01b038116610d3a5760405162461bcd60e51b815260206004820152600f60248201526e696e76616c6964206164647265737360881b60448201526064016108bc565b600f80546001600160a01b0319166001600160a01b0383161790556040517f3d21e5a2b633291bd1ff5f9c654e402d063783c95759d2ea521b31fb30e4da41906109a2908390612c0c565b610d8d611bea565b8051610da090600d906020840190612b27565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad816040516109a29190612c78565b826001600160a01b0381163314610dea57610dea33611a2a565b610aa1848484611c75565b610dfd611bea565b600c5460ff1615610e425760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e48195b98589b1959608a1b60448201526064016108bc565b600c805460ff191660011790556040517f7d4c15f0a1a76cde938e0b5d3a1c1e9905f57401c4aed53ae344801d156736e690600090a1565b6000610e8560095490565b8210610ee85760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108bc565b60098281548110610efb57610efb6130da565b90600052602060002001549050919050565b610f15611bea565b6013548310610f365760405162461bcd60e51b81526004016108bc906130b3565b610f408284611c90565b15610f5d5760405162461bcd60e51b81526004016108bc90613133565b8160138481548110610f7157610f716130da565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055508060148481548110610fb357610fb36130da565b9060005260206000200181905550816001600160a01b03167f1a85cf14d716d157222539579a3c9714398d1f2466f760da41f797d8f9a6300a8483604051611005929190918252602082015260400190565b60405180910390a2505050565b61101a611bea565b6001600160a01b03821661105b57604051339082156108fc029083906000818181858888f19350505050158015611055573d6000803e3d6000fd5b506110ce565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af11580156110a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cc9190613160565b505b604080516001600160a01b0384168152602081018390527f74f5dcd55c394cb1c6d3b9da22c2464bcc46c38cc3865bd629ed75823249b40b910160405180910390a15050565b6000818152600360205260408120546001600160a01b0316806107705760405162461bcd60e51b81526004016108bc9061317d565b611151611bea565b60968111156111965760405162461bcd60e51b8152602060048201526011602482015270063616e6e6f74206578636565642031353607c1b60448201526064016108bc565b600e8190556040518181527fd77359630618dd32a2fafd6311a2670e53617d7d6ea23eeac8f3a14b3110b6b1906020016109a2565b60006001600160a01b0382166112355760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b60648201526084016108bc565b506001600160a01b031660009081526004602052604090205490565b611259611bea565b6112636000611d08565b565b6014818154811061127557600080fd5b600091825260209091200154905081565b6060600280546107af90613079565b600c5460ff1680156112b057506113886112ae60095490565b105b6112ea5760405162461bcd60e51b815260206004820152600b60248201526a18d85b9b9bdd081b5a5b9d60aa1b60448201526064016108bc565b6002600b540361133c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108bc565b6002600b558061137f5760405162461bcd60e51b815260206004820152600e60248201526d1a5b9d985b1a5908185b5bdd5b9d60921b60448201526064016108bc565b600e548111156113d15760405162461bcd60e51b815260206004820152601a60248201527f657863656564206f6e652d74696d65206d696e74206c696d697400000000000060448201526064016108bc565b60c8816113dd60095490565b6113e791906131af565b111580156113f6575060125442105b8061142357506113888161140960095490565b61141391906131af565b1115801561142357506012544210155b61146f5760405162461bcd60e51b815260206004820152601a60248201527f4578636565642063757272656e74207068617365206c696d697400000000000060448201526064016108bc565b60008160115461147f91906131c7565b600f546010549192506114a1916001600160a01b039081169133911684611d58565b60125442106115405760005b60135481101561153e57600083601483815481106114cd576114cd6130da565b90600052602060002001546114e291906131c7565b600f546013805492935061152b9233926001600160a01b03169185918790811061150e5761150e6130da565b6000918252602090912001546001600160a01b0316929190611d58565b5080611536816131e6565b9150506114ad565b505b60005b828110156115b557600061155660095490565b6115619060016131af565b905061156d3382611db2565b60405181815233907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859060200160405180910390a250806115ad816131e6565b915050611543565b506113886115c260095490565b036115d257600c805460ff191690555b50506001600b55565b816115e581611a2a565b61086d8383611dd0565b6115f7611bea565b80518251146116485760405162461bcd60e51b815260206004820152601a60248201527f6d69736d6174636820746f6b656e7320616e642070726963657300000000000060448201526064016108bc565b60005b825181101561086d5761167c838281518110611669576116696130da565b6020026020010151601380549050611c90565b156116995760405162461bcd60e51b81526004016108bc90613133565b60138382815181106116ad576116ad6130da565b60209081029190910181015182546001810184556000938452919092200180546001600160a01b0319166001600160a01b0390921691909117905581516014908390839081106116ff576116ff6130da565b602090810291909101810151825460018101845560009384529190922001558251839082908110611732576117326130da565b60200260200101516001600160a01b03167f1a85cf14d716d157222539579a3c9714398d1f2466f760da41f797d8f9a6300a60016013805490506117769190613106565b848481518110611788576117886130da565b60200260200101516040516117a7929190918252602082015260400190565b60405180910390a2806117b9816131e6565b91505061164b565b836001600160a01b03811633146117db576117db33611a2a565b6117e785858585611ddb565b5050505050565b60606117f982611e0d565b61185d5760405162461bcd60e51b815260206004820152602f60248201527f5370726974654f6e73656e4e66743a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016108bc565b6000611867611e2a565b905060006118736107a0565b61187c85611e39565b8360405160200161188f939291906131ff565b60405160208183030381529060405290506118a981611f41565b6040516020016118b9919061336c565b60405160208183030381529060405292505050919050565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b611907611bea565b6001600160a01b03811661196c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108bc565b61197581611d08565b50565b611980611bea565b60118190556040518181527f02ebcb79e897ca3a22313ba6de8fc964409964de565fb4bb6a0927871756b88c906020016109a2565b60006001600160e01b031982166380ac58cd60e01b14806119e657506001600160e01b03198216635b5e139f60e01b145b8061077057506301ffc9a760e01b6001600160e01b0319831614610770565b611a0e81611e0d565b6119755760405162461bcd60e51b81526004016108bc9061317d565b6daaeb6d7670e522a718067333cd4e3b1561197557604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611a97573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611abb9190613160565b6119755780604051633b79c77360e21b81526004016108bc9190612c0c565b6000611ae582611114565b9050806001600160a01b0316836001600160a01b031603611b525760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108bc565b336001600160a01b0382161480611b6e5750611b6e81336118d1565b611be05760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016108bc565b61086d83836120a7565b6000546001600160a01b031633146112635760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108bc565b611c4e3382612115565b611c6a5760405162461bcd60e51b81526004016108bc906133b1565b61086d838383612173565b61086d838383604051806020016040528060008152506117c1565b6000805b601354811015611cfe57828114158015611cdd5750836001600160a01b031660138281548110611cc657611cc66130da565b6000918252602090912001546001600160a01b0316145b15611cec576001915050610770565b80611cf6816131e6565b915050611c94565b5060009392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052610aa190859061231a565b611dcc8282604051806020016040528060008152506123ec565b5050565b611dcc33838361241f565b611de53383612115565b611e015760405162461bcd60e51b81526004016108bc906133b1565b610aa1848484846124e9565b6000908152600360205260409020546001600160a01b0316151590565b6060600d80546107af90613079565b606081600003611e605750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611e8a5780611e74816131e6565b9150611e839050600a83613415565b9150611e64565b6000816001600160401b03811115611ea457611ea4612d2a565b6040519080825280601f01601f191660200182016040528015611ece576020820181803683370190505b5090505b8415611f3957611ee3600183613106565b9150611ef0600a86613429565b611efb9060306131af565b60f81b818381518110611f1057611f106130da565b60200101906001600160f81b031916908160001a905350611f32600a86613415565b9450611ed2565b949350505050565b60608151600003611f6057505060408051602081019091526000815290565b60006040518060600160405280604081526020016135066040913990506000600384516002611f8f91906131af565b611f999190613415565b611fa49060046131c7565b90506000611fb38260206131af565b6001600160401b03811115611fca57611fca612d2a565b6040519080825280601f01601f191660200182016040528015611ff4576020820181803683370190505b509050818152600183018586518101602084015b818310156120625760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b93820193909352600401612008565b60038951066001811461207c576002811461208d57612099565b613d3d60f01b600119830152612099565b603d60f81b6000198301525b509398975050505050505050565b600081815260056020526040902080546001600160a01b0319166001600160a01b03841690811790915581906120dc82611114565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60008061212183611114565b9050806001600160a01b0316846001600160a01b03161480612148575061214881856118d1565b80611f395750836001600160a01b031661216184610832565b6001600160a01b031614949350505050565b826001600160a01b031661218682611114565b6001600160a01b0316146121ea5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016108bc565b6001600160a01b03821661224c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108bc565b61225783838361251c565b6122626000826120a7565b6001600160a01b038316600090815260046020526040812080546001929061228b908490613106565b90915550506001600160a01b03821660009081526004602052604081208054600192906122b99084906131af565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061236f826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166125d49092919063ffffffff16565b80519091501561086d578080602001905181019061238d9190613160565b61086d5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016108bc565b6123f683836125ed565b612403600084848461272c565b61086d5760405162461bcd60e51b81526004016108bc9061343d565b816001600160a01b0316836001600160a01b03160361247c5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016108bc565b6001600160a01b03838116600081815260066020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6124f4848484612173565b6125008484848461272c565b610aa15760405162461bcd60e51b81526004016108bc9061343d565b6001600160a01b0383166125775761257281600980546000838152600a60205260408120829055600182018355919091527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0155565b61259a565b816001600160a01b0316836001600160a01b03161461259a5761259a838261282d565b6001600160a01b0382166125b15761086d816128ca565b826001600160a01b0316826001600160a01b03161461086d5761086d8282612979565b60606125e384846000856129bd565b90505b9392505050565b6001600160a01b0382166126435760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108bc565b61264c81611e0d565b156126995760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108bc565b6126a56000838361251c565b6001600160a01b03821660009081526004602052604081208054600192906126ce9084906131af565b909155505060008181526003602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006001600160a01b0384163b1561282257604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061277090339089908890889060040161348f565b6020604051808303816000875af19250505080156127ab575060408051601f3d908101601f191682019092526127a8918101906134cc565b60015b612808573d8080156127d9576040519150601f19603f3d011682016040523d82523d6000602084013e6127de565b606091505b5080516000036128005760405162461bcd60e51b81526004016108bc9061343d565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611f39565b506001949350505050565b6000600161283a846111cb565b6128449190613106565b600083815260086020526040902054909150808214612897576001600160a01b03841660009081526007602090815260408083208584528252808320548484528184208190558352600890915290208190555b5060009182526008602090815260408084208490556001600160a01b039094168352600781528383209183525290812055565b6009546000906128dc90600190613106565b6000838152600a602052604081205460098054939450909284908110612904576129046130da565b906000526020600020015490508060098381548110612925576129256130da565b6000918252602080832090910192909255828152600a9091526040808220849055858252812055600980548061295d5761295d61311d565b6001900381819060005260206000200160009055905550505050565b6000612984836111cb565b6001600160a01b039093166000908152600760209081526040808320868452825280832085905593825260089052919091209190915550565b606082471015612a1e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016108bc565b6001600160a01b0385163b612a755760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016108bc565b600080866001600160a01b03168587604051612a9191906134e9565b60006040518083038185875af1925050503d8060008114612ace576040519150601f19603f3d011682016040523d82523d6000602084013e612ad3565b606091505b5091509150612ae3828286612aee565b979650505050505050565b60608315612afd5750816125e6565b825115612b0d5782518084602001fd5b8160405162461bcd60e51b81526004016108bc9190612c78565b828054612b3390613079565b90600052602060002090601f016020900481019282612b555760008555612b9b565b82601f10612b6e57805160ff1916838001178555612b9b565b82800160010185558215612b9b579182015b82811115612b9b578251825591602001919060010190612b80565b50612ba7929150612bab565b5090565b5b80821115612ba75760008155600101612bac565b6001600160e01b03198116811461197557600080fd5b600060208284031215612be857600080fd5b81356125e681612bc0565b600060208284031215612c0557600080fd5b5035919050565b6001600160a01b0391909116815260200190565b60005b83811015612c3b578181015183820152602001612c23565b83811115610aa15750506000910152565b60008151808452612c64816020860160208601612c20565b601f01601f19169290920160200192915050565b6020815260006125e66020830184612c4c565b6001600160a01b038116811461197557600080fd5b60008060408385031215612cb357600080fd5b8235612cbe81612c8b565b946020939093013593505050565b600060208284031215612cde57600080fd5b81356125e681612c8b565b600080600060608486031215612cfe57600080fd5b8335612d0981612c8b565b92506020840135612d1981612c8b565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612d6857612d68612d2a565b604052919050565b60006001600160401b03831115612d8957612d89612d2a565b612d9c601f8401601f1916602001612d40565b9050828152838383011115612db057600080fd5b828260208301376000602084830101529392505050565b600060208284031215612dd957600080fd5b81356001600160401b03811115612def57600080fd5b8201601f81018413612e0057600080fd5b611f3984823560208401612d70565b600080600060608486031215612e2457600080fd5b833592506020840135612d1981612c8b565b801515811461197557600080fd5b60008060408385031215612e5757600080fd5b8235612e6281612c8b565b91506020830135612e7281612e36565b809150509250929050565b60006001600160401b03821115612e9657612e96612d2a565b5060051b60200190565b600082601f830112612eb157600080fd5b81356020612ec6612ec183612e7d565b612d40565b82815260059290921b84018101918181019086841115612ee557600080fd5b8286015b84811015612f005780358352918301918301612ee9565b509695505050505050565b60008060408385031215612f1e57600080fd5b82356001600160401b0380821115612f3557600080fd5b818501915085601f830112612f4957600080fd5b81356020612f59612ec183612e7d565b82815260059290921b84018101918181019089841115612f7857600080fd5b948201945b83861015612f9f578535612f9081612c8b565b82529482019490820190612f7d565b96505086013592505080821115612fb557600080fd5b50612fc285828601612ea0565b9150509250929050565b60008060008060808587031215612fe257600080fd5b8435612fed81612c8b565b93506020850135612ffd81612c8b565b92506040850135915060608501356001600160401b0381111561301f57600080fd5b8501601f8101871361303057600080fd5b61303f87823560208401612d70565b91505092959194509250565b6000806040838503121561305e57600080fd5b823561306981612c8b565b91506020830135612e7281612c8b565b600181811c9082168061308d57607f821691505b6020821081036130ad57634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252600d908201526c0d2dcecc2d8d2c840d2dcc8caf609b1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600082821015613118576131186130f0565b500390565b634e487b7160e01b600052603160045260246000fd5b6020808252601390820152723a37b5b2b71030b63932b0b23c903a30b5b2b760691b604082015260600190565b60006020828403121561317257600080fd5b81516125e681612e36565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b600082198211156131c2576131c26130f0565b500190565b60008160001904831182151516156131e1576131e16130f0565b500290565b6000600182016131f8576131f86130f0565b5060010190565b693d913730b6b2911d101160b11b8152835160009061322581600a850160208901612c20565b61202360f01b600a91840191820152845161324781600c840160208901612c20565b7f222c20226465736372697074696f6e223a2022537072697465204f6e73656e20600c92909101918201527f5061737320686f6c64657273206761696e206578636c75736976652061636365602c8201527f737320746f20746865206669727374204149204e4654207969656c6420656172604c8201527803734b73390383937ba37b1b7b61034b7103232b3349711161603d1b606c820152681134b6b0b3b2911d1160b91b6085820152835161330581608e840160208801612c20565b7f222c202261747472696275746573223a5b7b2274726169745f74797065223a22608e92909101918201527f506173732054797065222c202276616c7565223a224f7264696e617279227d5d60ae820152607d60f81b60ce82015260cf0195945050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516133a481601d850160208701612c20565b91909101601d0192915050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082613424576134246133ff565b500490565b600082613438576134386133ff565b500690565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906134c290830184612c4c565b9695505050505050565b6000602082840312156134de57600080fd5b81516125e681612bc0565b600082516134fb818460208701612c20565b919091019291505056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220b86a572e64baeed1a0e0453368cbb6258cc841da75c08d6a044870629056f9ae64736f6c634300080e0033
Loading...
Loading
Loading...
Loading
[ 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.