Merkle Tree Airdrop Smart Contract Module in Bunzz

The MerkleTreeAirdrop contract module acts as Airdrop for ERC20. It only sends out tokens on data verification, i.e., Merkle proof and appropriate arguments used to build the Merkle tree for that user. The contract requires a list of wallet addresses and root hash, which are the leaves and Merkle proofs needed to verify that a given data exists for that address in the tree.

You can access this Module and the code here.

How to use

  1. Prepare an ERC20 token as an airdrop token. You can use an existing token or deploy a new ERC20 token on the DApp’s page.
  2. Prepare the whitelist and their drop amount, generate the Merkle tree, and output to the JSON file. Check the JSON file format below. It contains the Merkle root, the total token amount for airdrop, individual token amounts, and a list of Merkle proofs.
  3. Deploy MerkleTreeAirdrop contract with Merkle root.
  4. Transfer drop assets to this contract.
  5. Beneficiaries can claim their drop tokens by claim function.
  6. Only verified users can claim.
  "merkleRoot": "0x73e9ab882da5e26fbfb0323ad8c171fa34847aedf17518960144a3d7712b8fb0",
  "tokenTotal": "12000000",
  "claims": {
    "0x15d34AAf54267DB7D7c367839AAf71A00a2C6A65": {
      "index": 0,
      "amount": "5000000",
      "proof": [
    "0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC": {
      "index": 1,
      "amount": "1000000",
      "proof": [



  • connectToOtherContracts
  • renounceOwnership
  • claim
  • transferOwnership


  • isClaimed
  • merkleRoot
  • owner
  • token
Share this article: