Skip to main content

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 are 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#

KeyTypeDescription
ownerCanonicalAddrAddress of contract owner
hub_contractHumanAddrContract address of bLuna Hub
reward_contractHumanAddrContract address of bLuna Reward
airdrop_tokensVec<String>List of supported airdrop token tickers

InitMsg#

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]pub struct InitMsg {    pub hub_contract: HumanAddr,    pub reward_contract: HumanAddr,}
{  "hub_contract": "terra1...",   "reward_contract": "terra1..." }
KeyTypeDescription
hub_contractHumanAddrContract address of bLuna Hub
reward_contractHumanAddrContract address of bLuna Reward

ExecuteMsg#

UpdateConfig#

Updates the Airdrop Registry contract configuration. Can only be issued by the contract owner.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum ExecuteMsg {    UpdateConfig {        owner: Option<HumanAddr>,         hub_contract: Option<HumanAddr>,         reward_contract: Option<HumanAddr>,     }}
{  "update_config": {    "owner": "terra1...",     "hub_contract": "terra1...",     "reward_contract": "terra1..."   }}
KeyTypeDescription
owner*HumanAddrAddress of new owner
hub_contract*HumanAddrNew contract address of bLuna Hub
reward_contract*HumanAddrNew contract address of bLuna Reward

* = optional

AddAirdropInfo#

Adds support for a new airdrop to Luna stakers. Can only be issued by the contract owner.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum ExecuteMsg {    AddAirdropInfo {        airdrop_token: String,         airdrop_info: AirdropInfo,     }}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]pub struct AirdropInfo {    pub airdrop_token_contract: HumanAddr,     pub airdrop_contract: HumanAddr,     pub airdrop_swap_contract: HumanAddr,     pub swap_belief_price: Option<Decimal>,     pub swap_max_spread: Option<Decimal>, }
{  "add_airdrop_info": {    "airdrop_token": "MIR",     "airdrop_info": {      "airdrop_token_contract": "terra1...",       "airdrop_contract": "terra1...",       "airdrop_swap_contract": "terra1...",       "swap_belief_price": null,       "swap_max_spread": null     }  }}
KeyTypeDescription
airdrop_tokenStringTicker of airdrop token
airdrop_infoAirdropInfoAirdrop token information
KeyTypeDescription
airdrop_token_contractHumanAddrContract address of airdrop token's Cw20 token contract
airdrop_contractHumanAddrContract address of airdrop contract to claim airdrop token
airdrop_swap_contractHumanAddrContract address of swap contract to convert airdrop token to TerraUSD (e.g. Terraswap Pair)
swap_belief_price*DecimalExpected conversion rate when swapping airdropped token to TerraUSD.
swap_max_spread*DecimalMaximum allowed spread when swapping airdropped token to TerraUSD.

* = optional

UpdateAirdropInfo#

Updates information for an already supported airdrop token. Can only be issued by the contract owner.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum ExecuteMsg {    UpdateAirdropInfo {        airdrop_token: String,         airdrop_info: AirdropInfo,     }}
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]pub struct AirdropInfo {    pub airdrop_token_contract: HumanAddr,     pub airdrop_contract: HumanAddr,     pub airdrop_swap_contract: HumanAddr,     pub swap_belief_price: Option<Decimal>,     pub swap_max_spread: Option<Decimal>, }
{  "update_airdrop_info": {    "airdrop_token": "MIR",     "airdrop_info": {      "airdrop_token_contract": "terra1...",       "airdrop_contract": "terra1...",       "airdrop_swap_contract": "terra1...",       "swap_belief_price": null,       "swap_max_spread": null     }  }}
KeyTypeDescription
airdrop_tokenStringTicker of airdrop token
airdrop_infoAirdropInfoNew airdrop token information
KeyTypeDescription
airdrop_token_contractHumanAddrNew contract address of airdrop token's Cw20 token contract
airdrop_contractHumanAddrNew contract address of airdrop contract to claim airdrop token
airdrop_swap_contractHumanAddrNew contract address of swap contract to convert airdrop token to TerraUSD
swap_belief_price*DecimalNew expected conversion rate when swapping airdropped token to TerraUSD
swap_max_spread*DecimalNew maximum allowed spread when swapping airdropped token to TerraUSD

* = optional

RemoveAirdropInfo#

Removes support for a currently supported airdrop. Can only be issued by the contract owner.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum ExecuteMsg {    RemoveAirdropInfo {        airdrop_token: String,     }}
{  "remove_airdrop_info": {    "airdrop_token": "MIR"   }}
KeyTypeDescription
airdrop_tokenStringTicker of airdrop token

FabricateMIRClaim#

Fabricates a message to claim MIR airdrop. Can only be issued by the Hub.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum ExecuteMsg {    FabricateMIRClaim {        stage: u8,         amount: Uint128,         proof: Vec<String>,     }}
{  "fabricate_mir_claim": {    "stage": 5,     "amount": "100000000",     "proof": [      "7132d2bab1c85ecda6aa6b417e7b2d085675c1139c5cf5b5556d1c10502ddd53",       "21ca861414821082c98620ba1eef9c91f41309a79c043d5615d51d26cc796b61",       "03cd093fcf64825e33a18eaf86bc828049b1ee1a7348ce60d90ee07b3858bb83",       "b55feb67c2a3540502ea11349ff75bc83ebab03626a2c7b1d4333a7776fd2178",       "6f96345d8d8e8eeea738f51c5f31ce01122ce9e93f7f1a978860263ffc29462e",       "878ec313d28ef91384b426f0c81c2bce00c817added7bdb1e075250df46b0a0d"     ]  }}
KeyTypeDescription
stageu8MIR airdrop stage
amountUint128Amount of MIR airdrop claimable by bLuna at this stage
proofVec<String>Merkle proof to prove airdrop eligibility

FabricateANCClaim#

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum ExecuteMsg {    FabricateANCClaim {        stage: u8,         amount: Uint128,         proof: Vec<String>,     }}
{  "fabricate_anc_claim": {    "stage": 5,     "amount": "100000000",     "proof": [      "7132d2bab1c85ecda6aa6b417e7b2d085675c1139c5cf5b5556d1c10502ddd53",       "21ca861414821082c98620ba1eef9c91f41309a79c043d5615d51d26cc796b61",       "03cd093fcf64825e33a18eaf86bc828049b1ee1a7348ce60d90ee07b3858bb83",       "b55feb67c2a3540502ea11349ff75bc83ebab03626a2c7b1d4333a7776fd2178",       "6f96345d8d8e8eeea738f51c5f31ce01122ce9e93f7f1a978860263ffc29462e",       "878ec313d28ef91384b426f0c81c2bce00c817added7bdb1e075250df46b0a0d"     ]  }}
KeyTypeDescription
stageu8MIR airdrop stage
amountUint128Amount of MIR airdrop claimable by bLuna at this stage
proofVec<String>Merkle proof to prove airdrop eligibility

QueryMsg#

Config#

Gets the Airdrop Registry contract configuration.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum QueryMsg {    Config {}}
{  "config": {}}

ConfigResponse#

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]pub struct ConfigResponse {    pub owner: HumanAddr,     pub hub_contract: HumanAddr,     pub reward_contract: HumanAddr,     pub airdrop_tokens: Vec<String>, }
{  "owner": "terra1...",   "hub_contract": "terra1...",   "reward_contract": "terra1...",   "airdrop_tokens": [    "MIR"  ]}
KeyTypeDescription
ownerHumanAddrAddress of contract owner
hub_contractHumanAddrContract address of bLuna Hub
reward_contractHumanAddrContract address of bLuna Reward
airdrop_tokensVec<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.

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum QueryMsg {    AirdropInfo {        airdrop_token: Option<String>,         start_after: Option<String>,         limit: Option<u32>,     }}
{  "airdrop_info": {    "airdrop_token": "MIR",     "start_after": null,     "limit": null   }}
KeyTypeDescription
airdrop_token*StringTicker of airdrop token to query information
start_after*StringAirdrop token ticker to start query
limit*u32Maximum number of query entries

* = optional

AirdropInfoResponse#

#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]pub struct AirdropInfoResponse {    pub airdrop_info: Vec<AirdropInfoElem>, }
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]pub struct AirdropInfoElem {    pub airdrop_token: String,     pub info: AirdropInfo, }
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]pub struct AirdropInfo {    pub airdrop_token_contract: HumanAddr,     pub airdrop_contract: HumanAddr,     pub airdrop_swap_contract: HumanAddr,     pub swap_belief_price: Option<Decimal>,     pub swap_max_spread: Option<Decimal>, }
{  "airdrop_info": [    {      "airdrop_token": "MIR",       "info": {        "airdrop_token_contract": "terra1...",         "airdrop_contract": "terra1...",         "airdrop_swap_contract": "terra1...",         "swap_belief_price": null,         "swap_max_spread": null       }    }  ]}
KeyTypeDescription
airdrop_infoVec<AirdropInfoElem>Information of the specified airdrop token
KeyTypeDescription
airdrop_tokenStringAirdrop token's ticker
infoAirdropInfoAirdrop token information
KeyTypeDescription
airdrop_token_contractHumanAddrContract address of airdrop token's Cw20 token contract
airdrop_contractHumanAddrContract address of airdrop contract to claim airdrop token
airdrop_swap_contractHumanAddrContract address of swap contract to convert airdrop token to TerraUSD
swap_belief_price*DecimalExpected conversion rate when swapping airdropped token to TerraUSD
swap_max_spread*DecimalMaximum allowed spread when swapping airdropped token to TerraUSD

* = optional