Skip to main content

pylon_token/
community.rs

1use cosmwasm_std::Uint128;
2use schemars::JsonSchema;
3use serde::{Deserialize, Serialize};
4
5#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
6pub struct InstantiateMsg {
7    pub gov_contract: String, // pylon gov contract
8    pub pylon_token: String,  // pylon token address
9    pub spend_limit: Uint128, // spend limit per each `spend` request
10}
11
12#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
13#[serde(rename_all = "snake_case")]
14pub enum ExecuteMsg {
15    UpdateConfig { spend_limit: Option<Uint128> },
16    Spend { recipient: String, amount: Uint128 },
17}
18
19/// We currently take no arguments for migrations
20#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
21pub struct MigrateMsg {}
22
23#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
24#[serde(rename_all = "snake_case")]
25pub enum QueryMsg {
26    Config {},
27}
28
29// We define a custom struct for each query response
30#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
31pub struct ConfigResponse {
32    pub gov_contract: String,
33    pub pylon_token: String,
34    pub spend_limit: Uint128,
35}