ERC-721
Overview
Max Total Supply
154 MCB
Holders
26
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 MCBLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Monsters
Compiler Version
v0.8.18+commit.87f61d96
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED /********************************* * * * (o.O) * * (^^^^^) * * * *********************************/ pragma solidity ^0.8.13; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IMonstersDecoder.sol"; import "./ERC721Enumerable.sol"; contract Monsters is ERC721Enumerable, Ownable { event SeedUpdated(uint256 indexed tokenId, uint256 seed); mapping(uint256 => uint256) internal seeds; IMonstersDecoder public decoder; bool public minting = false; bool public canUpdateSeed = true; constructor() ERC721("Monsters club", "MCB") { } function mint(uint32 count) external payable { require(minting, "Minting needs to be enabled to start minting"); require(count < 101, "Exceeds max per transaction."); uint256 nextTokenId = _owners.length; for (uint32 i; i < count;) { seeds[nextTokenId] = generateSeed(nextTokenId); _mint(_msgSender(), nextTokenId); unchecked { ++nextTokenId; i++; } } } function setMinting(bool value) external onlyOwner { minting = value; } function setDecoder(IMonstersDecoder newDecoder) external onlyOwner { decoder = newDecoder; } function withdraw() external payable onlyOwner { (bool os,)= payable(owner()).call{value: address(this).balance}(""); require(os); } function updateSeed(uint256 tokenId, uint256 seed) external onlyOwner { require(canUpdateSeed, "Cannot set the seed"); seeds[tokenId] = seed; emit SeedUpdated(tokenId, seed); } function disableSeedUpdate() external onlyOwner { canUpdateSeed = false; } function getSeed(uint256 tokenId) public view returns (uint256) { require(_exists(tokenId), "Monster does not exist."); return seeds[tokenId]; } function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "Monster does not exist."); uint256 seed = seeds[tokenId]; return decoder.tokenURI(tokenId, seed); } function generateSeed(uint256 tokenId) private view returns (uint256) { uint256 r = random(tokenId); uint256 headSeed = 100 * (r % 20 + 10) + ((r >> 48) % 20 + 10); uint256 faceSeed = 100 * ((r >> 96) % 12 + 10) + ((r >> 96) % 20 + 10); uint256 mouthSeed = 100 * ((r >> 144) % 7 + 10) + ((r >> 144) % 20 + 10); uint256 neckSeed = 100 * ((r >> 172) % 8 + 10) + ((r >> 172) % 20 + 10); uint256 bodySeed = 100 * ((r >> 192) % 9 + 10) + ((r >> 192) % 20 + 10); uint256 legsSeed = 100 * ((r >> 236) % 4 + 10) + ((r >> 236) % 20 + 10); return 10000 * (10000 * ( 10000 * (10000 * (10000 * headSeed + faceSeed) + mouthSeed ) + neckSeed) + bodySeed) + legsSeed; } function random(uint256 tokenId) private view returns (uint256 pseudoRandomness) { pseudoRandomness = uint256( keccak256(abi.encodePacked(blockhash(block.number - 1), tokenId)) ); return pseudoRandomness; } }
// 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 (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 v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * 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 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _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) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @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] = _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; library Address { function isContract(address account) internal view returns (bool) { uint size; assembly { size := extcodesize(account) } return size > 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "./Address.sol"; abstract contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; string private _name; string private _symbol; address[] internal _owners; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); uint256 count; for (uint256 i; i < _owners.length;) { if (owner == _owners[i]) { unchecked { ++count; } } unchecked { ++i; } } return count; } function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: invalid token ID"); return owner; } function name() public view virtual override returns (string memory) { return _name; } function symbol() public view virtual override returns (string memory) { return _symbol; } function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: invalid token ID"); return _tokenApprovals[tokenId]; } function setApprovalForAll(address operator, bool approved) public virtual override { require(_msgSender() != operator, "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } function transferFrom(address from, address to, uint256 tokenId) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _transfer(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved"); _safeTransfer(from, to, tokenId, data); } 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"); } function _exists(uint256 tokenId) internal view virtual returns (bool) { return tokenId < _owners.length && _owners[tokenId] != address(0); } 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); } function _mint(address to, uint256 tokenId) internal virtual { require(!_exists(tokenId), "ERC721: token already minted"); _owners.push(to); emit Transfer(address(0), to, tokenId); } function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); delete _tokenApprovals[tokenId]; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } 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"); // Clear approvals from the previous owner delete _tokenApprovals[tokenId]; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory data) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } return true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "./ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } function totalSupply() public view virtual override returns (uint256) { uint256 count; for (uint256 i; i < _owners.length;) { if (_owners[i] != address(0)) { unchecked { ++count; } } unchecked { ++i; } } return count; } function tokenByIndex(uint256 index) public view virtual override returns (uint256 tokenId) { require(index < _owners.length, "ERC721Enumerable: global index out of bounds"); return index; } function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256 tokenId) { require(index < balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); uint256 count; for(uint256 i; i < _owners.length;){ if(owner == _owners[i]) { if(count == index) return i; else { unchecked { ++count; } } } unchecked { ++i; } } revert("ERC721Enumerable: owner index out of bounds"); } }
// SPDX-License-Identifier: MIT /********************************* * * * (o.O) * * (^^^^^) * * * *********************************/ pragma solidity ^0.8.13; interface IMonstersDecoder { function tokenURI(uint256 tokenId, uint256 seed) external view returns (string memory); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"seed","type":"uint256"}],"name":"SeedUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canUpdateSeed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decoder","outputs":[{"internalType":"contract IMonstersDecoder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableSeedUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSeed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint32","name":"count","type":"uint32"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"minting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IMonstersDecoder","name":"newDecoder","type":"address"}],"name":"setDecoder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setMinting","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":"tokenId","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":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"seed","type":"uint256"}],"name":"updateSeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"payable","type":"function"}]
Contract Creation Code
6080346200036e576001600160401b039060408181018381118382101762000358578152600d82526020916c26b7b739ba32b9399031b63ab160991b838201528151938285018581108282111762000358578352600385526226a1a160e91b84860152815181811162000358576000948554916001948584811c941680156200034d575b8385101462000339578190601f94858111620002e6575b5083908583116001146200028257899262000276575b5050600019600383901b1c191690851b1786555b8651928311620002625783548481811c9116801562000257575b828210146200024357828111620001fb575b50809183116001146200019457508495829394959262000188575b5050600019600383901b1c191690821b1790555b60058054336001600160a01b03198216811790925591519290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a36007805461ffff60a01b1916600160a81b179055611d289081620003748239f35b0151905038806200010b565b90601f198316968487528287209287905b898210620001e3575050838596979810620001c9575b505050811b0190556200011f565b015160001960f88460031b161c19169055388080620001bb565b808785968294968601518155019501930190620001a5565b8487528187208380860160051c82019284871062000239575b0160051c019085905b8281106200022d575050620000f0565b8881550185906200021d565b9250819262000214565b634e487b7160e01b87526022600452602487fd5b90607f1690620000de565b634e487b7160e01b86526041600452602486fd5b015190503880620000b0565b898052848a208894509190601f1984168b5b87828210620002cf5750508411620002b5575b505050811b018655620000c4565b015160001960f88460031b161c19169055388080620002a7565b8385015186558b9790950194938401930162000294565b9091508880528389208580850160051c8201928686106200032f575b918991869594930160051c01915b828110620003205750506200009a565b8b815585945089910162000310565b9250819262000302565b634e487b7160e01b88526022600452602488fd5b93607f169362000083565b634e487b7160e01b600052604160045260246000fd5b600080fdfe6080604052600436101561001257600080fd5b60003560e01c806301ffc9a7146101e757806306fdde03146101e2578063081812fc146101dd578063095ea7b3146101d8578063176b72b4146101d357806318160ddd146101ce57806323b872dd146101c95780632f745c59146101c457806333101e1f146101bf5780633bb2c938146101ba5780633ccfd60b146101b557806342842e0e146101b05780634f6ccce7146101ab5780636352211e146101a657806370a08231146101a1578063715018a61461019c5780637dc2268c146101975780638da5cb5b1461019257806395d89b411461018d5780639cb3300514610188578063a22cb46514610183578063a71bbebe1461017e578063b4c7f06614610179578063b88d4fde14610174578063c87b56dd1461016f578063d31aa4681461016a578063e0d4ea3714610165578063e985e9c5146101605763f2fde38b1461015b57600080fd5b610fc0565b610f56565b610f1e565b610eda565b610e1a565b610d89565b610cc5565b610bd7565b610aeb565b610ab5565b6109f4565b6109cd565b6109a7565b61094b565b610924565b610906565b610873565b610834565b6107fa565b6107b7565b610791565b61075e565b610735565b610695565b6105d9565b6104c6565b610486565b61037c565b61021b565b7fffffffff0000000000000000000000000000000000000000000000000000000081160361021657565b600080fd5b346102165760203660031901126102165760207fffffffff0000000000000000000000000000000000000000000000000000000060043561025b816101ec565b167f780e9d63000000000000000000000000000000000000000000000000000000008114908115610292575b506040519015158152f35b7f80ac58cd000000000000000000000000000000000000000000000000000000008114915081156102f6575b81156102cc575b5038610287565b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014386102c5565b7f5b5e139f00000000000000000000000000000000000000000000000000000000811491506102be565b60005b8381106103335750506000910152565b8181015183820152602001610323565b9060209161035c81518092818552858086019101610320565b601f01601f1916010190565b906020610379928181520190610343565b90565b346102165760008060031936011261048357604051908080549060019180831c92808216928315610479575b602092838610851461046557858852602088019490811561044457506001146103ec575b6103e8876103dc81890382610d4b565b60405191829182610368565b0390f35b6000805294509192917f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b83861061043357505050910190506103dc826103e838806103cc565b805485870152948201948101610417565b60ff191685525050505090151560051b0190506103dc826103e838806103cc565b602482634e487b7160e01b81526022600452fd5b93607f16936103a8565b80fd5b346102165760203660031901126102165760206104a460043561131e565b6001600160a01b0360405191168152f35b6001600160a01b0381160361021657565b34610216576040366003190112610216576004356104e3816104b5565b6024356104ef81611267565b916001600160a01b03808416809183161461056f576105219361051c913314908115610523575b506112ad565b611692565b005b61056991506105629061054a33916001600160a01b03166000526004602052604060002090565b906001600160a01b0316600052602052604060002090565b5460ff1690565b38610516565b608460405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152fd5b34610216576040366003190112610216576004356024356105f861109c565b60ff60075460a81c16156106515761064c7faabfe5e8bccf1a1352f72b557ce580211305c37f88d5783ae467a1ba5e0761e09183600052600660205280604060002055604051918291829190602083019252565b0390a2005b606460405162461bcd60e51b815260206004820152601360248201527f43616e6e6f7420736574207468652073656564000000000000000000000000006044820152fd5b346102165760008060031936011261048357600280549082805b8381106106c157602085604051908152f35b8282526001600160a01b03817f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0154166106fe575b6001016106af565b6001909401936106f6565b606090600319011261021657600435610721816104b5565b9060243561072e816104b5565b9060443590565b346102165761052161074636610709565b91610759610754843361149b565b611349565b61151c565b34610216576040366003190112610216576020610789600435610780816104b5565b602435906118b3565b604051908152f35b3461021657600036600319011261021657602060ff60075460a81c166040519015158152f35b34610216576000366003190112610216576107d061109c565b600780547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055005b6000806003193601126104835761080f61109c565b808080806001600160a01b036005541647905af161082b61173e565b50156104835780f35b346102165761084236610709565b60405191602083019383851067ffffffffffffffff86111761086e5761052194604052600084526113ba565b610d35565b346102165760203660031901126102165760043560025481101561089c57602090604051908152f35b608460405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152fd5b346102165760203660031901126102165760206104a4600435611267565b34610216576020366003190112610216576020610789600435610946816104b5565b611146565b34610216576000806003193601126104835761096561109c565b806001600160a01b036005546001600160a01b03198116600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b3461021657600036600319011261021657602060ff60075460a01c166040519015158152f35b346102165760003660031901126102165760206001600160a01b0360055416604051908152f35b3461021657600080600319360112610483576040519080600190815480831c92808216928315610aab575b60209283861085146104655785885260208801949081156104445750600114610a52576103e8876103dc81890382610d4b565b600160005294509192917fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b838610610a9a57505050910190506103dc826103e838806103cc565b805485870152948201948101610a7e565b93607f1693610a1f565b346102165760003660031901126102165760206001600160a01b0360075416604051908152f35b60243590811515820361021657565b3461021657604036600319011261021657600435610b08816104b5565b610b10610adc565b6001600160a01b03821691823314610b935781610b50610b61923360005260046020526040600020906001600160a01b0316600052602052604060002090565b9060ff801983541691151516179055565b604051901515815233907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190602090a3005b606460405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152fd5b60203660031901126102165760043563ffffffff908181168091036102165760ff60075460a01c1615610c5b57610c10606582106119c7565b600254906000915b8184841610610c2357005b80610c2e8592611bc0565b610c42826000526006602052604060002090565b55610c4d8133611a12565b600180910193011691610c18565b608460405162461bcd60e51b815260206004820152602c60248201527f4d696e74696e67206e6565647320746f20626520656e61626c656420746f207360448201527f74617274206d696e74696e6700000000000000000000000000000000000000006064820152fd5b346102165760203660031901126102165760043580151580910361021657610ceb61109c565b7fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff00000000000000000000000000000000000000006007549260a01b16911617600755600080f35b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761086e57604052565b67ffffffffffffffff811161086e57601f01601f191660200190565b3461021657608036600319011261021657600435610da6816104b5565b602435610db2816104b5565b6064359167ffffffffffffffff8311610216573660238401121561021657826004013591610ddf83610d6d565b92610ded6040519485610d4b565b808452366024828701011161021657602081600092602461052198018388013785010152604435916113ba565b3461021657602036600319011261021657600435610e3f610e3a82611450565b611abd565b8060005260066020526000604081205460446001600160a01b03600754169360405194859384927f92cb829d000000000000000000000000000000000000000000000000000000008452600484015260248301525afa8015610ed5576103e891600091610eb4575b5060405191829182610368565b610ecf913d8091833e610ec78183610d4b565b810190611b08565b38610ea7565b611732565b34610216576020366003190112610216576001600160a01b03600435610eff816104b5565b610f0761109c565b166001600160a01b03196007541617600755600080f35b3461021657602036600319011261021657600435610f3e610e3a82611450565b60005260066020526020604060002054604051908152f35b3461021657604036600319011261021657602060ff610fb4600435610f7a816104b5565b6001600160a01b0360243591610f8f836104b5565b16600052600484526040600020906001600160a01b0316600052602052604060002090565b54166040519015158152f35b3461021657602036600319011261021657600435610fdd816104b5565b610fe561109c565b6001600160a01b0380911690811561103257600554826001600160a01b0319821617600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b608460405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b6001600160a01b036005541633036110b057565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b634e487b7160e01b600052603260045260246000fd5b6002548110156111415760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0190600090565b6110f4565b6001600160a01b031680156111b257600254600091825b82811061116a5750505090565b61119861118c6111798361110a565b90546001600160a01b039160031b1c1690565b6001600160a01b031690565b82146111a7575b60010161115d565b60019093019261119f565b608460405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152fd5b1561122357565b606460405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152fd5b6002548110156111415760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01546001600160a01b031661037981151561121c565b156112b457565b608460405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152fd5b61132f61132a82611450565b61121c565b60005260036020526001600160a01b036040600020541690565b1561135057565b608460405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152fd5b906113de9392916113ce610754843361149b565b6113d983838361151c565b61176e565b156113e557565b60405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b6002548110908161145f575090565b90156111415760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01546001600160a01b0316151590565b6001600160a01b03806114ad84611267565b1692818316928484149485156114e3575b505083156114cd575b50505090565b6114d99192935061131e565b16143880806114c7565b60ff929550906115129160005260046020526040600020906001600160a01b0316600052602052604060002090565b54169238806114be565b61152583611267565b6001600160a01b03918216919081168290036116285782169182156115bf576115989061156f61155f866000526003602052604060002090565b6001600160a01b03198154169055565b6115788561110a565b90919082549060031b916001600160a01b03809116831b921b1916179055565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b608460405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152fd5b8160005260036020526040600020906001600160a01b0380911691826001600160a01b03198254161790556116c683611267565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4565b908160209103126102165751610379816101ec565b909261037994936080936001600160a01b03809216845216602083015260408201528160608201520190610343565b6040513d6000823e3d90fd5b3d15611769573d9061174f82610d6d565b9161175d6040519384610d4b565b82523d6000602084013e565b606090565b92919091823b6117815750505050600190565b6117ca9260209260006001600160a01b036040518097819682957f150b7a02000000000000000000000000000000000000000000000000000000009b8c85523360048601611703565b0393165af160009181611883575b5061185d576117e561173e565b805190816118585760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000161490565b6118a591925060203d81116118ac575b61189d8183610d4b565b8101906116ee565b90386117d8565b503d611893565b906118bd82611146565b81101561196e576000908192600254935b84811061192e5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608490fd5b61193d61118c6111798361110a565b6001600160a01b03831614611955575b6001016118ce565b9282810361196557505050905090565b6001019261194d565b60405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608490fd5b156119ce57565b606460405162461bcd60e51b815260206004820152601c60248201527f45786365656473206d617820706572207472616e73616374696f6e2e000000006044820152fd5b611a1b82611450565b611a7957600254906801000000000000000082101561086e57611a50816115788460016001600160a01b03960160025561110a565b1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4565b606460405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152fd5b15611ac457565b606460405162461bcd60e51b815260206004820152601760248201527f4d6f6e7374657220646f6573206e6f742065786973742e0000000000000000006044820152fd5b6020818303126102165780519067ffffffffffffffff8211610216570181601f82011215610216578051611b3b81610d6d565b92611b496040519485610d4b565b81845260208284010111610216576103799160208085019101610320565b634e487b7160e01b600052601160045260246000fd5b90600a8201809211611b8b57565b611b67565b91908201809211611b8b57565b9081606402916064830403611b8b57565b906127109180830292830403611b8b57565b611bcc61037991611cb0565b611ca6611cab601492611ca6611cab82611ca6611cab611c0c611bf8611bf38b8606611b7d565b611b9d565b611c068b8660301c06611b7d565b90611b90565b98611ca6611cab611c348660601c611c0685611c2d611bf3600c8506611b7d565b9206611b7d565b611ca6611ca0611c548960901c611c0688611c2d611bf360078506611b7d565b95611c06611c8c611c758c60ac1c611c0685611c2d611bf360078516611b7d565b9b60c01c611c0684611c2d611bf360098506611b7d565b9d60ec1c91611c2d611bf360038516611b7d565b9d611bae565b611b90565b611bae565b600019430190438211611b8b576040519060208201924083526040820152604081526060810181811067ffffffffffffffff82111761086e576040525190209056fea264697066735822122037334ff0c3d8eb741e31ab53a6309a81ad8ae3e4392faefd68af5e58485cfbc864736f6c63430008120033
Deployed Bytecode
0x6080604052600436101561001257600080fd5b60003560e01c806301ffc9a7146101e757806306fdde03146101e2578063081812fc146101dd578063095ea7b3146101d8578063176b72b4146101d357806318160ddd146101ce57806323b872dd146101c95780632f745c59146101c457806333101e1f146101bf5780633bb2c938146101ba5780633ccfd60b146101b557806342842e0e146101b05780634f6ccce7146101ab5780636352211e146101a657806370a08231146101a1578063715018a61461019c5780637dc2268c146101975780638da5cb5b1461019257806395d89b411461018d5780639cb3300514610188578063a22cb46514610183578063a71bbebe1461017e578063b4c7f06614610179578063b88d4fde14610174578063c87b56dd1461016f578063d31aa4681461016a578063e0d4ea3714610165578063e985e9c5146101605763f2fde38b1461015b57600080fd5b610fc0565b610f56565b610f1e565b610eda565b610e1a565b610d89565b610cc5565b610bd7565b610aeb565b610ab5565b6109f4565b6109cd565b6109a7565b61094b565b610924565b610906565b610873565b610834565b6107fa565b6107b7565b610791565b61075e565b610735565b610695565b6105d9565b6104c6565b610486565b61037c565b61021b565b7fffffffff0000000000000000000000000000000000000000000000000000000081160361021657565b600080fd5b346102165760203660031901126102165760207fffffffff0000000000000000000000000000000000000000000000000000000060043561025b816101ec565b167f780e9d63000000000000000000000000000000000000000000000000000000008114908115610292575b506040519015158152f35b7f80ac58cd000000000000000000000000000000000000000000000000000000008114915081156102f6575b81156102cc575b5038610287565b7f01ffc9a700000000000000000000000000000000000000000000000000000000915014386102c5565b7f5b5e139f00000000000000000000000000000000000000000000000000000000811491506102be565b60005b8381106103335750506000910152565b8181015183820152602001610323565b9060209161035c81518092818552858086019101610320565b601f01601f1916010190565b906020610379928181520190610343565b90565b346102165760008060031936011261048357604051908080549060019180831c92808216928315610479575b602092838610851461046557858852602088019490811561044457506001146103ec575b6103e8876103dc81890382610d4b565b60405191829182610368565b0390f35b6000805294509192917f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b83861061043357505050910190506103dc826103e838806103cc565b805485870152948201948101610417565b60ff191685525050505090151560051b0190506103dc826103e838806103cc565b602482634e487b7160e01b81526022600452fd5b93607f16936103a8565b80fd5b346102165760203660031901126102165760206104a460043561131e565b6001600160a01b0360405191168152f35b6001600160a01b0381160361021657565b34610216576040366003190112610216576004356104e3816104b5565b6024356104ef81611267565b916001600160a01b03808416809183161461056f576105219361051c913314908115610523575b506112ad565b611692565b005b61056991506105629061054a33916001600160a01b03166000526004602052604060002090565b906001600160a01b0316600052602052604060002090565b5460ff1690565b38610516565b608460405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152fd5b34610216576040366003190112610216576004356024356105f861109c565b60ff60075460a81c16156106515761064c7faabfe5e8bccf1a1352f72b557ce580211305c37f88d5783ae467a1ba5e0761e09183600052600660205280604060002055604051918291829190602083019252565b0390a2005b606460405162461bcd60e51b815260206004820152601360248201527f43616e6e6f7420736574207468652073656564000000000000000000000000006044820152fd5b346102165760008060031936011261048357600280549082805b8381106106c157602085604051908152f35b8282526001600160a01b03817f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0154166106fe575b6001016106af565b6001909401936106f6565b606090600319011261021657600435610721816104b5565b9060243561072e816104b5565b9060443590565b346102165761052161074636610709565b91610759610754843361149b565b611349565b61151c565b34610216576040366003190112610216576020610789600435610780816104b5565b602435906118b3565b604051908152f35b3461021657600036600319011261021657602060ff60075460a81c166040519015158152f35b34610216576000366003190112610216576107d061109c565b600780547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff169055005b6000806003193601126104835761080f61109c565b808080806001600160a01b036005541647905af161082b61173e565b50156104835780f35b346102165761084236610709565b60405191602083019383851067ffffffffffffffff86111761086e5761052194604052600084526113ba565b610d35565b346102165760203660031901126102165760043560025481101561089c57602090604051908152f35b608460405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152fd5b346102165760203660031901126102165760206104a4600435611267565b34610216576020366003190112610216576020610789600435610946816104b5565b611146565b34610216576000806003193601126104835761096561109c565b806001600160a01b036005546001600160a01b03198116600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b3461021657600036600319011261021657602060ff60075460a01c166040519015158152f35b346102165760003660031901126102165760206001600160a01b0360055416604051908152f35b3461021657600080600319360112610483576040519080600190815480831c92808216928315610aab575b60209283861085146104655785885260208801949081156104445750600114610a52576103e8876103dc81890382610d4b565b600160005294509192917fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b838610610a9a57505050910190506103dc826103e838806103cc565b805485870152948201948101610a7e565b93607f1693610a1f565b346102165760003660031901126102165760206001600160a01b0360075416604051908152f35b60243590811515820361021657565b3461021657604036600319011261021657600435610b08816104b5565b610b10610adc565b6001600160a01b03821691823314610b935781610b50610b61923360005260046020526040600020906001600160a01b0316600052602052604060002090565b9060ff801983541691151516179055565b604051901515815233907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190602090a3005b606460405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152fd5b60203660031901126102165760043563ffffffff908181168091036102165760ff60075460a01c1615610c5b57610c10606582106119c7565b600254906000915b8184841610610c2357005b80610c2e8592611bc0565b610c42826000526006602052604060002090565b55610c4d8133611a12565b600180910193011691610c18565b608460405162461bcd60e51b815260206004820152602c60248201527f4d696e74696e67206e6565647320746f20626520656e61626c656420746f207360448201527f74617274206d696e74696e6700000000000000000000000000000000000000006064820152fd5b346102165760203660031901126102165760043580151580910361021657610ceb61109c565b7fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff74ff00000000000000000000000000000000000000006007549260a01b16911617600755600080f35b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761086e57604052565b67ffffffffffffffff811161086e57601f01601f191660200190565b3461021657608036600319011261021657600435610da6816104b5565b602435610db2816104b5565b6064359167ffffffffffffffff8311610216573660238401121561021657826004013591610ddf83610d6d565b92610ded6040519485610d4b565b808452366024828701011161021657602081600092602461052198018388013785010152604435916113ba565b3461021657602036600319011261021657600435610e3f610e3a82611450565b611abd565b8060005260066020526000604081205460446001600160a01b03600754169360405194859384927f92cb829d000000000000000000000000000000000000000000000000000000008452600484015260248301525afa8015610ed5576103e891600091610eb4575b5060405191829182610368565b610ecf913d8091833e610ec78183610d4b565b810190611b08565b38610ea7565b611732565b34610216576020366003190112610216576001600160a01b03600435610eff816104b5565b610f0761109c565b166001600160a01b03196007541617600755600080f35b3461021657602036600319011261021657600435610f3e610e3a82611450565b60005260066020526020604060002054604051908152f35b3461021657604036600319011261021657602060ff610fb4600435610f7a816104b5565b6001600160a01b0360243591610f8f836104b5565b16600052600484526040600020906001600160a01b0316600052602052604060002090565b54166040519015158152f35b3461021657602036600319011261021657600435610fdd816104b5565b610fe561109c565b6001600160a01b0380911690811561103257600554826001600160a01b0319821617600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3005b608460405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b6001600160a01b036005541633036110b057565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b634e487b7160e01b600052603260045260246000fd5b6002548110156111415760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0190600090565b6110f4565b6001600160a01b031680156111b257600254600091825b82811061116a5750505090565b61119861118c6111798361110a565b90546001600160a01b039160031b1c1690565b6001600160a01b031690565b82146111a7575b60010161115d565b60019093019261119f565b608460405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e657200000000000000000000000000000000000000000000006064820152fd5b1561122357565b606460405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e20494400000000000000006044820152fd5b6002548110156111415760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01546001600160a01b031661037981151561121c565b156112b457565b608460405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152fd5b61132f61132a82611450565b61121c565b60005260036020526001600160a01b036040600020541690565b1561135057565b608460405162461bcd60e51b815260206004820152602d60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206f7220617070726f766564000000000000000000000000000000000000006064820152fd5b906113de9392916113ce610754843361149b565b6113d983838361151c565b61176e565b156113e557565b60405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b6002548110908161145f575090565b90156111415760026000527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace01546001600160a01b0316151590565b6001600160a01b03806114ad84611267565b1692818316928484149485156114e3575b505083156114cd575b50505090565b6114d99192935061131e565b16143880806114c7565b60ff929550906115129160005260046020526040600020906001600160a01b0316600052602052604060002090565b54169238806114be565b61152583611267565b6001600160a01b03918216919081168290036116285782169182156115bf576115989061156f61155f866000526003602052604060002090565b6001600160a01b03198154169055565b6115788561110a565b90919082549060031b916001600160a01b03809116831b921b1916179055565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b608460405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152fd5b608460405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152fd5b8160005260036020526040600020906001600160a01b0380911691826001600160a01b03198254161790556116c683611267565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4565b908160209103126102165751610379816101ec565b909261037994936080936001600160a01b03809216845216602083015260408201528160608201520190610343565b6040513d6000823e3d90fd5b3d15611769573d9061174f82610d6d565b9161175d6040519384610d4b565b82523d6000602084013e565b606090565b92919091823b6117815750505050600190565b6117ca9260209260006001600160a01b036040518097819682957f150b7a02000000000000000000000000000000000000000000000000000000009b8c85523360048601611703565b0393165af160009181611883575b5061185d576117e561173e565b805190816118585760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608490fd5b602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000161490565b6118a591925060203d81116118ac575b61189d8183610d4b565b8101906116ee565b90386117d8565b503d611893565b906118bd82611146565b81101561196e576000908192600254935b84811061192e5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608490fd5b61193d61118c6111798361110a565b6001600160a01b03831614611955575b6001016118ce565b9282810361196557505050905090565b6001019261194d565b60405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608490fd5b156119ce57565b606460405162461bcd60e51b815260206004820152601c60248201527f45786365656473206d617820706572207472616e73616374696f6e2e000000006044820152fd5b611a1b82611450565b611a7957600254906801000000000000000082101561086e57611a50816115788460016001600160a01b03960160025561110a565b1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4565b606460405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152fd5b15611ac457565b606460405162461bcd60e51b815260206004820152601760248201527f4d6f6e7374657220646f6573206e6f742065786973742e0000000000000000006044820152fd5b6020818303126102165780519067ffffffffffffffff8211610216570181601f82011215610216578051611b3b81610d6d565b92611b496040519485610d4b565b81845260208284010111610216576103799160208085019101610320565b634e487b7160e01b600052601160045260246000fd5b90600a8201809211611b8b57565b611b67565b91908201809211611b8b57565b9081606402916064830403611b8b57565b906127109180830292830403611b8b57565b611bcc61037991611cb0565b611ca6611cab601492611ca6611cab82611ca6611cab611c0c611bf8611bf38b8606611b7d565b611b9d565b611c068b8660301c06611b7d565b90611b90565b98611ca6611cab611c348660601c611c0685611c2d611bf3600c8506611b7d565b9206611b7d565b611ca6611ca0611c548960901c611c0688611c2d611bf360078506611b7d565b95611c06611c8c611c758c60ac1c611c0685611c2d611bf360078516611b7d565b9b60c01c611c0684611c2d611bf360098506611b7d565b9d60ec1c91611c2d611bf360038516611b7d565b9d611bae565b611b90565b611bae565b600019430190438211611b8b576040519060208201924083526040820152604081526060810181811067ffffffffffffffff82111761086e576040525190209056fea264697066735822122037334ff0c3d8eb741e31ab53a6309a81ad8ae3e4392faefd68af5e58485cfbc864736f6c63430008120033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.