ETH Price: $3,643.44 (+1.78%)

Contract

0x731751e3C0B67014b560F98b26601A5587F954B0
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim211491082024-11-09 9:09:4720 days ago1731143387IN
0x731751e3...587F954B0
0 ETH0.0006784610.95164207
Claim210820752024-10-31 0:36:1130 days ago1730334971IN
0x731751e3...587F954B0
0 ETH0.000597529.64480222
Claim210743982024-10-29 22:51:4731 days ago1730242307IN
0x731751e3...587F954B0
0 ETH0.000575169.28562639
Claim206594362024-09-02 0:55:5989 days ago1725238559IN
0x731751e3...587F954B0
0 ETH0.000066661.07699818
Claim206172032024-08-27 3:21:4795 days ago1724728907IN
0x731751e3...587F954B0
0 ETH0.000058740.94819229
Claim205832872024-08-22 9:35:4799 days ago1724319347IN
0x731751e3...587F954B0
0 ETH0.00005730.92475699
Claim205024932024-08-11 2:49:11111 days ago1723344551IN
0x731751e3...587F954B0
0 ETH0.000058580.94556205
Claim204492342024-08-03 16:32:59118 days ago1722702779IN
0x731751e3...587F954B0
0 ETH0.0006311810.18814904
Claim204487862024-08-03 15:03:11118 days ago1722697391IN
0x731751e3...587F954B0
0 ETH0.000150632.4314921
Claim204241182024-07-31 4:22:59122 days ago1722399779IN
0x731751e3...587F954B0
0 ETH0.000118771.91686823
Claim203617262024-07-22 11:18:47130 days ago1721647127IN
0x731751e3...587F954B0
0 ETH0.000277684.4806884
Claim202510842024-07-07 0:34:11146 days ago1720312451IN
0x731751e3...587F954B0
0 ETH0.000116351.8791053
Claim202047382024-06-30 13:15:47152 days ago1719753347IN
0x731751e3...587F954B0
0 ETH0.000250524.04526293
Claim200227952024-06-05 2:59:35178 days ago1717556375IN
0x731751e3...587F954B0
0 ETH0.000525858.49122176
Claim199024452024-05-19 7:18:35194 days ago1716103115IN
0x731751e3...587F954B0
0 ETH0.00017452.81582804
Claim198752032024-05-15 11:52:47198 days ago1715773967IN
0x731751e3...587F954B0
0 ETH0.000381046.14751156
Claim198655412024-05-14 3:22:59200 days ago1715656979IN
0x731751e3...587F954B0
0 ETH0.000312365.04125832
Claim198606392024-05-13 10:56:47200 days ago1715597807IN
0x731751e3...587F954B0
0 ETH0.000256124.13425187
Claim198510772024-05-12 2:50:59202 days ago1715482259IN
0x731751e3...587F954B0
0 ETH0.000196153.1656338
Claim198365992024-05-10 2:16:11204 days ago1715307371IN
0x731751e3...587F954B0
0 ETH0.000239853.8697339
Claim197919392024-05-03 20:21:23210 days ago1714767683IN
0x731751e3...587F954B0
0 ETH0.000420186.78122487
Claim197473362024-04-27 14:42:59216 days ago1714228979IN
0x731751e3...587F954B0
0 ETH0.000443667.16276793
Claim197362572024-04-26 1:27:59218 days ago1714094879IN
0x731751e3...587F954B0
0 ETH0.000386696.24298143
Claim197170382024-04-23 8:55:35220 days ago1713862535IN
0x731751e3...587F954B0
0 ETH0.0007295711.77627793
Claim195102022024-03-25 8:05:47249 days ago1711353947IN
0x731751e3...587F954B0
0 ETH0.0009874615.92814354
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MerkleDistributor

Compiler Version
v0.6.11+commit.5ef660b1

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : MerkleDistributor.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.6.11;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/cryptography/MerkleProof.sol";
import "./interfaces/IMerkleDistributor.sol";

contract MerkleDistributor is IMerkleDistributor {
    address public immutable override token;
    bytes32 public immutable override merkleRoot;

    // This is a packed array of booleans.
    mapping(uint256 => uint256) private claimedBitMap;

    constructor(address token_, bytes32 merkleRoot_) public {
        token = token_;
        merkleRoot = merkleRoot_;
    }

    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(block.timestamp > 1682848800, 'Timestamp'); // Sun Apr 30 2023 10:00:00 GMT+0000
        require(!isClaimed(index), 'MerkleDistributor: Drop already claimed.');

        // Verify the merkle proof.
        bytes32 node = keccak256(abi.encodePacked(index, account, amount));
        require(MerkleProof.verify(merkleProof, merkleRoot, node), 'MerkleDistributor: Invalid proof.');

        // Mark it claimed and send the token.
        _setClaimed(index);
        require(IERC20(token).transfer(account, amount), 'MerkleDistributor: Transfer failed.');

        emit Claimed(index, account, amount);
    }
}

File 2 of 4 : IERC20.sol
// 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);
}

File 3 of 4 : MerkleProof.sol
// 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;
    }
}

File 4 of 4 : IMerkleDistributor.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.5.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);
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"token_","type":"address"},{"internalType":"bytes32","name":"merkleRoot_","type":"bytes32"}],"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"},{"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":"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":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60c060405234801561001057600080fd5b5060405161065b38038061065b8339818101604052604081101561003357600080fd5b508051602090910151606082901b6001600160601b03191660805260a08190526001600160a01b03909116906105d56100866000398061024f52806103f75250806102c0528061044152506105d56000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e7ba6ef146100515780632eb4a7ab146100df5780639e34070f146100f9578063fc0c546a1461012a575b600080fd5b6100dd6004803603608081101561006757600080fd5b8135916001600160a01b03602082013516916040820135919081019060808101606082013564010000000081111561009e57600080fd5b8201836020820111156100b057600080fd5b803590602001918460208302840111640100000000831117156100d257600080fd5b50909250905061014e565b005b6100e76103f5565b60408051918252519081900360200190f35b6101166004803603602081101561010f57600080fd5b5035610419565b604080519115158252519081900360200190f35b61013261043f565b604080516001600160a01b039092168252519081900360200190f35b63644e3c204211610192576040805162461bcd60e51b8152602060048201526009602482015268054696d657374616d760bc1b604482015290519081900360640190fd5b61019b85610419565b156101d75760405162461bcd60e51b81526004018080602001828103825260288152602001806105346028913960400191505060405180910390fd5b6040805160208082018890526bffffffffffffffffffffffff19606088901b168284015260548083018790528351808403909101815260748301808552815191830191909120609492860280850184019095528582529361027a939192879287928392909101908490808284376000920191909152507f000000000000000000000000000000000000000000000000000000000000000092508591506104639050565b6102b55760405162461bcd60e51b815260040180806020018281038252602181526020018061055c6021913960400191505060405180910390fd5b6102be8661050c565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb86866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561033e57600080fd5b505af1158015610352573d6000803e3d6000fd5b505050506040513d602081101561036857600080fd5b50516103a55760405162461bcd60e51b815260040180806020018281038252602381526020018061057d6023913960400191505060405180910390fd5b604080518781526001600160a01b038716602082015280820186905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6101008104600090815260208190526040902054600160ff9092169190911b9081161490565b7f000000000000000000000000000000000000000000000000000000000000000081565b600081815b855181101561050157600086828151811061047f57fe5b602002602001015190508083116104c657828160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092506104f8565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b50600101610468565b509092149392505050565b610100810460009081526020819052604090208054600160ff9093169290921b909117905556fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642ea2646970667358221220ba9e1b96d38b5814ce9856deb41f265357205f1d2a389c76a7187fe1585b126a64736f6c634300060b003300000000000000000000000046d2a90153cd8f09464ca3a5605b6bbec9c2ff018f72771443c8f9dcdac272d11520e0f20c5e03e0129581d37854c5ac5513278b

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e7ba6ef146100515780632eb4a7ab146100df5780639e34070f146100f9578063fc0c546a1461012a575b600080fd5b6100dd6004803603608081101561006757600080fd5b8135916001600160a01b03602082013516916040820135919081019060808101606082013564010000000081111561009e57600080fd5b8201836020820111156100b057600080fd5b803590602001918460208302840111640100000000831117156100d257600080fd5b50909250905061014e565b005b6100e76103f5565b60408051918252519081900360200190f35b6101166004803603602081101561010f57600080fd5b5035610419565b604080519115158252519081900360200190f35b61013261043f565b604080516001600160a01b039092168252519081900360200190f35b63644e3c204211610192576040805162461bcd60e51b8152602060048201526009602482015268054696d657374616d760bc1b604482015290519081900360640190fd5b61019b85610419565b156101d75760405162461bcd60e51b81526004018080602001828103825260288152602001806105346028913960400191505060405180910390fd5b6040805160208082018890526bffffffffffffffffffffffff19606088901b168284015260548083018790528351808403909101815260748301808552815191830191909120609492860280850184019095528582529361027a939192879287928392909101908490808284376000920191909152507f8f72771443c8f9dcdac272d11520e0f20c5e03e0129581d37854c5ac5513278b92508591506104639050565b6102b55760405162461bcd60e51b815260040180806020018281038252602181526020018061055c6021913960400191505060405180910390fd5b6102be8661050c565b7f00000000000000000000000046d2a90153cd8f09464ca3a5605b6bbec9c2ff016001600160a01b031663a9059cbb86866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b15801561033e57600080fd5b505af1158015610352573d6000803e3d6000fd5b505050506040513d602081101561036857600080fd5b50516103a55760405162461bcd60e51b815260040180806020018281038252602381526020018061057d6023913960400191505060405180910390fd5b604080518781526001600160a01b038716602082015280820186905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1505050505050565b7f8f72771443c8f9dcdac272d11520e0f20c5e03e0129581d37854c5ac5513278b81565b6101008104600090815260208190526040902054600160ff9092169190911b9081161490565b7f00000000000000000000000046d2a90153cd8f09464ca3a5605b6bbec9c2ff0181565b600081815b855181101561050157600086828151811061047f57fe5b602002602001015190508083116104c657828160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092506104f8565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b50600101610468565b509092149392505050565b610100810460009081526020819052604090208054600160ff9093169290921b909117905556fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642ea2646970667358221220ba9e1b96d38b5814ce9856deb41f265357205f1d2a389c76a7187fe1585b126a64736f6c634300060b0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000046d2a90153cd8f09464ca3a5605b6bbec9c2ff018f72771443c8f9dcdac272d11520e0f20c5e03e0129581d37854c5ac5513278b

-----Decoded View---------------
Arg [0] : token_ (address): 0x46D2A90153cd8F09464CA3a5605B6BBeC9C2fF01
Arg [1] : merkleRoot_ (bytes32): 0x8f72771443c8f9dcdac272d11520e0f20c5e03e0129581d37854c5ac5513278b

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000046d2a90153cd8f09464ca3a5605b6bbec9c2ff01
Arg [1] : 8f72771443c8f9dcdac272d11520e0f20c5e03e0129581d37854c5ac5513278b


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.