Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 1,537 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint Crate | 16898772 | 669 days ago | IN | 0 ETH | 0.00091489 | ||||
Set Enabled | 16898721 | 669 days ago | IN | 0 ETH | 0.00105112 | ||||
Mint Crate | 16898720 | 669 days ago | IN | 0 ETH | 0.0030838 | ||||
Mint Crate | 16898720 | 669 days ago | IN | 0 ETH | 0.00308371 | ||||
Mint Crate | 16898720 | 669 days ago | IN | 0 ETH | 0.00298124 | ||||
Mint Crate | 16898719 | 669 days ago | IN | 0 ETH | 0.00312036 | ||||
Mint Crate | 16898718 | 669 days ago | IN | 0 ETH | 0.00310866 | ||||
Mint Crate | 16898718 | 669 days ago | IN | 0 ETH | 0.00304173 | ||||
Mint Crate | 16898718 | 669 days ago | IN | 0 ETH | 0.00311134 | ||||
Mint Crate | 16898718 | 669 days ago | IN | 0 ETH | 0.0031101 | ||||
Mint Crate | 16898718 | 669 days ago | IN | 0 ETH | 0.00419063 | ||||
Mint Crate | 16898717 | 669 days ago | IN | 0 ETH | 0.00423394 | ||||
Mint Crate | 16898716 | 669 days ago | IN | 0 ETH | 0.00440008 | ||||
Mint Crate | 16898716 | 669 days ago | IN | 0 ETH | 0.00459636 | ||||
Mint Crate | 16898715 | 669 days ago | IN | 0 ETH | 0.00493791 | ||||
Mint Crate | 16898714 | 669 days ago | IN | 0 ETH | 0.00404316 | ||||
Mint Crate | 16898714 | 669 days ago | IN | 0 ETH | 0.00410911 | ||||
Mint Crate | 16898714 | 669 days ago | IN | 0 ETH | 0.00411101 | ||||
Mint Crate | 16898714 | 669 days ago | IN | 0 ETH | 0.00404298 | ||||
Mint Crate | 16898714 | 669 days ago | IN | 0 ETH | 0.00410982 | ||||
Mint Crate | 16898714 | 669 days ago | IN | 0 ETH | 0.00422514 | ||||
Mint Crate | 16898712 | 669 days ago | IN | 0 ETH | 0.00454566 | ||||
Mint Crate | 16898712 | 669 days ago | IN | 0 ETH | 0.00454478 | ||||
Mint Crate | 16898712 | 669 days ago | IN | 0 ETH | 0.00454619 | ||||
Mint Crate | 16898712 | 669 days ago | IN | 0 ETH | 0.00454557 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x94307658...998e1A9FA The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Mint
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 20000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IToken { function mintFT(address, uint256, uint256) external; } contract Mint is Ownable { address private _tokenAddress; bytes32 private _merkleRoot; bool private _enabled; mapping(bytes32 => bool) private _usedLeaves; function setEnabled(bool b) public onlyOwner { _enabled = b; } function setTokenAddress(address addr) public onlyOwner { _tokenAddress = addr; } function setMerkleRoot(bytes32 merkleRoot_) public onlyOwner { _merkleRoot = merkleRoot_; } function mintCrate( address to, uint256 tokenID, uint256 quantity, bytes32[] calldata proof ) public { require(_enabled == true, "Minting is not enabled."); require(_tokenAddress != address(0), "Token address not set."); bytes32 leaf = makeMerkleLeaf(to, tokenID, quantity); require( MerkleProof.verify(proof, _merkleRoot, leaf), "Address/quantity combination not on allowlist." ); require(_usedLeaves[leaf] == false, "Mint already used."); _usedLeaves[leaf] = true; IToken(_tokenAddress).mintFT(to, tokenID, quantity); } function adminMintCrate( address to, uint256 tokenID, uint256 quantity ) public onlyOwner { IToken(_tokenAddress).mintFT(to, tokenID, quantity); } function makeMerkleLeaf( address wallet, uint256 tokenID, uint256 quantity ) public pure returns (bytes32) { return keccak256(abi.encodePacked(wallet, tokenID, quantity)); } function leafUsed(bytes32 leaf) public view returns (bool) { return _usedLeaves[leaf]; } }
// 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.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * 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. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ 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) } } }
{ "optimizer": { "enabled": true, "runs": 20000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenID","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"adminMintCrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"leaf","type":"bytes32"}],"name":"leafUsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"tokenID","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"makeMerkleLeaf","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenID","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintCrate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"b","type":"bool"}],"name":"setEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setTokenAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100be5760003560e01c80638da5cb5b11610076578063eee1491a1161005b578063eee1491a146101c4578063f2fde38b146101d7578063fffc0f5c146101ea57600080fd5b80638da5cb5b14610119578063900b049c1461014657600080fd5b8063328d8f72116100a7578063328d8f72146100eb578063715018a6146100fe5780637cb647591461010657600080fd5b806322a9de62146100c357806326a4e8d2146100d8575b600080fd5b6100d66100d136600461093d565b61021d565b005b6100d66100e63660046109d4565b610589565b6100d66100f93660046109ef565b6105d8565b6100d6610611565b6100d6610114366004610a11565b610625565b60005460405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b6101b6610154366004610a2a565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606085901b16602082015260348101839052605481018290526000906074016040516020818303038152906040528051906020012090509392505050565b60405190815260200161013d565b6100d66101d2366004610a2a565b610632565b6100d66101e53660046109d4565b6106d2565b61020d6101f8366004610a11565b60009081526004602052604090205460ff1690565b604051901515815260200161013d565b60035460ff161515600114610293576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4d696e74696e67206973206e6f7420656e61626c65642e00000000000000000060448201526064015b60405180910390fd5b60015473ffffffffffffffffffffffffffffffffffffffff16610312576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f546f6b656e2061646472657373206e6f74207365742e00000000000000000000604482015260640161028a565b60408051606087901b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000001660208083019190915260348201879052605480830187905283518084039091018152607490920190925280519101206103ad838380806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506002549150849050610789565b610439576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f416464726573732f7175616e7469747920636f6d62696e6174696f6e206e6f7460448201527f206f6e20616c6c6f776c6973742e000000000000000000000000000000000000606482015260840161028a565b60008181526004602052604090205460ff16156104b2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601260248201527f4d696e7420616c726561647920757365642e0000000000000000000000000000604482015260640161028a565b60008181526004602081905260409182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660019081179091555491517fde34ff3500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff89811692820192909252602481018890526044810187905291169063de34ff3590606401600060405180830381600087803b15801561056957600080fd5b505af115801561057d573d6000803e3d6000fd5b50505050505050505050565b61059161079f565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6105e061079f565b600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b61061961079f565b6106236000610820565b565b61062d61079f565b600255565b61063a61079f565b6001546040517fde34ff3500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff858116600483015260248201859052604482018490529091169063de34ff3590606401600060405180830381600087803b1580156106b557600080fd5b505af11580156106c9573d6000803e3d6000fd5b50505050505050565b6106da61079f565b73ffffffffffffffffffffffffffffffffffffffff811661077d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f6464726573730000000000000000000000000000000000000000000000000000606482015260840161028a565b61078681610820565b50565b6000826107968584610895565b14949350505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610623576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161028a565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815b84518110156108da576108c6828683815181106108b9576108b9610a5d565b60200260200101516108e2565b9150806108d281610a8c565b91505061089a565b509392505050565b60008183106108fe57600082815260208490526040902061090d565b60008381526020839052604090205b9392505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461093857600080fd5b919050565b60008060008060006080868803121561095557600080fd5b61095e86610914565b94506020860135935060408601359250606086013567ffffffffffffffff8082111561098957600080fd5b818801915088601f83011261099d57600080fd5b8135818111156109ac57600080fd5b8960208260051b85010111156109c157600080fd5b9699959850939650602001949392505050565b6000602082840312156109e657600080fd5b61090d82610914565b600060208284031215610a0157600080fd5b8135801515811461090d57600080fd5b600060208284031215610a2357600080fd5b5035919050565b600080600060608486031215610a3f57600080fd5b610a4884610914565b95602085013595506040909401359392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203610ae4577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b506001019056fea2646970667358221220e9fa08e68fdc650d29b30563ad66e0ee4504736477463c5879b074567395230464736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain 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.