Merkle-Airdrop V1.0.0
Introduction
The Merkle-Airdrop ADO is a smart contract that allows projects to launch airdrops using the Merkle-tree (hashing). Uses the same logic of the base cw20-merkel-airdrop contract. If you do not know what is a Merkle-airdrop and how it is different from a normal airdrop, please refer to the following article.
Ado_type: merkle-airdrop
InstantiateMsg
Name | Type | Description |
---|---|---|
| The assets to airdrop. | |
| String | Contract address of the kernel contract to be used for AMP messaging. Kernel contract address can be found in our deployed contracts. |
| Option<String> | Optional address to specify as the owner of the ADO being created. Defaults to the sender if not specified. |
AssetInfoUnchecked
Represents an asset info instance that may contain unverified data; to be used in messages.
AssetInfoBase
Represents the type of an fungible asset. Each asset info instance can be one of two variants:
CW20 tokens: To create an asset info instance of this type, provide the contract address of the token.
Native SDK coins: To create an asset info instance of this type, provide the denomination ("uandr","uatom").
ExecuteMsg
RegisterMerkleRoot
Sets the provided Merkle-root that contains the whitelisted addresses that can claim tokens from the airdrop.
Only the owner can execute RegisterMerkleRoot
.
Name | Type | Description |
---|---|---|
| String | A hex-encoded Merkle root. |
| Option<Expiration> | An optional expiration for the root. Defaults to never if not specified. |
| Option<Uint128> | An optional amount to specify the maximum number of tokens that can be claimed from the airdrop. |
Claim
Claims the funds assigned to the address executing the claim.
Only addresses found in the Merkle-Root can claim tokens.
Name | Type | Description |
---|---|---|
| u8 | Stage is used to index which airdrop to claim from. There can be more than one airdrop and each is referenced by it's designated stage. |
| Uint128 | The amount of tokens to claim. |
| Vec<String> | Hex-encoded Merkle proof that proves that the address claiming the tokens from the airdrop is found in the Merkle-Root. Needs to be calculated similar to this. |
Burn
Burn the remaining tokens (unclaimed) after expire time for the specified stage
.
Only the owner can execute Burn
.
Name | Type | Description |
---|---|---|
| u8 | The stage of the airdrop used to specify which airdrop to execute burn on. |
Base Executes
The rest of the execute messages can be found in the ADO Base section.
Query
Config
ConfigResponse
Name | Type | Description |
---|---|---|
| AssetInfo | The type of Asset. |
AssetInfo
Represents an asset info instance containing only verified data which is saved in the contract storage.
MerkleRoot
Queries the Merkle-Root for the specified stage
.
| u8 | The stage which we want to get the Merkle root for. |
MerkleRootResponse
Name | Type | Description |
---|---|---|
| u8 | The stage that belongs to this root. |
| String | The Merkle-Root of this stage. |
| The expiration for the airdrop of this stage. | |
| Uint128 | The total amount of funds to be airdropped belonging to this stage. |
LatestStage
Queries the last stage.
LastStageResponse
IsClaimed
Checks if the specified address
has claimed its
Name | Type | Description |
---|---|---|
| u8 | The stage to check. |
| String | The address to check. |
IsClaimedResponse
Name | Type | Description |
---|---|---|
| bool | Returns true if the funds have claimed and false otherwise. |
TotalClaimed
Name | Type | Description |
---|---|---|
| u8 | The stage to check the amount claimed. |
TotalClaimedResponse
Name | Type | Description |
---|---|---|
| Uint128 | The stage to check the amount claimed. |
Base Queries
The rest of the query messages can be found in the ADO Base section.
Last updated