The Claimdrop Contract V1 distributes tokens to recipients using a Merkle tree (proof-based claims). The Merkle root is stored on the campaign and used to verify proofs submitted by recipients.
Features
Merkle-tree based distribution
Lump sum and/or linear vesting distribution (two distribution types can be used simultaneously)
Linear vesting may include an optional cliff
One campaign per contract
Campaign can be closed to retrieve unclaimed funds and restart with a new contract/campaign
Generating airdrop data
You can generate the merkle root and proofs using the JS scripts in the contract repository.
Prepare a CSV file (header required) with columns: contract_addr,address,amount.
Generate:
node merkle_root.js → generates the merkle root
node merkle_proof.js → generates the proofs
Only a single claim entry per address should exist in the CSV. If an address has multiple entries, consolidate them first.
How it works
Contract owner can create a campaign (optionally appointing a different campaign owner).
Campaign owner can top up a campaign before it ends.
Users claim by submitting a valid Merkle proof .
Contract owner or campaign owner can close a campaign, returning unclaimed funds to the campaign owner.
Instantiate
ExecuteMsg
ManageCampaign
Actions:
CreateCampaign : create a new campaign (contract owner only)
TopUpCampaign : add funds (campaign owner only)
CloseCampaign : close and refund remaining funds (contract owner or campaign owner)
CreateCampaign
The reward_asset must be sent with this transaction.
TopUpCampaign
Send the same denom as reward_asset. You can’t top up a closed campaign.
CloseCampaign
Claim
QueryMsg
Campaign
Rewards
Claimed