Community
The Community Contract holds the funds of the Community Pool, which can be spent through a governance poll.
InstantiateMsg
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
pub struct InstantiateMsg {
    pub admins: Vec<String>,
    pub managing_token: String,
}{
  "admins":["terra1...",...],
  "managing_token": "VKR",
  "terraswap_router": "terra1...",
  "campaign_deposit_fee_burn_ratio": 50,
  "campaign_deposit_fee_recipient": "terra1..." 
}Key
Type
Description
admins
Ves<String>
Campaign manager address
managing_token
String
Managed token address
ExecuteMsg
Receive
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    Receive {
        amount: Uint128,
        sender: Addr,
        msg: Option<Binary>,
    }
}{
  "receive": {
    "amount": "10000000",
    "sender": "terra1...",
    "msg": "eyAiZXhlY3V0ZV9tc2ciOiAiYmxhaCBibGFoIiB9"
  }
}Key
Type
Description
Cw20ReceiveMsg
Uint128
Amount of tokens received
sender
Addr
Sender of token transfer
msg*
Binary
Base64-encoded JSON of receive hook
* = optional
UpdateConfig
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    UpdateConfig {
        admins: Option<Vec<String>>,
    },
}{
  "spend":   {
    "admins":["terra1...",...],    
    "terraswap_router": "terra1...",
    "campaign_deposit_fee_burn_ratio": 50,
    "campaign_deposit_fee_recipient": "terra1...",  
  }
}Key
Type
Description
admins*
Ves<String>
Campaign manager address
* = optional
IncreaseAllowance
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    IncreaseAllowance {
        address: String,
        amount: Uint128,
    },
}{
  "increase_allownace": {
    "address": "terra1...",
    "amount" : 1000000
  }
}Key
Type
Description
address
String
Wallet address of allowance campaign
amount
Uint128
Amount of increase
DecreaseAllowance
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    DecreaseAllowance {
        address: String,
        amount: Option<Uint128>,
    },
}{
  "decrease_allownace": {
    "address": "terra1...",
    "amount" : 1000000
  }
}Key
Type
Description
address
String
Wallet address of allowance campaign
amount*
Uint128
Amount of decrease (None = Total)
* = optional
Transfer
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum ExecuteMsg {
    Transfer {
        recipient: String,
        amount: Uint128,
    },
}{
  "transfer": {
    "recipient": "terra1...",
    "amount": 1000
  }
}Key
Type
Description
recipient
String
Address to receive payment
amount
Uint128
Amount to send
QueryMsg
Config
Config#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    Config {}
}{
  "config": {}
}Response
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema)]
pub struct ContractConfigResponse {
    pub admins: Vec<String>,
    pub managing_token: String,
}{
    "config_response": {
      "admins":["terra1...",...],
      "managing_token": "VKR",
    }
}Key
Type
Description
admins
Ves<String>
Campaign manager address
managing_token
String
Managed token address
Balance
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    Balance {}
}{
  "balance": {}
}Response
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema)]
pub struct BalanceResponse {
    pub total_balance: Uint128,
    pub allowance_amount: Uint128,
    pub free_balance: Uint128,
}{
    "balance_response": {
        "total_balance": 100,
        "allowance_amount": 1000,
        "fee_balance": 1,
    }
}Key
Type
Description
total_balance
Uint128
Contract balance
allowance_amount
Uint128
Entitled amount
free_balance
Uint128
Unauthorized or freely transferable number
Allowance
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    Allowance {
        address: String,
    }
}{
  "allowance": {
    "address" : "terra1..."
  }
}Key
Type
Description
address
String
Wallet address of allowance campaign
Response
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema)]
pub struct AllowanceResponse {
    pub address: String,
    pub allowed_amount: Uint128,
    pub remain_amount: Uint128,
}{
    "allowance_response": {
        "address":"terra...",
        "allowed_amount": 10000,
        "remain_amount": 5000,        
    }
}Key
Type
Description
address
String
Wallet address of allowance campaign
allowed_amount
Uint128
Amount granted
remain_amount
Uint128
Transferable amount
Allowances
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
    Allowances {
        start_after: Option<String>,
        limit: Option<u32>,
        order_by: Option<OrderBy>,
    },
}{
  "allowances": {
    "start_after" : "terra1...",
    "limit" : 10000,
    "order_by" : "",
  }
}Key
Type
Description
start_after*
String
Wallet address to start query at
limit*
u32
Maximum number of query entries
order_by*
OrderBy
Order to make query
*=optional
Response
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema)]
pub struct AllowancesResponse {
    pub allowances: Vec<AllowanceResponse>,
}{
    "allowances_response": {
        "allowances":[
             {
                  "address":"terra...",
                  "allowed_amount": 10000,
                  "remain_amount": 5000,        
             }...
        ]
    }
}Key
Type
Description
allowances
Vec<AllowanceResponse>
List of Allowance
Last updated
Was this helpful?