Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 513 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 20294813 | 163 days ago | IN | 0 ETH | 0.00007848 | ||||
Set Approval For... | 19853085 | 224 days ago | IN | 0 ETH | 0.00016917 | ||||
Set Approval For... | 19617052 | 257 days ago | IN | 0 ETH | 0.00108496 | ||||
Set Approval For... | 18990653 | 345 days ago | IN | 0 ETH | 0.00088776 | ||||
Set Approval For... | 18442002 | 422 days ago | IN | 0 ETH | 0.00114916 | ||||
Set Approval For... | 18316258 | 440 days ago | IN | 0 ETH | 0.00032212 | ||||
Set Approval For... | 18102454 | 470 days ago | IN | 0 ETH | 0.00045843 | ||||
Set Approval For... | 17945069 | 492 days ago | IN | 0 ETH | 0.00075733 | ||||
Set Approval For... | 17618873 | 538 days ago | IN | 0 ETH | 0.00059753 | ||||
Transfer From | 17612467 | 538 days ago | IN | 0 ETH | 0.0004904 | ||||
Mint | 17595957 | 541 days ago | IN | 0 ETH | 0.0019965 | ||||
Set Approval For... | 17576758 | 543 days ago | IN | 0 ETH | 0.00092036 | ||||
Mint | 17451148 | 561 days ago | IN | 0 ETH | 0.00377203 | ||||
Mint | 17437361 | 563 days ago | IN | 0 ETH | 0.0042016 | ||||
Set Base Token U... | 17422860 | 565 days ago | IN | 0 ETH | 0.00143588 | ||||
Mint | 17378374 | 571 days ago | IN | 0 ETH | 0.00372961 | ||||
Set Base Token U... | 17374490 | 572 days ago | IN | 0 ETH | 0.00127624 | ||||
Mint | 17367351 | 573 days ago | IN | 0 ETH | 0.00372207 | ||||
Mint | 17366255 | 573 days ago | IN | 0 ETH | 0.00376551 | ||||
Mint | 17358065 | 574 days ago | IN | 0 ETH | 0.0043019 | ||||
Mint | 17356053 | 574 days ago | IN | 0 ETH | 0.00247564 | ||||
Mint | 17349246 | 575 days ago | IN | 0 ETH | 0.00255139 | ||||
Mint | 17347139 | 576 days ago | IN | 0 ETH | 0.00253061 | ||||
Set Merkle Root | 17345512 | 576 days ago | IN | 0 ETH | 0.0015695 | ||||
Mint | 17339247 | 577 days ago | IN | 0 ETH | 0.00340191 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
NFT
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@solmate/src/tokens/ERC721.sol"; import '@solmate/src/utils/ReentrancyGuard.sol'; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; error NonTransferrable(); contract NFT is ERC721, Ownable, ReentrancyGuard { uint256 public currentTokenId; mapping(address => uint256) public userOwnedTokens; // ========Governance======== string private baseTokenURI; bytes32 public merkleRoot; constructor(bytes32 _merkleRoot) ERC721("Canonicon", "JPG") { baseTokenURI = "https://arweave.net/someHash/"; merkleRoot = _merkleRoot; } // ========Admin======== mapping(address => bool) public admins; modifier onlyAdmin() { require(owner() == msg.sender || admins[msg.sender], "Must be an admin"); _; } function toggleAdmin(address _address) external onlyOwner { admins[_address] = !admins[_address]; } function setMerkleRoot(bytes32 _merkleRoot) external onlyAdmin { merkleRoot = _merkleRoot; } function setBaseTokenURI(string memory _baseTokenURI) external onlyAdmin { baseTokenURI = _baseTokenURI; } function setMintCost(uint256 _cost) external onlyOwner { cost = _cost; } function withdraw() external onlyOwner { payable(msg.sender).transfer(address(this).balance); } // ========Soulbound======== function transferFrom(address from, address to, uint256 id) public pure override { revert NonTransferrable(); } function safeTransferFrom(address from, address to, uint256 id) public pure override { revert NonTransferrable(); } function safeTransferFrom(address from, address to, uint256 id, bytes calldata data) public pure override { revert NonTransferrable(); } // ========Minting======== uint256 public cost = 0; function allowlisted(address _wallet, bytes32[] calldata _proof) public view returns (bool) { return MerkleProof.verify(_proof, merkleRoot, keccak256(abi.encodePacked(_wallet))); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { string memory baseURI = baseTokenURI; return string(abi.encodePacked(baseURI, Strings.toString(tokenId))); } modifier onlyAllowlisted(bytes32[] calldata _proof) { require(allowlisted(msg.sender, _proof), "Not allowlisted"); _; } modifier mintCompliance() { require(balanceOf(msg.sender) == 0, "only 1 per wallet"); require(msg.value == cost, "Not enough ETH sent"); _; } function mint(bytes32[] calldata _proof) external payable onlyAllowlisted(_proof) nonReentrant mintCompliance { uint256 newTokenId = ++currentTokenId; userOwnedTokens[msg.sender] = newTokenId; _safeMint(msg.sender, newTokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 << 3) < value ? 1 : 0); } } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Modern, minimalist, and gas efficient ERC-721 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol) abstract contract ERC721 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 indexed id); event Approval(address indexed owner, address indexed spender, uint256 indexed id); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /*////////////////////////////////////////////////////////////// METADATA STORAGE/LOGIC //////////////////////////////////////////////////////////////*/ string public name; string public symbol; function tokenURI(uint256 id) public view virtual returns (string memory); /*////////////////////////////////////////////////////////////// ERC721 BALANCE/OWNER STORAGE //////////////////////////////////////////////////////////////*/ mapping(uint256 => address) internal _ownerOf; mapping(address => uint256) internal _balanceOf; function ownerOf(uint256 id) public view virtual returns (address owner) { require((owner = _ownerOf[id]) != address(0), "NOT_MINTED"); } function balanceOf(address owner) public view virtual returns (uint256) { require(owner != address(0), "ZERO_ADDRESS"); return _balanceOf[owner]; } /*////////////////////////////////////////////////////////////// ERC721 APPROVAL STORAGE //////////////////////////////////////////////////////////////*/ mapping(uint256 => address) public getApproved; mapping(address => mapping(address => bool)) public isApprovedForAll; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor(string memory _name, string memory _symbol) { name = _name; symbol = _symbol; } /*////////////////////////////////////////////////////////////// ERC721 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 id) public virtual { address owner = _ownerOf[id]; require(msg.sender == owner || isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED"); getApproved[id] = spender; emit Approval(owner, spender, id); } function setApprovalForAll(address operator, bool approved) public virtual { isApprovedForAll[msg.sender][operator] = approved; emit ApprovalForAll(msg.sender, operator, approved); } function transferFrom( address from, address to, uint256 id ) public virtual { require(from == _ownerOf[id], "WRONG_FROM"); require(to != address(0), "INVALID_RECIPIENT"); require( msg.sender == from || isApprovedForAll[from][msg.sender] || msg.sender == getApproved[id], "NOT_AUTHORIZED" ); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. unchecked { _balanceOf[from]--; _balanceOf[to]++; } _ownerOf[id] = to; delete getApproved[id]; emit Transfer(from, to, id); } function safeTransferFrom( address from, address to, uint256 id ) public virtual { transferFrom(from, to, id); require( to.code.length == 0 || ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "") == ERC721TokenReceiver.onERC721Received.selector, "UNSAFE_RECIPIENT" ); } function safeTransferFrom( address from, address to, uint256 id, bytes calldata data ) public virtual { transferFrom(from, to, id); require( to.code.length == 0 || ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) == ERC721TokenReceiver.onERC721Received.selector, "UNSAFE_RECIPIENT" ); } /*////////////////////////////////////////////////////////////// ERC165 LOGIC //////////////////////////////////////////////////////////////*/ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165 interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721 interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 id) internal virtual { require(to != address(0), "INVALID_RECIPIENT"); require(_ownerOf[id] == address(0), "ALREADY_MINTED"); // Counter overflow is incredibly unrealistic. unchecked { _balanceOf[to]++; } _ownerOf[id] = to; emit Transfer(address(0), to, id); } function _burn(uint256 id) internal virtual { address owner = _ownerOf[id]; require(owner != address(0), "NOT_MINTED"); // Ownership check above ensures no underflow. unchecked { _balanceOf[owner]--; } delete _ownerOf[id]; delete getApproved[id]; emit Transfer(owner, address(0), id); } /*////////////////////////////////////////////////////////////// INTERNAL SAFE MINT LOGIC //////////////////////////////////////////////////////////////*/ function _safeMint(address to, uint256 id) internal virtual { _mint(to, id); require( to.code.length == 0 || ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") == ERC721TokenReceiver.onERC721Received.selector, "UNSAFE_RECIPIENT" ); } function _safeMint( address to, uint256 id, bytes memory data ) internal virtual { _mint(to, id); require( to.code.length == 0 || ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) == ERC721TokenReceiver.onERC721Received.selector, "UNSAFE_RECIPIENT" ); } } /// @notice A generic interface for a contract which properly accepts ERC721 tokens. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC721.sol) abstract contract ERC721TokenReceiver { function onERC721Received( address, address, uint256, bytes calldata ) external virtual returns (bytes4) { return ERC721TokenReceiver.onERC721Received.selector; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Gas optimized reentrancy protection for smart contracts. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/ReentrancyGuard.sol) /// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/security/ReentrancyGuard.sol) abstract contract ReentrancyGuard { uint256 private locked = 1; modifier nonReentrant() virtual { require(locked == 1, "REENTRANCY"); locked = 2; _; locked = 1; } }
{ "remappings": [ "@forge-std/=lib/forge-std/", "@openzeppelin/=lib/openzeppelin-contracts/", "@solmate/=lib/solmate/", "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "bytecodeHash": "ipfs" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NonTransferrable","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"admins","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_wallet","type":"address"},{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"allowlisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_proof","type":"bytes32[]"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseTokenURI","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_cost","type":"uint256"}],"name":"setMintCost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"toggleAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userOwnedTokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405260016007556000600d553480156200001b57600080fd5b5060405162001a9d38038062001a9d8339810160408190526200003e916200015c565b6040518060400160405280600981526020016821b0b737b734b1b7b760b91b815250604051806040016040528060038152602001624a504760e81b81525081600090816200008d91906200021b565b5060016200009c82826200021b565b505050620000b9620000b36200010660201b60201c565b6200010a565b60408051808201909152601d81527f68747470733a2f2f617277656176652e6e65742f736f6d65486173682f0000006020820152600a90620000fc90826200021b565b50600b55620002e7565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000602082840312156200016f57600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620001a157607f821691505b602082108103620001c257634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200021657600081815260208120601f850160051c81016020861015620001f15750805b601f850160051c820191505b818110156200021257828155600101620001fd565b5050505b505050565b81516001600160401b0381111562000237576200023762000176565b6200024f816200024884546200018c565b84620001c8565b602080601f8311600181146200028757600084156200026e5750858301515b600019600386901b1c1916600185901b17855562000212565b600085815260208120601f198616915b82811015620002b85788860151825594840194600190910190840162000297565b5085821015620002d75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6117a680620002f76000396000f3fe6080604052600436106101b55760003560e01c80636352211e116100ec578063a22cb4651161008a578063c87b56dd11610064578063c87b56dd146104b9578063d3b86141146104d9578063e985e9c5146104f9578063f2fde38b1461053457600080fd5b8063a22cb4651461046b578063b77a147b1461048b578063b88d4fde1461049e57600080fd5b80637cb64759116100c65780637cb64759146103f85780638545f4ea146104185780638da5cb5b1461043857806395d89b411461045657600080fd5b80636352211e146103a357806370a08231146103c3578063715018a6146103e357600080fd5b80631fecf0591161015957806330176e131161013357806330176e131461033e5780633ccfd60b1461035e57806342842e0e14610308578063429b62e51461037357600080fd5b80631fecf059146102db57806323b872dd146103085780632eb4a7ab1461032857600080fd5b806306fdde031161019557806306fdde0314610233578063081812fc14610255578063095ea7b3146102a357806313faede6146102c557600080fd5b806252fd14146101ba5780629a9b7b146101ef57806301ffc9a714610213575b600080fd5b3480156101c657600080fd5b506101da6101d5366004611214565b610554565b60405190151581526020015b60405180910390f35b3480156101fb57600080fd5b5061020560085481565b6040519081526020016101e6565b34801561021f57600080fd5b506101da61022e36600461127d565b6105d4565b34801561023f57600080fd5b50610248610626565b6040516101e691906112be565b34801561026157600080fd5b5061028b6102703660046112f1565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101e6565b3480156102af57600080fd5b506102c36102be36600461130a565b6106b4565b005b3480156102d157600080fd5b50610205600d5481565b3480156102e757600080fd5b506102056102f6366004611334565b60096020526000908152604090205481565b34801561031457600080fd5b506102c361032336600461134f565b61079b565b34801561033457600080fd5b50610205600b5481565b34801561034a57600080fd5b506102c36103593660046113a1565b6107b4565b34801561036a57600080fd5b506102c361083a565b34801561037f57600080fd5b506101da61038e366004611334565b600c6020526000908152604090205460ff1681565b3480156103af57600080fd5b5061028b6103be3660046112f1565b610871565b3480156103cf57600080fd5b506102056103de366004611334565b6108c8565b3480156103ef57600080fd5b506102c361092b565b34801561040457600080fd5b506102c36104133660046112f1565b61093f565b34801561042457600080fd5b506102c36104333660046112f1565b6109ba565b34801561044457600080fd5b506006546001600160a01b031661028b565b34801561046257600080fd5b506102486109c7565b34801561047757600080fd5b506102c3610486366004611452565b6109d4565b6102c361049936600461148e565b610a40565b3480156104aa57600080fd5b506102c36103233660046114d0565b3480156104c557600080fd5b506102486104d43660046112f1565b610ba1565b3480156104e557600080fd5b506102c36104f4366004611334565b610c64565b34801561050557600080fd5b506101da61051436600461156b565b600560209081526000928352604080842090915290825290205460ff1681565b34801561054057600080fd5b506102c361054f366004611334565b610c95565b60006105cc83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b546040516bffffffffffffffffffffffff1960608b901b166020820152909250603401905060405160208183030381529060405280519060200120610d0b565b949350505050565b60006301ffc9a760e01b6001600160e01b03198316148061060557506380ac58cd60e01b6001600160e01b03198316145b806106205750635b5e139f60e01b6001600160e01b03198316145b92915050565b600080546106339061159e565b80601f016020809104026020016040519081016040528092919081815260200182805461065f9061159e565b80156106ac5780601f10610681576101008083540402835291602001916106ac565b820191906000526020600020905b81548152906001019060200180831161068f57829003601f168201915b505050505081565b6000818152600260205260409020546001600160a01b0316338114806106fd57506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b61073f5760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b60008281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60405163bf9e1a7560e01b815260040160405180910390fd5b336107c76006546001600160a01b031690565b6001600160a01b031614806107eb5750336000908152600c602052604090205460ff165b61082a5760405162461bcd60e51b815260206004820152601060248201526f26bab9ba1031329030b71030b236b4b760811b6044820152606401610736565b600a6108368282611627565b5050565b610842610d21565b60405133904780156108fc02916000818181858888f1935050505015801561086e573d6000803e3d6000fd5b50565b6000818152600260205260409020546001600160a01b0316806108c35760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b6044820152606401610736565b919050565b60006001600160a01b03821661090f5760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b6044820152606401610736565b506001600160a01b031660009081526003602052604090205490565b610933610d21565b61093d6000610d7b565b565b336109526006546001600160a01b031690565b6001600160a01b031614806109765750336000908152600c602052604090205460ff165b6109b55760405162461bcd60e51b815260206004820152601060248201526f26bab9ba1031329030b71030b236b4b760811b6044820152606401610736565b600b55565b6109c2610d21565b600d55565b600180546106339061159e565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b8181610a4d338383610554565b610a8b5760405162461bcd60e51b815260206004820152600f60248201526e139bdd08185b1b1bdddb1a5cdd1959608a1b6044820152606401610736565b600754600114610aca5760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b6044820152606401610736565b6002600755610ad8336108c8565b15610b195760405162461bcd60e51b81526020600482015260116024820152701bdb9b1e480c481c195c881dd85b1b195d607a1b6044820152606401610736565b600d543414610b605760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da08115512081cd95b9d606a1b6044820152606401610736565b6000600860008154610b71906116e7565b9182905550336000818152600960205260409020829055909150610b959082610dcd565b50506001600755505050565b60606000600a8054610bb29061159e565b80601f0160208091040260200160405190810160405280929190818152602001828054610bde9061159e565b8015610c2b5780601f10610c0057610100808354040283529160200191610c2b565b820191906000526020600020905b815481529060010190602001808311610c0e57829003601f168201915b5050505050905080610c3c84610ebc565b604051602001610c4d92919061170e565b604051602081830303815290604052915050919050565b610c6c610d21565b6001600160a01b03166000908152600c60205260409020805460ff19811660ff90911615179055565b610c9d610d21565b6001600160a01b038116610d025760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610736565b61086e81610d7b565b600082610d188584610f4f565b14949350505050565b6006546001600160a01b0316331461093d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610736565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610dd78282610f9c565b6001600160a01b0382163b1580610e7d5750604051630a85bd0160e11b80825233600483015260006024830181905260448301849052608060648401526084830152906001600160a01b0384169063150b7a029060a4016020604051808303816000875af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061173d565b6001600160e01b031916145b6108365760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b6044820152606401610736565b60606000610ec9836110a7565b600101905060008167ffffffffffffffff811115610ee957610ee961138b565b6040519080825280601f01601f191660200182016040528015610f13576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610f1d57509392505050565b600081815b8451811015610f9457610f8082868381518110610f7357610f7361175a565b602002602001015161117f565b915080610f8c816116e7565b915050610f54565b509392505050565b6001600160a01b038216610fe65760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b6044820152606401610736565b6000818152600260205260409020546001600160a01b03161561103c5760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d3525395115160921b6044820152606401610736565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106110e65772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611112576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061113057662386f26fc10000830492506010015b6305f5e1008310611148576305f5e100830492506008015b612710831061115c57612710830492506004015b6064831061116e576064830492506002015b600a83106106205760010192915050565b600081831061119b5760008281526020849052604090206111aa565b60008381526020839052604090205b9392505050565b80356001600160a01b03811681146108c357600080fd5b60008083601f8401126111da57600080fd5b50813567ffffffffffffffff8111156111f257600080fd5b6020830191508360208260051b850101111561120d57600080fd5b9250929050565b60008060006040848603121561122957600080fd5b611232846111b1565b9250602084013567ffffffffffffffff81111561124e57600080fd5b61125a868287016111c8565b9497909650939450505050565b6001600160e01b03198116811461086e57600080fd5b60006020828403121561128f57600080fd5b81356111aa81611267565b60005b838110156112b557818101518382015260200161129d565b50506000910152565b60208152600082518060208401526112dd81604085016020870161129a565b601f01601f19169190910160400192915050565b60006020828403121561130357600080fd5b5035919050565b6000806040838503121561131d57600080fd5b611326836111b1565b946020939093013593505050565b60006020828403121561134657600080fd5b6111aa826111b1565b60008060006060848603121561136457600080fd5b61136d846111b1565b925061137b602085016111b1565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156113b357600080fd5b813567ffffffffffffffff808211156113cb57600080fd5b818401915084601f8301126113df57600080fd5b8135818111156113f1576113f161138b565b604051601f8201601f19908116603f011681019083821181831017156114195761141961138b565b8160405282815287602084870101111561143257600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806040838503121561146557600080fd5b61146e836111b1565b91506020830135801515811461148357600080fd5b809150509250929050565b600080602083850312156114a157600080fd5b823567ffffffffffffffff8111156114b857600080fd5b6114c4858286016111c8565b90969095509350505050565b6000806000806000608086880312156114e857600080fd5b6114f1866111b1565b94506114ff602087016111b1565b935060408601359250606086013567ffffffffffffffff8082111561152357600080fd5b818801915088601f83011261153757600080fd5b81358181111561154657600080fd5b89602082850101111561155857600080fd5b9699959850939650602001949392505050565b6000806040838503121561157e57600080fd5b611587836111b1565b9150611595602084016111b1565b90509250929050565b600181811c908216806115b257607f821691505b6020821081036115d257634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561162257600081815260208120601f850160051c810160208610156115ff5750805b601f850160051c820191505b8181101561161e5782815560010161160b565b5050505b505050565b815167ffffffffffffffff8111156116415761164161138b565b6116558161164f845461159e565b846115d8565b602080601f83116001811461168a57600084156116725750858301515b600019600386901b1c1916600185901b17855561161e565b600085815260208120601f198616915b828110156116b95788860151825594840194600190910190840161169a565b50858210156116d75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001820161170757634e487b7160e01b600052601160045260246000fd5b5060010190565b6000835161172081846020880161129a565b83519083019061173481836020880161129a565b01949350505050565b60006020828403121561174f57600080fd5b81516111aa81611267565b634e487b7160e01b600052603260045260246000fdfea264697066735822122075a89d98d544722b8b3f6a6571033ccb9177702bf0e24aeac018971285e73b6764736f6c634300081100332e07fdce871cd951dc396429af44416a65862e7458bf7d9c44d801e0c9d38a25
Deployed Bytecode
0x6080604052600436106101b55760003560e01c80636352211e116100ec578063a22cb4651161008a578063c87b56dd11610064578063c87b56dd146104b9578063d3b86141146104d9578063e985e9c5146104f9578063f2fde38b1461053457600080fd5b8063a22cb4651461046b578063b77a147b1461048b578063b88d4fde1461049e57600080fd5b80637cb64759116100c65780637cb64759146103f85780638545f4ea146104185780638da5cb5b1461043857806395d89b411461045657600080fd5b80636352211e146103a357806370a08231146103c3578063715018a6146103e357600080fd5b80631fecf0591161015957806330176e131161013357806330176e131461033e5780633ccfd60b1461035e57806342842e0e14610308578063429b62e51461037357600080fd5b80631fecf059146102db57806323b872dd146103085780632eb4a7ab1461032857600080fd5b806306fdde031161019557806306fdde0314610233578063081812fc14610255578063095ea7b3146102a357806313faede6146102c557600080fd5b806252fd14146101ba5780629a9b7b146101ef57806301ffc9a714610213575b600080fd5b3480156101c657600080fd5b506101da6101d5366004611214565b610554565b60405190151581526020015b60405180910390f35b3480156101fb57600080fd5b5061020560085481565b6040519081526020016101e6565b34801561021f57600080fd5b506101da61022e36600461127d565b6105d4565b34801561023f57600080fd5b50610248610626565b6040516101e691906112be565b34801561026157600080fd5b5061028b6102703660046112f1565b6004602052600090815260409020546001600160a01b031681565b6040516001600160a01b0390911681526020016101e6565b3480156102af57600080fd5b506102c36102be36600461130a565b6106b4565b005b3480156102d157600080fd5b50610205600d5481565b3480156102e757600080fd5b506102056102f6366004611334565b60096020526000908152604090205481565b34801561031457600080fd5b506102c361032336600461134f565b61079b565b34801561033457600080fd5b50610205600b5481565b34801561034a57600080fd5b506102c36103593660046113a1565b6107b4565b34801561036a57600080fd5b506102c361083a565b34801561037f57600080fd5b506101da61038e366004611334565b600c6020526000908152604090205460ff1681565b3480156103af57600080fd5b5061028b6103be3660046112f1565b610871565b3480156103cf57600080fd5b506102056103de366004611334565b6108c8565b3480156103ef57600080fd5b506102c361092b565b34801561040457600080fd5b506102c36104133660046112f1565b61093f565b34801561042457600080fd5b506102c36104333660046112f1565b6109ba565b34801561044457600080fd5b506006546001600160a01b031661028b565b34801561046257600080fd5b506102486109c7565b34801561047757600080fd5b506102c3610486366004611452565b6109d4565b6102c361049936600461148e565b610a40565b3480156104aa57600080fd5b506102c36103233660046114d0565b3480156104c557600080fd5b506102486104d43660046112f1565b610ba1565b3480156104e557600080fd5b506102c36104f4366004611334565b610c64565b34801561050557600080fd5b506101da61051436600461156b565b600560209081526000928352604080842090915290825290205460ff1681565b34801561054057600080fd5b506102c361054f366004611334565b610c95565b60006105cc83838080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050600b546040516bffffffffffffffffffffffff1960608b901b166020820152909250603401905060405160208183030381529060405280519060200120610d0b565b949350505050565b60006301ffc9a760e01b6001600160e01b03198316148061060557506380ac58cd60e01b6001600160e01b03198316145b806106205750635b5e139f60e01b6001600160e01b03198316145b92915050565b600080546106339061159e565b80601f016020809104026020016040519081016040528092919081815260200182805461065f9061159e565b80156106ac5780601f10610681576101008083540402835291602001916106ac565b820191906000526020600020905b81548152906001019060200180831161068f57829003601f168201915b505050505081565b6000818152600260205260409020546001600160a01b0316338114806106fd57506001600160a01b038116600090815260056020908152604080832033845290915290205460ff165b61073f5760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b60448201526064015b60405180910390fd5b60008281526004602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60405163bf9e1a7560e01b815260040160405180910390fd5b336107c76006546001600160a01b031690565b6001600160a01b031614806107eb5750336000908152600c602052604090205460ff165b61082a5760405162461bcd60e51b815260206004820152601060248201526f26bab9ba1031329030b71030b236b4b760811b6044820152606401610736565b600a6108368282611627565b5050565b610842610d21565b60405133904780156108fc02916000818181858888f1935050505015801561086e573d6000803e3d6000fd5b50565b6000818152600260205260409020546001600160a01b0316806108c35760405162461bcd60e51b815260206004820152600a6024820152691393d517d3525395115160b21b6044820152606401610736565b919050565b60006001600160a01b03821661090f5760405162461bcd60e51b815260206004820152600c60248201526b5a45524f5f4144445245535360a01b6044820152606401610736565b506001600160a01b031660009081526003602052604090205490565b610933610d21565b61093d6000610d7b565b565b336109526006546001600160a01b031690565b6001600160a01b031614806109765750336000908152600c602052604090205460ff165b6109b55760405162461bcd60e51b815260206004820152601060248201526f26bab9ba1031329030b71030b236b4b760811b6044820152606401610736565b600b55565b6109c2610d21565b600d55565b600180546106339061159e565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b8181610a4d338383610554565b610a8b5760405162461bcd60e51b815260206004820152600f60248201526e139bdd08185b1b1bdddb1a5cdd1959608a1b6044820152606401610736565b600754600114610aca5760405162461bcd60e51b815260206004820152600a6024820152695245454e5452414e435960b01b6044820152606401610736565b6002600755610ad8336108c8565b15610b195760405162461bcd60e51b81526020600482015260116024820152701bdb9b1e480c481c195c881dd85b1b195d607a1b6044820152606401610736565b600d543414610b605760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da08115512081cd95b9d606a1b6044820152606401610736565b6000600860008154610b71906116e7565b9182905550336000818152600960205260409020829055909150610b959082610dcd565b50506001600755505050565b60606000600a8054610bb29061159e565b80601f0160208091040260200160405190810160405280929190818152602001828054610bde9061159e565b8015610c2b5780601f10610c0057610100808354040283529160200191610c2b565b820191906000526020600020905b815481529060010190602001808311610c0e57829003601f168201915b5050505050905080610c3c84610ebc565b604051602001610c4d92919061170e565b604051602081830303815290604052915050919050565b610c6c610d21565b6001600160a01b03166000908152600c60205260409020805460ff19811660ff90911615179055565b610c9d610d21565b6001600160a01b038116610d025760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610736565b61086e81610d7b565b600082610d188584610f4f565b14949350505050565b6006546001600160a01b0316331461093d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610736565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b610dd78282610f9c565b6001600160a01b0382163b1580610e7d5750604051630a85bd0160e11b80825233600483015260006024830181905260448301849052608060648401526084830152906001600160a01b0384169063150b7a029060a4016020604051808303816000875af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061173d565b6001600160e01b031916145b6108365760405162461bcd60e51b815260206004820152601060248201526f155394d0519157d49150d2541251539560821b6044820152606401610736565b60606000610ec9836110a7565b600101905060008167ffffffffffffffff811115610ee957610ee961138b565b6040519080825280601f01601f191660200182016040528015610f13576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084610f1d57509392505050565b600081815b8451811015610f9457610f8082868381518110610f7357610f7361175a565b602002602001015161117f565b915080610f8c816116e7565b915050610f54565b509392505050565b6001600160a01b038216610fe65760405162461bcd60e51b81526020600482015260116024820152701253959053125117d49150d25412515395607a1b6044820152606401610736565b6000818152600260205260409020546001600160a01b03161561103c5760405162461bcd60e51b815260206004820152600e60248201526d1053149150511657d3525395115160921b6044820152606401610736565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106110e65772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310611112576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061113057662386f26fc10000830492506010015b6305f5e1008310611148576305f5e100830492506008015b612710831061115c57612710830492506004015b6064831061116e576064830492506002015b600a83106106205760010192915050565b600081831061119b5760008281526020849052604090206111aa565b60008381526020839052604090205b9392505050565b80356001600160a01b03811681146108c357600080fd5b60008083601f8401126111da57600080fd5b50813567ffffffffffffffff8111156111f257600080fd5b6020830191508360208260051b850101111561120d57600080fd5b9250929050565b60008060006040848603121561122957600080fd5b611232846111b1565b9250602084013567ffffffffffffffff81111561124e57600080fd5b61125a868287016111c8565b9497909650939450505050565b6001600160e01b03198116811461086e57600080fd5b60006020828403121561128f57600080fd5b81356111aa81611267565b60005b838110156112b557818101518382015260200161129d565b50506000910152565b60208152600082518060208401526112dd81604085016020870161129a565b601f01601f19169190910160400192915050565b60006020828403121561130357600080fd5b5035919050565b6000806040838503121561131d57600080fd5b611326836111b1565b946020939093013593505050565b60006020828403121561134657600080fd5b6111aa826111b1565b60008060006060848603121561136457600080fd5b61136d846111b1565b925061137b602085016111b1565b9150604084013590509250925092565b634e487b7160e01b600052604160045260246000fd5b6000602082840312156113b357600080fd5b813567ffffffffffffffff808211156113cb57600080fd5b818401915084601f8301126113df57600080fd5b8135818111156113f1576113f161138b565b604051601f8201601f19908116603f011681019083821181831017156114195761141961138b565b8160405282815287602084870101111561143257600080fd5b826020860160208301376000928101602001929092525095945050505050565b6000806040838503121561146557600080fd5b61146e836111b1565b91506020830135801515811461148357600080fd5b809150509250929050565b600080602083850312156114a157600080fd5b823567ffffffffffffffff8111156114b857600080fd5b6114c4858286016111c8565b90969095509350505050565b6000806000806000608086880312156114e857600080fd5b6114f1866111b1565b94506114ff602087016111b1565b935060408601359250606086013567ffffffffffffffff8082111561152357600080fd5b818801915088601f83011261153757600080fd5b81358181111561154657600080fd5b89602082850101111561155857600080fd5b9699959850939650602001949392505050565b6000806040838503121561157e57600080fd5b611587836111b1565b9150611595602084016111b1565b90509250929050565b600181811c908216806115b257607f821691505b6020821081036115d257634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561162257600081815260208120601f850160051c810160208610156115ff5750805b601f850160051c820191505b8181101561161e5782815560010161160b565b5050505b505050565b815167ffffffffffffffff8111156116415761164161138b565b6116558161164f845461159e565b846115d8565b602080601f83116001811461168a57600084156116725750858301515b600019600386901b1c1916600185901b17855561161e565b600085815260208120601f198616915b828110156116b95788860151825594840194600190910190840161169a565b50858210156116d75787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60006001820161170757634e487b7160e01b600052601160045260246000fd5b5060010190565b6000835161172081846020880161129a565b83519083019061173481836020880161129a565b01949350505050565b60006020828403121561174f57600080fd5b81516111aa81611267565b634e487b7160e01b600052603260045260246000fdfea264697066735822122075a89d98d544722b8b3f6a6571033ccb9177702bf0e24aeac018971285e73b6764736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
2e07fdce871cd951dc396429af44416a65862e7458bf7d9c44d801e0c9d38a25
-----Decoded View---------------
Arg [0] : _merkleRoot (bytes32): 0x2e07fdce871cd951dc396429af44416a65862e7458bf7d9c44d801e0c9d38a25
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 2e07fdce871cd951dc396429af44416a65862e7458bf7d9c44d801e0c9d38a25
Loading...
Loading
Loading...
Loading
OVERVIEW
Canonicons are dynamic, **nontransferable** NFTs that reflect participation in the JPG ecosystem. The more you participate on JPG, the more voting power and opportunities to customize your NFT will be unlocked.Designed by 0xStardrop, produced by JPGMultichain Portfolio | 30 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.