Struct cw_proposal_single::state::Config
source · pub struct Config {
pub threshold: Threshold,
pub max_voting_period: Duration,
pub min_voting_period: Option<Duration>,
pub only_members_execute: bool,
pub allow_revoting: bool,
pub dao: Addr,
pub deposit_info: Option<CheckedDepositInfo>,
}Expand description
The governance module’s configuration.
Fields§
§threshold: ThresholdThe threshold a proposal must reach to complete.
max_voting_period: DurationThe default maximum amount of time a proposal may be voted on before expiring.
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.
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.
dao: AddrThe address of the DAO that this governance module is associated with.
deposit_info: Option<CheckedDepositInfo>Information about the depost required to create a proposal. None if no deposit is required, Some otherwise.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
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 Config
impl JsonSchema for Config
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 more