More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 18,178 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 13632374 | 19 days ago | IN | 0 ETH | 0.00000019 | ||||
Claim | 13443224 | 23 days ago | IN | 0 ETH | 0.00000014 | ||||
Claim | 13439955 | 23 days ago | IN | 0 ETH | 0.00000005 | ||||
Claim | 13425550 | 23 days ago | IN | 0 ETH | 0 | ||||
Claim | 12451313 | 46 days ago | IN | 0 ETH | 0.00000009 | ||||
Claim | 12377962 | 48 days ago | IN | 0 ETH | 0.00000006 | ||||
Claim | 12262276 | 50 days ago | IN | 0 ETH | 0.00000059 | ||||
Claim | 11268846 | 73 days ago | IN | 0 ETH | 0.00000018 | ||||
Claim | 10459385 | 92 days ago | IN | 0 ETH | 0.00000015 | ||||
Claim | 8689521 | 133 days ago | IN | 0 ETH | 0.00000119 | ||||
Claim | 7681692 | 156 days ago | IN | 0 ETH | 0.00000129 | ||||
Claim | 6561755 | 182 days ago | IN | 0 ETH | 0 | ||||
Claim | 6450897 | 185 days ago | IN | 0 ETH | 0 | ||||
Claim | 6168080 | 191 days ago | IN | 0 ETH | 0.00000145 | ||||
Claim | 4738063 | 225 days ago | IN | 0 ETH | 0.00001398 | ||||
Claim | 4478222 | 231 days ago | IN | 0 ETH | 0.00000158 | ||||
Claim | 4341904 | 234 days ago | IN | 0 ETH | 0.00000141 | ||||
Claim | 4309919 | 234 days ago | IN | 0 ETH | 0.00000182 | ||||
Claim | 4223873 | 236 days ago | IN | 0 ETH | 0.00000239 | ||||
Claim | 4080223 | 240 days ago | IN | 0 ETH | 0.00000167 | ||||
Claim | 3963301 | 242 days ago | IN | 0 ETH | 0.00000115 | ||||
Claim | 3959333 | 243 days ago | IN | 0 ETH | 0.0000011 | ||||
Claim | 3823654 | 246 days ago | IN | 0 ETH | 0.00000105 | ||||
Claim | 3818047 | 246 days ago | IN | 0 ETH | 0.000001 | ||||
Claim | 3811169 | 246 days ago | IN | 0 ETH | 0.00000077 |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
PumpDistributor
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "interfaces/IPump.sol"; contract PumpDistributor is Ownable { event Claimed(address indexed owner, address indexed claimer, uint256 amount); event SetIsAllowed(address indexed account, bool allowed); event SetPump(address indexed pump, uint256 deadline); address public pump; bytes32 public root; uint256 public threshold; uint256 public claimDeadline; mapping(address => bool) public claimed; /** * @dev Constructor for the PumpDistributor contract. * @param owner_ - The owner of the contract * @param root_ - The root of the merkle tree * @param threshold_ - The threshold for enabling transfers, in terms of remaining balance of the distributor contract */ constructor(address owner_, bytes32 root_, uint256 threshold_) Ownable(owner_) { root = root_; threshold = threshold_; } /** * @dev Sets the PUMP token address, only callable by owner, and starts the claims. * @param pump_ - The address of the PUMP token */ function setPump(address pump_) external onlyOwner { require(pump == address(0), "PumpDistributor: Pump already set"); claimDeadline = block.timestamp + 366 days; pump = pump_; emit SetPump(pump_, claimDeadline); } /** * @dev Allows claiming by an external address if it exists in the tree. Only callabe once per owner, requires merkle tree to be constructed correctly. * @param owner_ - The address to claim tokens for * @param amount_ - The amount of tokens to claim * @param proof_ - The merkle proof to verify the claim */ function claim(address owner_, uint256 amount_, bytes32[] calldata proof_) external { require(block.timestamp < claimDeadline, "PumpDistributor: Deadline passed"); bytes32 node = keccak256(abi.encodePacked(msg.sender, owner_, amount_)); require(MerkleProof.verify(proof_, root, node), "PumpDistributor: Invalid proof"); require(!claimed[owner_], "PumpDistributor: Already claimed"); claimed[owner_] = true; IPump(pump).transfer(owner_, amount_); emit Claimed(owner_, msg.sender, amount_); } /** * @dev Set the allowed status for an account, only callable by owner. * @param account_ - The account to set the allowed status for * @param allowed_ - The status to set */ function setIsAllowed(address account_, bool allowed_) external onlyOwner { IPump(pump).setIsAllowed(account_, allowed_); emit SetIsAllowed(account_, allowed_); } /** * @dev Enables transfers for the PUMP token if the distribution threshold has been reached. */ function enableTransfers() external { require(IPump(pump).balanceOf(address(this)) < threshold, "PumpDistributor: Threshold not reached"); IPump(pump).setEnableTransfers(true); } /** * @dev Burns remaining tokens, anyone call this function as long as the claim deadline has passed. */ function burnRemaining() external { require(block.timestamp > claimDeadline, "PumpDistributor: Deadline not passed"); IPump(pump).burn(IPump(pump).balanceOf(address(this))); } function updateRoot(bytes32 _root) external onlyOwner { root = _root; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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 { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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 v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.20; /** * @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 The multiproof provided is not valid. */ error MerkleProofInvalidMultiproof(); /** * @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} */ 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. */ 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} */ 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. */ 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. */ 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). */ 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. if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } // 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) { if (proofPos != proofLen) { revert MerkleProofInvalidMultiproof(); } 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. */ 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. if (leavesLen + proofLen != totalHashes + 1) { revert MerkleProofInvalidMultiproof(); } // 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) { if (proofPos != proofLen) { revert MerkleProofInvalidMultiproof(); } unchecked { return hashes[totalHashes - 1]; } } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Sorts the pair (a, b) and hashes the result. */ function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } /** * @dev Implementation of keccak256(abi.encode(a, b)) that doesn't allocate or expand memory. */ 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 pragma solidity ^0.8.23; import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import {IERC20Metadata} from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import {IERC20Errors} from "@openzeppelin/contracts/interfaces/draft-IERC6093.sol"; interface IPump is IERC20, IERC20Metadata, IERC20Errors { function setIsAllowed(address account, bool allowed) external; function setEnableTransfers(bool enabled) external; function burn(uint256 amount) external; }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"bytes32","name":"root_","type":"bytes32"},{"internalType":"uint256","name":"threshold_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claimed","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":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"allowed","type":"bool"}],"name":"SetIsAllowed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pump","type":"address"},{"indexed":false,"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"SetPump","type":"event"},{"inputs":[],"name":"burnRemaining","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"uint256","name":"amount_","type":"uint256"},{"internalType":"bytes32[]","name":"proof_","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimDeadline","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableTransfers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pump","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"root","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account_","type":"address"},{"internalType":"bool","name":"allowed_","type":"bool"}],"name":"setIsAllowed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pump_","type":"address"}],"name":"setPump","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"threshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_root","type":"bytes32"}],"name":"updateRoot","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50604051610c64380380610c6483398101604081905261002f916100c7565b826001600160a01b03811661005e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b61006781610077565b506002919091556003555061010a565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000606084860312156100dc57600080fd5b83516001600160a01b03811681146100f357600080fd5b602085015160409095015190969495509392505050565b610b4b806101196000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063af35c6c71161008c578063c884ef8311610066578063c884ef83146101ae578063d6a78004146101e1578063ebf0c717146101e9578063f2fde38b146101f257600080fd5b8063af35c6c714610180578063b12e427214610188578063c2b7c5fc1461019b57600080fd5b80633d13f874116100c85780633d13f8741461014b57806342cde4e81461015e578063715018a6146101675780638da5cb5b1461016f57600080fd5b806321ff9970146100ef578063395ea61b146101045780633ba86c4414610134575b600080fd5b6101026100fd366004610989565b610205565b005b600154610117906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61013d60045481565b60405190815260200161012b565b6101026101593660046109be565b610212565b61013d60035481565b610102610487565b6000546001600160a01b0316610117565b61010261049b565b610102610196366004610a48565b6105c7565b6101026101a9366004610a71565b61069a565b6101d16101bc366004610a48565b60056020526000908152604090205460ff1681565b604051901515815260200161012b565b610102610752565b61013d60025481565b610102610200366004610a48565b610841565b61020d61087f565b600255565b60045442106102685760405162461bcd60e51b815260206004820181905260248201527f50756d704469737472696275746f723a20446561646c696e652070617373656460448201526064015b60405180910390fd5b6040516bffffffffffffffffffffffff1933606090811b8216602084015286901b166034820152604881018490526000906068016040516020818303038152906040528051906020012090506102f58383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060025491508490506108ac565b6103415760405162461bcd60e51b815260206004820152601e60248201527f50756d704469737472696275746f723a20496e76616c69642070726f6f660000604482015260640161025f565b6001600160a01b03851660009081526005602052604090205460ff16156103aa5760405162461bcd60e51b815260206004820181905260248201527f50756d704469737472696275746f723a20416c726561647920636c61696d6564604482015260640161025f565b6001600160a01b0385811660008181526005602052604090819020805460ff1916600190811790915554905163a9059cbb60e01b81526004810192909252602482018790529091169063a9059cbb906044016020604051808303816000875af115801561041b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043f9190610aa8565b5060405184815233906001600160a01b038716907ff7a40077ff7a04c7e61f6f26fb13774259ddf1b6bce9ecf26a8276cdd39926839060200160405180910390a35050505050565b61048f61087f565b61049960006108c2565b565b6003546001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050a9190610ac5565b106105665760405162461bcd60e51b815260206004820152602660248201527f50756d704469737472696275746f723a205468726573686f6c64206e6f742072604482015265195858da195960d21b606482015260840161025f565b60018054604051632b69f8a160e21b815260048101929092526001600160a01b03169063ada7e284906024015b600060405180830381600087803b1580156105ad57600080fd5b505af11580156105c1573d6000803e3d6000fd5b50505050565b6105cf61087f565b6001546001600160a01b0316156106325760405162461bcd60e51b815260206004820152602160248201527f50756d704469737472696275746f723a2050756d7020616c72656164792073656044820152601d60fa1b606482015260840161025f565b610640426301e28500610ade565b6004819055600180546001600160a01b0319166001600160a01b038416908117909155604051918252907fb77cb7d71952eefd2b01127c9794f0f8f6c30a7b1d3809c3f3ce3891227000619060200160405180910390a250565b6106a261087f565b6001546040516330adf17f60e21b81526001600160a01b03848116600483015283151560248301529091169063c2b7c5fc90604401600060405180830381600087803b1580156106f157600080fd5b505af1158015610705573d6000803e3d6000fd5b50505050816001600160a01b03167f36ae00714361353e3d515f2c887000112edb40928a1021938787fcc3faad094082604051610746911515815260200190565b60405180910390a25050565b60045442116107af5760405162461bcd60e51b8152602060048201526024808201527f50756d704469737472696275746f723a20446561646c696e65206e6f742070616044820152631cdcd95960e21b606482015260840161025f565b6001546040516370a0823160e01b81523060048201526001600160a01b03909116906342966c689082906370a0823190602401602060405180830381865afa1580156107ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108239190610ac5565b6040518263ffffffff1660e01b815260040161059391815260200190565b61084961087f565b6001600160a01b03811661087357604051631e4fbdf760e01b81526000600482015260240161025f565b61087c816108c2565b50565b6000546001600160a01b031633146104995760405163118cdaa760e01b815233600482015260240161025f565b6000826108b98584610912565b14949350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815b845181101561094d576109438286838151811061093657610936610aff565b6020026020010151610957565b9150600101610917565b5090505b92915050565b6000818310610973576000828152602084905260409020610982565b60008381526020839052604090205b9392505050565b60006020828403121561099b57600080fd5b5035919050565b80356001600160a01b03811681146109b957600080fd5b919050565b600080600080606085870312156109d457600080fd5b6109dd856109a2565b935060208501359250604085013567ffffffffffffffff80821115610a0157600080fd5b818701915087601f830112610a1557600080fd5b813581811115610a2457600080fd5b8860208260051b8501011115610a3957600080fd5b95989497505060200194505050565b600060208284031215610a5a57600080fd5b610982826109a2565b801515811461087c57600080fd5b60008060408385031215610a8457600080fd5b610a8d836109a2565b91506020830135610a9d81610a63565b809150509250929050565b600060208284031215610aba57600080fd5b815161098281610a63565b600060208284031215610ad757600080fd5b5051919050565b8082018082111561095157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fdfea2646970667358221220e9af221ee6bc36a6c519efd93113a4334edcb1abdb30158b7f8dc08c6e1083fe64736f6c63430008180033000000000000000000000000d6b64e44aae0938118ad0dae251b859d85351c222fa2efedab0df58900521bbc4ccd1e1365f30614d1ab9014304520754192592c0000000000000000000000000000000000000000000de589d32bd931c4000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063af35c6c71161008c578063c884ef8311610066578063c884ef83146101ae578063d6a78004146101e1578063ebf0c717146101e9578063f2fde38b146101f257600080fd5b8063af35c6c714610180578063b12e427214610188578063c2b7c5fc1461019b57600080fd5b80633d13f874116100c85780633d13f8741461014b57806342cde4e81461015e578063715018a6146101675780638da5cb5b1461016f57600080fd5b806321ff9970146100ef578063395ea61b146101045780633ba86c4414610134575b600080fd5b6101026100fd366004610989565b610205565b005b600154610117906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61013d60045481565b60405190815260200161012b565b6101026101593660046109be565b610212565b61013d60035481565b610102610487565b6000546001600160a01b0316610117565b61010261049b565b610102610196366004610a48565b6105c7565b6101026101a9366004610a71565b61069a565b6101d16101bc366004610a48565b60056020526000908152604090205460ff1681565b604051901515815260200161012b565b610102610752565b61013d60025481565b610102610200366004610a48565b610841565b61020d61087f565b600255565b60045442106102685760405162461bcd60e51b815260206004820181905260248201527f50756d704469737472696275746f723a20446561646c696e652070617373656460448201526064015b60405180910390fd5b6040516bffffffffffffffffffffffff1933606090811b8216602084015286901b166034820152604881018490526000906068016040516020818303038152906040528051906020012090506102f58383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152505060025491508490506108ac565b6103415760405162461bcd60e51b815260206004820152601e60248201527f50756d704469737472696275746f723a20496e76616c69642070726f6f660000604482015260640161025f565b6001600160a01b03851660009081526005602052604090205460ff16156103aa5760405162461bcd60e51b815260206004820181905260248201527f50756d704469737472696275746f723a20416c726561647920636c61696d6564604482015260640161025f565b6001600160a01b0385811660008181526005602052604090819020805460ff1916600190811790915554905163a9059cbb60e01b81526004810192909252602482018790529091169063a9059cbb906044016020604051808303816000875af115801561041b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061043f9190610aa8565b5060405184815233906001600160a01b038716907ff7a40077ff7a04c7e61f6f26fb13774259ddf1b6bce9ecf26a8276cdd39926839060200160405180910390a35050505050565b61048f61087f565b61049960006108c2565b565b6003546001546040516370a0823160e01b81523060048201526001600160a01b03909116906370a0823190602401602060405180830381865afa1580156104e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061050a9190610ac5565b106105665760405162461bcd60e51b815260206004820152602660248201527f50756d704469737472696275746f723a205468726573686f6c64206e6f742072604482015265195858da195960d21b606482015260840161025f565b60018054604051632b69f8a160e21b815260048101929092526001600160a01b03169063ada7e284906024015b600060405180830381600087803b1580156105ad57600080fd5b505af11580156105c1573d6000803e3d6000fd5b50505050565b6105cf61087f565b6001546001600160a01b0316156106325760405162461bcd60e51b815260206004820152602160248201527f50756d704469737472696275746f723a2050756d7020616c72656164792073656044820152601d60fa1b606482015260840161025f565b610640426301e28500610ade565b6004819055600180546001600160a01b0319166001600160a01b038416908117909155604051918252907fb77cb7d71952eefd2b01127c9794f0f8f6c30a7b1d3809c3f3ce3891227000619060200160405180910390a250565b6106a261087f565b6001546040516330adf17f60e21b81526001600160a01b03848116600483015283151560248301529091169063c2b7c5fc90604401600060405180830381600087803b1580156106f157600080fd5b505af1158015610705573d6000803e3d6000fd5b50505050816001600160a01b03167f36ae00714361353e3d515f2c887000112edb40928a1021938787fcc3faad094082604051610746911515815260200190565b60405180910390a25050565b60045442116107af5760405162461bcd60e51b8152602060048201526024808201527f50756d704469737472696275746f723a20446561646c696e65206e6f742070616044820152631cdcd95960e21b606482015260840161025f565b6001546040516370a0823160e01b81523060048201526001600160a01b03909116906342966c689082906370a0823190602401602060405180830381865afa1580156107ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108239190610ac5565b6040518263ffffffff1660e01b815260040161059391815260200190565b61084961087f565b6001600160a01b03811661087357604051631e4fbdf760e01b81526000600482015260240161025f565b61087c816108c2565b50565b6000546001600160a01b031633146104995760405163118cdaa760e01b815233600482015260240161025f565b6000826108b98584610912565b14949350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600081815b845181101561094d576109438286838151811061093657610936610aff565b6020026020010151610957565b9150600101610917565b5090505b92915050565b6000818310610973576000828152602084905260409020610982565b60008381526020839052604090205b9392505050565b60006020828403121561099b57600080fd5b5035919050565b80356001600160a01b03811681146109b957600080fd5b919050565b600080600080606085870312156109d457600080fd5b6109dd856109a2565b935060208501359250604085013567ffffffffffffffff80821115610a0157600080fd5b818701915087601f830112610a1557600080fd5b813581811115610a2457600080fd5b8860208260051b8501011115610a3957600080fd5b95989497505060200194505050565b600060208284031215610a5a57600080fd5b610982826109a2565b801515811461087c57600080fd5b60008060408385031215610a8457600080fd5b610a8d836109a2565b91506020830135610a9d81610a63565b809150509250929050565b600060208284031215610aba57600080fd5b815161098281610a63565b600060208284031215610ad757600080fd5b5051919050565b8082018082111561095157634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fdfea2646970667358221220e9af221ee6bc36a6c519efd93113a4334edcb1abdb30158b7f8dc08c6e1083fe64736f6c63430008180033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000d6b64e44aae0938118ad0dae251b859d85351c222fa2efedab0df58900521bbc4ccd1e1365f30614d1ab9014304520754192592c0000000000000000000000000000000000000000000de589d32bd931c4000000
-----Decoded View---------------
Arg [0] : owner_ (address): 0xd6b64E44aae0938118aD0dAE251b859D85351c22
Arg [1] : root_ (bytes32): 0x2fa2efedab0df58900521bbc4ccd1e1365f30614d1ab9014304520754192592c
Arg [2] : threshold_ (uint256): 16800000000000000000000000
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000d6b64e44aae0938118ad0dae251b859d85351c22
Arg [1] : 2fa2efedab0df58900521bbc4ccd1e1365f30614d1ab9014304520754192592c
Arg [2] : 0000000000000000000000000000000000000000000de589d32bd931c4000000
Loading...
Loading
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.