Enum cw_proposal_single::msg::ExecuteMsg
source · pub enum ExecuteMsg {
Propose {
title: String,
description: String,
msgs: Vec<CosmosMsg<Empty>>,
},
Vote {
proposal_id: u64,
vote: Vote,
},
Execute {
proposal_id: u64,
},
Close {
proposal_id: u64,
},
UpdateConfig {
threshold: Threshold,
max_voting_period: Duration,
min_voting_period: Option<Duration>,
only_members_execute: bool,
allow_revoting: bool,
dao: String,
deposit_info: Option<DepositInfo>,
},
AddProposalHook {
address: String,
},
RemoveProposalHook {
address: String,
},
AddVoteHook {
address: String,
},
RemoveVoteHook {
address: String,
},
}Variants§
Propose
Fields
Creates a proposal in the governance module.
Vote
Fields
Votes on a proposal. Voting power is determined by the DAO’s voting power module.
Execute
Causes the messages associated with a passed proposal to be executed by the DAO.
Close
Closes a proposal that has failed (either not passed or timed out). If applicable this will cause the proposal deposit associated wth said proposal to be returned.
UpdateConfig
Fields
threshold: ThresholdThe new proposal passing threshold. This will only apply to proposals created after the config update.
max_voting_period: DurationThe default maximum amount of time a proposal may be voted on before expiring. This will only apply to proposals created after the config update.
min_voting_period: Option<Duration>The minimum amount of time a proposal must be open before passing. A proposal may fail before this amount of time has elapsed, but it will not pass. This can be useful for preventing governance attacks wherein an attacker aquires a large number of tokens and forces a proposal through.
only_members_execute: boolIf set to true only members may execute passed proposals. Otherwise, any address may execute a passed proposal. Applies to all outstanding and future proposals.
allow_revoting: boolAllows changing votes before the proposal expires. If this is enabled proposals will not be able to complete early as final vote information is not known until the time of proposal expiration.
deposit_info: Option<DepositInfo>Information about the deposit required to make a proposal. None if no deposit, Some otherwise.
Updates the governance module’s config.
AddProposalHook
RemoveProposalHook
AddVoteHook
RemoveVoteHook
Trait Implementations§
source§impl Clone for ExecuteMsg
impl Clone for ExecuteMsg
source§fn clone(&self) -> ExecuteMsg
fn clone(&self) -> ExecuteMsg
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ExecuteMsg
impl Debug for ExecuteMsg
source§impl<'de> Deserialize<'de> for ExecuteMsg
impl<'de> Deserialize<'de> for ExecuteMsg
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
source§impl JsonSchema for ExecuteMsg
impl JsonSchema for ExecuteMsg
source§fn schema_name() -> String
fn schema_name() -> String
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moresource§impl PartialEq<ExecuteMsg> for ExecuteMsg
impl PartialEq<ExecuteMsg> for ExecuteMsg
source§fn eq(&self, other: &ExecuteMsg) -> bool
fn eq(&self, other: &ExecuteMsg) -> bool
self and other values to be equal, and is used
by ==.