Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,005 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Whitelist Mint | 20283236 | 7 days ago | IN | 0 ETH | 0.00077788 | ||||
Whitelist Mint | 20283235 | 7 days ago | IN | 0 ETH | 0.00069176 | ||||
Whitelist Mint | 20283094 | 7 days ago | IN | 0 ETH | 0.000582 | ||||
Whitelist Mint | 20283087 | 7 days ago | IN | 0 ETH | 0.00057001 | ||||
Whitelist Mint | 20283085 | 7 days ago | IN | 0 ETH | 0.00050244 | ||||
Whitelist Mint | 20283077 | 7 days ago | IN | 0 ETH | 0.00046041 | ||||
Whitelist Mint | 20283066 | 7 days ago | IN | 0 ETH | 0.00047411 | ||||
Whitelist Mint | 20283064 | 7 days ago | IN | 0 ETH | 0.00050341 | ||||
Whitelist Mint | 20283056 | 7 days ago | IN | 0 ETH | 0.00047732 | ||||
Whitelist Mint | 20283048 | 7 days ago | IN | 0 ETH | 0.00050969 | ||||
Whitelist Mint | 20282785 | 8 days ago | IN | 0 ETH | 0.0004042 | ||||
Whitelist Mint | 20282415 | 8 days ago | IN | 0 ETH | 0.0014384 | ||||
Whitelist Mint | 20282404 | 8 days ago | IN | 0 ETH | 0.00165614 | ||||
Whitelist Mint | 20282337 | 8 days ago | IN | 0 ETH | 0.00186712 | ||||
Whitelist Mint | 20282257 | 8 days ago | IN | 0 ETH | 0.00083891 | ||||
Whitelist Mint | 20282225 | 8 days ago | IN | 0 ETH | 0.00050754 | ||||
Whitelist Mint | 20282219 | 8 days ago | IN | 0 ETH | 0.00051403 | ||||
Whitelist Mint | 20282205 | 8 days ago | IN | 0 ETH | 0.00048885 | ||||
Whitelist Mint | 20282198 | 8 days ago | IN | 0 ETH | 0.00053837 | ||||
Whitelist Mint | 20282197 | 8 days ago | IN | 0 ETH | 0.00048204 | ||||
Whitelist Mint | 20282158 | 8 days ago | IN | 0 ETH | 0.00043492 | ||||
Whitelist Mint | 20282144 | 8 days ago | IN | 0 ETH | 0.00047476 | ||||
Whitelist Mint | 20282122 | 8 days ago | IN | 0 ETH | 0.0004213 | ||||
Whitelist Mint | 20282119 | 8 days ago | IN | 0 ETH | 0.00047943 | ||||
Whitelist Mint | 20282117 | 8 days ago | IN | 0 ETH | 0.00045892 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
Mint7007
Compiler Version
v0.8.24+commit.e11b9ed9
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2024-07-07 */ // SPDX-License-Identifier: MIT pragma solidity =0.8.24 ^0.8.20; // lib/openzeppelin-contracts/contracts/interfaces/IERC5267.sol // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol) interface IERC5267 { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ); } // lib/openzeppelin-contracts/contracts/utils/Context.sol // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } } // lib/openzeppelin-contracts/contracts/utils/StorageSlot.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC-1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` */ library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } } // lib/openzeppelin-contracts/contracts/utils/cryptography/ECDSA.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol) /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS } /** * @dev The signature derives the `address(0)`. */ error ECDSAInvalidSignature(); /** * @dev The signature has an invalid length. */ error ECDSAInvalidSignatureLength(uint256 length); /** * @dev The signature has an S value that is in the upper half order. */ error ECDSAInvalidSignatureS(bytes32 s); /** * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not * return address(0) without also returning an error description. Errors are documented using an enum (error type) * and a bytes32 providing additional information about the error. * * If no error is returned, then the address can be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length)); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[ERC-2098 short signatures] */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) { unchecked { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); // We do not check for an overflow here since the shift operation results in 0 or 1. uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError, bytes32) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS, s); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature, bytes32(0)); } return (signer, RecoverError.NoError, bytes32(0)); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s); _throwError(error, errorArg); return recovered; } /** * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. */ function _throwError(RecoverError error, bytes32 errorArg) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert ECDSAInvalidSignature(); } else if (error == RecoverError.InvalidSignatureLength) { revert ECDSAInvalidSignatureLength(uint256(errorArg)); } else if (error == RecoverError.InvalidSignatureS) { revert ECDSAInvalidSignatureS(errorArg); } } } // lib/openzeppelin-contracts/contracts/utils/introspection/IERC165.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * 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[ERC 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); } // lib/openzeppelin-contracts/contracts/utils/math/Math.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an success flag (no overflow). */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an success flag (no overflow). */ function trySub(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an success flag (no overflow). */ function tryMul(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a success flag (no division by zero). */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a success flag (no division by zero). */ function tryMod(uint256 a, uint256 b) internal pure returns (bool success, uint256 result) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @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 towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // The following calculation ensures accurate ceiling division without overflow. // Since a is non-zero, (a - 1) / b will not overflow. // The largest possible result occurs when (a - 1) / b is type(uint256).max, // but the largest value we can obtain is type(uint256).max - 1, which happens // when a = type(uint256).max and b = 1. unchecked { 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 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 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. uint256 twos = denominator & (0 - denominator); 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 (unsignedRoundsUp(rounding) && 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 * towards zero. * * 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 + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * 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 + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * 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 + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * 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 256, 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 + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } } // lib/openzeppelin-contracts/contracts/utils/math/SignedMath.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } } // lib/openzeppelin-contracts/contracts/access/Ownable.sol // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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 { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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); } } // lib/openzeppelin-contracts/contracts/token/ERC721/IERC721.sol // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC721/IERC721.sol) /** * @dev Required interface of an ERC-721 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 ERC-721 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 ERC-721 * 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 address zero. * * 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); } // lib/openzeppelin-contracts/contracts/utils/Pausable.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol) /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { bool private _paused; /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); /** * @dev The operation failed because the contract is paused. */ error EnforcedPause(); /** * @dev The operation failed because the contract is not paused. */ error ExpectedPause(); /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { if (paused()) { revert EnforcedPause(); } } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { if (!paused()) { revert ExpectedPause(); } } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } } // lib/openzeppelin-contracts/contracts/utils/ShortStrings.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol) // | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA | // | length | 0x BB | type ShortString is bytes32; /** * @dev This library provides functions to convert short memory strings * into a `ShortString` type that can be used as an immutable variable. * * Strings of arbitrary length can be optimized using this library if * they are short enough (up to 31 bytes) by packing them with their * length (1 byte) in a single EVM word (32 bytes). Additionally, a * fallback mechanism can be used for every other case. * * Usage example: * * ```solidity * contract Named { * using ShortStrings for *; * * ShortString private immutable _name; * string private _nameFallback; * * constructor(string memory contractName) { * _name = contractName.toShortStringWithFallback(_nameFallback); * } * * function name() external view returns (string memory) { * return _name.toStringWithFallback(_nameFallback); * } * } * ``` */ library ShortStrings { // Used as an identifier for strings longer than 31 bytes. bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; error StringTooLong(string str); error InvalidShortString(); /** * @dev Encode a string of at most 31 chars into a `ShortString`. * * This will trigger a `StringTooLong` error is the input string is too long. */ function toShortString(string memory str) internal pure returns (ShortString) { bytes memory bstr = bytes(str); if (bstr.length > 31) { revert StringTooLong(str); } return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); } /** * @dev Decode a `ShortString` back to a "normal" string. */ function toString(ShortString sstr) internal pure returns (string memory) { uint256 len = byteLength(sstr); // using `new string(len)` would work locally but is not memory safe. string memory str = new string(32); /// @solidity memory-safe-assembly assembly { mstore(str, len) mstore(add(str, 0x20), sstr) } return str; } /** * @dev Return the length of a `ShortString`. */ function byteLength(ShortString sstr) internal pure returns (uint256) { uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; if (result > 31) { revert InvalidShortString(); } return result; } /** * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. */ function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { if (bytes(value).length < 32) { return toShortString(value); } else { StorageSlot.getStringSlot(store).value = value; return ShortString.wrap(FALLBACK_SENTINEL); } } /** * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. */ function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return toString(value); } else { return store; } } /** * @dev Return the length of a string that was encoded to `ShortString` or written to storage using * {setWithFallback}. * * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. */ function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return byteLength(value); } else { return bytes(store).length; } } } // lib/openzeppelin-contracts/contracts/access/Ownable2Step.sol // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable2Step.sol) /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * This extension of the {Ownable} contract includes a two-step mechanism to transfer * ownership, where the new owner must call {acceptOwnership} in order to replace the * old one. This can help prevent common mistakes, such as transfers of ownership to * incorrect accounts, or to contracts that are unable to interact with the * permission system. * * The initial owner is specified at deployment time in the constructor for `Ownable`. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); if (pendingOwner() != sender) { revert OwnableUnauthorizedAccount(sender); } _transferOwnership(sender); } } // lib/openzeppelin-contracts/contracts/utils/Strings.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @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), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @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) { uint256 localValue = value; 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_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } 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); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } } // src/interfaces/IToken7007.sol interface IToken7007 is IERC721 { error ExceedMaxSupply(); error CallerNotMinter(); event BaseTokenURIUpdated(string uri); event MinterRoleUpdated(address minter); event RoyaltyInfoUpdated(address receiver, uint96 feeNumerator); function totalSupply() external view returns (uint256); function mint(address account) external returns (uint256); } // lib/openzeppelin-contracts/contracts/utils/cryptography/MessageHashUtils.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol) /** * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. * * The library provides methods for generating a hash of a message that conforms to the * https://eips.ethereum.org/EIPS/eip-191[ERC-191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] * specifications. */ library MessageHashUtils { /** * @dev Returns the keccak256 digest of an ERC-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing a bytes32 `messageHash` with * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with * keccak256, although any bytes32 value can be safely used because the final digest will * be re-hashed. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20) } } /** * @dev Returns the keccak256 digest of an ERC-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing an arbitrary `message` with * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) { return keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message)); } /** * @dev Returns the keccak256 digest of an ERC-191 signed data with version * `0x00` (data with intended validator). * * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended * `validator` address. Then hashing the result. * * See {ECDSA-recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked(hex"19_00", validator, data)); } /** * @dev Returns the keccak256 digest of an EIP-712 typed data (ERC-191 version `0x01`). * * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with * `\x19\x01` and hashing the result. It corresponds to the hash signed by the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. * * See {ECDSA-recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, hex"19_01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) digest := keccak256(ptr, 0x42) } } } // lib/openzeppelin-contracts/contracts/utils/cryptography/EIP712.sol // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol) /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP-712] is a standard for hashing and signing of typed structured data. * * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP-712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. * * @custom:oz-upgrades-unsafe-allow state-variable-immutable */ abstract contract EIP712 is IERC5267 { using ShortStrings for *; bytes32 private constant TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _cachedDomainSeparator; uint256 private immutable _cachedChainId; address private immutable _cachedThis; bytes32 private immutable _hashedName; bytes32 private immutable _hashedVersion; ShortString private immutable _name; ShortString private immutable _version; string private _nameFallback; string private _versionFallback; /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP-712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { _name = name.toShortStringWithFallback(_nameFallback); _version = version.toShortStringWithFallback(_versionFallback); _hashedName = keccak256(bytes(name)); _hashedVersion = keccak256(bytes(version)); _cachedChainId = block.chainid; _cachedDomainSeparator = _buildDomainSeparator(); _cachedThis = address(this); } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _cachedThis && block.chainid == _cachedChainId) { return _cachedDomainSeparator; } else { return _buildDomainSeparator(); } } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev See {IERC-5267}. */ function eip712Domain() public view virtual returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ) { return ( hex"0f", // 01111 _EIP712Name(), _EIP712Version(), block.chainid, address(this), bytes32(0), new uint256[](0) ); } /** * @dev The name parameter for the EIP712 domain. * * NOTE: By default this function reads _name which is an immutable value. * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). */ // solhint-disable-next-line func-name-mixedcase function _EIP712Name() internal view returns (string memory) { return _name.toStringWithFallback(_nameFallback); } /** * @dev The version parameter for the EIP712 domain. * * NOTE: By default this function reads _version which is an immutable value. * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). */ // solhint-disable-next-line func-name-mixedcase function _EIP712Version() internal view returns (string memory) { return _version.toStringWithFallback(_versionFallback); } } // src/Mint7007.sol contract Mint7007 is Ownable2Step, Pausable, EIP712("Mint7007", "1") { error InvalidMintQuantity(); error InvalidSignature(); error ExceedMaxQuantity(); event SignerUpdated(address signer); bytes32 private constant _MINT_TYPE_HASH = keccak256("Mint(address account,uint256 maxQuantity)"); IToken7007 public immutable token; address public signer; mapping(address => uint256) public mintedAmounts; constructor(address token_) Ownable(_msgSender()) { token = IToken7007(token_); } function whitelistMint( uint256 quantity, uint256 maxQuantity, bytes calldata signature ) external whenNotPaused { if (quantity == 0 || quantity > maxQuantity) { revert InvalidMintQuantity(); } bytes32 digest = _hashTypedDataV4( keccak256(abi.encode(_MINT_TYPE_HASH, _msgSender(), maxQuantity)) ); if (ECDSA.recover(digest, signature) != signer) { revert InvalidSignature(); } if (mintedAmounts[_msgSender()] + quantity > maxQuantity) { revert ExceedMaxQuantity(); } mintedAmounts[_msgSender()] += quantity; for (uint256 i = 0; i < quantity; i++) { token.mint(_msgSender()); } } function pause() external onlyOwner { _pause(); } function unpause() external onlyOwner { _unpause(); } function setSigner(address signer_) external onlyOwner { signer = signer_; emit SignerUpdated(signer_); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"token_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExceedMaxQuantity","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"InvalidMintQuantity","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[],"name":"InvalidSignature","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"signer","type":"address"}],"name":"SignerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"mintedAmounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer_","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IToken7007","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"uint256","name":"maxQuantity","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"whitelistMint","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101806040523480156200001257600080fd5b506040516200138d3803806200138d83398101604081905262000035916200027f565b604051806040016040528060088152602001674d696e743730303760c01b815250604051806040016040528060018152602001603160f81b815250620000806200019160201b60201c565b6001600160a01b038116620000b057604051631e4fbdf760e01b8152600060048201526024015b60405180910390fd5b620000bb8162000195565b506001805460ff60a01b19169055620000d6826002620001b3565b61012052620000e7816003620001b3565b61014052815160208084019190912060e052815190820120610100524660a0526200017560e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60805250503060c0526001600160a01b0316610160526200049a565b3390565b600180546001600160a01b0319169055620001b081620001ec565b50565b6000602083511015620001d357620001cb836200023c565b9050620001e6565b81620001e0848262000358565b5060ff90505b92915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080829050601f815111156200026a578260405163305a27a960e01b8152600401620000a7919062000424565b8051620002778262000475565b179392505050565b6000602082840312156200029257600080fd5b81516001600160a01b0381168114620002aa57600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620002dc57607f821691505b602082108103620002fd57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000353576000816000526020600020601f850160051c810160208610156200032e5750805b601f850160051c820191505b818110156200034f578281556001016200033a565b5050505b505050565b81516001600160401b03811115620003745762000374620002b1565b6200038c81620003858454620002c7565b8462000303565b602080601f831160018114620003c45760008415620003ab5750858301515b600019600386901b1c1916600185901b1785556200034f565b600085815260208120601f198616915b82811015620003f557888601518255948401946001909101908401620003d4565b5085821015620004145787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006020808352835180602085015260005b81811015620004545785810183015185820160400152820162000436565b506000604082860101526040601f19601f8301168501019250505092915050565b80516020808301519190811015620002fd5760001960209190910360031b1b16919050565b60805160a05160c05160e05161010051610120516101405161016051610e86620005076000396000818161020701526104d0015260006106f9015260006106c7015260006109a60152600061097e015260006108d9015260006109030152600061092d0152610e866000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638456cb591161008c578063e30c397811610066578063e30c3978146101cb578063ec596b72146101dc578063f2fde38b146101ef578063fc0c546a1461020257600080fd5b80638456cb591461019757806384b0196e1461019f5780638da5cb5b146101ba57600080fd5b80636c19e783116100c85780636c19e783146101465780636ef0d85514610159578063715018a61461018757806379ba50971461018f57600080fd5b8063238ac933146100ef5780633f4ba83a1461011f5780635c975abb14610129575b600080fd5b600454610102906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b610127610229565b005b600154600160a01b900460ff166040519015158152602001610116565b610127610154366004610c37565b61023b565b610179610167366004610c37565b60056020526000908152604090205481565b604051908152602001610116565b610127610297565b6101276102a9565b6101276102f2565b6101a7610302565b6040516101169796959493929190610cad565b6000546001600160a01b0316610102565b6001546001600160a01b0316610102565b6101276101ea366004610d46565b610348565b6101276101fd366004610c37565b610571565b6101027f000000000000000000000000000000000000000000000000000000000000000081565b6102316105e2565b61023961060f565b565b6102436105e2565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5553331329228fbd4123164423717a4a7539f6dfa1c3279a923b98fd681a6c739060200160405180910390a150565b61029f6105e2565b6102396000610664565b60015433906001600160a01b031681146102e65760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b6102ef81610664565b50565b6102fa6105e2565b61023961067d565b6000606080600080600060606103166106c0565b61031e6106f2565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61035061071f565b83158061035c57508284115b1561037a5760405163011674e560e71b815260040160405180910390fd5b60006103e17f0d0f41681e1370dd80692ccd09b5710dbde2d5fecd24b0098f08182daf6bf08b336040805160208101939093526001600160a01b0390911690820152606081018690526080016040516020818303038152906040528051906020012061074a565b600454604080516020601f87018190048102820181019092528581529293506001600160a01b039091169161043391849190879087908190840183828082843760009201919091525061077d92505050565b6001600160a01b03161461045a57604051638baa579f60e01b815260040160405180910390fd5b336000908152600560205260409020548490610477908790610dc6565b111561049657604051633435702960e01b815260040160405180910390fd5b33600090815260056020526040812080548792906104b5908490610dc6565b90915550600090505b85811015610569576001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016636a627842336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024016020604051808303816000875af115801561053c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105609190610de7565b506001016104be565b505050505050565b6105796105e2565b600180546001600160a01b0383166001600160a01b031990911681179091556105aa6000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146102395760405163118cdaa760e01b81523360048201526024016102dd565b6106176107a7565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b03191690556102ef816107d1565b61068561071f565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586106473390565b60606106ed7f00000000000000000000000000000000000000000000000000000000000000006002610821565b905090565b60606106ed7f00000000000000000000000000000000000000000000000000000000000000006003610821565b600154600160a01b900460ff16156102395760405163d93c066560e01b815260040160405180910390fd5b60006107776107576108cc565b8360405161190160f01b8152600281019290925260228201526042902090565b92915050565b60008060008061078d86866109f7565b92509250925061079d8282610a44565b5090949350505050565b600154600160a01b900460ff1661023957604051638dfc202b60e01b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606060ff831461083b5761083483610b01565b9050610777565b81805461084790610e00565b80601f016020809104026020016040519081016040528092919081815260200182805461087390610e00565b80156108c05780601f10610895576101008083540402835291602001916108c0565b820191906000526020600020905b8154815290600101906020018083116108a357829003601f168201915b50505050509050610777565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561092557507f000000000000000000000000000000000000000000000000000000000000000046145b1561094f57507f000000000000000000000000000000000000000000000000000000000000000090565b6106ed604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60008060008351604103610a315760208401516040850151606086015160001a610a2388828585610b40565b955095509550505050610a3d565b50508151600091506002905b9250925092565b6000826003811115610a5857610a58610e3a565b03610a61575050565b6001826003811115610a7557610a75610e3a565b03610a935760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610aa757610aa7610e3a565b03610ac85760405163fce698f760e01b8152600481018290526024016102dd565b6003826003811115610adc57610adc610e3a565b03610afd576040516335e2f38360e21b8152600481018290526024016102dd565b5050565b60606000610b0e83610c0f565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610b7b5750600091506003905082610c05565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610bcf573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bfb57506000925060019150829050610c05565b9250600091508190505b9450945094915050565b600060ff8216601f81111561077757604051632cd44ac360e21b815260040160405180910390fd5b600060208284031215610c4957600080fd5b81356001600160a01b0381168114610c6057600080fd5b9392505050565b6000815180845260005b81811015610c8d57602081850181015186830182015201610c71565b506000602082860101526020601f19601f83011685010191505092915050565b60ff60f81b881681526000602060e06020840152610cce60e084018a610c67565b8381036040850152610ce0818a610c67565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b81811015610d3457835183529284019291840191600101610d18565b50909c9b505050505050505050505050565b60008060008060608587031215610d5c57600080fd5b8435935060208501359250604085013567ffffffffffffffff80821115610d8257600080fd5b818701915087601f830112610d9657600080fd5b813581811115610da557600080fd5b886020828501011115610db757600080fd5b95989497505060200194505050565b8082018082111561077757634e487b7160e01b600052601160045260246000fd5b600060208284031215610df957600080fd5b5051919050565b600181811c90821680610e1457607f821691505b602082108103610e3457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212200d31e40e7b98a5449eaa1bc59d97fec867ea33ef3301271e45cba1b64466ce7864736f6c6343000818003300000000000000000000000097e64e55e2d1739c2b09923dcfe09813a7324dfa
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c80638456cb591161008c578063e30c397811610066578063e30c3978146101cb578063ec596b72146101dc578063f2fde38b146101ef578063fc0c546a1461020257600080fd5b80638456cb591461019757806384b0196e1461019f5780638da5cb5b146101ba57600080fd5b80636c19e783116100c85780636c19e783146101465780636ef0d85514610159578063715018a61461018757806379ba50971461018f57600080fd5b8063238ac933146100ef5780633f4ba83a1461011f5780635c975abb14610129575b600080fd5b600454610102906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b610127610229565b005b600154600160a01b900460ff166040519015158152602001610116565b610127610154366004610c37565b61023b565b610179610167366004610c37565b60056020526000908152604090205481565b604051908152602001610116565b610127610297565b6101276102a9565b6101276102f2565b6101a7610302565b6040516101169796959493929190610cad565b6000546001600160a01b0316610102565b6001546001600160a01b0316610102565b6101276101ea366004610d46565b610348565b6101276101fd366004610c37565b610571565b6101027f00000000000000000000000097e64e55e2d1739c2b09923dcfe09813a7324dfa81565b6102316105e2565b61023961060f565b565b6102436105e2565b600480546001600160a01b0319166001600160a01b0383169081179091556040519081527f5553331329228fbd4123164423717a4a7539f6dfa1c3279a923b98fd681a6c739060200160405180910390a150565b61029f6105e2565b6102396000610664565b60015433906001600160a01b031681146102e65760405163118cdaa760e01b81526001600160a01b03821660048201526024015b60405180910390fd5b6102ef81610664565b50565b6102fa6105e2565b61023961067d565b6000606080600080600060606103166106c0565b61031e6106f2565b60408051600080825260208201909252600f60f81b9b939a50919850469750309650945092509050565b61035061071f565b83158061035c57508284115b1561037a5760405163011674e560e71b815260040160405180910390fd5b60006103e17f0d0f41681e1370dd80692ccd09b5710dbde2d5fecd24b0098f08182daf6bf08b336040805160208101939093526001600160a01b0390911690820152606081018690526080016040516020818303038152906040528051906020012061074a565b600454604080516020601f87018190048102820181019092528581529293506001600160a01b039091169161043391849190879087908190840183828082843760009201919091525061077d92505050565b6001600160a01b03161461045a57604051638baa579f60e01b815260040160405180910390fd5b336000908152600560205260409020548490610477908790610dc6565b111561049657604051633435702960e01b815260040160405180910390fd5b33600090815260056020526040812080548792906104b5908490610dc6565b90915550600090505b85811015610569576001600160a01b037f00000000000000000000000097e64e55e2d1739c2b09923dcfe09813a7324dfa16636a627842336040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024016020604051808303816000875af115801561053c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105609190610de7565b506001016104be565b505050505050565b6105796105e2565b600180546001600160a01b0383166001600160a01b031990911681179091556105aa6000546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b6000546001600160a01b031633146102395760405163118cdaa760e01b81523360048201526024016102dd565b6106176107a7565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b03191690556102ef816107d1565b61068561071f565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586106473390565b60606106ed7f4d696e74373030370000000000000000000000000000000000000000000000086002610821565b905090565b60606106ed7f31000000000000000000000000000000000000000000000000000000000000016003610821565b600154600160a01b900460ff16156102395760405163d93c066560e01b815260040160405180910390fd5b60006107776107576108cc565b8360405161190160f01b8152600281019290925260228201526042902090565b92915050565b60008060008061078d86866109f7565b92509250925061079d8282610a44565b5090949350505050565b600154600160a01b900460ff1661023957604051638dfc202b60e01b815260040160405180910390fd5b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b606060ff831461083b5761083483610b01565b9050610777565b81805461084790610e00565b80601f016020809104026020016040519081016040528092919081815260200182805461087390610e00565b80156108c05780601f10610895576101008083540402835291602001916108c0565b820191906000526020600020905b8154815290600101906020018083116108a357829003601f168201915b50505050509050610777565b6000306001600160a01b037f0000000000000000000000001a1a93be3b44278959d4fef7ccca759c87ff46911614801561092557507f000000000000000000000000000000000000000000000000000000000000000146145b1561094f57507f14f1e161945ff2b17c8f48df566404ff46e28341554308d1bdec6a5dae23f45790565b6106ed604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f91b05c9d22f6ef8f245b7443af797c40c90b83767233d43132dc67108c3b629f918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260009060c00160405160208183030381529060405280519060200120905090565b60008060008351604103610a315760208401516040850151606086015160001a610a2388828585610b40565b955095509550505050610a3d565b50508151600091506002905b9250925092565b6000826003811115610a5857610a58610e3a565b03610a61575050565b6001826003811115610a7557610a75610e3a565b03610a935760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115610aa757610aa7610e3a565b03610ac85760405163fce698f760e01b8152600481018290526024016102dd565b6003826003811115610adc57610adc610e3a565b03610afd576040516335e2f38360e21b8152600481018290526024016102dd565b5050565b60606000610b0e83610c0f565b604080516020808252818301909252919250600091906020820181803683375050509182525060208101929092525090565b600080807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115610b7b5750600091506003905082610c05565b604080516000808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015610bcf573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116610bfb57506000925060019150829050610c05565b9250600091508190505b9450945094915050565b600060ff8216601f81111561077757604051632cd44ac360e21b815260040160405180910390fd5b600060208284031215610c4957600080fd5b81356001600160a01b0381168114610c6057600080fd5b9392505050565b6000815180845260005b81811015610c8d57602081850181015186830182015201610c71565b506000602082860101526020601f19601f83011685010191505092915050565b60ff60f81b881681526000602060e06020840152610cce60e084018a610c67565b8381036040850152610ce0818a610c67565b606085018990526001600160a01b038816608086015260a0850187905284810360c08601528551808252602080880193509091019060005b81811015610d3457835183529284019291840191600101610d18565b50909c9b505050505050505050505050565b60008060008060608587031215610d5c57600080fd5b8435935060208501359250604085013567ffffffffffffffff80821115610d8257600080fd5b818701915087601f830112610d9657600080fd5b813581811115610da557600080fd5b886020828501011115610db757600080fd5b95989497505060200194505050565b8082018082111561077757634e487b7160e01b600052601160045260246000fd5b600060208284031215610df957600080fd5b5051919050565b600181811c90821680610e1457607f821691505b602082108103610e3457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052602160045260246000fdfea26469706673582212200d31e40e7b98a5449eaa1bc59d97fec867ea33ef3301271e45cba1b64466ce7864736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000097e64e55e2d1739c2b09923dcfe09813a7324dfa
-----Decoded View---------------
Arg [0] : token_ (address): 0x97E64E55e2D1739C2B09923dcFE09813a7324Dfa
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000097e64e55e2d1739c2b09923dcfe09813a7324dfa
Deployed Bytecode Sourcemap
63899:1642:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;64279:21;;;;;-1:-1:-1;;;;;64279:21:0;;;;;;-1:-1:-1;;;;;178:32:1;;;160:51;;148:2;133:18;64279:21:0;;;;;;;;65335:67;;;:::i;:::-;;42113:86;42184:7;;-1:-1:-1;;;42184:7:0;;;;42113:86;;387:14:1;;380:22;362:41;;350:2;335:18;42113:86:0;222:187:1;65410:128:0;;;;;;:::i;:::-;;:::i;64309:48::-;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;851:25:1;;;839:2;824:18;64309:48:0;705:177:1;34395:103:0;;;:::i;49670:235::-;;;:::i;65264:63::-;;;:::i;62360:580::-;;;:::i;:::-;;;;;;;;;;;;;:::i;33720:87::-;33766:7;33793:6;-1:-1:-1;;;;;33793:6:0;33720:87;;48758:101;48838:13;;-1:-1:-1;;;;;48838:13:0;48758:101;;64469:787;;;;;;:::i;:::-;;:::i;49058:181::-;;;;;;:::i;:::-;;:::i;64237:33::-;;;;;65335:67;33606:13;:11;:13::i;:::-;65384:10:::1;:8;:10::i;:::-;65335:67::o:0;65410:128::-;33606:13;:11;:13::i;:::-;65476:6:::1;:16:::0;;-1:-1:-1;;;;;;65476:16:0::1;-1:-1:-1::0;;;;;65476:16:0;::::1;::::0;;::::1;::::0;;;65508:22:::1;::::0;160:51:1;;;65508:22:0::1;::::0;148:2:1;133:18;65508:22:0::1;;;;;;;65410:128:::0;:::o;34395:103::-;33606:13;:11;:13::i;:::-;34460:30:::1;34487:1;34460:18;:30::i;49670:235::-:0;48838:13;;1596:10;;-1:-1:-1;;;;;48838:13:0;49767:24;;49763:98;;49815:34;;-1:-1:-1;;;49815:34:0;;-1:-1:-1;;;;;178:32:1;;49815:34:0;;;160:51:1;133:18;;49815:34:0;;;;;;;;49763:98;49871:26;49890:6;49871:18;:26::i;:::-;49712:193;49670:235::o;65264:63::-;33606:13;:11;:13::i;:::-;65311:8:::1;:6;:8::i;62360:580::-:0;62463:13;62491:18;62524:21;62560:15;62590:25;62630:12;62657:27;62765:13;:11;:13::i;:::-;62793:16;:14;:16::i;:::-;62905;;;62888:1;62905:16;;;;;;;;;-1:-1:-1;;;62712:220:0;;;-1:-1:-1;62712:220:0;;-1:-1:-1;62824:13:0;;-1:-1:-1;62860:4:0;;-1:-1:-1;62888:1:0;-1:-1:-1;62905:16:0;-1:-1:-1;62712:220:0;-1:-1:-1;62360:580:0:o;64469:787::-;41718:19;:17;:19::i;:::-;64629:13;;;:39:::1;;;64657:11;64646:8;:22;64629:39;64625:100;;;64692:21;;-1:-1:-1::0;;;64692:21:0::1;;;;;;;;;;;64625:100;64737:14;64754:107;64174:54;1596:10:::0;64795:54:::1;::::0;;::::1;::::0;::::1;3872:25:1::0;;;;-1:-1:-1;;;;;3933:32:1;;;3913:18;;;3906:60;3982:18;;;3975:34;;;3845:18;;64795:54:0::1;;;;;;;;;;;;64785:65;;;;;;64754:16;:107::i;:::-;64912:6;::::0;64876:32:::1;::::0;;::::1;;::::0;::::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;;64737:124;;-1:-1:-1;;;;;;64912:6:0;;::::1;::::0;64876:32:::1;::::0;64737:124;;64876:32;64898:9;;;;;;64876:32;::::1;64898:9:::0;;;;64876:32;::::1;;::::0;::::1;::::0;;;;-1:-1:-1;64876:13:0::1;::::0;-1:-1:-1;;;64876:32:0:i:1;:::-;-1:-1:-1::0;;;;;64876:42:0::1;;64872:100;;64942:18;;-1:-1:-1::0;;;64942:18:0::1;;;;;;;;;;;64872:100;1596:10:::0;64988:27:::1;::::0;;;:13:::1;:27;::::0;;;;;65029:11;;64988:38:::1;::::0;65018:8;;64988:38:::1;:::i;:::-;:52;64984:111;;;65064:19;;-1:-1:-1::0;;;65064:19:0::1;;;;;;;;;;;64984:111;1596:10:::0;65107:27:::1;::::0;;;:13:::1;:27;::::0;;;;:39;;65138:8;;65107:27;:39:::1;::::0;65138:8;;65107:39:::1;:::i;:::-;::::0;;;-1:-1:-1;65164:9:0::1;::::0;-1:-1:-1;65159:90:0::1;65183:8;65179:1;:12;65159:90;;;-1:-1:-1::0;;;;;65213:5:0::1;:10;;1596::::0;65213:24:::1;::::0;-1:-1:-1;;;;;;65213:24:0::1;::::0;;;;;;-1:-1:-1;;;;;178:32:1;;;65213:24:0::1;::::0;::::1;160:51:1::0;133:18;;65213:24:0::1;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;65193:3:0::1;;65159:90;;;;64614:642;64469:787:::0;;;;:::o;49058:181::-;33606:13;:11;:13::i;:::-;49148::::1;:24:::0;;-1:-1:-1;;;;;49148:24:0;::::1;-1:-1:-1::0;;;;;;49148:24:0;;::::1;::::0;::::1;::::0;;;49213:7:::1;33766::::0;33793:6;-1:-1:-1;;;;;33793:6:0;;33720:87;49213:7:::1;-1:-1:-1::0;;;;;49188:43:0::1;;;;;;;;;;;49058:181:::0;:::o;33885:166::-;33766:7;33793:6;-1:-1:-1;;;;;33793:6:0;1596:10;33945:23;33941:103;;33992:40;;-1:-1:-1;;;33992:40:0;;1596:10;33992:40;;;160:51:1;133:18;;33992:40:0;14:203:1;43014:120:0;41977:16;:14;:16::i;:::-;43073:7:::1;:15:::0;;-1:-1:-1;;;;43073:15:0::1;::::0;;43104:22:::1;1596:10:::0;43113:12:::1;43104:22;::::0;-1:-1:-1;;;;;178:32:1;;;160:51;;148:2;133:18;43104:22:0::1;;;;;;;43014:120::o:0;49429:156::-;49519:13;49512:20;;-1:-1:-1;;;;;;49512:20:0;;;49543:34;49568:8;49543:24;:34::i;42755:118::-;41718:19;:17;:19::i;:::-;42825:4:::1;42815:14:::0;;-1:-1:-1;;;;42815:14:0::1;-1:-1:-1::0;;;42815:14:0::1;::::0;;42845:20:::1;42852:12;1596:10:::0;;1516:98;63269:128;63315:13;63348:41;:5;63375:13;63348:26;:41::i;:::-;63341:48;;63269:128;:::o;63732:137::-;63781:13;63814:47;:8;63844:16;63814:29;:47::i;42272:132::-;42184:7;;-1:-1:-1;;;42184:7:0;;;;42334:63;;;42370:15;;-1:-1:-1;;;42370:15:0;;;;;;;;;;;62126:178;62203:7;62230:66;62263:20;:18;:20::i;:::-;62285:10;57060:4;57054:11;-1:-1:-1;;;57079:23:0;;57132:4;57123:14;;57116:39;;;;57185:4;57176:14;;57169:34;57242:4;57227:20;;;56855:410;62230:66;62223:73;62126:178;-1:-1:-1;;62126:178:0:o;9711:259::-;9789:7;9810:17;9829:18;9849:16;9869:27;9880:4;9886:9;9869:10;:27::i;:::-;9809:87;;;;;;9907:28;9919:5;9926:8;9907:11;:28::i;:::-;-1:-1:-1;9953:9:0;;9711:259;-1:-1:-1;;;;9711:259:0:o;42481:130::-;42184:7;;-1:-1:-1;;;42184:7:0;;;;42540:64;;42577:15;;-1:-1:-1;;;42577:15:0;;;;;;;;;;;35033:191;35107:16;35126:6;;-1:-1:-1;;;;;35143:17:0;;;-1:-1:-1;;;;;;35143:17:0;;;;;;35176:40;;35126:6;;;;;;;35176:40;;35107:16;35176:40;35096:128;35033:191;:::o;46581:273::-;46675:13;44527:66;46705:46;;46701:146;;46775:15;46784:5;46775:8;:15::i;:::-;46768:22;;;;46701:146;46830:5;46823:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;61027:268;61080:7;61112:4;-1:-1:-1;;;;;61121:11:0;61104:28;;:63;;;;;61153:14;61136:13;:31;61104:63;61100:188;;;-1:-1:-1;61191:22:0;;61027:268::o;61100:188::-;61253:23;61395:80;;;59219:95;61395:80;;;5394:25:1;61417:11:0;5435:18:1;;;5428:34;;;;61430:14:0;5478:18:1;;;5471:34;61446:13:0;5521:18:1;;;5514:34;61469:4:0;5564:19:1;;;5557:61;61358:7:0;;5366:19:1;;61395:80:0;;;;;;;;;;;;61385:91;;;;;;61378:98;;61303:181;;8105:783;8186:7;8195:12;8209:7;8233:9;:16;8253:2;8233:22;8229:652;;8577:4;8562:20;;8556:27;8627:4;8612:20;;8606:27;8685:4;8670:20;;8664:27;8272:9;8656:36;8728:25;8739:4;8656:36;8556:27;8606;8728:10;:25::i;:::-;8721:32;;;;;;;;;;;8229:652;-1:-1:-1;;8851:16:0;;8802:1;;-1:-1:-1;8806:35:0;;8229:652;8105:783;;;;;:::o;13279:542::-;13375:20;13366:5;:29;;;;;;;;:::i;:::-;;13362:452;;13279:542;;:::o;13362:452::-;13473:29;13464:5;:38;;;;;;;;:::i;:::-;;13460:354;;13526:23;;-1:-1:-1;;;13526:23:0;;;;;;;;;;;13460:354;13580:35;13571:5;:44;;;;;;;;:::i;:::-;;13567:247;;13639:46;;-1:-1:-1;;;13639:46:0;;;;;851:25:1;;;824:18;;13639:46:0;705:177:1;13567:247:0;13716:30;13707:5;:39;;;;;;;;:::i;:::-;;13703:111;;13770:32;;-1:-1:-1;;;13770:32:0;;;;;851:25:1;;;824:18;;13770:32:0;705:177:1;13703:111:0;13279:542;;:::o;45236:415::-;45295:13;45321:11;45335:16;45346:4;45335:10;:16::i;:::-;45461:14;;;45472:2;45461:14;;;;;;;;;45321:30;;-1:-1:-1;45441:17:0;;45461:14;;;;;;;;;-1:-1:-1;;;45554:16:0;;;-1:-1:-1;45600:4:0;45591:14;;45584:28;;;;-1:-1:-1;45554:16:0;45236:415::o;11182:1556::-;11313:7;;;12256:66;12243:79;;12239:166;;;-1:-1:-1;12355:1:0;;-1:-1:-1;12359:30:0;;-1:-1:-1;12391:1:0;12339:54;;12239:166;12519:24;;;12502:14;12519:24;;;;;;;;;5856:25:1;;;5929:4;5917:17;;5897:18;;;5890:45;;;;5951:18;;;5944:34;;;5994:18;;;5987:34;;;12519:24:0;;5828:19:1;;12519:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;12519:24:0;;-1:-1:-1;;12519:24:0;;;-1:-1:-1;;;;;;;12558:20:0;;12554:115;;-1:-1:-1;12611:1:0;;-1:-1:-1;12615:29:0;;-1:-1:-1;12611:1:0;;-1:-1:-1;12595:62:0;;12554:115;12689:6;-1:-1:-1;12697:20:0;;-1:-1:-1;12697:20:0;;-1:-1:-1;11182:1556:0;;;;;;;;;:::o;45728:251::-;45789:7;45862:4;45826:40;;45890:2;45881:11;;45877:71;;;45916:20;;-1:-1:-1;;;45916:20:0;;;;;;;;;;;414:286:1;473:6;526:2;514:9;505:7;501:23;497:32;494:52;;;542:1;539;532:12;494:52;568:23;;-1:-1:-1;;;;;620:31:1;;610:42;;600:70;;666:1;663;656:12;600:70;689:5;414:286;-1:-1:-1;;;414:286:1:o;887:423::-;929:3;967:5;961:12;994:6;989:3;982:19;1019:1;1029:162;1043:6;1040:1;1037:13;1029:162;;;1105:4;1161:13;;;1157:22;;1151:29;1133:11;;;1129:20;;1122:59;1058:12;1029:162;;;1033:3;1236:1;1229:4;1220:6;1215:3;1211:16;1207:27;1200:38;1299:4;1292:2;1288:7;1283:2;1275:6;1271:15;1267:29;1262:3;1258:39;1254:50;1247:57;;;887:423;;;;:::o;1315:1259::-;1721:3;1716;1712:13;1704:6;1700:26;1689:9;1682:45;1663:4;1746:2;1784:3;1779:2;1768:9;1764:18;1757:31;1811:46;1852:3;1841:9;1837:19;1829:6;1811:46;:::i;:::-;1905:9;1897:6;1893:22;1888:2;1877:9;1873:18;1866:50;1939:33;1965:6;1957;1939:33;:::i;:::-;2003:2;1988:18;;1981:34;;;-1:-1:-1;;;;;2052:32:1;;2046:3;2031:19;;2024:61;2072:3;2101:19;;2094:35;;;2166:22;;;2160:3;2145:19;;2138:51;2238:13;;2260:22;;;2310:2;2336:15;;;;-1:-1:-1;2298:15:1;;;;-1:-1:-1;2379:169:1;2393:6;2390:1;2387:13;2379:169;;;2454:13;;2442:26;;2523:15;;;;2488:12;;;;2415:1;2408:9;2379:169;;;-1:-1:-1;2565:3:1;;1315:1259;-1:-1:-1;;;;;;;;;;;;1315:1259:1:o;2579:727::-;2667:6;2675;2683;2691;2744:2;2732:9;2723:7;2719:23;2715:32;2712:52;;;2760:1;2757;2750:12;2712:52;2796:9;2783:23;2773:33;;2853:2;2842:9;2838:18;2825:32;2815:42;;2908:2;2897:9;2893:18;2880:32;2931:18;2972:2;2964:6;2961:14;2958:34;;;2988:1;2985;2978:12;2958:34;3026:6;3015:9;3011:22;3001:32;;3071:7;3064:4;3060:2;3056:13;3052:27;3042:55;;3093:1;3090;3083:12;3042:55;3133:2;3120:16;3159:2;3151:6;3148:14;3145:34;;;3175:1;3172;3165:12;3145:34;3220:7;3215:2;3206:6;3202:2;3198:15;3194:24;3191:37;3188:57;;;3241:1;3238;3231:12;3188:57;2579:727;;;;-1:-1:-1;;3272:2:1;3264:11;;-1:-1:-1;;;2579:727:1:o;4020:222::-;4085:9;;;4106:10;;;4103:133;;;4158:10;4153:3;4149:20;4146:1;4139:31;4193:4;4190:1;4183:15;4221:4;4218:1;4211:15;4247:184;4317:6;4370:2;4358:9;4349:7;4345:23;4341:32;4338:52;;;4386:1;4383;4376:12;4338:52;-1:-1:-1;4409:16:1;;4247:184;-1:-1:-1;4247:184:1:o;4436:380::-;4515:1;4511:12;;;;4558;;;4579:61;;4633:4;4625:6;4621:17;4611:27;;4579:61;4686:2;4678:6;4675:14;4655:18;4652:38;4649:161;;4732:10;4727:3;4723:20;4720:1;4713:31;4767:4;4764:1;4757:15;4795:4;4792:1;4785:15;4649:161;;4436:380;;;:::o;4821:127::-;4882:10;4877:3;4873:20;4870:1;4863:31;4913:4;4910:1;4903:15;4937:4;4934:1;4927:15
Swarm Source
ipfs://0d31e40e7b98a5449eaa1bc59d97fec867ea33ef3301271e45cba1b64466ce78
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.