pub struct Config {
pub voting_strategy: VotingStrategy,
pub min_voting_period: Option<Duration>,
pub max_voting_period: Duration,
pub only_members_execute: bool,
pub allow_revoting: bool,
pub dao: Addr,
pub close_proposal_on_execution_failure: bool,
pub veto: Option<VetoConfig>,
}Expand description
The proposal module’s configuration.
Fields§
§voting_strategy: VotingStrategyThe threshold a proposal must reach to complete.
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.
max_voting_period: DurationThe default maximum amount of time a proposal may be voted on before expiring.
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.
close_proposal_on_execution_failure: boolIf set to true proposals will be closed if their execution fails. Otherwise, proposals will remain open after execution failure. For example, with this enabled a proposal to send 5 tokens out of a DAO’s treasury with 4 tokens would be closed when it is executed. With this disabled, that same proposal would remain open until the DAO’s treasury was large enough for it to be executed.
veto: Option<VetoConfig>Optional veto configuration. If set to None, veto option
is disabled. Otherwise contains the configuration for veto flow.
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 schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more