Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
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 0x7FA52810...C83F8E1d9 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
WgmisMerkleTreeWhitelist
Compiler Version
v0.8.4+commit.c7e474f2
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract WgmisMerkleTreeWhitelist { bytes32 public merkleRoot; constructor(bytes32 _merkleRoot) { merkleRoot = _merkleRoot; } function isValidMerkleProof(bytes32[] calldata _merkleProof, address _minter, uint96 _amount) external view returns (bool) { bytes32 leaf = keccak256(abi.encodePacked(_minter, _amount)); bool result = MerkleProof.verify(_merkleProof, merkleRoot, leaf); require(result, 'INVALID_MERKLE_PROOF'); return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Trees 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. */ 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 Returns the rebuilt hash obtained by traversing a Merklee 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++) { bytes32 proofElement = proof[i]; if (computedHash <= proofElement) { // Hash(current computed hash + current element of the proof) computedHash = keccak256(abi.encodePacked(computedHash, proofElement)); } else { // Hash(current element of the proof + current computed hash) computedHash = keccak256(abi.encodePacked(proofElement, computedHash)); } } return computedHash; } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"},{"internalType":"address","name":"_minter","type":"address"},{"internalType":"uint96","name":"_amount","type":"uint96"}],"name":"isValidMerkleProof","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100365760003560e01c80631780b5cd1461003b5780632eb4a7ab1461006b575b600080fd5b610055600480360381019061005091906102c0565b610089565b604051610062919061040a565b60405180910390f35b610073610156565b6040516100809190610425565b60405180910390f35b600080838360405160200161009f9291906103b2565b6040516020818303038152906040528051906020012090506000610107878780806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050506000548461015c565b905080610149576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161014090610440565b60405180910390fd5b8092505050949350505050565b60005481565b6000826101698584610173565b1490509392505050565b60008082905060005b84518110156102415760008582815181106101c0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190508083116102015782816040516020016101e49291906103de565b60405160208183030381529060405280519060200120925061022d565b80836040516020016102149291906103de565b6040516020818303038152906040528051906020012092505b508080610239906104db565b91505061017c565b508091505092915050565b60008135905061025b816105d6565b92915050565b60008083601f84011261027357600080fd5b8235905067ffffffffffffffff81111561028c57600080fd5b6020830191508360208202830111156102a457600080fd5b9250929050565b6000813590506102ba816105ed565b92915050565b600080600080606085870312156102d657600080fd5b600085013567ffffffffffffffff8111156102f057600080fd5b6102fc87828801610261565b9450945050602061030f8782880161024c565b9250506040610320878288016102ab565b91505092959194509250565b61033d61033882610471565b610524565b82525050565b61034c81610483565b82525050565b61035b8161048f565b82525050565b61037261036d8261048f565b610536565b82525050565b6000610385601483610460565b9150610390826105ad565b602082019050919050565b6103ac6103a7826104c3565b610552565b82525050565b60006103be828561032c565b6014820191506103ce828461039b565b600c820191508190509392505050565b60006103ea8285610361565b6020820191506103fa8284610361565b6020820191508190509392505050565b600060208201905061041f6000830184610343565b92915050565b600060208201905061043a6000830184610352565b92915050565b6000602082019050818103600083015261045981610378565b9050919050565b600082825260208201905092915050565b600061047c82610499565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006bffffffffffffffffffffffff82169050919050565b60006104e6826104b9565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561051957610518610564565b5b600182019050919050565b600061052f82610540565b9050919050565b6000819050919050565b600061054b826105a0565b9050919050565b600061055d82610593565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160a01b9050919050565b60008160601b9050919050565b7f494e56414c49445f4d45524b4c455f50524f4f46000000000000000000000000600082015250565b6105df81610471565b81146105ea57600080fd5b50565b6105f6816104c3565b811461060157600080fd5b5056fea2646970667358221220572d702a898a198edb72df59395962869478f43ee6688219097e356e5dbe01df64736f6c63430008040033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.