Airdrop Registry
The Airdrop Registry contract manages the fabrication of messages relevant to claiming and swapping tokens airdropped to Luna delegators. Airdropped tokens to the bLuna Hub contract is swapped for Terra USD and distributed as bLuna rewards.
The Airdrop Registry is initially configured to support airdrops of ANC and Mirror Protocol's governance token, MIR. When a new airdrop is distributed to Luna stakers, a new Airdrop Registry contract that includes the message interface for claiming and swapping the airdrop token can be deployed and its address newly registered to the bLuna Hub contract.

Config

Key
Type
Description
owner
CanonicalAddr
Address of contract owner
hub_contract
String
Contract address of bLuna Hub
reward_contract
String
Contract address of bLuna Reward
airdrop_tokens
Vec<String>
List of supported airdrop token tickers

InstantiateMsg

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
pub struct InstantiateMsg {
3
pub hub_contract: String,
4
pub reward_contract: String,
5
}
Copied!
1
{
2
"hub_contract": "terra1...",
3
"reward_contract": "terra1..."
4
}
Copied!
Key
Type
Description
hub_contract
String
Contract address of bLuna Hub
reward_contract
String
Contract address of bLuna Reward

ExecuteMsg

UpdateConfig

Updates the Airdrop Registry contract configuration. Can only be issued by contract owner.
Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum ExecuteMsg {
4
UpdateConfig {
5
owner: Option<String>,
6
hub_contract: Option<String>,
7
reward_contract: Option<String>,
8
}
9
}
Copied!
1
{
2
"update_config": {
3
"owner": "terra1...",
4
"hub_contract": "terra1...",
5
"reward_contract": "terra1..."
6
}
7
}
Copied!
Key
Type
Description
owner*
String
Address of new owner
hub_contract*
String
New contract address of bLuna Hub
reward_contract*
String
New contract address of bLuna Reward
* = optional

AddAirdropInfo

Adds support for a new airdrop to Luna stakers. Can only be issued by contract owner.
Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum ExecuteMsg {
4
AddAirdropInfo {
5
airdrop_token: String,
6
airdrop_info: AirdropInfo,
7
}
8
}
9
10
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
11
pub struct AirdropInfo {
12
pub airdrop_token_contract: String,
13
pub airdrop_contract: String,
14
pub airdrop_swap_contract: String,
15
pub swap_belief_price: Option<Decimal>,
16
pub swap_max_spread: Option<Decimal>,
17
}
Copied!
1
{
2
"add_airdrop_info": {
3
"airdrop_token": "MIR",
4
"airdrop_info": {
5
"airdrop_token_contract": "terra1...",
6
"airdrop_contract": "terra1...",
7
"airdrop_swap_contract": "terra1...",
8
"swap_belief_price": null,
9
"swap_max_spread": null
10
}
11
}
12
}
Copied!
Key
Type
Description
airdrop_token
String
Ticker of airdrop token
airdrop_info
AirdropInfo
Airdrop token information
Key
Type
Description
airdrop_token_contract
String
Contract address of airdrop token's Cw20 token contract
airdrop_contract
String
Contract address of airdrop contract to claim airdrop token
airdrop_swap_contract
String
Contract address of swap contract to convert airdrop token to TerraUSD (e.g. Terraswap Pair)
swap_belief_price*
Decimal
Expected conversion rate when swapping airdropped token to TerraUSD.
swap_max_spread*
Decimal
Maximum allowed spread when swapping airdropped token to TerraUSD.
* = optional

UpdateAirdropInfo

Updates information for an already supported airdrop token. Can only be issued by contract owner.
Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum ExecuteMsg {
4
UpdateAirdropInfo {
5
airdrop_token: String,
6
airdrop_info: AirdropInfo,
7
}
8
}
9
10
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
11
pub struct AirdropInfo {
12
pub airdrop_token_contract: String,
13
pub airdrop_contract: String,
14
pub airdrop_swap_contract: String,
15
pub swap_belief_price: Option<Decimal>,
16
pub swap_max_spread: Option<Decimal>,
17
}
Copied!
1
{
2
"update_airdrop_info": {
3
"airdrop_token": "MIR",
4
"airdrop_info": {
5
"airdrop_token_contract": "terra1...",
6
"airdrop_contract": "terra1...",
7
"airdrop_swap_contract": "terra1...",
8
"swap_belief_price": null,
9
"swap_max_spread": null
10
}
11
}
12
}
Copied!
Key
Type
Description
airdrop_token
String
Ticker of airdrop token
airdrop_info
AirdropInfo
New airdrop token information
Key
Type
Description
airdrop_token_contract
String
New contract address of airdrop token's Cw20 token contract
airdrop_contract
String
New contract address of airdrop contract to claim airdrop token
airdrop_swap_contract
String
New contract address of swap contract to convert airdrop token to TerraUSD
swap_belief_price*
Decimal
New expected conversion rate when swapping airdropped token to TerraUSD
swap_max_spread*
Decimal
New maximum allowed spread when swapping airdropped token to TerraUSD
* = optional

RemoveAirdropInfo

Removes support for a currently supported airdrop. Can only be issued by contract owner.
Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum ExecuteMsg {
4
RemoveAirdropInfo {
5
airdrop_token: String,
6
}
7
}
Copied!
1
{
2
"remove_airdrop_info": {
3
"airdrop_token": "MIR"
4
}
5
}
Copied!
Key
Type
Description
airdrop_token
String
Ticker of airdrop token

FabricateMIRClaim

Fabricates a message to claim MIR airdrop. Can only be issued by Hub.
Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum ExecuteMsg {
4
FabricateMIRClaim {
5
stage: u8,
6
amount: Uint128,
7
proof: Vec<String>,
8
}
9
}
Copied!
1
{
2
"fabricate_mir_claim": {
3
"stage": 5,
4
"amount": "100000000",
5
"proof": [
6
"7132d2bab1c85ecda6aa6b417e7b2d085675c1139c5cf5b5556d1c10502ddd53",
7
"21ca861414821082c98620ba1eef9c91f41309a79c043d5615d51d26cc796b61",
8
"03cd093fcf64825e33a18eaf86bc828049b1ee1a7348ce60d90ee07b3858bb83",
9
"b55feb67c2a3540502ea11349ff75bc83ebab03626a2c7b1d4333a7776fd2178",
10
"6f96345d8d8e8eeea738f51c5f31ce01122ce9e93f7f1a978860263ffc29462e",
11
"878ec313d28ef91384b426f0c81c2bce00c817added7bdb1e075250df46b0a0d"
12
]
13
}
14
}
Copied!
Key
Type
Description
stage
u8
MIR airdrop stage
amount
Uint128
Amount of MIR airdrop claimable by bLuna at this stage
proof
Vec<String>
Merkle proof to prove airdrop eligibility

FabricateANCClaim

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum ExecuteMsg {
4
FabricateANCClaim {
5
stage: u8,
6
amount: Uint128,
7
proof: Vec<String>,
8
}
9
}
Copied!
1
{
2
"fabricate_anc_claim": {
3
"stage": 5,
4
"amount": "100000000",
5
"proof": [
6
"7132d2bab1c85ecda6aa6b417e7b2d085675c1139c5cf5b5556d1c10502ddd53",
7
"21ca861414821082c98620ba1eef9c91f41309a79c043d5615d51d26cc796b61",
8
"03cd093fcf64825e33a18eaf86bc828049b1ee1a7348ce60d90ee07b3858bb83",
9
"b55feb67c2a3540502ea11349ff75bc83ebab03626a2c7b1d4333a7776fd2178",
10
"6f96345d8d8e8eeea738f51c5f31ce01122ce9e93f7f1a978860263ffc29462e",
11
"878ec313d28ef91384b426f0c81c2bce00c817added7bdb1e075250df46b0a0d"
12
]
13
}
14
}
Copied!
Key
Type
Description
stage
u8
MIR airdrop stage
amount
Uint128
Amount of MIR airdrop claimable by bLuna at this stage
proof
Vec<String>
Merkle proof to prove airdrop eligibility

QueryMsg

Config

Gets the Airdrop Registry contract configuration.
Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum QueryMsg {
4
Config {}
5
}
Copied!
1
{
2
"config": {}
3
}
Copied!
Key
Type
Description

ConfigResponse

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
pub struct ConfigResponse {
3
pub owner: String,
4
pub hub_contract: String,
5
pub reward_contract: String,
6
pub airdrop_tokens: Vec<String>,
7
}
Copied!
1
{
2
"owner": "terra1...",
3
"hub_contract": "terra1...",
4
"reward_contract": "terra1...",
5
"airdrop_tokens": [
6
"MIR"
7
]
8
}
Copied!
Key
Type
Description
owner
String
Address of contract owner
hub_contract
String
Contract address of bLuna Hub
reward_contract
String
Contract address of bLuna Reward
airdrop_tokens
Vec<String>
List of supported airdrop token tickers

AirdropInfo

Gets information for the specified airdrop token if the airdrop_token field is filled. Gets information for all airdrop tokens if the airdrop_token field is not filled.
Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum QueryMsg {
4
AirdropInfo {
5
airdrop_token: Option<String>,
6
start_after: Option<String>,
7
limit: Option<u32>,
8
}
9
}
Copied!
1
{
2
"airdrop_info": {
3
"airdrop_token": "MIR",
4
"start_after": null,
5
"limit": null
6
}
7
}
Copied!
Key
Type
Description
airdrop_token*
String
Ticker of airdrop token to query information
start_after*
String
Airdrop token ticker to start query
limit*
u32
Maximum number of query entries
* = optional

AirdropInfoResponse

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
pub struct AirdropInfoResponse {
3
pub airdrop_info: Vec<AirdropInfoElem>,
4
}
5
6
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
7
pub struct AirdropInfoElem {
8
pub airdrop_token: String,
9
pub info: AirdropInfo,
10
}
11
12
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
13
pub struct AirdropInfo {
14
pub airdrop_token_contract: String,
15
pub airdrop_contract: String,
16
pub airdrop_swap_contract: String,
17
pub swap_belief_price: Option<Decimal>,
18
pub swap_max_spread: Option<Decimal>,
19
}
Copied!
1
{
2
"airdrop_info": [
3
{
4
"airdrop_token": "MIR",
5
"info": {
6
"airdrop_token_contract": "terra1...",
7
"airdrop_contract": "terra1...",
8
"airdrop_swap_contract": "terra1...",
9
"swap_belief_price": null,
10
"swap_max_spread": null
11
}
12
}
13
]
14
}
Copied!
Key
Type
Description
airdrop_info
Vec<AirdropInfoElem>
Information of the specified airdrop token
Key
Type
Description
airdrop_token
String
Airdrop token's ticker
info
AirdropInfo
Airdrop token information
Key
Type
Description
airdrop_token_contract
String
Contract address of airdrop token's Cw20 token contract
airdrop_contract
String
Contract address of airdrop contract to claim airdrop token
airdrop_swap_contract
String
Contract address of swap contract to convert airdrop token to TerraUSD
swap_belief_price*
Decimal
Expected conversion rate when swapping airdropped token to TerraUSD
swap_max_spread*
Decimal
Maximum allowed spread when swapping airdropped token to TerraUSD
* = optional
Last modified 2mo ago