ETH Price: $2,478.79 (-7.76%)

Contract

0x4ee7c0F5480Eb1EDd8902a5E8b991ed52992d5f5
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00
Transaction Hash
Method
Block
From
To
Claim205639062024-08-19 16:36:478 days ago1724085407IN
0x4ee7c0F5...52992d5f5
0 ETH0.000139251.83027891
Claim205537962024-08-18 6:43:359 days ago1723963415IN
0x4ee7c0F5...52992d5f5
0 ETH0.000065970.89709188
Claim205255302024-08-14 7:59:2313 days ago1723622363IN
0x4ee7c0F5...52992d5f5
0 ETH0.000120491.63775138
Claim204934322024-08-09 20:28:1118 days ago1723235291IN
0x4ee7c0F5...52992d5f5
0 ETH0.000251713.31018744
Claim204814712024-08-08 4:27:2320 days ago1723091243IN
0x4ee7c0F5...52992d5f5
0 ETH0.000082191.07944437
Claim204788062024-08-07 19:31:5920 days ago1723059119IN
0x4ee7c0F5...52992d5f5
0 ETH0.000281753.70327272
Claim203443392024-07-20 1:03:4739 days ago1721437427IN
0x4ee7c0F5...52992d5f5
0 ETH0.000243623.30928609
Claim203443332024-07-20 1:02:3539 days ago1721437355IN
0x4ee7c0F5...52992d5f5
0 ETH0.000244233.21182603
Claim203443262024-07-20 1:01:1139 days ago1721437271IN
0x4ee7c0F5...52992d5f5
0 ETH0.000271423.56955641
Claim203443192024-07-20 0:59:4739 days ago1721437187IN
0x4ee7c0F5...52992d5f5
0 ETH0.000227062.98347842
Claim203443122024-07-20 0:58:2339 days ago1721437103IN
0x4ee7c0F5...52992d5f5
0 ETH0.000238053.12998181
Claim203443032024-07-20 0:56:3539 days ago1721436995IN
0x4ee7c0F5...52992d5f5
0 ETH0.000245423.2253251
Claim203442932024-07-20 0:54:3539 days ago1721436875IN
0x4ee7c0F5...52992d5f5
0 ETH0.000231423.04261699
Claim203437372024-07-19 23:02:4739 days ago1721430167IN
0x4ee7c0F5...52992d5f5
0 ETH0.000389235.11432418
Claim203436282024-07-19 22:40:5939 days ago1721428859IN
0x4ee7c0F5...52992d5f5
0 ETH0.0003694.85274486
Claim203434412024-07-19 22:03:2339 days ago1721426603IN
0x4ee7c0F5...52992d5f5
0 ETH0.000405545.32866428
Claim203433112024-07-19 21:37:2339 days ago1721425043IN
0x4ee7c0F5...52992d5f5
0 ETH0.000416815.4800398
Claim203432662024-07-19 21:28:2339 days ago1721424503IN
0x4ee7c0F5...52992d5f5
0 ETH0.000414945.45318258
Claim203432242024-07-19 21:19:5939 days ago1721423999IN
0x4ee7c0F5...52992d5f5
0 ETH0.000447855.88878179
Claim203432192024-07-19 21:18:5939 days ago1721423939IN
0x4ee7c0F5...52992d5f5
0 ETH0.00044055.79334956
Claim203431762024-07-19 21:10:2339 days ago1721423423IN
0x4ee7c0F5...52992d5f5
0 ETH0.000392885.16705245
Claim201580222024-06-24 0:39:2365 days ago1719189563IN
0x4ee7c0F5...52992d5f5
0 ETH0.00015572.04678649
Claim201331262024-06-20 13:05:5968 days ago1718888759IN
0x4ee7c0F5...52992d5f5
0 ETH0.0011880715.61732993
Claim201031932024-06-16 8:35:2372 days ago1718526923IN
0x4ee7c0F5...52992d5f5
0 ETH0.000274113.60235404
Claim200931512024-06-14 22:52:2374 days ago1718405543IN
0x4ee7c0F5...52992d5f5
0 ETH0.000374384.92219963
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
205639062024-08-19 16:36:478 days ago1724085407
0x4ee7c0F5...52992d5f5
0 ETH
205537962024-08-18 6:43:359 days ago1723963415
0x4ee7c0F5...52992d5f5
0 ETH
205255302024-08-14 7:59:2313 days ago1723622363
0x4ee7c0F5...52992d5f5
0 ETH
204934322024-08-09 20:28:1118 days ago1723235291
0x4ee7c0F5...52992d5f5
0 ETH
204814712024-08-08 4:27:2320 days ago1723091243
0x4ee7c0F5...52992d5f5
0 ETH
204788062024-08-07 19:31:5920 days ago1723059119
0x4ee7c0F5...52992d5f5
0 ETH
203443392024-07-20 1:03:4739 days ago1721437427
0x4ee7c0F5...52992d5f5
0 ETH
203443332024-07-20 1:02:3539 days ago1721437355
0x4ee7c0F5...52992d5f5
0 ETH
203443262024-07-20 1:01:1139 days ago1721437271
0x4ee7c0F5...52992d5f5
0 ETH
203443192024-07-20 0:59:4739 days ago1721437187
0x4ee7c0F5...52992d5f5
0 ETH
203443122024-07-20 0:58:2339 days ago1721437103
0x4ee7c0F5...52992d5f5
0 ETH
203443032024-07-20 0:56:3539 days ago1721436995
0x4ee7c0F5...52992d5f5
0 ETH
203442932024-07-20 0:54:3539 days ago1721436875
0x4ee7c0F5...52992d5f5
0 ETH
203437372024-07-19 23:02:4739 days ago1721430167
0x4ee7c0F5...52992d5f5
0 ETH
203436282024-07-19 22:40:5939 days ago1721428859
0x4ee7c0F5...52992d5f5
0 ETH
203434412024-07-19 22:03:2339 days ago1721426603
0x4ee7c0F5...52992d5f5
0 ETH
203433112024-07-19 21:37:2339 days ago1721425043
0x4ee7c0F5...52992d5f5
0 ETH
203432662024-07-19 21:28:2339 days ago1721424503
0x4ee7c0F5...52992d5f5
0 ETH
203432242024-07-19 21:19:5939 days ago1721423999
0x4ee7c0F5...52992d5f5
0 ETH
203432192024-07-19 21:18:5939 days ago1721423939
0x4ee7c0F5...52992d5f5
0 ETH
203431762024-07-19 21:10:2339 days ago1721423423
0x4ee7c0F5...52992d5f5
0 ETH
201580222024-06-24 0:39:2365 days ago1719189563
0x4ee7c0F5...52992d5f5
0 ETH
201331262024-06-20 13:05:5968 days ago1718888759
0x4ee7c0F5...52992d5f5
0 ETH
201031932024-06-16 8:35:2372 days ago1718526923
0x4ee7c0F5...52992d5f5
0 ETH
200931512024-06-14 22:52:2374 days ago1718405543
0x4ee7c0F5...52992d5f5
0 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MerkleDistributor

Compiler Version
v0.6.11+commit.5ef660b1

Optimization Enabled:
Yes with 10000 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(!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 : 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);
}

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

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 10000
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

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"}]

60c060405234801561001057600080fd5b506040516106c63803806106c68339818101604052604081101561003357600080fd5b508051602090910151606082901b6001600160601b03191660805260a08190526001600160a01b03909116906106406100866000398061025252806104625250806102dd52806104ac52506106406000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e7ba6ef146100515780632eb4a7ab146100ec5780639e34070f14610106578063fc0c546a14610137575b600080fd5b6100ea6004803603608081101561006757600080fd5b81359173ffffffffffffffffffffffffffffffffffffffff60208201351691604082013591908101906080810160608201356401000000008111156100ab57600080fd5b8201836020820111156100bd57600080fd5b803590602001918460208302840111640100000000831117156100df57600080fd5b509092509050610168565b005b6100f4610460565b60408051918252519081900360200190f35b6101236004803603602081101561011c57600080fd5b5035610484565b604080519115158252519081900360200190f35b61013f6104aa565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61017185610484565b156101c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061059f6028913960400191505060405180910390fd5b6040805160208082018890527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b168284015260548083018790528351808403909101815260748301808552815191830191909120609492860280850184019095528582529361027d939192879287928392909101908490808284376000920191909152507f000000000000000000000000000000000000000000000000000000000000000092508591506104ce9050565b6102d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806105c76021913960400191505060405180910390fd5b6102db86610577565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561038257600080fd5b505af1158015610396573d6000803e3d6000fd5b505050506040513d60208110156103ac57600080fd5b5051610403576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806105e86023913960400191505060405180910390fd5b6040805187815273ffffffffffffffffffffffffffffffffffffffff8716602082015280820186905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6101008104600090815260208190526040902054600160ff9092169190911b9081161490565b7f000000000000000000000000000000000000000000000000000000000000000081565b600081815b855181101561056c5760008682815181106104ea57fe5b602002602001015190508083116105315782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250610563565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b506001016104d3565b509092149392505050565b610100810460009081526020819052604090208054600160ff9093169290921b909117905556fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642ea26469706673582212203e9db67ca344e30da5e4d554f404584bc6529fcdb0a1b55be52601d19d00ed9c64736f6c634300060b0033000000000000000000000000111111111117dc0aa78b770fa6a738034120c302baa75409fd78b9b6a76f5579860286ba35adbfde69ebf84c72bf3d6044e8df6a

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e7ba6ef146100515780632eb4a7ab146100ec5780639e34070f14610106578063fc0c546a14610137575b600080fd5b6100ea6004803603608081101561006757600080fd5b81359173ffffffffffffffffffffffffffffffffffffffff60208201351691604082013591908101906080810160608201356401000000008111156100ab57600080fd5b8201836020820111156100bd57600080fd5b803590602001918460208302840111640100000000831117156100df57600080fd5b509092509050610168565b005b6100f4610460565b60408051918252519081900360200190f35b6101236004803603602081101561011c57600080fd5b5035610484565b604080519115158252519081900360200190f35b61013f6104aa565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b61017185610484565b156101c7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061059f6028913960400191505060405180910390fd5b6040805160208082018890527fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606088901b168284015260548083018790528351808403909101815260748301808552815191830191909120609492860280850184019095528582529361027d939192879287928392909101908490808284376000920191909152507fbaa75409fd78b9b6a76f5579860286ba35adbfde69ebf84c72bf3d6044e8df6a92508591506104ce9050565b6102d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806105c76021913960400191505060405180910390fd5b6102db86610577565b7f000000000000000000000000111111111117dc0aa78b770fa6a738034120c30273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561038257600080fd5b505af1158015610396573d6000803e3d6000fd5b505050506040513d60208110156103ac57600080fd5b5051610403576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806105e86023913960400191505060405180910390fd5b6040805187815273ffffffffffffffffffffffffffffffffffffffff8716602082015280820186905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1505050505050565b7fbaa75409fd78b9b6a76f5579860286ba35adbfde69ebf84c72bf3d6044e8df6a81565b6101008104600090815260208190526040902054600160ff9092169190911b9081161490565b7f000000000000000000000000111111111117dc0aa78b770fa6a738034120c30281565b600081815b855181101561056c5760008682815181106104ea57fe5b602002602001015190508083116105315782816040516020018083815260200182815260200192505050604051602081830303815290604052805190602001209250610563565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b506001016104d3565b509092149392505050565b610100810460009081526020819052604090208054600160ff9093169290921b909117905556fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642ea26469706673582212203e9db67ca344e30da5e4d554f404584bc6529fcdb0a1b55be52601d19d00ed9c64736f6c634300060b0033

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

000000000000000000000000111111111117dc0aa78b770fa6a738034120c302baa75409fd78b9b6a76f5579860286ba35adbfde69ebf84c72bf3d6044e8df6a

-----Decoded View---------------
Arg [0] : token_ (address): 0x111111111117dC0aa78b770fA6A738034120C302
Arg [1] : merkleRoot_ (bytes32): 0xbaa75409fd78b9b6a76f5579860286ba35adbfde69ebf84c72bf3d6044e8df6a

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000111111111117dc0aa78b770fa6a738034120c302
Arg [1] : baa75409fd78b9b6a76f5579860286ba35adbfde69ebf84c72bf3d6044e8df6a


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.