Governance
InstantiateMsg#
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]pub struct InstantiateMsg { pub nebula_token: String, pub quorum: Decimal, pub threshold: Decimal, pub voting_period: u64, pub effective_delay: u64, pub expiration_period: u64, pub proposal_deposit: Uint128, pub voter_weight: Decimal, pub snapshot_period: u64,}| Key | Type | Description |
|---|---|---|
| nebula_token | String | (address) owner of contract |
| quorum | Decimal | Minimum percentage of participation of total voting power required for a poll to pass |
| threshold | Decimal | Minimum percentage of votes that must vote YES in order for a poll to pass |
| voting_period | u64 | (address) owner of contract |
| effective_delay | u64 | (address) Nebula Token (NEB) contract |
| expiration_period | u64 | Maximum amount of NEB tokens that can be spent in a single grant |
| proposal_deposit | Uint128 | (address) Nebula Token (NEB) contract |
| voter_weight | Decimal | Maximum amount of NEB tokens that can be spent in a single grant |
| snapshot_period | u64 | (address) Nebula Token (NEB) contract |
ExecuteMsg#
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum ExecuteMsg { Receive(Cw20ReceiveMsg), UpdateConfig { owner: Option<String>, quorum: Option<Decimal>, threshold: Option<Decimal>, voting_period: Option<u64>, effective_delay: Option<u64>, expiration_period: Option<u64>, proposal_deposit: Option<Uint128>, voter_weight: Option<Decimal>, snapshot_period: Option<u64>, }, CastVote { poll_id: u64, vote: VoteOption, amount: Uint128, }, WithdrawVotingTokens { amount: Option<Uint128>, }, WithdrawVotingRewards {}, EndPoll { poll_id: u64, }, ExecutePoll { poll_id: u64, }, ExpirePoll { poll_id: u64, }, SnapshotPoll { poll_id: u64, }, IncreaseLockTime { increase_weeks: u64, },}Receive#
This function must be passed a Cw20ReceiveMsg hooks.
UpdateConfig#
| Key | Type | Description |
|---|---|---|
| nebula_token | Option\<String> | (address) owner of contract |
| quorum | Option\<Decimal> | Minimum percentage of participation of total voting power required for a poll to pass |
| threshold | Option\<Decimal> | Minimum percentage of votes that must vote YES in order for a poll to pass |
| voting_period | Option\<u64> | (address) owner of contract |
| effective_delay | Option\<u64> | (address) Nebula Token (NEB) contract |
| expiration_period | Option\<u64> | Maximum amount of NEB tokens that can be spent in a single grant |
| proposal_deposit | Option\<Uint128> | (address) Nebula Token (NEB) contract |
| voter_weight | Option\<Decimal> | Maximum amount of NEB tokens that can be spent in a single grant |
| snapshot_period | Option\<u64> | (address) Nebula Token (NEB) contract |
CastVote#
| Key | Type | Description |
|---|---|---|
| poll_id | u64 | (address) owner of contract |
| vote | VoteOption | Minimum percentage of participation of total voting power required for a poll to pass |
| amount | Uint128 | Minimum percentage of votes that must vote YES in order for a poll to pass |
WithdrawVotingTokens#
| Key | Type | Description |
|---|---|---|
| amount | Option\<u64> | (address) owner of contract |
WithdrawVotingRewards#
| Key | Type | Description |
|---|---|---|
| This message takes no arguments. | ||
EndPoll#
| Key | Type | Description |
|---|---|---|
| poll_id | u64 |
ExecutePoll#
| Key | Type | Description |
|---|---|---|
| poll_id | u64 |
ExpirePoll#
| Key | Type | Description |
|---|---|---|
| poll_id | u64 |
CW20 Receive Hooks#
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum Cw20HookMsg { /// USER-CALLABLE /// StakeVotingTokens a user can stake their nebula token to receive rewards /// or do vote on polls StakeVotingTokens { lock_for_weeks: Option<u64> }, /// CreatePoll need to receive deposit from a proposer CreatePoll { title: String, description: String, link: Option<String>, execute_msg: Option<PollExecuteMsg>, }, /// Deposit rewards to be distributed among stakers and voters DepositReward {},}StakeVotingTokens#
| Key | Type | Description |
|---|---|---|
| lock_for_weeks | Option\<u64> |
CreatePoll#
| Key | Type | Description |
|---|---|---|
| title | String | |
| description | String | |
| link | Option\<String> | |
| execute_msg | Option\<PollExecuteMsg> |
DepositReward#
| Key | Type | Description |
|---|---|---|
| This message takes no arguments. | ||
QueryMsg#
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]#[serde(rename_all = "snake_case")]pub enum QueryMsg { Config {}, State {}, Staker { address: String, }, Poll { poll_id: u64, }, Polls { filter: Option<PollStatus>, start_after: Option<u64>, limit: Option<u32>, order_by: Option<OrderBy>, }, Voters { poll_id: u64, start_after: Option<String>, limit: Option<u32>, order_by: Option<OrderBy>, }, Shares { start_after: Option<String>, limit: Option<u32>, order_by: Option<OrderBy>, },}Config#
Request#
| Key | Type | Description |
|---|---|---|
| This message takes no arguments. | ||
Response#
State#
Request#
| Key | Type | Description |
|---|---|---|
| This message takes no arguments. | ||
Response#
Staker#
Request#
| Key | Type | Description |
|---|---|---|
| address | String |
Response#
Poll#
| Key | Type | Description |
|---|---|---|
| poll_id | u64 |
Request#
Response#
Polls#
Request#
| Key | Type | Description |
|---|---|---|
| filter | Option\<PollStatus> | |
| start_after | Option\<u64> | |
| limit | Option\<u32> | |
| order_by | Option\<OrderBy> |
Response#
Voters#
Request#
| Key | Type | Description |
|---|---|---|
| poll_id | u64 | |
| start_after | Option\<String> | |
| limit | Option\<u32> | |
| order_by | Option\<OrderBy> |
Response#
Shares#
Request#
| Key | Type | Description |
|---|---|---|
| start_after | Option\<String> | |
| limit | Option\<u32> | |
| order_by | Option\<OrderBy> |