ETH Price: $3,581.10 (-2.81%)

Contract

0xdB46C277dA1599390eAb394327602889E9546296
 
Transaction Hash
Method
Block
From
To
Claim197976172024-05-04 15:24:47211 days ago1714836287IN
Lido: 1inch Liquidity Farming
0 ETH0.000950236.27513155
Claim197975972024-05-04 15:20:47211 days ago1714836047IN
Lido: 1inch Liquidity Farming
0 ETH0.001095687.23407826
Claim197975742024-05-04 15:16:11211 days ago1714835771IN
Lido: 1inch Liquidity Farming
0 ETH0.001036346.84255147
Claim148228962022-05-22 10:36:23925 days ago1653215783IN
Lido: 1inch Liquidity Farming
0 ETH0.001393399.2
Claim144924802022-03-31 7:03:47977 days ago1648710227IN
Lido: 1inch Liquidity Farming
0 ETH0.0063537541.9533833
Claim128842862021-07-23 18:41:001227 days ago1627065660IN
Lido: 1inch Liquidity Farming
0 ETH0.002120314
Claim128840182021-07-23 17:43:021227 days ago1627062182IN
Lido: 1inch Liquidity Farming
0 ETH0.0033316322
Claim127436872021-07-01 19:44:351249 days ago1625168675IN
Lido: 1inch Liquidity Farming
0 ETH0.0034824723
Claim127314692021-06-29 22:02:291251 days ago1625004149IN
Lido: 1inch Liquidity Farming
0 ETH0.004089227
Claim126260282021-06-13 12:03:321267 days ago1623585812IN
Lido: 1inch Liquidity Farming
0 ETH0.0015141810
Claim125963082021-06-08 21:29:471272 days ago1623187787IN
Lido: 1inch Liquidity Farming
0 ETH0.0030286420
Claim125704602021-06-04 21:30:141276 days ago1622842214IN
Lido: 1inch Liquidity Farming
0 ETH0.0034827923
Claim125193102021-05-27 23:32:261284 days ago1622158346IN
Lido: 1inch Liquidity Farming
0 ETH0.0048305531.9
Claim124343752021-05-14 19:20:521297 days ago1621020052IN
Lido: 1inch Liquidity Farming
0 ETH0.01741652115
Claim124040442021-05-10 2:57:061302 days ago1620615426IN
Lido: 1inch Liquidity Farming
0 ETH0.0148426898
Claim123956222021-05-08 19:40:441303 days ago1620502844IN
Lido: 1inch Liquidity Farming
0 ETH0.02210615146
Claim123880692021-05-07 15:54:561304 days ago1620402896IN
Lido: 1inch Liquidity Farming
0 ETH0.01605221106
Claim123873392021-05-07 13:13:081304 days ago1620393188IN
Lido: 1inch Liquidity Farming
0 ETH0.0089349659
Claim123822272021-05-06 18:00:571305 days ago1620324057IN
Lido: 1inch Liquidity Farming
0 ETH0.0083287655
Claim123728382021-05-05 7:15:541307 days ago1620198954IN
Lido: 1inch Liquidity Farming
0 ETH0.0048462732
Claim123609872021-05-03 11:32:191308 days ago1620041539IN
Lido: 1inch Liquidity Farming
0 ETH0.0039375926
Claim123538202021-05-02 8:56:261310 days ago1619945786IN
Lido: 1inch Liquidity Farming
0 ETH0.0039368126
Claim123474892021-05-01 9:36:311311 days ago1619861791IN
Lido: 1inch Liquidity Farming
0 ETH0.0049971233
Claim123378002021-04-29 21:22:121312 days ago1619731332IN
Lido: 1inch Liquidity Farming
0 ETH0.0071166447
Claim123250062021-04-27 21:53:501314 days ago1619560430IN
Lido: 1inch Liquidity Farming
0 ETH0.008481256
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, None license
/**
 *Submitted for verification at Etherscan.io on 2021-03-02
*/

// SPDX-License-Identifier: MIT AND UNLICENSED
// 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);
}

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

// File: contracts/interfaces/IMerkleDistributor.sol

// Copied from: https://github.com/Uniswap/merkle-distributor

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: contracts/MerkleDistributor.sol

// Copied from: https://github.com/Uniswap/merkle-distributor

pragma solidity =0.6.11;




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

60c060405234801561001057600080fd5b506040516106173803806106178339818101604052604081101561003357600080fd5b508051602090910151606082901b6001600160601b03191660805260a08190526001600160a01b03909116906105916100866000398061020b52806103b352508061027c52806103fd52506105916000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e7ba6ef146100515780632eb4a7ab146100df5780639e34070f146100f9578063fc0c546a1461012a575b600080fd5b6100dd6004803603608081101561006757600080fd5b8135916001600160a01b03602082013516916040820135919081019060808101606082013564010000000081111561009e57600080fd5b8201836020820111156100b057600080fd5b803590602001918460208302840111640100000000831117156100d257600080fd5b50909250905061014e565b005b6100e76103b1565b60408051918252519081900360200190f35b6101166004803603602081101561010f57600080fd5b50356103d5565b604080519115158252519081900360200190f35b6101326103fb565b604080516001600160a01b039092168252519081900360200190f35b610157856103d5565b156101935760405162461bcd60e51b81526004018080602001828103825260288152602001806104f06028913960400191505060405180910390fd5b6040805160208082018890526bffffffffffffffffffffffff19606088901b1682840152605480830187905283518084039091018152607483018085528151918301919091206094928602808501840190955285825293610236939192879287928392909101908490808284376000920191909152507f0000000000000000000000000000000000000000000000000000000000000000925085915061041f9050565b6102715760405162461bcd60e51b81526004018080602001828103825260218152602001806105186021913960400191505060405180910390fd5b61027a866104c8565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a9059cbb86866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156102fa57600080fd5b505af115801561030e573d6000803e3d6000fd5b505050506040513d602081101561032457600080fd5b50516103615760405162461bcd60e51b81526004018080602001828103825260238152602001806105396023913960400191505060405180910390fd5b604080518781526001600160a01b038716602082015280820186905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6101008104600090815260208190526040902054600160ff9092169190911b9081161490565b7f000000000000000000000000000000000000000000000000000000000000000081565b600081815b85518110156104bd57600086828151811061043b57fe5b6020026020010151905080831161048257828160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092506104b4565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b50600101610424565b509092149392505050565b610100810460009081526020819052604090208054600160ff9093169290921b909117905556fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642ea2646970667358221220abef3a763c82cf1e24c986a51b75f215a4e67f928504bd92768afe89e575c0c664736f6c634300060b00330000000000000000000000005a98fcbea516cf06857215779fd812ca3bef1b32834ce97d237b5a9bf519a7fd35d755b05a38a9c3b67164af0f05feb516d91fca

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e7ba6ef146100515780632eb4a7ab146100df5780639e34070f146100f9578063fc0c546a1461012a575b600080fd5b6100dd6004803603608081101561006757600080fd5b8135916001600160a01b03602082013516916040820135919081019060808101606082013564010000000081111561009e57600080fd5b8201836020820111156100b057600080fd5b803590602001918460208302840111640100000000831117156100d257600080fd5b50909250905061014e565b005b6100e76103b1565b60408051918252519081900360200190f35b6101166004803603602081101561010f57600080fd5b50356103d5565b604080519115158252519081900360200190f35b6101326103fb565b604080516001600160a01b039092168252519081900360200190f35b610157856103d5565b156101935760405162461bcd60e51b81526004018080602001828103825260288152602001806104f06028913960400191505060405180910390fd5b6040805160208082018890526bffffffffffffffffffffffff19606088901b1682840152605480830187905283518084039091018152607483018085528151918301919091206094928602808501840190955285825293610236939192879287928392909101908490808284376000920191909152507f834ce97d237b5a9bf519a7fd35d755b05a38a9c3b67164af0f05feb516d91fca925085915061041f9050565b6102715760405162461bcd60e51b81526004018080602001828103825260218152602001806105186021913960400191505060405180910390fd5b61027a866104c8565b7f0000000000000000000000005a98fcbea516cf06857215779fd812ca3bef1b326001600160a01b031663a9059cbb86866040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156102fa57600080fd5b505af115801561030e573d6000803e3d6000fd5b505050506040513d602081101561032457600080fd5b50516103615760405162461bcd60e51b81526004018080602001828103825260238152602001806105396023913960400191505060405180910390fd5b604080518781526001600160a01b038716602082015280820186905290517f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed0269181900360600190a1505050505050565b7f834ce97d237b5a9bf519a7fd35d755b05a38a9c3b67164af0f05feb516d91fca81565b6101008104600090815260208190526040902054600160ff9092169190911b9081161490565b7f0000000000000000000000005a98fcbea516cf06857215779fd812ca3bef1b3281565b600081815b85518110156104bd57600086828151811061043b57fe5b6020026020010151905080831161048257828160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092506104b4565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b50600101610424565b509092149392505050565b610100810460009081526020819052604090208054600160ff9093169290921b909117905556fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642ea2646970667358221220abef3a763c82cf1e24c986a51b75f215a4e67f928504bd92768afe89e575c0c664736f6c634300060b0033

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

0000000000000000000000005a98fcbea516cf06857215779fd812ca3bef1b32834ce97d237b5a9bf519a7fd35d755b05a38a9c3b67164af0f05feb516d91fca

-----Decoded View---------------
Arg [0] : token_ (address): 0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32
Arg [1] : merkleRoot_ (bytes32): 0x834ce97d237b5a9bf519a7fd35d755b05a38a9c3b67164af0f05feb516d91fca

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000005a98fcbea516cf06857215779fd812ca3bef1b32
Arg [1] : 834ce97d237b5a9bf519a7fd35d755b05a38a9c3b67164af0f05feb516d91fca


Deployed Bytecode Sourcemap

5353:1639:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6339:650;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6339:650:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6339:650:0;;-1:-1:-1;6339:650:0;-1:-1:-1;6339:650:0;:::i;:::-;;5455:44;;;:::i;:::-;;;;;;;;;;;;;;;;5742:331;;;;;;;;;;;;;;;;-1:-1:-1;5742:331:0;;:::i;:::-;;;;;;;;;;;;;;;;;;5409:39;;;:::i;:::-;;;;-1:-1:-1;;;;;5409:39:0;;;;;;;;;;;;;;6339:650;6472:16;6482:5;6472:9;:16::i;:::-;6471:17;6463:70;;;;-1:-1:-1;;;6463:70:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6608:40;;;;;;;;;;-1:-1:-1;;6608:40:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6598:51;;;;;;;;;6668:49;;;;;;;;;;;;;;;6598:51;6668:49;;6608:40;;6687:11;;;;;;6668:49;;;;6687:11;;6668:49;6687:11;6668:49;;;;;;;;;-1:-1:-1;6700:10:0;;-1:-1:-1;6712:4:0;;-1:-1:-1;6668:18:0;;-1:-1:-1;6668:49:0:i;:::-;6660:95;;;;-1:-1:-1;;;6660:95:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6816:18;6828:5;6816:11;:18::i;:::-;6860:5;-1:-1:-1;;;;;6853:22:0;;6876:7;6885:6;6853:39;;;;;;;;;;;;;-1:-1:-1;;;;;6853:39:0;-1:-1:-1;;;;;6853:39:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6853:39:0;6845:87;;;;-1:-1:-1;;;6845:87:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6950:31;;;;;;-1:-1:-1;;;;;6950:31:0;;;;;;;;;;;;;;;;;;;;;;;6339:650;;;;;;:::o;5455:44::-;;;:::o;5742:331::-;5858:3;5850:11;;5806:4;5942:31;;;;;;;;;;;6000:1;5898:11;;;;6000:20;;;;6039:18;;;:26;;5742:331::o;5409:39::-;;;:::o;3392:796::-;3483:4;3523;3483;3540:525;3564:5;:12;3560:1;:16;3540:525;;;3598:20;3621:5;3627:1;3621:8;;;;;;;;;;;;;;3598:31;;3666:12;3650;:28;3646:408;;3820:12;3834;3803:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3793:55;;;;;;3778:70;;3646:408;;;4010:12;4024;3993:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3983:55;;;;;;3968:70;;3646:408;-1:-1:-1;3578:3:0;;3540:525;;;-1:-1:-1;4160:20:0;;;;3392:796;-1:-1:-1;;;3392:796:0:o;6081:250::-;6171:3;6163:11;;6136:24;6267:31;;;;;;;;;;;;6302:1;6211:11;;;;6302:20;;;;6267:56;;;6233:90;;6081:250::o

Swarm Source

ipfs://abef3a763c82cf1e24c986a51b75f215a4e67f928504bd92768afe89e575c0c6

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.