ETH Price: $2,619.31 (+6.07%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim121593112021-04-02 9:40:071314 days ago1617356407IN
0x7daFEB1c...46506DCa1
0 ETH0.01032796155
Claim121116872021-03-26 1:38:121321 days ago1616722692IN
0x7daFEB1c...46506DCa1
0 ETH0.0088575125
Claim120636982021-03-18 16:18:221328 days ago1616084302IN
0x7daFEB1c...46506DCa1
0 ETH0.01870387264
Claim120386662021-03-14 19:47:271332 days ago1615751247IN
0x7daFEB1c...46506DCa1
0 ETH0.00999126141
Claim120359252021-03-14 9:36:471333 days ago1615714607IN
0x7daFEB1c...46506DCa1
0 ETH0.00828945117
Claim120358502021-03-14 9:19:051333 days ago1615713545IN
0x7daFEB1c...46506DCa1
0 ETH0.00825834118
Claim120314722021-03-13 17:00:461333 days ago1615654846IN
0x7daFEB1c...46506DCa1
0 ETH0.01204416170
Claim120255992021-03-12 19:33:451334 days ago1615577625IN
0x7daFEB1c...46506DCa1
0 ETH0.01321013191
Claim120074182021-03-10 0:03:221337 days ago1615334602IN
0x7daFEB1c...46506DCa1
0 ETH0.00980392140
Claim119795382021-03-05 16:56:371341 days ago1614963397IN
0x7daFEB1c...46506DCa1
0 ETH0.01012023142.8
Claim119680922021-03-03 22:50:111343 days ago1614811811IN
0x7daFEB1c...46506DCa1
0 ETH0.0069190897.65
Claim119639872021-03-03 7:41:441344 days ago1614757304IN
0x7daFEB1c...46506DCa1
0 ETH0.0066515295
Claim119607772021-03-02 19:38:311344 days ago1614713911IN
0x7daFEB1c...46506DCa1
0 ETH0.00850056120
Claim119592772021-03-02 14:12:551345 days ago1614694375IN
0x7daFEB1c...46506DCa1
0 ETH0.00757945107
Claim119585902021-03-02 11:37:171345 days ago1614685037IN
0x7daFEB1c...46506DCa1
0 ETH0.0049362670.50000072
Claim119568912021-03-02 5:23:471345 days ago1614662627IN
0x7daFEB1c...46506DCa1
0 ETH0.00722527102
Claim119549352021-03-01 22:04:401345 days ago1614636280IN
0x7daFEB1c...46506DCa1
0 ETH0.0070008100
Claim119546752021-03-01 21:08:301345 days ago1614632910IN
0x7daFEB1c...46506DCa1
0 ETH0.00839712120
Claim119475532021-02-28 18:53:531346 days ago1614538433IN
0x7daFEB1c...46506DCa1
0 ETH0.0050997672
Claim119451862021-02-28 10:12:441347 days ago1614507164IN
0x7daFEB1c...46506DCa1
0 ETH0.0065170992
Claim119331992021-02-26 13:46:151349 days ago1614347175IN
0x7daFEB1c...46506DCa1
0 ETH0.00750988106
Claim119331442021-02-26 13:31:441349 days ago1614346304IN
0x7daFEB1c...46506DCa1
0 ETH0.00786279111
Claim119331352021-02-26 13:29:161349 days ago1614346156IN
0x7daFEB1c...46506DCa1
0 ETH0.00786412111
Claim119281822021-02-25 19:19:131349 days ago1614280753IN
0x7daFEB1c...46506DCa1
0 ETH0.01112313157
Claim119274972021-02-25 16:48:561349 days ago1614271736IN
0x7daFEB1c...46506DCa1
0 ETH0.01218792172
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.12+commit.27d51765

Optimization Enabled:
No with 200 runs

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

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

/// @dev Interface of the ERC20 standard with only the funcions we need
interface I_ERC20 {
    function transfer(address recipient, uint256 amount) external returns (bool);
}

/// @dev Allows anyone to claim a token if they exist in a merkle root.
interface I_MerkleDistributor {

    /// @dev Returns the address of the token distributed by this contract.
    function token() external view returns (address);

    /// @dev Returns the merkle root of the merkle tree containing account balances available to claim.
    function merkleRoot() external view returns (bytes32);

    /// @dev Returns true if the index has been marked claimed.
    function isClaimed(uint256 index) external view returns (bool);

    /// @dev 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;

    /// @dev This event is triggered whenever a call to #claim succeeds.
    event Claimed(uint256 index, address account, uint256 amount);
}

contract MerkleDistributor is I_MerkleDistributor {
    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(msg.sender == account, 'claim: Only account may withdraw'); // self-request only
        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.');

        require(I_ERC20(token).transfer(account, amount), 'MerkleDistributor: Transfer failed.');

        // Mark it claimed and send the token.
        _setClaimed(index);
        
        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"}]

60c060405234801561001057600080fd5b5060405161083b38038061083b8339818101604052604081101561003357600080fd5b8101908080519060200190929190805190602001909291905050508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508060a08181525050505060805160601c60a05161077c6100bf6000398061032f528061053a5250806103ab52806105af525061077c6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e7ba6ef146100515780632eb4a7ab146100fe5780639e34070f1461011c578063fc0c546a14610160575b600080fd5b6100fc6004803603608081101561006757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460208302840111640100000000831117156100ec57600080fd5b9091929391929390505050610194565b005b610106610538565b6040518082815260200191505060405180910390f35b6101486004803603602081101561013257600080fd5b810190808035906020019092919050505061055c565b60405180821515815260200191505060405180910390f35b6101686105ad565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610235576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f636c61696d3a204f6e6c79206163636f756e74206d617920776974686472617781525060200191505060405180910390fd5b61023e8561055c565b15610294576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806106db6028913960400191505060405180910390fd5b6000858585604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1660601b81526014018281526020019350505050604051602081830303815290604052805190602001209050610354838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050507f0000000000000000000000000000000000000000000000000000000000000000836105d1565b6103a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806107036021913960400191505060405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561043a57600080fd5b505af115801561044e573d6000803e3d6000fd5b505050506040513d602081101561046457600080fd5b81019080805190602001909291905050506104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806107246023913960400191505060405180910390fd5b6104d386610686565b7f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed026868686604051808481526020018373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a1505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b600080610100838161056a57fe5b0490506000610100848161057a57fe5b06905060008060008481526020019081526020016000205490506000826001901b90508081831614945050505050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008082905060005b85518110156106785760008682815181106105f157fe5b60200260200101519050808311610638578281604051602001808381526020018281526020019250505060405160208183030381529060405280519060200120925061066a565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b5080806001019150506105da565b508381149150509392505050565b6000610100828161069357fe5b049050600061010083816106a357fe5b069050806001901b60008084815260200190815260200160002054176000808481526020019081526020016000208190555050505056fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642ea2646970667358221220cce9202b1982dc1e5be36a5bab9b713cd4d33605509198e61f34b0f123f3d23364736f6c634300060c0033000000000000000000000000f157b7ba35089c9b0f02c24bbe1e03855dbe5c1f2490acba7a30fda9317f6f7f837f39d52d6624ff189a9a24094ada49527ecc89

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e7ba6ef146100515780632eb4a7ab146100fe5780639e34070f1461011c578063fc0c546a14610160575b600080fd5b6100fc6004803603608081101561006757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460208302840111640100000000831117156100ec57600080fd5b9091929391929390505050610194565b005b610106610538565b6040518082815260200191505060405180910390f35b6101486004803603602081101561013257600080fd5b810190808035906020019092919050505061055c565b60405180821515815260200191505060405180910390f35b6101686105ad565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610235576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f636c61696d3a204f6e6c79206163636f756e74206d617920776974686472617781525060200191505060405180910390fd5b61023e8561055c565b15610294576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806106db6028913960400191505060405180910390fd5b6000858585604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1660601b81526014018281526020019350505050604051602081830303815290604052805190602001209050610354838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050507f2490acba7a30fda9317f6f7f837f39d52d6624ff189a9a24094ada49527ecc89836105d1565b6103a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806107036021913960400191505060405180910390fd5b7f000000000000000000000000f157b7ba35089c9b0f02c24bbe1e03855dbe5c1f73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561043a57600080fd5b505af115801561044e573d6000803e3d6000fd5b505050506040513d602081101561046457600080fd5b81019080805190602001909291905050506104ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806107246023913960400191505060405180910390fd5b6104d386610686565b7f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed026868686604051808481526020018373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a1505050505050565b7f2490acba7a30fda9317f6f7f837f39d52d6624ff189a9a24094ada49527ecc8981565b600080610100838161056a57fe5b0490506000610100848161057a57fe5b06905060008060008481526020019081526020016000205490506000826001901b90508081831614945050505050919050565b7f000000000000000000000000f157b7ba35089c9b0f02c24bbe1e03855dbe5c1f81565b60008082905060005b85518110156106785760008682815181106105f157fe5b60200260200101519050808311610638578281604051602001808381526020018281526020019250505060405160208183030381529060405280519060200120925061066a565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b5080806001019150506105da565b508381149150509392505050565b6000610100828161069357fe5b049050600061010083816106a357fe5b069050806001901b60008084815260200190815260200160002054176000808481526020019081526020016000208190555050505056fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642ea2646970667358221220cce9202b1982dc1e5be36a5bab9b713cd4d33605509198e61f34b0f123f3d23364736f6c634300060c0033

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

000000000000000000000000f157b7ba35089c9b0f02c24bbe1e03855dbe5c1f2490acba7a30fda9317f6f7f837f39d52d6624ff189a9a24094ada49527ecc89

-----Decoded View---------------
Arg [0] : _token (address): 0xF157b7Ba35089c9b0F02C24BBE1E03855dBE5c1F
Arg [1] : _merkleRoot (bytes32): 0x2490acba7a30fda9317f6f7f837f39d52d6624ff189a9a24094ada49527ecc89

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000f157b7ba35089c9b0f02c24bbe1e03855dbe5c1f
Arg [1] : 2490acba7a30fda9317f6f7f837f39d52d6624ff189a9a24094ada49527ecc89


Deployed Bytecode Sourcemap

2403:1749:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3390:759;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;2506:44;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2793:331;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;2460:39;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;3390:759;3536:7;3522:21;;:10;:21;;;3514:66;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3621:16;3631:5;3621:9;:16::i;:::-;3620:17;3612:70;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3732:12;3774:5;3781:7;3790:6;3757:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3747:51;;;;;;3732:66;;3817:49;3836:11;;3817:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3849:10;3861:4;3817:18;:49::i;:::-;3809:95;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3933:5;3925:23;;;3949:7;3958:6;3925:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3917:88;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4066:18;4078:5;4066:11;:18::i;:::-;4110:31;4118:5;4125:7;4134:6;4110:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3390:759;;;;;;:::o;2506:44::-;;;:::o;2793:331::-;2857:4;2874:24;2909:3;2901:5;:11;;;;;;2874:38;;2923:23;2957:3;2949:5;:11;;;;;;2923:37;;2971:19;2993:13;:31;3007:16;2993:31;;;;;;;;;;;;2971:53;;3035:12;3056:15;3051:1;:20;;3035:37;;3112:4;3104;3090:11;:18;:26;3083:33;;;;;;2793:331;;;:::o;2460:39::-;;;:::o;507:796::-;598:4;615:20;638:4;615:27;;660:9;655:525;679:5;:12;675:1;:16;655:525;;;713:20;736:5;742:1;736:8;;;;;;;;;;;;;;713:31;;781:12;765;:28;761:408;;935:12;949;918:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;908:55;;;;;;893:70;;761:408;;;1125:12;1139;1108:44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1098:55;;;;;;1083:70;;761:408;655:525;693:3;;;;;;;655:525;;;;1291:4;1275:12;:20;1268:27;;;507:796;;;;;:::o;3132:250::-;3187:24;3222:3;3214:5;:11;;;;;;3187:38;;3236:23;3270:3;3262:5;:11;;;;;;3236:37;;3358:15;3353:1;:20;;3318:13;:31;3332:16;3318:31;;;;;;;;;;;;:56;3284:13;:31;3298:16;3284:31;;;;;;;;;;;:90;;;;3132:250;;;:::o

Swarm Source

ipfs://cce9202b1982dc1e5be36a5bab9b713cd4d33605509198e61f34b0f123f3d233

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.