Contracts
Claimdrop V2
Batch allocations + authorized wallets (allowlist) token distribution contract
Claimdrop Contract V2 distributes tokens to a list of addresses using batch uploaded allocations (rather than Merkle proofs), and introduces an authorized wallet (allowlist) model for admin actions.
Note
This page is adapted from the legacy GitBook source: _tmp_gitbook/mantra-smart-contracts/claimdrop_contract_v2.md.
Features
- Batch upload allocations (only before campaign starts)
- Lump sum and/or linear vesting distribution (both can be used simultaneously)
- One campaign per contract
- Owner-only campaign creation
- Anyone can top up campaign by sending funds (via
BankMsg) - Owner can close campaign at any time before it ends (refunds remaining tokens)
- Single claim entry per address
- Address replacement and removal in allocation registry
- Blacklist addresses (cannot claim)
- Authorized wallet management (allowlist)
- Partial claims supported
How it works
- Each contract hosts a single campaign.
- The owner (and authorized wallets) can perform admin actions like creating/closing campaigns, managing allocations, and blacklisting.
- The owner is the only actor that can manage the allowlist itself.
Instantiate (example)
{
"owner": "mantra1...",
"action": {
"create_campaign": {
"params": {
"name": "Airdrop",
"description": "This is an airdrop description.",
"type": "Campaign label",
"reward_denom": "amantra",
"total_reward": { "denom": "amantra", "amount": "888888000000000000000000" },
"distribution_type": [
{ "lump_sum": { "percentage": "0.25", "start_time": 1571797419 } },
{
"linear_vesting": {
"percentage": "0.75",
"start_time": 1572402219,
"end_time": 1573007019,
"cliff_duration": 86400
}
}
],
"start_time": 1571797419,
"end_time": 1573007019
}
}
}
}Tip
If you create a campaign during instantiation, the total_reward must be provided with the instantiation transaction.
ExecuteMsg (high-level)
ManageCampaign(create / close)ClaimAddAllocationsReplaceAddressRemoveAddressBlacklistAddressManageAuthorizedWalletsUpdateOwnership(cw_ownable)
Claim (example)
{
"claim": {
"receiver": "mantra1...",
"amount": "88888"
}
}AddAllocations (example)
{
"add_allocations": {
"allocations": [
["mantra1...", "100000"],
["mantra1...", "200000"]
]
}
}QueryMsg (high-level)
CampaignRewardsClaimedAllocationsIsBlacklistedIsAuthorizedAuthorizedWalletsOwnership(cw_ownable)
Deployments
See:
resources/contracts/mainnetresources/contracts/testnet