More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 2,683 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 21672734 | 34 hrs ago | IN | 0 ETH | 0.00095841 | ||||
Claim | 21665322 | 2 days ago | IN | 0 ETH | 0.00151018 | ||||
Claim | 21653651 | 4 days ago | IN | 0 ETH | 0.00086311 | ||||
Claim | 21635634 | 6 days ago | IN | 0 ETH | 0.00022064 | ||||
Claim | 21634038 | 6 days ago | IN | 0 ETH | 0.00025495 | ||||
Claim | 21633983 | 6 days ago | IN | 0 ETH | 0.00024821 | ||||
Claim | 21633842 | 6 days ago | IN | 0 ETH | 0.00022721 | ||||
Claim | 21608689 | 10 days ago | IN | 0 ETH | 0.00019801 | ||||
Claim | 21564152 | 16 days ago | IN | 0 ETH | 0.00060614 | ||||
Claim | 21564007 | 16 days ago | IN | 0 ETH | 0.00060179 | ||||
Claim | 21546493 | 19 days ago | IN | 0 ETH | 0.00092258 | ||||
Claim | 21536643 | 20 days ago | IN | 0 ETH | 0.00065957 | ||||
Claim | 21528575 | 21 days ago | IN | 0 ETH | 0.00027746 | ||||
Claim | 21520117 | 22 days ago | IN | 0 ETH | 0.00022446 | ||||
Claim | 21518004 | 23 days ago | IN | 0 ETH | 0.00050116 | ||||
Claim | 21516031 | 23 days ago | IN | 0 ETH | 0.00087672 | ||||
Claim | 21500493 | 25 days ago | IN | 0 ETH | 0.00025786 | ||||
Claim | 21494101 | 26 days ago | IN | 0 ETH | 0.00043149 | ||||
Claim | 21493883 | 26 days ago | IN | 0 ETH | 0.00043223 | ||||
Claim | 21487182 | 27 days ago | IN | 0 ETH | 0.00049054 | ||||
Claim | 21486034 | 27 days ago | IN | 0 ETH | 0.0004185 | ||||
Claim | 21481453 | 28 days ago | IN | 0 ETH | 0.00031597 | ||||
Claim | 21478107 | 28 days ago | IN | 0 ETH | 0.00029462 | ||||
Claim | 21473926 | 29 days ago | IN | 0 ETH | 0.00045232 | ||||
Claim | 21473898 | 29 days ago | IN | 0 ETH | 0.00047139 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
21672734 | 34 hrs ago | 0.02025191 ETH | ||||
21665322 | 2 days ago | 0.02010329 ETH | ||||
21653651 | 4 days ago | 0.16846362 ETH | ||||
21635634 | 6 days ago | 0.23614503 ETH | ||||
21634038 | 6 days ago | 0.16157076 ETH | ||||
21633983 | 6 days ago | 0.15175974 ETH | ||||
21633842 | 6 days ago | 0.14427975 ETH | ||||
21608689 | 10 days ago | 0.14550683 ETH | ||||
21564152 | 16 days ago | 0.14714534 ETH | ||||
21564007 | 16 days ago | 0.09481593 ETH | ||||
21546493 | 19 days ago | 0.02053474 ETH | ||||
21536643 | 20 days ago | 0.0198343 ETH | ||||
21528575 | 21 days ago | 0.15056924 ETH | ||||
21520117 | 22 days ago | 0.02005132 ETH | ||||
21518004 | 23 days ago | 0.0938895 ETH | ||||
21516031 | 23 days ago | 0.50504577 ETH | ||||
21500493 | 25 days ago | 0.14605116 ETH | ||||
21494101 | 26 days ago | 0.02005429 ETH | ||||
21493883 | 26 days ago | 0.15046493 ETH | ||||
21487182 | 27 days ago | 0.02005495 ETH | ||||
21486034 | 27 days ago | 0.15040896 ETH | ||||
21481453 | 28 days ago | 0.02005541 ETH | ||||
21478107 | 28 days ago | 0.01973198 ETH | ||||
21473926 | 29 days ago | 0.03245512 ETH | ||||
21473898 | 29 days ago | 0.05779882 ETH |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
MerkleAirdrop
Compiler Version
v0.8.27+commit.40a35a09
Optimization Enabled:
Yes with 200 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-FileCopyrightText: 2024 P2P Validator <[email protected]> // SPDX-License-Identifier: MIT pragma solidity 0.8.27; import "./@openzeppelin/access/Ownable2Step.sol"; import "./@openzeppelin/utils/cryptography/MerkleProof.sol"; import "./@openzeppelin/utils/Address.sol"; error MerkleAirdrop__AlreadyClaimed(); error MerkleAirdrop__InvalidProof(); error MerkleAirdrop__SameRoot(); error MerkleAirdrop__ZeroAddress(); contract MerkleAirdrop is Ownable2Step { bytes32 public merkleRoot; mapping(address => bool) public claimed; event MerkleAirdrop__MerkleRootSet(bytes32 _merkleRoot); event MerkleAirdrop__EtherRecovered(address _recipient, uint256 _amount); event MerkleAirdrop__Claimed(address indexed _recipient, uint256 _amount); constructor(bytes32 _merkleRoot) payable { merkleRoot = _merkleRoot; emit MerkleAirdrop__MerkleRootSet(_merkleRoot); } function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner { require (_merkleRoot != merkleRoot, MerkleAirdrop__SameRoot()); merkleRoot = _merkleRoot; emit MerkleAirdrop__MerkleRootSet(_merkleRoot); } function claim(uint256 _amount, bytes32[] calldata _merkleProof) external { require(!claimed[msg.sender], MerkleAirdrop__AlreadyClaimed()); // Compute the leaf node bytes32 leaf = keccak256(bytes.concat(keccak256(abi.encode(msg.sender, _amount)))); // Verify the Merkle proof require( MerkleProof.verify(_merkleProof, merkleRoot, leaf), MerkleAirdrop__InvalidProof() ); // Mark address as claimed and transfer the ETH claimed[msg.sender] = true; emit MerkleAirdrop__Claimed(msg.sender, _amount); Address.sendValue(payable(msg.sender), _amount); } function recoverEther(address payable _recipient) external onlyOwner { require (_recipient != address(0), MerkleAirdrop__ZeroAddress()); emit MerkleAirdrop__EtherRecovered(_recipient, address(this).balance); Address.sendValue(_recipient, address(this).balance); } // Function to allow the contract to receive ETH receive() external payable {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol) pragma solidity ^0.8.0; import "./Ownable.sol"; /** * @dev Contract module which provides 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} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2Step is Ownable { address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); _transferOwnership(sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.2) (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 rebuilds 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 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proofLen - 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 from 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) { require(proofPos == proofLen, "MerkleProof: invalid multiproof"); unchecked { 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 rebuilds 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 proofLen = proof.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proofLen - 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 from 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) { require(proofPos == proofLen, "MerkleProof: invalid multiproof"); unchecked { 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.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling 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 (last updated v4.9.4) (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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
{ "remappings": [ "forge-std/=lib/forge-std/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "cancun", "viaIR": true, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"stateMutability":"payable","type":"constructor"},{"inputs":[],"name":"MerkleAirdrop__AlreadyClaimed","type":"error"},{"inputs":[],"name":"MerkleAirdrop__InvalidProof","type":"error"},{"inputs":[],"name":"MerkleAirdrop__SameRoot","type":"error"},{"inputs":[],"name":"MerkleAirdrop__ZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"MerkleAirdrop__Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"MerkleAirdrop__EtherRecovered","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"MerkleAirdrop__MerkleRootSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","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"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"bytes32[]","name":"_merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"merkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_recipient","type":"address"}],"name":"recoverEther","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_merkleRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
6080601f61081038819003918201601f19168301916001600160401b0383118484101760ca5780849260209460405283398101031260c65751600180546001600160a01b03199081169091555f805433928116831782556040517fbae8e9c4ca41df618573c8e3e481e4d6136736b023949d3886f1d5573d8f603994602094919390926001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3806002558152a160405161073190816100df8239f35b5f80fd5b634e487b7160e01b5f52604160045260245ffdfe608080604052600436101561001c575b50361561001a575f80fd5b005b5f3560e01c9081632eb4a7ab14610546575080632f52ebb7146103ab57806352d5999f1461032e578063715018a6146102cb57806379ba5097146102025780637cb647591461019d5780638da5cb5b14610176578063c884ef8314610135578063e30c39781461010d5763f2fde38b14610096575f61000f565b34610109576020366003190112610109576004356001600160a01b03811690819003610109576100c46106a4565b600180546001600160a01b031916821790555f80546001600160a01b0316907f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227009080a3005b5f80fd5b34610109575f366003190112610109576001546040516001600160a01b039091168152602090f35b34610109576020366003190112610109576004356001600160a01b03811690819003610109575f526003602052602060ff60405f2054166040519015158152f35b34610109575f366003190112610109575f546040516001600160a01b039091168152602090f35b34610109576020366003190112610109576004356101b96106a4565b60025481146101f3576020817fbae8e9c4ca41df618573c8e3e481e4d6136736b023949d3886f1d5573d8f603992600255604051908152a1005b630b76c4a160e01b5f5260045ffd5b34610109575f36600319011261010957600154336001600160a01b039091160361027457600180546001600160a01b03199081169091555f805433928116831782556001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3005b60405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608490fd5b34610109575f366003190112610109576102e36106a4565b600180546001600160a01b03199081169091555f80549182168155906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610109576020366003190112610109576004356001600160a01b038116908181036101095761035c6106a4565b811561039c577fbc001004d53bca7789114e61545b8e7bfd26f64719e133c6f4dff783eb9e01e5604061001a934782519182526020820152a14790610596565b63e346630f60e01b5f5260045ffd5b346101095760403660031901126101095760243560043567ffffffffffffffff821161010957366023830112156101095781600401359067ffffffffffffffff8211610109578160051b9260248482010136811161010957335f52600360205260ff60405f20541661053757604051602081019033825284604082015260408152610437606082610560565b5190206040516020810191825260208152610453604082610560565b519020916002549461046b6020604051980188610560565b8652602401602086015b82821061052757505050905f915b84518310156104c55760208360051b86010151908181105f146104b4575f52602052600160405f205b920191610483565b905f52602052600160405f206104ac565b83036105185761001a90335f52600360205260405f20600160ff198254161790556040518181527f5393734b558fec9ac8236c86c919df72a9f4de7fa08a51cc0f55f993b037da2f60203392a233610596565b6330f109b760e21b5f5260045ffd5b8135815260209182019101610475565b631ac2170b60e01b5f5260045ffd5b34610109575f366003190112610109576020906002548152f35b90601f8019910116810190811067ffffffffffffffff82111761058257604052565b634e487b7160e01b5f52604160045260245ffd5b81471061065f575f918291829182916001600160a01b03165af13d1561065a573d67ffffffffffffffff811161058257604051906105de601f8201601f191660200183610560565b81525f60203d92013e5b156105ef57565b60405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608490fd5b6105e8565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606490fd5b5f546001600160a01b031633036106b757565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfea264697066735822122026914197231e986a6e34307e7593d2d44d035cbb106aa2940ac496b7ca4d7d8764736f6c634300081b00330000000000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608080604052600436101561001c575b50361561001a575f80fd5b005b5f3560e01c9081632eb4a7ab14610546575080632f52ebb7146103ab57806352d5999f1461032e578063715018a6146102cb57806379ba5097146102025780637cb647591461019d5780638da5cb5b14610176578063c884ef8314610135578063e30c39781461010d5763f2fde38b14610096575f61000f565b34610109576020366003190112610109576004356001600160a01b03811690819003610109576100c46106a4565b600180546001600160a01b031916821790555f80546001600160a01b0316907f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e227009080a3005b5f80fd5b34610109575f366003190112610109576001546040516001600160a01b039091168152602090f35b34610109576020366003190112610109576004356001600160a01b03811690819003610109575f526003602052602060ff60405f2054166040519015158152f35b34610109575f366003190112610109575f546040516001600160a01b039091168152602090f35b34610109576020366003190112610109576004356101b96106a4565b60025481146101f3576020817fbae8e9c4ca41df618573c8e3e481e4d6136736b023949d3886f1d5573d8f603992600255604051908152a1005b630b76c4a160e01b5f5260045ffd5b34610109575f36600319011261010957600154336001600160a01b039091160361027457600180546001600160a01b03199081169091555f805433928116831782556001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3005b60405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608490fd5b34610109575f366003190112610109576102e36106a4565b600180546001600160a01b03199081169091555f80549182168155906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a3005b34610109576020366003190112610109576004356001600160a01b038116908181036101095761035c6106a4565b811561039c577fbc001004d53bca7789114e61545b8e7bfd26f64719e133c6f4dff783eb9e01e5604061001a934782519182526020820152a14790610596565b63e346630f60e01b5f5260045ffd5b346101095760403660031901126101095760243560043567ffffffffffffffff821161010957366023830112156101095781600401359067ffffffffffffffff8211610109578160051b9260248482010136811161010957335f52600360205260ff60405f20541661053757604051602081019033825284604082015260408152610437606082610560565b5190206040516020810191825260208152610453604082610560565b519020916002549461046b6020604051980188610560565b8652602401602086015b82821061052757505050905f915b84518310156104c55760208360051b86010151908181105f146104b4575f52602052600160405f205b920191610483565b905f52602052600160405f206104ac565b83036105185761001a90335f52600360205260405f20600160ff198254161790556040518181527f5393734b558fec9ac8236c86c919df72a9f4de7fa08a51cc0f55f993b037da2f60203392a233610596565b6330f109b760e21b5f5260045ffd5b8135815260209182019101610475565b631ac2170b60e01b5f5260045ffd5b34610109575f366003190112610109576020906002548152f35b90601f8019910116810190811067ffffffffffffffff82111761058257604052565b634e487b7160e01b5f52604160045260245ffd5b81471061065f575f918291829182916001600160a01b03165af13d1561065a573d67ffffffffffffffff811161058257604051906105de601f8201601f191660200183610560565b81525f60203d92013e5b156105ef57565b60405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608490fd5b6105e8565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606490fd5b5f546001600160a01b031633036106b757565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fdfea264697066735822122026914197231e986a6e34307e7593d2d44d035cbb106aa2940ac496b7ca4d7d8764736f6c634300081b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _merkleRoot (bytes32): 0x0000000000000000000000000000000000000000000000000000000000000000
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,259.99 | 651.5099 | $2,123,917.98 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.