Skip to main content

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,}
KeyTypeDescription
nebula_tokenString(address) owner of contract
quorumDecimalMinimum percentage of participation of total voting power required for a poll to pass
thresholdDecimalMinimum percentage of votes that must vote YES in order for a poll to pass
voting_periodu64(address) owner of contract
effective_delayu64(address) Nebula Token (NEB) contract
expiration_periodu64Maximum amount of NEB tokens that can be spent in a single grant
proposal_depositUint128(address) Nebula Token (NEB) contract
voter_weightDecimalMaximum amount of NEB tokens that can be spent in a single grant
snapshot_periodu64(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#

KeyTypeDescription
nebula_tokenOption\<String>(address) owner of contract
quorumOption\<Decimal>Minimum percentage of participation of total voting power required for a poll to pass
thresholdOption\<Decimal>Minimum percentage of votes that must vote YES in order for a poll to pass
voting_periodOption\<u64>(address) owner of contract
effective_delayOption\<u64>(address) Nebula Token (NEB) contract
expiration_periodOption\<u64>Maximum amount of NEB tokens that can be spent in a single grant
proposal_depositOption\<Uint128>(address) Nebula Token (NEB) contract
voter_weightOption\<Decimal>Maximum amount of NEB tokens that can be spent in a single grant
snapshot_periodOption\<u64>(address) Nebula Token (NEB) contract

CastVote#

KeyTypeDescription
poll_idu64(address) owner of contract
voteVoteOptionMinimum percentage of participation of total voting power required for a poll to pass
amountUint128Minimum percentage of votes that must vote YES in order for a poll to pass

WithdrawVotingTokens#

KeyTypeDescription
amountOption\<u64>(address) owner of contract

WithdrawVotingRewards#

KeyTypeDescription
This message takes no arguments.

EndPoll#

KeyTypeDescription
poll_idu64

ExecutePoll#

KeyTypeDescription
poll_idu64

ExpirePoll#

KeyTypeDescription
poll_idu64

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#

KeyTypeDescription
lock_for_weeksOption\<u64>

CreatePoll#

KeyTypeDescription
titleString
descriptionString
linkOption\<String>
execute_msgOption\<PollExecuteMsg>

DepositReward#

KeyTypeDescription
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#

KeyTypeDescription
This message takes no arguments.

Response#

State#

Request#

KeyTypeDescription
This message takes no arguments.

Response#

Staker#

Request#

KeyTypeDescription
addressString

Response#

Poll#

KeyTypeDescription
poll_idu64

Request#

Response#

Polls#

Request#

KeyTypeDescription
filterOption\<PollStatus>
start_afterOption\<u64>
limitOption\<u32>
order_byOption\<OrderBy>

Response#

Voters#

Request#

KeyTypeDescription
poll_idu64
start_afterOption\<String>
limitOption\<u32>
order_byOption\<OrderBy>

Response#

Shares#

Request#

KeyTypeDescription
start_afterOption\<String>
limitOption\<u32>
order_byOption\<OrderBy>

Response#