A contract that lets approved users claim their airdropped tokens securely.
- Deposit tokens into a claimable balance with multiple claimants.
- Each claimant can claim their portion once.
- Supports multiple deposits and combines claimants.
- Only the admin can deposit.
To initialize and deploy the contract, use the Soroban CLI:
soroban contract deploy \
--wasm whitelist_claim.optimized.wasm \
--source $YOUR_WALLET \
--network $NETWORK \
-- \
--admin $ADMIN_KEY
Admin-only. Adds (appends) claimants and transfers tokens into the contract.
soroban contract invoke \
--id $CONTRACT_ID \
--source $YOUR_WALLET \
--network $NETWORK \
--fn deposit \
-- \
--from $ADMIN_ADDRESS \
--token $TOKEN_CONTRACT_ADDRESS \
--claimants "[{\"claimant\":\"$CLAIMANT1\",\"amount\":100}, {\"claimant\":\"$CLAIMANT2\",\"amount\":200}]"
Called by a claimant to receive their tokens. Is removed from the list afterwards.
soroban contract invoke \
--id $CONTRACT_ID \
--source $CLAIMANT1 \
--network $NETWORK \
--fn claim \
-- \
--sender $CLAIMANT1 \
--token $TOKEN_CONTRACT_ADDRESS