pylon_token/
collector.rs

1use cosmwasm_std::Decimal;
2use schemars::JsonSchema;
3use serde::{Deserialize, Serialize};
4
5#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
6pub struct InstantiateMsg {
7    pub gov_contract: String, // collected rewards receiver
8    pub terraswap_factory: String,
9    pub pylon_token: String,
10    pub distributor_contract: String,
11    pub reward_factor: Decimal,
12}
13
14#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
15#[serde(rename_all = "snake_case")]
16pub enum ExecuteMsg {
17    /// Update config interface
18    /// to enable reward_factor update
19    UpdateConfig { reward_factor: Option<Decimal> },
20    /// Public Message
21    /// Sweep all given denom balance to ANC token
22    /// and execute Distribute message
23    Sweep { denom: String },
24}
25
26#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
27#[serde(rename_all = "snake_case")]
28pub enum QueryMsg {
29    Config {},
30}
31
32// We define a custom struct for each query response
33#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
34pub struct ConfigResponse {
35    pub gov_contract: String, // collected rewards receiver
36    pub terraswap_factory: String,
37    pub pylon_token: String,
38    pub distributor_contract: String,
39    pub reward_factor: Decimal,
40}
41
42/// We currently take no arguments for migrations
43#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
44pub struct MigrateMsg {}