pub struct Params {Show 16 fields
pub min_deposit: Vec<Coin>,
pub max_deposit_period: Option<Duration>,
pub voting_period: Option<Duration>,
pub quorum: String,
pub threshold: String,
pub veto_threshold: String,
pub min_initial_deposit_ratio: String,
pub proposal_cancel_ratio: String,
pub proposal_cancel_dest: String,
pub expedited_voting_period: Option<Duration>,
pub expedited_threshold: String,
pub expedited_min_deposit: Vec<Coin>,
pub burn_vote_quorum: bool,
pub burn_proposal_deposit_prevote: bool,
pub burn_vote_veto: bool,
pub min_deposit_ratio: String,
}Expand description
Params defines the parameters for the x/gov module.
Since: cosmos-sdk 0.47
Fields§
§min_deposit: Vec<Coin>Minimum deposit for a proposal to enter voting period.
max_deposit_period: Option<Duration>Maximum period for Atom holders to deposit on a proposal. Initial value: 2 months.
voting_period: Option<Duration>Duration of the voting period.
quorum: StringMinimum percentage of total stake needed to vote for a result to be considered valid.
threshold: StringMinimum proportion of Yes votes for proposal to pass. Default value: 0.5.
veto_threshold: StringMinimum value of Veto votes to Total votes ratio for proposal to be vetoed. Default value: 1/3.
min_initial_deposit_ratio: StringThe ratio representing the proportion of the deposit value that must be paid at proposal submission.
proposal_cancel_ratio: StringThe cancel ratio which will not be returned back to the depositors when a proposal is cancelled.
Since: cosmos-sdk 0.50
proposal_cancel_dest: StringThe address which will receive (proposal_cancel_ratio * deposit) proposal deposits. If empty, the (proposal_cancel_ratio * deposit) proposal deposits will be burned.
Since: cosmos-sdk 0.50
expedited_voting_period: Option<Duration>Duration of the voting period of an expedited proposal.
Since: cosmos-sdk 0.50
expedited_threshold: StringMinimum proportion of Yes votes for proposal to pass. Default value: 0.67.
Since: cosmos-sdk 0.50
expedited_min_deposit: Vec<Coin>Minimum expedited deposit for a proposal to enter voting period.
burn_vote_quorum: boolburn deposits if a proposal does not meet quorum
burn_proposal_deposit_prevote: boolburn deposits if the proposal does not enter voting period
burn_vote_veto: boolburn deposits if quorum with vote type no_veto is met
min_deposit_ratio: StringThe ratio representing the proportion of the deposit value minimum that must be met when making a deposit. Default value: 0.01. Meaning that for a chain with a min_deposit of 100stake, a deposit of 1stake would be required.
Since: cosmos-sdk 0.50
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Params
impl<'de> Deserialize<'de> for Params
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 Params
impl JsonSchema for Params
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 moreSource§impl Message for Params
impl Message for Params
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.Source§impl TryFrom<SubMsgResult> for Params
impl TryFrom<SubMsgResult> for Params
impl Eq for Params
impl StructuralPartialEq for Params
Auto Trait Implementations§
impl Freeze for Params
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnwindSafe for Params
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more