mirror_protocol/
collector.rs

1use schemars::JsonSchema;
2use serde::{Deserialize, Serialize};
3
4#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
5pub struct InstantiateMsg {
6    pub owner: String,
7    pub distribution_contract: String, // collected rewards receiver
8    pub terraswap_factory: String,
9    pub mirror_token: String,
10    pub base_denom: String,
11    // aUST params
12    pub aust_token: String,
13    pub anchor_market: String,
14    // bLuna params
15    pub bluna_token: String,
16    pub bluna_swap_denom: String,
17}
18
19#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
20#[serde(rename_all = "snake_case")]
21pub enum ExecuteMsg {
22    UpdateConfig {
23        owner: Option<String>,
24        distribution_contract: Option<String>,
25        terraswap_factory: Option<String>,
26        mirror_token: Option<String>,
27        base_denom: Option<String>,
28        aust_token: Option<String>,
29        anchor_market: Option<String>,
30        bluna_token: Option<String>,
31        bluna_swap_denom: Option<String>,
32    },
33    Convert {
34        asset_token: String,
35    },
36    Distribute {},
37    /// Internal operation to swap Luna for UST
38    LunaSwapHook {},
39}
40
41#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
42#[serde(rename_all = "snake_case")]
43pub enum QueryMsg {
44    Config {},
45}
46
47// TODO: Delete when moneymarket is upgraded to std 0.14
48#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
49#[serde(rename_all = "snake_case")]
50pub enum MoneyMarketCw20HookMsg {
51    /// Return stable coins to a user
52    /// according to exchange rate
53    RedeemStable {},
54}
55
56// We define a custom struct for each query response
57#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
58pub struct ConfigResponse {
59    pub owner: String,
60    pub distribution_contract: String, // collected rewards receiver
61    pub terraswap_factory: String,
62    pub mirror_token: String,
63    pub base_denom: String,
64    pub aust_token: String,
65    pub anchor_market: String,
66    pub bluna_token: String,
67    pub bluna_swap_denom: String,
68}
69
70#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
71pub struct MigrateMsg {}