Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 12,820 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint | 21164991 | 15 days ago | IN | 0 ETH | 0.00365381 | ||||
Mint | 21119420 | 21 days ago | IN | 0 ETH | 0.00037116 | ||||
Mint | 21112577 | 22 days ago | IN | 0 ETH | 0.00092302 | ||||
Mint | 21112570 | 22 days ago | IN | 0 ETH | 0.00095346 | ||||
Mint | 21112567 | 22 days ago | IN | 0 ETH | 0.00096436 | ||||
Mint | 21110652 | 22 days ago | IN | 0 ETH | 0.00064953 | ||||
Mint | 21110568 | 22 days ago | IN | 0 ETH | 0.00085367 | ||||
Mint | 21109694 | 22 days ago | IN | 0 ETH | 0.00083941 | ||||
Mint | 21109653 | 23 days ago | IN | 0 ETH | 0.00077995 | ||||
Mint | 21107803 | 23 days ago | IN | 0 ETH | 0.00143721 | ||||
Mint | 21107478 | 23 days ago | IN | 0 ETH | 0.00199008 | ||||
Mint | 21105611 | 23 days ago | IN | 0 ETH | 0.00045021 | ||||
Mint | 21105104 | 23 days ago | IN | 0 ETH | 0.0009439 | ||||
Mint | 21105103 | 23 days ago | IN | 0 ETH | 0.00087223 | ||||
Mint | 21104717 | 23 days ago | IN | 0 ETH | 0.0006517 | ||||
Mint | 21104545 | 23 days ago | IN | 0 ETH | 0.00059378 | ||||
Mint | 21103838 | 23 days ago | IN | 0 ETH | 0.00047823 | ||||
Mint | 21103098 | 23 days ago | IN | 0 ETH | 0.00076083 | ||||
Mint | 21103098 | 23 days ago | IN | 0 ETH | 0.00077444 | ||||
Mint | 21103095 | 23 days ago | IN | 0 ETH | 0.00074219 | ||||
Mint | 21102082 | 24 days ago | IN | 0 ETH | 0.00144476 | ||||
Mint | 21101449 | 24 days ago | IN | 0 ETH | 0.00209304 | ||||
Mint | 21101436 | 24 days ago | IN | 0 ETH | 0.00201123 | ||||
Mint | 21100712 | 24 days ago | IN | 0 ETH | 0.00096238 | ||||
Mint | 21099885 | 24 days ago | IN | 0 ETH | 0.00078648 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
20387004 | 123 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
FluidNFTClaimer
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 10000000 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BUSL-1.1 pragma solidity 0.8.21; import { Owned } from "solmate/src/auth/Owned.sol"; import { ECDSA } from "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; interface IFluidNFT { function mint(address to) external returns(uint256 tokenId); function burn(uint256 tokenId) external; } contract FluidNFTClaimer is Owned { string public constant DOMAIN_SEPARATOR_NAME = "Fluid-NFT-Claimer"; string public constant DOMAIN_SEPARATOR_VERSION = "1.0.0"; // hashed EIP712 values bytes32 internal constant DOMAIN_SEPARATOR_NAME_HASHED = keccak256(bytes(DOMAIN_SEPARATOR_NAME)); bytes32 internal constant DOMAIN_SEPARATOR_VERSION_HASHED = keccak256(bytes(DOMAIN_SEPARATOR_VERSION)); /// @notice _TYPE_HASH is copied from OpenZeppelin EIP712 but with added salt as last param (we use it for `block.chainid`) bytes32 public constant TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); /// @notice EIP712 typehash for Claim struct bytes32 public constant CLAIM_TYPE_HASH = keccak256("Claim(address nft,address user)"); struct Claim { address nft; address user; } function _getSigDigest( address nft_, address user_ ) internal view returns (bytes32) { return ECDSA.toTypedDataHash( // domain separator _domainSeparatorV4(), // structHash according to CAST_TYPE_HASH keccak256( abi.encode( CLAIM_TYPE_HASH, nft_, user_ ) ) ); } function _domainSeparatorV4() internal view returns (bytes32) { return keccak256( abi.encode( TYPE_HASH, DOMAIN_SEPARATOR_NAME_HASHED, DOMAIN_SEPARATOR_VERSION_HASHED, 634, // chainId address(this) ) ); } event LogClaimed( address indexed nft, address indexed user, address indexed minter, uint256 tokenId ); event LogUpdateMinter( address indexed nft, address indexed minter, bool indexed status, uint256 count ); mapping (address => mapping(address => uint32)) internal minter; mapping (address => mapping(address => uint256)) internal claimed; constructor ( address owner_ ) Owned(owner_) { } function updateMinter(address nft_, address minter_, uint32 count_) public onlyOwner() { minter[nft_][minter_] = count_; emit LogUpdateMinter(nft_, minter_, count_ > 0, count_); } function isClaimed(address nft_, address user_) public view returns(bool) { return claimed[nft_][user_] == 1; } function mint(address nft_, address user_, bytes memory hash_) public { bytes32 digest_ = _getSigDigest(nft_, user_); address minter_ = ECDSA.recover(digest_, hash_); minter[nft_][minter_] -= 1; if (claimed[nft_][user_] > 0) revert("not-allowed"); claimed[nft_][user_] = 1; uint256 tokenId = IFluidNFT(nft_).mint(user_); emit LogClaimed(nft_, user_, minter_, tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV // Deprecated in v4.8 } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { 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); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // 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: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Simple single owner authorization mixin. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol) abstract contract Owned { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event OwnershipTransferred(address indexed user, address indexed newOwner); /*////////////////////////////////////////////////////////////// OWNERSHIP STORAGE //////////////////////////////////////////////////////////////*/ address public owner; modifier onlyOwner() virtual { require(msg.sender == owner, "UNAUTHORIZED"); _; } /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor(address _owner) { owner = _owner; emit OwnershipTransferred(address(0), _owner); } /*////////////////////////////////////////////////////////////// OWNERSHIP LOGIC //////////////////////////////////////////////////////////////*/ function transferOwnership(address newOwner) public virtual onlyOwner { owner = newOwner; emit OwnershipTransferred(msg.sender, newOwner); } }
{ "optimizer": { "enabled": true, "runs": 10000000 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"owner_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nft","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"LogClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"nft","type":"address"},{"indexed":true,"internalType":"address","name":"minter","type":"address"},{"indexed":true,"internalType":"bool","name":"status","type":"bool"},{"indexed":false,"internalType":"uint256","name":"count","type":"uint256"}],"name":"LogUpdateMinter","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[],"name":"CLAIM_TYPE_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR_NAME","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TYPE_HASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nft_","type":"address"},{"internalType":"address","name":"user_","type":"address"}],"name":"isClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nft_","type":"address"},{"internalType":"address","name":"user_","type":"address"},{"internalType":"bytes","name":"hash_","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nft_","type":"address"},{"internalType":"address","name":"minter_","type":"address"},{"internalType":"uint32","name":"count_","type":"uint32"}],"name":"updateMinter","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50604051610f97380380610f9783398101604081905261002f9161007e565b600080546001600160a01b0319166001600160a01b03831690811782556040518392907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350506100ae565b60006020828403121561009057600080fd5b81516001600160a01b03811681146100a757600080fd5b9392505050565b610eda806100bd6000396000f3fe608060405234801561001057600080fd5b50600436106100a35760003560e01c8063a4df075811610076578063cc23594e1161005b578063cc23594e1461021a578063f1ddecf914610241578063f2fde38b1461025457600080fd5b8063a4df075814610185578063b4907ddc146101de57600080fd5b80631aab01d1146100a857806364d4c819146100bd57806387265c95146100f75780638da5cb5b14610140575b600080fd5b6100bb6100b6366004610be8565b610267565b005b6100e47f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6040519081526020015b60405180910390f35b6101336040518060400160405280601181526020017f466c7569642d4e46542d436c61696d657200000000000000000000000000000081525081565b6040516100ee9190610c38565b6000546101609073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100ee565b6101ce610193366004610ca4565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205460011490565b60405190151581526020016100ee565b6101336040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b6100e47f53eed54c06b1c2c0340a8eaec74b52a3c3eadaabf0164e1f7d911307e210f88a81565b6100bb61024f366004610d06565b61038f565b6100bb610262366004610df6565b6105ea565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff871690811790915591518281529115159392917fa6a94ad149ecbf8c4553b9c2dd16a165562d1d4335250dcf074a1df775c83459910160405180910390a4505050565b600061039b84846106db565b905060006103a982846108b1565b73ffffffffffffffffffffffffffffffffffffffff80871660009081526001602081815260408084209486168452939052918120805493945091926103f590849063ffffffff16610e11565b825463ffffffff9182166101009390930a92830291909202199091161790555073ffffffffffffffffffffffffffffffffffffffff808616600090815260026020908152604080832093881683529290522054156104af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6e6f742d616c6c6f77656400000000000000000000000000000000000000000060448201526064016102e4565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526002602090815260408083209489168084529490915280822060019055517f6a627842000000000000000000000000000000000000000000000000000000008152600481019390935291636a627842906024016020604051808303816000875af115801561053e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105629190610e5c565b90508173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f1cea8a8f8850e5923d6299d9e818ce0c0ed19bb3b56633b7fe5536c45c4b84c8846040516105da91815260200190565b60405180910390a4505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461066b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016102e4565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b60006108aa6107e5604080518082018252601181527f466c7569642d4e46542d436c61696d657200000000000000000000000000000060209182015281518083018352600581527f312e302e300000000000000000000000000000000000000000000000000000009082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f2661c18354a7038c9756261df087cd0c8818132d72a2be5345b9026182c959cc818401527f06c015bd22b4c69690933c1058878ebdfef31f9aaae40bbe86d8a09fe1b2972c606082015261027a60808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b604080517f53eed54c06b1c2c0340a8eaec74b52a3c3eadaabf0164e1f7d911307e210f88a602082015273ffffffffffffffffffffffffffffffffffffffff808816928201929092529085166060820152608001604051602081830303815290604052805190602001206040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9392505050565b60008060006108c085856108d5565b915091506108cd8161091a565b509392505050565b600080825160410361090b5760208301516040840151606085015160001a6108ff87828585610ad0565b94509450505050610913565b506000905060025b9250929050565b600081600481111561092e5761092e610e75565b036109365750565b600181600481111561094a5761094a610e75565b036109b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016102e4565b60028160048111156109c5576109c5610e75565b03610a2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016102e4565b6003816004811115610a4057610a40610e75565b03610acd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016102e4565b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610b075750600090506003610bb6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610b5b573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116610baf57600060019250925050610bb6565b9150600090505b94509492505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610be357600080fd5b919050565b600080600060608486031215610bfd57600080fd5b610c0684610bbf565b9250610c1460208501610bbf565b9150604084013563ffffffff81168114610c2d57600080fd5b809150509250925092565b600060208083528351808285015260005b81811015610c6557858101830151858201604001528201610c49565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60008060408385031215610cb757600080fd5b610cc083610bbf565b9150610cce60208401610bbf565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080600060608486031215610d1b57600080fd5b610d2484610bbf565b9250610d3260208501610bbf565b9150604084013567ffffffffffffffff80821115610d4f57600080fd5b818601915086601f830112610d6357600080fd5b813581811115610d7557610d75610cd7565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610dbb57610dbb610cd7565b81604052828152896020848701011115610dd457600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b600060208284031215610e0857600080fd5b6108aa82610bbf565b63ffffffff828116828216039080821115610e55577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5092915050565b600060208284031215610e6e57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea264697066735822122033a44ecaa40da1f624c961191549505d33ff45729879dc93af420284e00c18ac64736f6c634300081500330000000000000000000000009800020b610194dba52cf606e8aa142f9f256166
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100a35760003560e01c8063a4df075811610076578063cc23594e1161005b578063cc23594e1461021a578063f1ddecf914610241578063f2fde38b1461025457600080fd5b8063a4df075814610185578063b4907ddc146101de57600080fd5b80631aab01d1146100a857806364d4c819146100bd57806387265c95146100f75780638da5cb5b14610140575b600080fd5b6100bb6100b6366004610be8565b610267565b005b6100e47f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81565b6040519081526020015b60405180910390f35b6101336040518060400160405280601181526020017f466c7569642d4e46542d436c61696d657200000000000000000000000000000081525081565b6040516100ee9190610c38565b6000546101609073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100ee565b6101ce610193366004610ca4565b73ffffffffffffffffffffffffffffffffffffffff918216600090815260026020908152604080832093909416825291909152205460011490565b60405190151581526020016100ee565b6101336040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b6100e47f53eed54c06b1c2c0340a8eaec74b52a3c3eadaabf0164e1f7d911307e210f88a81565b6100bb61024f366004610d06565b61038f565b6100bb610262366004610df6565b6105ea565b60005473ffffffffffffffffffffffffffffffffffffffff1633146102ed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83811660008181526001602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff871690811790915591518281529115159392917fa6a94ad149ecbf8c4553b9c2dd16a165562d1d4335250dcf074a1df775c83459910160405180910390a4505050565b600061039b84846106db565b905060006103a982846108b1565b73ffffffffffffffffffffffffffffffffffffffff80871660009081526001602081815260408084209486168452939052918120805493945091926103f590849063ffffffff16610e11565b825463ffffffff9182166101009390930a92830291909202199091161790555073ffffffffffffffffffffffffffffffffffffffff808616600090815260026020908152604080832093881683529290522054156104af576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600b60248201527f6e6f742d616c6c6f77656400000000000000000000000000000000000000000060448201526064016102e4565b73ffffffffffffffffffffffffffffffffffffffff85811660008181526002602090815260408083209489168084529490915280822060019055517f6a627842000000000000000000000000000000000000000000000000000000008152600481019390935291636a627842906024016020604051808303816000875af115801561053e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105629190610e5c565b90508173ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f1cea8a8f8850e5923d6299d9e818ce0c0ed19bb3b56633b7fe5536c45c4b84c8846040516105da91815260200190565b60405180910390a4505050505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461066b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600c60248201527f554e415554484f52495a4544000000000000000000000000000000000000000060448201526064016102e4565b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b60006108aa6107e5604080518082018252601181527f466c7569642d4e46542d436c61696d657200000000000000000000000000000060209182015281518083018352600581527f312e302e300000000000000000000000000000000000000000000000000000009082015281517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818301527f2661c18354a7038c9756261df087cd0c8818132d72a2be5345b9026182c959cc818401527f06c015bd22b4c69690933c1058878ebdfef31f9aaae40bbe86d8a09fe1b2972c606082015261027a60808201523060a0808301919091528351808303909101815260c0909101909252815191012090565b604080517f53eed54c06b1c2c0340a8eaec74b52a3c3eadaabf0164e1f7d911307e210f88a602082015273ffffffffffffffffffffffffffffffffffffffff808816928201929092529085166060820152608001604051602081830303815290604052805190602001206040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b9392505050565b60008060006108c085856108d5565b915091506108cd8161091a565b509392505050565b600080825160410361090b5760208301516040840151606085015160001a6108ff87828585610ad0565b94509450505050610913565b506000905060025b9250929050565b600081600481111561092e5761092e610e75565b036109365750565b600181600481111561094a5761094a610e75565b036109b1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016102e4565b60028160048111156109c5576109c5610e75565b03610a2c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016102e4565b6003816004811115610a4057610a40610e75565b03610acd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016102e4565b50565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115610b075750600090506003610bb6565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015610b5b573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116610baf57600060019250925050610bb6565b9150600090505b94509492505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610be357600080fd5b919050565b600080600060608486031215610bfd57600080fd5b610c0684610bbf565b9250610c1460208501610bbf565b9150604084013563ffffffff81168114610c2d57600080fd5b809150509250925092565b600060208083528351808285015260005b81811015610c6557858101830151858201604001528201610c49565b5060006040828601015260407fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168501019250505092915050565b60008060408385031215610cb757600080fd5b610cc083610bbf565b9150610cce60208401610bbf565b90509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080600060608486031215610d1b57600080fd5b610d2484610bbf565b9250610d3260208501610bbf565b9150604084013567ffffffffffffffff80821115610d4f57600080fd5b818601915086601f830112610d6357600080fd5b813581811115610d7557610d75610cd7565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610dbb57610dbb610cd7565b81604052828152896020848701011115610dd457600080fd5b8260208601602083013760006020848301015280955050505050509250925092565b600060208284031215610e0857600080fd5b6108aa82610bbf565b63ffffffff828116828216039080821115610e55577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5092915050565b600060208284031215610e6e57600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea264697066735822122033a44ecaa40da1f624c961191549505d33ff45729879dc93af420284e00c18ac64736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000009800020b610194dba52cf606e8aa142f9f256166
-----Decoded View---------------
Arg [0] : owner_ (address): 0x9800020b610194dBa52CF606E8Aa142F9F256166
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000009800020b610194dba52cf606e8aa142f9f256166
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ 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.