Skip to main content

pylon_token/
airdrop.rs

1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4use cosmwasm_std::Uint128;
5
6#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
7pub struct InstantiateMsg {
8    pub owner: String,
9    pub pylon_token: String,
10}
11
12#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
13#[serde(rename_all = "snake_case")]
14pub enum ExecuteMsg {
15    UpdateConfig {
16        owner: Option<String>,
17    },
18    RegisterMerkleRoot {
19        merkle_root: String,
20    },
21    Claim {
22        stage: u8,
23        amount: Uint128,
24        proof: Vec<String>,
25        receiver: Option<String>,
26    },
27}
28
29/// We currently take no arguments for migrations
30#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
31pub struct MigrateMsg {}
32
33#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
34#[serde(rename_all = "snake_case")]
35pub enum QueryMsg {
36    Config {},
37    MerkleRoot { stage: u8 },
38    LatestStage {},
39    IsClaimed { stage: u8, address: String },
40}
41
42// We define a custom struct for each query response
43#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
44pub struct ConfigResponse {
45    pub owner: String,
46    pub pylon_token: String,
47}
48
49// We define a custom struct for each query response
50#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
51pub struct MerkleRootResponse {
52    pub stage: u8,
53    pub merkle_root: String,
54}
55
56// We define a custom struct for each query response
57#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
58pub struct LatestStageResponse {
59    pub latest_stage: u8,
60}
61
62// We define a custom struct for each query response
63#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
64pub struct IsClaimedResponse {
65    pub is_claimed: bool,
66}