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,
}
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>,
}
}
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>>,
},
}
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,
},
}
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>,
},
}
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,
},
}
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 {}
}
Response
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema)]
pub struct ContractConfigResponse {
pub admins: Vec<String>,
pub managing_token: String,
}
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 {}
}
Response
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema)]
pub struct BalanceResponse {
pub total_balance: Uint128,
pub allowance_amount: Uint128,
pub free_balance: Uint128,
}
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,
}
}
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,
}
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>,
},
}
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>,
}
Key
Type
Description
allowances
Vec<AllowanceResponse>
List of Allowance
Last updated
Was this helpful?