ETH Price: $2,385.47 (+1.87%)

Contract

0xDD111F0fc07F4D89ED6ff96DBAB19a61450b8435
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim198305312024-05-09 5:55:23124 days ago1715234123IN
Index Protocol: Early Community Rewards
0 ETH0.000331394.42210178
Claim190702162024-01-23 15:19:11231 days ago1706023151IN
Index Protocol: Early Community Rewards
0 ETH0.0016371427.14953364
Claim189356612024-01-04 18:10:47250 days ago1704391847IN
Index Protocol: Early Community Rewards
0 ETH0.0021058627.21846063
Claim188814862023-12-28 3:37:47257 days ago1703734667IN
Index Protocol: Early Community Rewards
0 ETH0.0015991520.65799937
Claim175923222023-06-30 13:14:59438 days ago1688130899IN
Index Protocol: Early Community Rewards
0 ETH0.0028367236.66204645
Claim171205442023-04-25 3:15:59504 days ago1682392559IN
Index Protocol: Early Community Rewards
0 ETH0.0025274232.65283227
Claim169937122023-04-07 2:36:23522 days ago1680834983IN
Index Protocol: Early Community Rewards
0 ETH0.0021663828
Claim169917992023-04-06 20:05:35523 days ago1680811535IN
Index Protocol: Early Community Rewards
0 ETH0.0031635940.88012815
Claim163192792023-01-02 13:06:47617 days ago1672664807IN
Index Protocol: Early Community Rewards
0 ETH0.0011986916.00547393
Claim161185682022-12-05 12:20:47645 days ago1670242847IN
Index Protocol: Early Community Rewards
0 ETH0.0010723313.86211392
Claim154092282022-08-25 13:01:21747 days ago1661432481IN
Index Protocol: Early Community Rewards
0 ETH0.000971612.55454407
Claim147153802022-05-05 5:19:33859 days ago1651727973IN
Index Protocol: Early Community Rewards
0 ETH0.0031418240.58631081
Claim145919332022-04-15 19:49:05879 days ago1650052145IN
Index Protocol: Early Community Rewards
0 ETH0.0069346389.59134857
Claim139741402022-01-09 22:56:08974 days ago1641768968IN
Index Protocol: Early Community Rewards
0 ETH0.00958093123.76715614
Claim139671582022-01-08 21:16:13975 days ago1641676573IN
Index Protocol: Early Community Rewards
0 ETH0.01358409175.60264529
Claim139591952022-01-07 15:47:59977 days ago1641570479IN
Index Protocol: Early Community Rewards
0 ETH0.01349367174.26710328
Claim139291932022-01-03 0:05:39981 days ago1641168339IN
Index Protocol: Early Community Rewards
0 ETH0.00849853113.45448109
Claim138808962021-12-26 12:44:13989 days ago1640522653IN
Index Protocol: Early Community Rewards
0 ETH0.0025669733.16039711
Claim138792542021-12-26 6:42:36989 days ago1640500956IN
Index Protocol: Early Community Rewards
0 ETH0.0034717846.34793042
Claim138357932021-12-19 13:11:42996 days ago1639919502IN
Index Protocol: Early Community Rewards
0 ETH0.0028257536.51362204
Claim138174432021-12-16 17:09:22999 days ago1639674562IN
Index Protocol: Early Community Rewards
0 ETH0.01183307157.92802372
Claim138148652021-12-16 7:34:31999 days ago1639640071IN
Index Protocol: Early Community Rewards
0 ETH0.0038645849.90744953
Claim138109982021-12-15 17:13:351000 days ago1639588415IN
Index Protocol: Early Community Rewards
0 ETH0.01099345141.98849763
Claim137632432021-12-08 6:22:061007 days ago1638944526IN
Index Protocol: Early Community Rewards
0 ETH0.0055467571.65144849
Claim137155752021-11-30 15:33:361015 days ago1638286416IN
Index Protocol: Early Community Rewards
0 ETH0.007964102.89284844
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.10+commit.00c0fcaf

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license
/**
 *Submitted for verification at Etherscan.io on 2020-10-06
*/

// Dependency file: contracts/interfaces/IMerkleDistributor.sol



// pragma solidity ^0.6.10;

// 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);
}
// Dependency file: @openzeppelin/contracts/cryptography/MerkleProof.sol



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

// Dependency file: @openzeppelin/contracts/token/ERC20/IERC20.sol



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


pragma solidity ^0.6.10;

// import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
// import { MerkleProof } from "@openzeppelin/contracts/cryptography/MerkleProof.sol";
// import { IMerkleDistributor } from "../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);
    }
}

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

60c060405234801561001057600080fd5b506040516106173803806106178339818101604052604081101561003357600080fd5b508051602090910151606082901b6001600160601b03191660805260a08190526001600160a01b03909116906105916100866000398061020b52806103b352508061027c52806103fd52506105916000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e7ba6ef146100515780632eb4a7ab146100df5780639e34070f146100f9578063fc0c546a1461012a575b600080fd5b6100dd6004803603608081101561006757600080fd5b8135916001600160a01b03602082013516916040820135919081019060808101606082013564010000000081111561009e57600080fd5b8201836020820111156100b057600080fd5b803590602001918460208302840111640100000000831117156100d257600080fd5b50909250905061014e565b005b6100e76103b1565b60408051918252519081900360200190f35b6101166004803603602081101561010f57600080fd5b50356103d5565b604080519115158252519081900360200190f35b6101326103fb565b604080516001600160a01b039092168252519081900360200190f35b610157856103d5565b156101935760405162461bcd60e51b81526004018080602001828103825260288152602001806104f06028913960400191505060405180910390fd5b6040805160208082018890526bffffffffffffffffffffffff19606088901b1682840152605480830187905283518084039091018152607483018085528151918301919091206094928602808501840190955285825293610236939192879287928392909101908490808284376000920191909152507f0000000000000000000000000000000000000000000000000000000000000000925085915061041f9050565b6102715760405162461bcd60e51b81526004018080602001828103825260218152602001806105186021913960400191505060405180910390fd5b61027a866104c8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb86866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156102fa57600080fd5b505af115801561030e573d6000803e3d6000fd5b505050506040513d602081101561032457600080fd5b50516103615760405162461bcd60e51b81526004018080602001828103825260238152602001806105396023913960400191505060405180910390fd5b604080518781526001600160a01b038716602082015280820186905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6101008104600090815260208190526040902054600160ff9092169190911b9081161490565b7f000000000000000000000000000000000000000000000000000000000000000081565b600081815b85518110156104bd57600086828151811061043b57fe5b6020026020010151905080831161048257828160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092506104b4565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b50600101610424565b509092149392505050565b610100810460009081526020819052604090208054600160ff9093169290921b909117905556fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642ea26469706673582212206435ab0784c767a848d5273cdea01f0c3f168db5ae601706dd2f3f077d2a521864736f6c634300060a00330000000000000000000000000954906da0bf32d5479e25f46056d22f08464cab0f2cabbe50fc2d5d46f34ead7924313782cfc6c19a6ae31aa5883628a523f5db

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e7ba6ef146100515780632eb4a7ab146100df5780639e34070f146100f9578063fc0c546a1461012a575b600080fd5b6100dd6004803603608081101561006757600080fd5b8135916001600160a01b03602082013516916040820135919081019060808101606082013564010000000081111561009e57600080fd5b8201836020820111156100b057600080fd5b803590602001918460208302840111640100000000831117156100d257600080fd5b50909250905061014e565b005b6100e76103b1565b60408051918252519081900360200190f35b6101166004803603602081101561010f57600080fd5b50356103d5565b604080519115158252519081900360200190f35b6101326103fb565b604080516001600160a01b039092168252519081900360200190f35b610157856103d5565b156101935760405162461bcd60e51b81526004018080602001828103825260288152602001806104f06028913960400191505060405180910390fd5b6040805160208082018890526bffffffffffffffffffffffff19606088901b1682840152605480830187905283518084039091018152607483018085528151918301919091206094928602808501840190955285825293610236939192879287928392909101908490808284376000920191909152507f0f2cabbe50fc2d5d46f34ead7924313782cfc6c19a6ae31aa5883628a523f5db925085915061041f9050565b6102715760405162461bcd60e51b81526004018080602001828103825260218152602001806105186021913960400191505060405180910390fd5b61027a866104c8565b7f0000000000000000000000000954906da0bf32d5479e25f46056d22f08464cab6001600160a01b031663a9059cbb86866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156102fa57600080fd5b505af115801561030e573d6000803e3d6000fd5b505050506040513d602081101561032457600080fd5b50516103615760405162461bcd60e51b81526004018080602001828103825260238152602001806105396023913960400191505060405180910390fd5b604080518781526001600160a01b038716602082015280820186905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1505050505050565b7f0f2cabbe50fc2d5d46f34ead7924313782cfc6c19a6ae31aa5883628a523f5db81565b6101008104600090815260208190526040902054600160ff9092169190911b9081161490565b7f0000000000000000000000000954906da0bf32d5479e25f46056d22f08464cab81565b600081815b85518110156104bd57600086828151811061043b57fe5b6020026020010151905080831161048257828160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092506104b4565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b50600101610424565b509092149392505050565b610100810460009081526020819052604090208054600160ff9093169290921b909117905556fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642ea26469706673582212206435ab0784c767a848d5273cdea01f0c3f168db5ae601706dd2f3f077d2a521864736f6c634300060a0033

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

0000000000000000000000000954906da0bf32d5479e25f46056d22f08464cab0f2cabbe50fc2d5d46f34ead7924313782cfc6c19a6ae31aa5883628a523f5db

-----Decoded View---------------
Arg [0] : token_ (address): 0x0954906da0Bf32d5479e25f46056d22f08464cab
Arg [1] : merkleRoot_ (bytes32): 0x0f2cabbe50fc2d5d46f34ead7924313782cfc6c19a6ae31aa5883628a523f5db

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000954906da0bf32d5479e25f46056d22f08464cab
Arg [1] : 0f2cabbe50fc2d5d46f34ead7924313782cfc6c19a6ae31aa5883628a523f5db


Deployed Bytecode Sourcemap

5424:1639:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6410:650;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6410:650:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6410:650:0;;-1:-1:-1;6410:650:0;-1:-1:-1;6410:650:0;:::i;:::-;;5526:44;;;:::i;:::-;;;;;;;;;;;;;;;;5813:331;;;;;;;;;;;;;;;;-1:-1:-1;5813:331:0;;:::i;:::-;;;;;;;;;;;;;;;;;;5480:39;;;:::i;:::-;;;;-1:-1:-1;;;;;5480:39:0;;;;;;;;;;;;;;6410:650;6543:16;6553:5;6543:9;:16::i;:::-;6542:17;6534:70;;;;-1:-1:-1;;;6534:70:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6679:40;;;;;;;;;;-1:-1:-1;;6679:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6669:51;;;;;;;;;6739:49;;;;;;;;;;;;;;;6669:51;6739:49;;6679:40;;6758:11;;;;;;6739:49;;;;6758:11;;6739:49;6758:11;6739:49;;;;;;;;;-1:-1:-1;6771:10:0;;-1:-1:-1;6783:4:0;;-1:-1:-1;6739:18:0;;-1:-1:-1;6739:49:0:i;:::-;6731:95;;;;-1:-1:-1;;;6731:95:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6887:18;6899:5;6887:11;:18::i;:::-;6931:5;-1:-1:-1;;;;;6924:22:0;;6947:7;6956:6;6924:39;;;;;;;;;;;;;-1:-1:-1;;;;;6924:39:0;-1:-1:-1;;;;;6924:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6924:39:0;6916:87;;;;-1:-1:-1;;;6916:87:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7021:31;;;;;;-1:-1:-1;;;;;7021:31:0;;;;;;;;;;;;;;;;;;;;;;;6410:650;;;;;;:::o;5526:44::-;;;:::o;5813:331::-;5929:3;5921:11;;5877:4;6013:31;;;;;;;;;;;6071:1;5969:11;;;;6071:20;;;;6110:18;;;:26;;5813:331::o;5480:39::-;;;:::o;1525:796::-;1616:4;1656;1616;1673:525;1697:5;:12;1693:1;:16;1673:525;;;1731:20;1754:5;1760:1;1754:8;;;;;;;;;;;;;;1731:31;;1799:12;1783;:28;1779:408;;1953:12;1967;1936:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1926:55;;;;;;1911:70;;1779:408;;;2143:12;2157;2126:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2116:55;;;;;;2101:70;;1779:408;-1:-1:-1;1711:3:0;;1673:525;;;-1:-1:-1;2293:20:0;;;;1525:796;-1:-1:-1;;;1525:796:0:o;6152:250::-;6242:3;6234:11;;6207:24;6338:31;;;;;;;;;;;;6373:1;6282:11;;;;6373:20;;;;6338:56;;;6304:90;;6152:250::o

Swarm Source

ipfs://6435ab0784c767a848d5273cdea01f0c3f168db5ae601706dd2f3f077d2a5218

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.