Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 13635816 | 1101 days ago | IN | 0 ETH | 0.06720714 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
GBAWhitelist
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: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; /// @author Andrew Parker /// @title GBA Whitelist NFT Contract /// @notice Implementation of OpenZeppelin MerkleProof contract for GBA MiniStayPuft and Traps NFTs contract GBAWhitelist{ bytes32 merkleRoot; /// Constructor /// @param _merkleRoot root of merkle tree constructor(bytes32 _merkleRoot){ merkleRoot = _merkleRoot; } /// Is Whitelisted /// @notice Is a given address whitelisted based on proof provided /// @param proof Merkle proof /// @param claimer address to check /// @return Is whitelisted function isWhitelisted(bytes32[] memory proof, address claimer) public view returns(bool){ bytes32 leaf = keccak256(abi.encodePacked(claimer)); return MerkleProof.verify(proof,merkleRoot,leaf); } }
// SPDX-License-Identifier: MIT 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) { 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)); } } // Check if the computed hash (root) is equal to the provided root return computedHash == root; } }
{ "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":"proof","type":"bytes32[]"},{"internalType":"address","name":"claimer","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5060405161060938038061060983398181016040528101906100329190610054565b806000819055505061009e565b60008151905061004e81610087565b92915050565b60006020828403121561006657600080fd5b60006100748482850161003f565b91505092915050565b6000819050919050565b6100908161007d565b811461009b57600080fd5b50565b61055c806100ad6000396000f3fe608060405234801561001057600080fd5b506004361061002b5760003560e01c8063debefaa614610030575b600080fd5b61004a6004803603810190610045919061023e565b610060565b6040516100579190610316565b60405180910390f35b6000808260405160200161007491906102cf565b60405160208183030381529060405280519060200120905061009984600054836100a2565b91505092915050565b60008082905060005b85518110156101705760008682815181106100ef577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190508083116101305782816040516020016101139291906102ea565b60405160208183030381529060405280519060200120925061015c565b80836040516020016101439291906102ea565b6040516020818303038152906040528051906020012092505b50808061016890610405565b9150506100ab565b508381149150509392505050565b600061019161018c84610356565b610331565b905080838252602082019050828560208602820111156101b057600080fd5b60005b858110156101e057816101c68882610229565b8452602084019350602083019250506001810190506101b3565b5050509392505050565b6000813590506101f9816104f8565b92915050565b600082601f83011261021057600080fd5b813561022084826020860161017e565b91505092915050565b6000813590506102388161050f565b92915050565b6000806040838503121561025157600080fd5b600083013567ffffffffffffffff81111561026b57600080fd5b610277858286016101ff565b9250506020610288858286016101ea565b9150509250929050565b6102a361029e82610382565b61044e565b82525050565b6102b281610394565b82525050565b6102c96102c4826103a0565b610460565b82525050565b60006102db8284610292565b60148201915081905092915050565b60006102f682856102b8565b60208201915061030682846102b8565b6020820191508190509392505050565b600060208201905061032b60008301846102a9565b92915050565b600061033b61034c565b905061034782826103d4565b919050565b6000604051905090565b600067ffffffffffffffff821115610371576103706104ab565b5b602082029050602081019050919050565b600061038d826103aa565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6103dd826104da565b810181811067ffffffffffffffff821117156103fc576103fb6104ab565b5b80604052505050565b6000610410826103ca565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156104435761044261047c565b5b600182019050919050565b60006104598261046a565b9050919050565b6000819050919050565b6000610475826104eb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b61050181610382565b811461050c57600080fd5b50565b610518816103a0565b811461052357600080fd5b5056fea2646970667358221220e1af90bef61dff1d90ffb9d2961cc1ae39ac0715fab3d361ef948254202d96a464736f6c634300080400332c27b8efb568f87f57666db7d797e7dcd5e05e886a753117ae67c8c624415e1e
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c8063debefaa614610030575b600080fd5b61004a6004803603810190610045919061023e565b610060565b6040516100579190610316565b60405180910390f35b6000808260405160200161007491906102cf565b60405160208183030381529060405280519060200120905061009984600054836100a2565b91505092915050565b60008082905060005b85518110156101705760008682815181106100ef577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015190508083116101305782816040516020016101139291906102ea565b60405160208183030381529060405280519060200120925061015c565b80836040516020016101439291906102ea565b6040516020818303038152906040528051906020012092505b50808061016890610405565b9150506100ab565b508381149150509392505050565b600061019161018c84610356565b610331565b905080838252602082019050828560208602820111156101b057600080fd5b60005b858110156101e057816101c68882610229565b8452602084019350602083019250506001810190506101b3565b5050509392505050565b6000813590506101f9816104f8565b92915050565b600082601f83011261021057600080fd5b813561022084826020860161017e565b91505092915050565b6000813590506102388161050f565b92915050565b6000806040838503121561025157600080fd5b600083013567ffffffffffffffff81111561026b57600080fd5b610277858286016101ff565b9250506020610288858286016101ea565b9150509250929050565b6102a361029e82610382565b61044e565b82525050565b6102b281610394565b82525050565b6102c96102c4826103a0565b610460565b82525050565b60006102db8284610292565b60148201915081905092915050565b60006102f682856102b8565b60208201915061030682846102b8565b6020820191508190509392505050565b600060208201905061032b60008301846102a9565b92915050565b600061033b61034c565b905061034782826103d4565b919050565b6000604051905090565b600067ffffffffffffffff821115610371576103706104ab565b5b602082029050602081019050919050565b600061038d826103aa565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6103dd826104da565b810181811067ffffffffffffffff821117156103fc576103fb6104ab565b5b80604052505050565b6000610410826103ca565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156104435761044261047c565b5b600182019050919050565b60006104598261046a565b9050919050565b6000819050919050565b6000610475826104eb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b60008160601b9050919050565b61050181610382565b811461050c57600080fd5b50565b610518816103a0565b811461052357600080fd5b5056fea2646970667358221220e1af90bef61dff1d90ffb9d2961cc1ae39ac0715fab3d361ef948254202d96a464736f6c63430008040033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
2c27b8efb568f87f57666db7d797e7dcd5e05e886a753117ae67c8c624415e1e
-----Decoded View---------------
Arg [0] : _merkleRoot (bytes32): 0x2c27b8efb568f87f57666db7d797e7dcd5e05e886a753117ae67c8c624415e1e
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 2c27b8efb568f87f57666db7d797e7dcd5e05e886a753117ae67c8c624415e1e
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.