1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4use cosmwasm_std::{Binary, Decimal, Uint128};
5
6#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
7pub struct InstantiateMsg {
8 pub token_code_id: u64,
9 pub base_denom: String,
10 pub distribution_schedule: Vec<(u64, u64, Uint128)>, }
12
13#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
14#[serde(rename_all = "snake_case")]
15pub enum ExecuteMsg {
16 PostInitialize {
20 owner: String,
21 terraswap_factory: String,
22 mirror_token: String,
23 staking_contract: String,
24 oracle_contract: String,
25 mint_contract: String,
26 commission_collector: String,
27 },
28 UpdateConfig {
29 owner: Option<String>,
30 token_code_id: Option<u64>,
31 distribution_schedule: Option<Vec<(u64, u64, Uint128)>>, },
33 UpdateWeight {
34 asset_token: String,
35 weight: u32,
36 },
37 Whitelist {
38 name: String,
40 symbol: String,
42 oracle_feeder: String,
44 params: Params,
46 },
47 PassCommand {
48 contract_addr: String,
49 msg: Binary,
50 },
51
52 RevokeAsset {
60 asset_token: String,
61 end_price: Option<Decimal>,
62 },
63 MigrateAsset {
67 name: String,
68 symbol: String,
69 from_token: String,
70 end_price: Decimal,
71 },
72
73 Distribute {},
77}
78
79#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
80#[serde(rename_all = "snake_case")]
81pub enum QueryMsg {
82 Config {},
83 DistributionInfo {},
84}
85
86#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
88pub struct ConfigResponse {
89 pub owner: String,
90 pub mirror_token: String,
91 pub mint_contract: String,
92 pub staking_contract: String,
93 pub commission_collector: String,
94 pub oracle_contract: String,
95 pub terraswap_factory: String,
96 pub token_code_id: u64,
97 pub base_denom: String,
98 pub genesis_time: u64,
99 pub distribution_schedule: Vec<(u64, u64, Uint128)>,
100}
101
102#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
104pub struct DistributionInfoResponse {
105 pub weights: Vec<(String, u32)>,
106 pub last_distributed: u64,
107}
108
109#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
111pub struct MigrateMsg {}
112
113#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
114#[serde(rename_all = "snake_case")]
115pub struct Params {
116 pub auction_discount: Decimal,
118 pub min_collateral_ratio: Decimal,
120 pub weight: Option<u32>,
122 pub mint_period: Option<u64>,
124 pub min_collateral_ratio_after_ipo: Option<Decimal>,
126 pub pre_ipo_price: Option<Decimal>,
128}