Community
The Community Contract holds the funds of the Community Pool, which can be spent through a governance poll.

InstantiateMsg

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
pub struct InstantiateMsg {
3
pub admins: Vec<String>,
4
pub managing_token: String,
5
}
Copied!
1
{
2
"admins":["terra1...",...],
3
"managing_token": "VKR",
4
"terraswap_router": "terra1...",
5
"campaign_deposit_fee_burn_ratio": 50,
6
"campaign_deposit_fee_recipient": "terra1..."
7
}
Copied!
Key
Type
Description
admins
Ves<String>
Campaign manager address
managing_token
String
Managed token address

ExecuteMsg

Receive

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum ExecuteMsg {
4
Receive {
5
amount: Uint128,
6
sender: Addr,
7
msg: Option<Binary>,
8
}
9
}
Copied!
1
{
2
"receive": {
3
"amount": "10000000",
4
"sender": "terra1...",
5
"msg": "eyAiZXhlY3V0ZV9tc2ciOiAiYmxhaCBibGFoIiB9"
6
}
7
}
Copied!
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

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum ExecuteMsg {
4
UpdateConfig {
5
admins: Option<Vec<String>>,
6
},
7
}
Copied!
1
{
2
"spend": {
3
"admins":["terra1...",...],
4
"terraswap_router": "terra1...",
5
"campaign_deposit_fee_burn_ratio": 50,
6
"campaign_deposit_fee_recipient": "terra1...",
7
}
8
}
Copied!
Key
Type
Description
admins*
Ves<String>
Campaign manager address
* = optional

IncreaseAllowance

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum ExecuteMsg {
4
IncreaseAllowance {
5
address: String,
6
amount: Uint128,
7
},
8
}
Copied!
1
{
2
"increase_allownace": {
3
"address": "terra1...",
4
"amount" : 1000000
5
}
6
}
Copied!
Key
Type
Description
address
String
Wallet address of allowance campaign
amount
Uint128
Amount of increase

DecreaseAllowance

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum ExecuteMsg {
4
DecreaseAllowance {
5
address: String,
6
amount: Option<Uint128>,
7
},
8
}
Copied!
1
{
2
"decrease_allownace": {
3
"address": "terra1...",
4
"amount" : 1000000
5
}
6
}
Copied!
Key
Type
Description
address
String
Wallet address of allowance campaign
amount*
Uint128
Amount of decrease (None = Total)
* = optional

Transfer

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum ExecuteMsg {
4
Transfer {
5
recipient: String,
6
amount: Uint128,
7
},
8
}
Copied!
1
{
2
"transfer": {
3
"recipient": "terra1...",
4
"amount": 1000
5
}
6
}
Copied!
Key
Type
Description
recipient
String
Address to receive payment
amount
Uint128
Amount to send

QueryMsg

Config

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum QueryMsg {
4
Config {}
5
}
Copied!
1
{
2
"config": {}
3
}
Copied!

Response

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema)]
2
pub struct ContractConfigResponse {
3
pub admins: Vec<String>,
4
pub managing_token: String,
5
}
Copied!
1
{
2
"config_response": {
3
"admins":["terra1...",...],
4
"managing_token": "VKR",
5
}
6
}
Copied!
Key
Type
Description
admins
Ves<String>
Campaign manager address
managing_token
String
Managed token address

Balance

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum QueryMsg {
4
Balance {}
5
}
Copied!
1
{
2
"balance": {}
3
}
Copied!

Response

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema)]
2
pub struct BalanceResponse {
3
pub total_balance: Uint128,
4
pub allowance_amount: Uint128,
5
pub free_balance: Uint128,
6
}
Copied!
1
{
2
"balance_response": {
3
"total_balance": 100,
4
"allowance_amount": 1000,
5
"fee_balance": 1,
6
}
7
}
Copied!
Key
Type
Description
total_balance
Uint128
Contract balance
allowance_amount
Uint128
Entitled amount
free_balance
Uint128
Unauthorized or freely transferable number

Allowance

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum QueryMsg {
4
Allowance {
5
address: String,
6
}
7
}
Copied!
1
{
2
"allowance": {
3
"address" : "terra1..."
4
}
5
}
Copied!
Key
Type
Description
address
String
Wallet address of allowance campaign

Response

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema)]
2
pub struct AllowanceResponse {
3
pub address: String,
4
pub allowed_amount: Uint128,
5
pub remain_amount: Uint128,
6
}
Copied!
1
{
2
"allowance_response": {
3
"address":"terra...",
4
"allowed_amount": 10000,
5
"remain_amount": 5000,
6
}
7
}
Copied!
Key
Type
Description
address
String
Wallet address of allowance campaign
allowed_amount
Uint128
Amount granted
remain_amount
Uint128
Transferable amount

Allowances

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
2
#[serde(rename_all = "snake_case")]
3
pub enum QueryMsg {
4
Allowances {
5
start_after: Option<String>,
6
limit: Option<u32>,
7
order_by: Option<OrderBy>,
8
},
9
}
Copied!
1
{
2
"allowances": {
3
"start_after" : "terra1...",
4
"limit" : 10000,
5
"order_by" : "",
6
}
7
}
Copied!
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

Rust
JSON
1
#[derive(Serialize, Deserialize, Clone, PartialEq, JsonSchema)]
2
pub struct AllowancesResponse {
3
pub allowances: Vec<AllowanceResponse>,
4
}
Copied!
1
{
2
"allowances_response": {
3
"allowances":[
4
{
5
"address":"terra...",
6
"allowed_amount": 10000,
7
"remain_amount": 5000,
8
}...
9
]
10
}
11
}
Copied!
Key
Type
Description
allowances
Vec<AllowanceResponse>
List of Allowance
Last modified 7mo ago