Struct Params
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
Trait Implementations§
§impl Message for Params
impl Message for Params
§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.§impl Name for Params
impl Name for Params
§const NAME: &'static str = "Params"
const NAME: &'static str = "Params"
Message.
This name is the same as it appears in the source .proto file, e.g. FooBar.§const PACKAGE: &'static str = "cosmos.gov.v1"
const PACKAGE: &'static str = "cosmos.gov.v1"
., e.g. google.protobuf.§fn full_name() -> String
fn full_name() -> String
Message.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.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§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].