ETH Price: $3,298.50 (+1.06%)

Contract

0x20E3D49241A9658C36Df595437160a6F6Dc01bDe
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Claim182224492023-09-26 20:52:23482 days ago1695761543IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0009116112.46863468
Claim179186612023-08-15 7:09:59524 days ago1692083399IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0011673515.97294603
Claim163177782023-01-02 8:04:47749 days ago1672646687IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0011325715.49757551
Claim162968542022-12-30 10:01:11752 days ago1672394471IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0010764714.72583284
Claim162531212022-12-24 7:32:35758 days ago1671867155IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0008870112.13505572
Claim162032492022-12-17 8:33:35765 days ago1671266015IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0010471514.32671974
Claim160413992022-11-24 17:41:59788 days ago1669311719IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.001013313.86323989
Claim155942262022-09-23 6:22:23850 days ago1663914143IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.000471656.45604406
Claim154722552022-09-04 14:56:40869 days ago1662303400IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0009659713.22404816
Claim154529622022-09-01 12:45:01872 days ago1662036301IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0012131216.60159516
Claim154342482022-08-29 13:07:07875 days ago1661778427IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0013854418.96337991
Claim154095492022-08-25 14:12:58879 days ago1661436778IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0016843223.06438909
Claim153974422022-08-23 15:32:18881 days ago1661268738IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0017535724.00153148
Claim153720312022-08-19 15:17:14885 days ago1660922234IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0013728218.78504408
Claim153147402022-08-10 13:57:30894 days ago1660139850IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0023008231.50558805
Claim152763692022-08-04 14:18:17900 days ago1659622697IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0010421414.25626476
Claim152499972022-07-31 11:36:14904 days ago1659267374IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.000590638.08552909
Claim152114922022-07-25 11:49:30910 days ago1658749770IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0011181515.30443316
Claim151712602022-07-19 5:48:09916 days ago1658209689IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0012383716.9526798
Claim150812192022-07-05 7:46:44930 days ago1657007204IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0013475718.43651047
Claim146928872022-05-01 15:54:29995 days ago1651420469IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0030837142.22583681
Claim146915952022-05-01 11:06:04995 days ago1651403164IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0027732737.94698482
Claim146355412022-04-22 15:38:431004 days ago1650641923IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0036789350.35425857
Claim146285212022-04-21 13:19:361005 days ago1650547176IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0028309338.72526277
Claim145656832022-04-11 17:20:531015 days ago1649697653IN
Dopex: rDPX Aidrop Merkle Distributor
0 ETH0.0046542563.67753971
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.7.6+commit.7338295f

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : MerkleDistributor.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity =0.7.6;

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_) {
    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 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.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 3 of 4 : MerkleProof.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.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 : 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);
}

Settings
{
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

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

60c060405234801561001057600080fd5b5060405161079a38038061079a8339818101604052604081101561003357600080fd5b8101908080519060200190929190805190602001909291905050508173ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b815250508060a08181525050505060805160601c60a0516106db6100bf6000398061028e5280610499525080610313528061050e52506106db6000f3fe608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e7ba6ef146100515780632eb4a7ab146100fe5780639e34070f1461011c578063fc0c546a14610160575b600080fd5b6100fc6004803603608081101561006757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460208302840111640100000000831117156100ec57600080fd5b9091929391929390505050610194565b005b610106610497565b6040518082815260200191505060405180910390f35b6101486004803603602081101561013257600080fd5b81019080803590602001909291905050506104bb565b60405180821515815260200191505060405180910390f35b61016861050c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61019d856104bb565b156101f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061063a6028913960400191505060405180910390fd5b6000858585604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1660601b815260140182815260200193505050506040516020818303038152906040528051906020012090506102b3838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050507f000000000000000000000000000000000000000000000000000000000000000083610530565b610308576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806106626021913960400191505060405180910390fd5b610311866105e5565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156103a257600080fd5b505af11580156103b6573d6000803e3d6000fd5b505050506040513d60208110156103cc57600080fd5b8101908080519060200190929190505050610432576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806106836023913960400191505060405180910390fd5b7f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed026868686604051808481526020018373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a1505050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008061010083816104c957fe5b049050600061010084816104d957fe5b06905060008060008481526020019081526020016000205490506000826001901b90508081831614945050505050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60008082905060005b85518110156105d757600086828151811061055057fe5b6020026020010151905080831161059757828160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092506105c9565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b508080600101915050610539565b508381149150509392505050565b600061010082816105f257fe5b0490506000610100838161060257fe5b069050806001901b60008084815260200190815260200160002054176000808481526020019081526020016000208190555050505056fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642ea2646970667358221220d91f3daca131f3eff6f04f82f2a577d91c4e35e1ad3d03e8a7c174c20a6b3a0264736f6c634300070600330000000000000000000000000ff5a8451a839f5f0bb3562689d9a44089738d11f20809bab9f4822035f095e8a52c36010dde56e5d81691e9833c2d63e7f8e85d

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80632e7ba6ef146100515780632eb4a7ab146100fe5780639e34070f1461011c578063fc0c546a14610160575b600080fd5b6100fc6004803603608081101561006757600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460208302840111640100000000831117156100ec57600080fd5b9091929391929390505050610194565b005b610106610497565b6040518082815260200191505060405180910390f35b6101486004803603602081101561013257600080fd5b81019080803590602001909291905050506104bb565b60405180821515815260200191505060405180910390f35b61016861050c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61019d856104bb565b156101f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061063a6028913960400191505060405180910390fd5b6000858585604051602001808481526020018373ffffffffffffffffffffffffffffffffffffffff1660601b815260140182815260200193505050506040516020818303038152906040528051906020012090506102b3838380806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050507ff20809bab9f4822035f095e8a52c36010dde56e5d81691e9833c2d63e7f8e85d83610530565b610308576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806106626021913960400191505060405180910390fd5b610311866105e5565b7f0000000000000000000000000ff5a8451a839f5f0bb3562689d9a44089738d1173ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86866040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156103a257600080fd5b505af11580156103b6573d6000803e3d6000fd5b505050506040513d60208110156103cc57600080fd5b8101908080519060200190929190505050610432576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806106836023913960400191505060405180910390fd5b7f4ec90e965519d92681267467f775ada5bd214aa92c0dc93d90a5e880ce9ed026868686604051808481526020018373ffffffffffffffffffffffffffffffffffffffff168152602001828152602001935050505060405180910390a1505050505050565b7ff20809bab9f4822035f095e8a52c36010dde56e5d81691e9833c2d63e7f8e85d81565b60008061010083816104c957fe5b049050600061010084816104d957fe5b06905060008060008481526020019081526020016000205490506000826001901b90508081831614945050505050919050565b7f0000000000000000000000000ff5a8451a839f5f0bb3562689d9a44089738d1181565b60008082905060005b85518110156105d757600086828151811061055057fe5b6020026020010151905080831161059757828160405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092506105c9565b808360405160200180838152602001828152602001925050506040516020818303038152906040528051906020012092505b508080600101915050610539565b508381149150509392505050565b600061010082816105f257fe5b0490506000610100838161060257fe5b069050806001901b60008084815260200190815260200160002054176000808481526020019081526020016000208190555050505056fe4d65726b6c654469737472696275746f723a2044726f7020616c726561647920636c61696d65642e4d65726b6c654469737472696275746f723a20496e76616c69642070726f6f662e4d65726b6c654469737472696275746f723a205472616e73666572206661696c65642ea2646970667358221220d91f3daca131f3eff6f04f82f2a577d91c4e35e1ad3d03e8a7c174c20a6b3a0264736f6c63430007060033

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

0000000000000000000000000ff5a8451a839f5f0bb3562689d9a44089738d11f20809bab9f4822035f095e8a52c36010dde56e5d81691e9833c2d63e7f8e85d

-----Decoded View---------------
Arg [0] : token_ (address): 0x0ff5A8451A839f5F0BB3562689D9A44089738D11
Arg [1] : merkleRoot_ (bytes32): 0xf20809bab9f4822035f095e8a52c36010dde56e5d81691e9833c2d63e7f8e85d

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000ff5a8451a839f5f0bb3562689d9a44089738d11
Arg [1] : f20809bab9f4822035f095e8a52c36010dde56e5d81691e9833c2d63e7f8e85d


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.