More Info
Private Name Tags
Latest 25 from a total of 380 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim | 16799471 | 693 days ago | IN | 0 ETH | 0.00176855 | ||||
Claim | 15357563 | 899 days ago | IN | 0 ETH | 0.00043336 | ||||
Claim | 14741276 | 999 days ago | IN | 0 ETH | 0.00096558 | ||||
Claim | 14720178 | 1002 days ago | IN | 0 ETH | 0.00294466 | ||||
Expire | 14698910 | 1005 days ago | IN | 0 ETH | 0.00264526 | ||||
Claim | 14517826 | 1034 days ago | IN | 0 ETH | 0.00352048 | ||||
Claim | 14303567 | 1067 days ago | IN | 0 ETH | 0.00285497 | ||||
Claim | 14165176 | 1089 days ago | IN | 0 ETH | 0.00366767 | ||||
Claim | 14139420 | 1093 days ago | IN | 0 ETH | 0.00432926 | ||||
Claim | 14130723 | 1094 days ago | IN | 0 ETH | 0.00525859 | ||||
Claim | 14062803 | 1104 days ago | IN | 0 ETH | 0.0053653 | ||||
Claim | 14012636 | 1112 days ago | IN | 0 ETH | 0.00515429 | ||||
Claim | 13955791 | 1121 days ago | IN | 0 ETH | 0.0126407 | ||||
Claim | 13954452 | 1121 days ago | IN | 0 ETH | 0.00797645 | ||||
Claim | 13902119 | 1129 days ago | IN | 0 ETH | 0.00979992 | ||||
Claim | 13890814 | 1131 days ago | IN | 0 ETH | 0.00471116 | ||||
Claim | 13880216 | 1133 days ago | IN | 0 ETH | 0.00243343 | ||||
Claim | 13879572 | 1133 days ago | IN | 0 ETH | 0.00266467 | ||||
Claim | 13878120 | 1133 days ago | IN | 0 ETH | 0.00286533 | ||||
Claim | 13870950 | 1134 days ago | IN | 0 ETH | 0.0033642 | ||||
Claim | 13859272 | 1136 days ago | IN | 0 ETH | 0.00376055 | ||||
Claim | 13848704 | 1137 days ago | IN | 0 ETH | 0.00303043 | ||||
Claim | 13838165 | 1139 days ago | IN | 0 ETH | 0.00435785 | ||||
Claim | 13817935 | 1142 days ago | IN | 0 ETH | 0.00725823 | ||||
Claim | 13817829 | 1142 days ago | IN | 0 ETH | 0.00963727 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
MerkleDistributor2
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/cryptography/MerkleProof.sol"; import "../interfaces/IMerkleDistributor.sol"; contract MerkleDistributor2 is IMerkleDistributor { address public immutable override token; bytes32 public immutable override merkleRoot; address public owner; uint256 public immutable expiryDate; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); // This is a packed array of booleans. mapping(uint256 => uint256) private claimedBitMap; constructor(address token_, bytes32 merkleRoot_, uint256 expiryDate_) public { owner = msg.sender; token = token_; merkleRoot = merkleRoot_; expiryDate = expiryDate_; } function isClaimed(uint256 index) public view override returns (bool) { uint256 claimedWordIndex = index / 256; uint256 claimedBitIndex = index % 256; uint256 claimedWord = claimedBitMap[claimedWordIndex]; uint256 mask = (1 << claimedBitIndex); return claimedWord & mask == mask; } function _setClaimed(uint256 index) private { uint256 claimedWordIndex = index / 256; uint256 claimedBitIndex = index % 256; claimedBitMap[claimedWordIndex] = claimedBitMap[claimedWordIndex] | (1 << claimedBitIndex); } function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external override { require(!isClaimed(index), "MerkleDistributor2: Drop already claimed."); // Verify the merkle proof. bytes32 node = keccak256(abi.encodePacked(index, account, amount)); require(MerkleProof.verify(merkleProof, merkleRoot, node), "MerkleDistributor2: Invalid proof."); // Mark it claimed and send the token. _setClaimed(index); require(IERC20(token).transfer(account, amount), "MerkleDistributor2: Transfer failed."); emit Claimed(index, account, amount); } function expire(address exitAddress) external onlyOwner { require(block.timestamp >= expiryDate, "MerkleDistributor2: expiry date not reached"); uint256 remainingBalance = IERC20(token).balanceOf(address(this)); IERC20(token).transfer(exitAddress, remainingBalance); } function transferOwnership(address newOwner) external onlyOwner { require(newOwner != address(0), "MerkleDistributor2: new owner is the zero address"); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } modifier onlyOwner() { require(msg.sender == owner, "MerkleDistributor2: not owner"); _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) 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 `amount` 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 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev These functions deal with verification of Merkle trees (hash trees), */ 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; } }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.6.0; // Allows anyone to claim a token if they exist in a merkle root. interface IMerkleDistributor { // Returns the address of the token distributed by this contract. function token() external view returns (address); // Returns the merkle root of the merkle tree containing account balances available to claim. function merkleRoot() external view returns (bytes32); // Returns true if the index has been marked claimed. function isClaimed(uint256 index) external view returns (bool); // Claim the given amount of the token to the given address. Reverts if the inputs are invalid. function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external; // This event is triggered whenever a call to #claim succeeds. event Claimed(uint256 index, address account, uint256 amount); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"},{"internalType":"uint256","name":"expiryDate_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"index","type":"uint256"},{"indexed":false,"internalType":"address","name":"account","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"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"exitAddress","type":"address"}],"name":"expire","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"expiryDate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"isClaimed","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":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e060405234801561001057600080fd5b50604051610a6c380380610a6c8339818101604052606081101561003357600080fd5b5080516020820151604090920151600080546001600160a01b031916331781556001600160601b0319606084901b1660805260a084905260c08290526001600160a01b0390921692916109b4906100b890398061046a52806105205250806102a752806104465250806103185280610581528061064452806107c052506109b46000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c80639e34070f1161005b5780639e34070f14610161578063c8db233e14610192578063f2fde38b146101b8578063fc0c546a146101de57610088565b80632e7ba6ef1461008d5780632eb4a7ab1461011b578063516dde43146101355780638da5cb5b1461013d575b600080fd5b610119600480360360808110156100a357600080fd5b8135916001600160a01b0360208201351691604082013591908101906080810160608201356401000000008111156100da57600080fd5b8201836020820111156100ec57600080fd5b8035906020019184602083028401116401000000008311171561010e57600080fd5b5090925090506101e6565b005b610123610444565b60408051918252519081900360200190f35b610123610468565b61014561048c565b604080516001600160a01b039092168252519081900360200190f35b61017e6004803603602081101561017757600080fd5b503561049b565b604080519115158252519081900360200190f35b610119600480360360208110156101a857600080fd5b50356001600160a01b03166104bf565b610119600480360360208110156101ce57600080fd5b50356001600160a01b03166106bf565b6101456107be565b6101ef8561049b565b1561022b5760405162461bcd60e51b815260040180806020018281038252602981526020018061092b6029913960400191505060405180910390fd5b600085858560405160200180848152602001836001600160a01b031660601b815260140182815260200193505050506040516020818303038152906040528051906020012090506102d28383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f000000000000000000000000000000000000000000000000000000000000000092508591506107e29050565b61030d5760405162461bcd60e51b81526004018080602001828103825260228152602001806109096022913960400191505060405180910390fd5b6103168661088b565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb86866040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561038d57600080fd5b505af11580156103a1573d6000803e3d6000fd5b505050506040513d60208110156103b757600080fd5b50516103f45760405162461bcd60e51b81526004018080602001828103825260248152602001806108e56024913960400191505060405180910390fd5b604080518781526001600160a01b038716602082015280820186905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031681565b610100810460009081526001602081905260409091205460ff9092161b9081161490565b6000546001600160a01b0316331461051e576040805162461bcd60e51b815260206004820152601d60248201527f4d65726b6c654469737472696275746f72323a206e6f74206f776e6572000000604482015290519081900360640190fd5b7f000000000000000000000000000000000000000000000000000000000000000042101561057d5760405162461bcd60e51b815260040180806020018281038252602b815260200180610954602b913960400191505060405180910390fd5b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156105ec57600080fd5b505afa158015610600573d6000803e3d6000fd5b505050506040513d602081101561061657600080fd5b50516040805163a9059cbb60e01b81526001600160a01b0385811660048301526024820184905291519293507f00000000000000000000000000000000000000000000000000000000000000009091169163a9059cbb916044808201926020929091908290030181600087803b15801561068f57600080fd5b505af11580156106a3573d6000803e3d6000fd5b505050506040513d60208110156106b957600080fd5b50505050565b6000546001600160a01b0316331461071e576040805162461bcd60e51b815260206004820152601d60248201527f4d65726b6c654469737472696275746f72323a206e6f74206f776e6572000000604482015290519081900360640190fd5b6001600160a01b0381166107635760405162461bcd60e51b81526004018080602001828103825260318152602001806108b46031913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b7f000000000000000000000000000000000000000000000000000000000000000081565b600081815b85518110156108805760008682815181106107fe57fe5b602002602001015190508083116108455782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250610877565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b506001016107e7565b509092149392505050565b61010081046000908152600160208190526040909120805460ff9093169190911b909117905556fe4d65726b6c654469737472696275746f72323a206e6577206f776e657220697320746865207a65726f20616464726573734d65726b6c654469737472696275746f72323a205472616e73666572206661696c65642e4d65726b6c654469737472696275746f72323a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f72323a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f72323a206578706972792064617465206e6f742072656163686564a2646970667358221220d9a5b32b33eea9117fde5fc79bdb56c25cbf97fea39ea44e437d1d1c2b880f2264736f6c634300060c003300000000000000000000000002d3a27ac3f55d5d91fb0f52759842696a86421731340c29d25b57749abae264a051c31a96d6b79a24776ffc91a8d46d4a9258a50000000000000000000000000000000000000000000000000000000061cf9944
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100885760003560e01c80639e34070f1161005b5780639e34070f14610161578063c8db233e14610192578063f2fde38b146101b8578063fc0c546a146101de57610088565b80632e7ba6ef1461008d5780632eb4a7ab1461011b578063516dde43146101355780638da5cb5b1461013d575b600080fd5b610119600480360360808110156100a357600080fd5b8135916001600160a01b0360208201351691604082013591908101906080810160608201356401000000008111156100da57600080fd5b8201836020820111156100ec57600080fd5b8035906020019184602083028401116401000000008311171561010e57600080fd5b5090925090506101e6565b005b610123610444565b60408051918252519081900360200190f35b610123610468565b61014561048c565b604080516001600160a01b039092168252519081900360200190f35b61017e6004803603602081101561017757600080fd5b503561049b565b604080519115158252519081900360200190f35b610119600480360360208110156101a857600080fd5b50356001600160a01b03166104bf565b610119600480360360208110156101ce57600080fd5b50356001600160a01b03166106bf565b6101456107be565b6101ef8561049b565b1561022b5760405162461bcd60e51b815260040180806020018281038252602981526020018061092b6029913960400191505060405180910390fd5b600085858560405160200180848152602001836001600160a01b031660601b815260140182815260200193505050506040516020818303038152906040528051906020012090506102d28383808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f31340c29d25b57749abae264a051c31a96d6b79a24776ffc91a8d46d4a9258a592508591506107e29050565b61030d5760405162461bcd60e51b81526004018080602001828103825260228152602001806109096022913960400191505060405180910390fd5b6103168661088b565b7f00000000000000000000000002d3a27ac3f55d5d91fb0f52759842696a8642176001600160a01b031663a9059cbb86866040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561038d57600080fd5b505af11580156103a1573d6000803e3d6000fd5b505050506040513d60208110156103b757600080fd5b50516103f45760405162461bcd60e51b81526004018080602001828103825260248152602001806108e56024913960400191505060405180910390fd5b604080518781526001600160a01b038716602082015280820186905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1505050505050565b7f31340c29d25b57749abae264a051c31a96d6b79a24776ffc91a8d46d4a9258a581565b7f0000000000000000000000000000000000000000000000000000000061cf994481565b6000546001600160a01b031681565b610100810460009081526001602081905260409091205460ff9092161b9081161490565b6000546001600160a01b0316331461051e576040805162461bcd60e51b815260206004820152601d60248201527f4d65726b6c654469737472696275746f72323a206e6f74206f776e6572000000604482015290519081900360640190fd5b7f0000000000000000000000000000000000000000000000000000000061cf994442101561057d5760405162461bcd60e51b815260040180806020018281038252602b815260200180610954602b913960400191505060405180910390fd5b60007f00000000000000000000000002d3a27ac3f55d5d91fb0f52759842696a8642176001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156105ec57600080fd5b505afa158015610600573d6000803e3d6000fd5b505050506040513d602081101561061657600080fd5b50516040805163a9059cbb60e01b81526001600160a01b0385811660048301526024820184905291519293507f00000000000000000000000002d3a27ac3f55d5d91fb0f52759842696a8642179091169163a9059cbb916044808201926020929091908290030181600087803b15801561068f57600080fd5b505af11580156106a3573d6000803e3d6000fd5b505050506040513d60208110156106b957600080fd5b50505050565b6000546001600160a01b0316331461071e576040805162461bcd60e51b815260206004820152601d60248201527f4d65726b6c654469737472696275746f72323a206e6f74206f776e6572000000604482015290519081900360640190fd5b6001600160a01b0381166107635760405162461bcd60e51b81526004018080602001828103825260318152602001806108b46031913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b7f00000000000000000000000002d3a27ac3f55d5d91fb0f52759842696a86421781565b600081815b85518110156108805760008682815181106107fe57fe5b602002602001015190508083116108455782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250610877565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b506001016107e7565b509092149392505050565b61010081046000908152600160208190526040909120805460ff9093169190911b909117905556fe4d65726b6c654469737472696275746f72323a206e6577206f776e657220697320746865207a65726f20616464726573734d65726b6c654469737472696275746f72323a205472616e73666572206661696c65642e4d65726b6c654469737472696275746f72323a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f72323a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f72323a206578706972792064617465206e6f742072656163686564a2646970667358221220d9a5b32b33eea9117fde5fc79bdb56c25cbf97fea39ea44e437d1d1c2b880f2264736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000002d3a27ac3f55d5d91fb0f52759842696a86421731340c29d25b57749abae264a051c31a96d6b79a24776ffc91a8d46d4a9258a50000000000000000000000000000000000000000000000000000000061cf9944
-----Decoded View---------------
Arg [0] : token_ (address): 0x02D3A27Ac3f55d5D91Fb0f52759842696a864217
Arg [1] : merkleRoot_ (bytes32): 0x31340c29d25b57749abae264a051c31a96d6b79a24776ffc91a8d46d4a9258a5
Arg [2] : expiryDate_ (uint256): 1640995140
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000002d3a27ac3f55d5d91fb0f52759842696a864217
Arg [1] : 31340c29d25b57749abae264a051c31a96d6b79a24776ffc91a8d46d4a9258a5
Arg [2] : 0000000000000000000000000000000000000000000000000000000061cf9944
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $0.003635 | 635,476 | $2,309.82 |
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.