ETH Price: $3,153.06 (-12.45%)

Contract

0x090E53c44E8a9b6B1bcA800e881455b921AEC420
 

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim236855032025-10-29 20:42:116 days ago1761770531IN
0x090E53c4...921AEC420
0 ETH0.000198462.45736326
Claim236632412025-10-26 17:51:479 days ago1761501107IN
0x090E53c4...921AEC420
0 ETH0.000050490.62471176
Claim236159732025-10-20 2:53:3515 days ago1760928815IN
0x090E53c4...921AEC420
0 ETH0.000015790.19538356
Claim235465282025-10-10 9:46:4725 days ago1760089607IN
0x090E53c4...921AEC420
0 ETH0.000017740.22404267
Claim235121422025-10-05 14:23:1130 days ago1759674191IN
0x090E53c4...921AEC420
0 ETH0.000090571.12050207
Claim234940952025-10-03 1:53:4732 days ago1759456427IN
0x090E53c4...921AEC420
0 ETH0.000014230.17970748
Claim234932292025-10-02 22:58:4732 days ago1759445927IN
0x090E53c4...921AEC420
0 ETH0.000093681.15944094
Claim234707392025-09-29 19:28:4736 days ago1759174127IN
0x090E53c4...921AEC420
0 ETH0.000178472.20824085
Claim234649212025-09-28 23:58:1136 days ago1759103891IN
0x090E53c4...921AEC420
0 ETH0.000015890.20077307
Claim234234122025-09-23 4:42:2342 days ago1758602543IN
0x090E53c4...921AEC420
0 ETH0.000090091.11495168
Claim234101912025-09-21 8:20:2344 days ago1758442823IN
0x090E53c4...921AEC420
0 ETH0.000094561.16999775
Claim234063992025-09-20 19:35:5945 days ago1758396959IN
0x090E53c4...921AEC420
0 ETH0.000013980.17311252
Claim234061832025-09-20 18:52:1145 days ago1758394331IN
0x090E53c4...921AEC420
0 ETH0.000022410.27752204
Claim233969242025-09-19 11:47:5946 days ago1758282479IN
0x090E53c4...921AEC420
0 ETH0.000034710.42940087
Claim233955432025-09-19 7:10:1146 days ago1758265811IN
0x090E53c4...921AEC420
0 ETH0.000060730.75132554
Claim233766832025-09-16 15:59:4749 days ago1758038387IN
0x090E53c4...921AEC420
0 ETH0.000191392.36972618
Claim233766322025-09-16 15:49:3549 days ago1758037775IN
0x090E53c4...921AEC420
0 ETH0.000193122.38921935
Claim233574012025-09-13 23:21:4751 days ago1757805707IN
0x090E53c4...921AEC420
0 ETH0.000009980.1235238
Claim233258182025-09-09 13:24:2356 days ago1757424263IN
0x090E53c4...921AEC420
0 ETH0.00016642.05915913
Claim232801322025-09-03 4:15:2362 days ago1756872923IN
0x090E53c4...921AEC420
0 ETH0.000104931.29798218
Claim232287542025-08-27 0:04:4769 days ago1756253087IN
0x090E53c4...921AEC420
0 ETH0.000103341.27966563
Claim232245912025-08-26 10:08:1170 days ago1756202891IN
0x090E53c4...921AEC420
0 ETH0.000095551.18228166
Claim232073222025-08-24 0:20:1172 days ago1755994811IN
0x090E53c4...921AEC420
0 ETH0.000092841.14871956
Claim232051542025-08-23 17:03:2373 days ago1755968603IN
0x090E53c4...921AEC420
0 ETH0.000036790.45563089
Claim231714092025-08-19 0:03:4777 days ago1755561827IN
0x090E53c4...921AEC420
0 ETH0.000017430.21566381
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MerkleDistributor

Compiler Version
v0.6.11+commit.5ef660b1

Optimization Enabled:
Yes with 1000000 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2021-11-15
*/

/**
 *Submitted for verification at Etherscan.io on 2020-09-16
*/

// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.6.11;

/**
 * @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);
}

/**
 * @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;
    }
}

// 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);
}

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(!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);
    }
}

Contract Security Audit

Contract ABI

API
[{"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"}]

60c060405234801561001057600080fd5b506040516106c63803806106c68339818101604052604081101561003357600080fd5b508051602090910151606082901b6001600160601b03191660805260a08190526001600160a01b03909116906106406100866000398061025252806104625250806102dd52806104ac52506106406000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e7ba6ef146100515780632eb4a7ab146100ec5780639e34070f14610106578063fc0c546a14610137575b600080fd5b6100ea6004803603608081101561006757600080fd5b81359173ffffffffffffffffffffffffffffffffffffffff60208201351691604082013591908101906080810160608201356401000000008111156100ab57600080fd5b8201836020820111156100bd57600080fd5b803590602001918460208302840111640100000000831117156100df57600080fd5b509092509050610168565b005b6100f4610460565b60408051918252519081900360200190f35b6101236004803603602081101561011c57600080fd5b5035610484565b604080519115158252519081900360200190f35b61013f6104aa565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61017185610484565b156101c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061059f6028913960400191505060405180910390fd5b6040805160208082018890527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b168284015260548083018790528351808403909101815260748301808552815191830191909120609492860280850184019095528582529361027d939192879287928392909101908490808284376000920191909152507f000000000000000000000000000000000000000000000000000000000000000092508591506104ce9050565b6102d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806105c76021913960400191505060405180910390fd5b6102db86610577565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561038257600080fd5b505af1158015610396573d6000803e3d6000fd5b505050506040513d60208110156103ac57600080fd5b5051610403576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806105e86023913960400191505060405180910390fd5b6040805187815273ffffffffffffffffffffffffffffffffffffffff8716602082015280820186905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6101008104600090815260208190526040902054600160ff9092169190911b9081161490565b7f000000000000000000000000000000000000000000000000000000000000000081565b600081815b855181101561056c5760008682815181106104ea57fe5b602002602001015190508083116105315782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250610563565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b506001016104d3565b509092149392505050565b610100810460009081526020819052604090208054600160ff9093169290921b909117905556fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642ea26469706673582212206b5e0854da0b5c906e5e5bbc893315c162143a8e883ce13acc7ddc95e69b061564736f6c634300060b0033000000000000000000000000cafe001067cdef266afb7eb5a286dcfd277f3de5391e56ca48c62562599a4fc384ea96a0b28f3b6af2a47a07717466e24a0a9d2c

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e7ba6ef146100515780632eb4a7ab146100ec5780639e34070f14610106578063fc0c546a14610137575b600080fd5b6100ea6004803603608081101561006757600080fd5b81359173ffffffffffffffffffffffffffffffffffffffff60208201351691604082013591908101906080810160608201356401000000008111156100ab57600080fd5b8201836020820111156100bd57600080fd5b803590602001918460208302840111640100000000831117156100df57600080fd5b509092509050610168565b005b6100f4610460565b60408051918252519081900360200190f35b6101236004803603602081101561011c57600080fd5b5035610484565b604080519115158252519081900360200190f35b61013f6104aa565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61017185610484565b156101c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061059f6028913960400191505060405180910390fd5b6040805160208082018890527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b168284015260548083018790528351808403909101815260748301808552815191830191909120609492860280850184019095528582529361027d939192879287928392909101908490808284376000920191909152507f391e56ca48c62562599a4fc384ea96a0b28f3b6af2a47a07717466e24a0a9d2c92508591506104ce9050565b6102d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806105c76021913960400191505060405180910390fd5b6102db86610577565b7f000000000000000000000000cafe001067cdef266afb7eb5a286dcfd277f3de573ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561038257600080fd5b505af1158015610396573d6000803e3d6000fd5b505050506040513d60208110156103ac57600080fd5b5051610403576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806105e86023913960400191505060405180910390fd5b6040805187815273ffffffffffffffffffffffffffffffffffffffff8716602082015280820186905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1505050505050565b7f391e56ca48c62562599a4fc384ea96a0b28f3b6af2a47a07717466e24a0a9d2c81565b6101008104600090815260208190526040902054600160ff9092169190911b9081161490565b7f000000000000000000000000cafe001067cdef266afb7eb5a286dcfd277f3de581565b600081815b855181101561056c5760008682815181106104ea57fe5b602002602001015190508083116105315782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250610563565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b506001016104d3565b509092149392505050565b610100810460009081526020819052604090208054600160ff9093169290921b909117905556fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642ea26469706673582212206b5e0854da0b5c906e5e5bbc893315c162143a8e883ce13acc7ddc95e69b061564736f6c634300060b0033

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

000000000000000000000000cafe001067cdef266afb7eb5a286dcfd277f3de5391e56ca48c62562599a4fc384ea96a0b28f3b6af2a47a07717466e24a0a9d2c

-----Decoded View---------------
Arg [0] : token_ (address): 0xcAfE001067cDEF266AfB7Eb5A286dCFD277f3dE5
Arg [1] : merkleRoot_ (bytes32): 0x391e56ca48c62562599a4fc384ea96a0b28f3b6af2a47a07717466e24a0a9d2c

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000cafe001067cdef266afb7eb5a286dcfd277f3de5
Arg [1] : 391e56ca48c62562599a4fc384ea96a0b28f3b6af2a47a07717466e24a0a9d2c


Deployed Bytecode Sourcemap

4970:1639:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5956:650;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5956:650:0;;-1:-1:-1;5956:650:0;-1:-1:-1;5956:650:0;:::i;:::-;;5072:44;;;:::i;:::-;;;;;;;;;;;;;;;;5359:331;;;;;;;;;;;;;;;;-1:-1:-1;5359:331:0;;:::i;:::-;;;;;;;;;;;;;;;;;;5026:39;;;:::i;:::-;;;;;;;;;;;;;;;;;;;5956:650;6089:16;6099:5;6089:9;:16::i;:::-;6088:17;6080:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6225:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6215:51;;;;;;;;;6285:49;;;;;;;;;;;;;;;6215:51;6285:49;;6225:40;;6304:11;;;;;;6285:49;;;;6304:11;;6285:49;6304:11;6285:49;;;;;;;;;-1:-1:-1;6317:10:0;;-1:-1:-1;6329:4:0;;-1:-1:-1;6285:18:0;;-1:-1:-1;6285:49:0:i;:::-;6277:95;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6433:18;6445:5;6433:11;:18::i;:::-;6477:5;6470:22;;;6493:7;6502:6;6470:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6470:39:0;6462:87;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6567:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5956:650;;;;;;:::o;5072:44::-;;;:::o;5359:331::-;5475:3;5467:11;;5423:4;5559:31;;;;;;;;;;;5617:1;5515:11;;;;5617:20;;;;5656:18;;;:26;;5359:331::o;5026:39::-;;;:::o;3301:796::-;3392:4;3432;3392;3449:525;3473:5;:12;3469:1;:16;3449:525;;;3507:20;3530:5;3536:1;3530:8;;;;;;;;;;;;;;3507:31;;3575:12;3559;:28;3555:408;;3729:12;3743;3712:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3702:55;;;;;;3687:70;;3555:408;;;3919:12;3933;3902:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3892:55;;;;;;3877:70;;3555:408;-1:-1:-1;3487:3:0;;3449:525;;;-1:-1:-1;4069:20:0;;;;3301:796;-1:-1:-1;;;3301:796:0:o;5698:250::-;5788:3;5780:11;;5753:24;5884:31;;;;;;;;;;;;5919:1;5828:11;;;;5919:20;;;;5884:56;;;5850:90;;5698:250::o

Swarm Source

ipfs://6b5e0854da0b5c906e5e5bbc893315c162143a8e883ce13acc7ddc95e69b0615

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
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.