pub struct GenesisState {
pub starting_proposal_id: u64,
pub deposits: Vec<Deposit>,
pub votes: Vec<Vote>,
pub proposals: Vec<Proposal>,
pub deposit_params: Option<DepositParams>,
pub voting_params: Option<VotingParams>,
pub tally_params: Option<TallyParams>,
pub params: Option<Params>,
pub constitution: String,
}
Expand description
GenesisState defines the gov module’s genesis state.
Fields§
§starting_proposal_id: u64
starting_proposal_id is the ID of the starting proposal.
deposits: Vec<Deposit>
deposits defines all the deposits present at genesis.
votes: Vec<Vote>
votes defines all the votes present at genesis.
proposals: Vec<Proposal>
proposals defines all the proposals present at genesis.
deposit_params: Option<DepositParams>
Deprecated: Prefer to use params
instead.
deposit_params defines all the paramaters of related to deposit.
voting_params: Option<VotingParams>
Deprecated: Prefer to use params
instead.
voting_params defines all the paramaters of related to voting.
tally_params: Option<TallyParams>
Deprecated: Prefer to use params
instead.
tally_params defines all the paramaters of related to tally.
params: Option<Params>
params defines all the paramaters of x/gov module.
Since: cosmos-sdk 0.47
constitution: String
The constitution allows builders to lay a foundation and define purpose. This is an immutable string set in genesis. There are no amendments, to go outside of scope, just fork. constitution is an immutable string in genesis for a chain builder to lay out their vision, ideas and ideals.
Since: cosmos-sdk 0.50
Trait Implementations§
Source§impl Clone for GenesisState
impl Clone for GenesisState
Source§fn clone(&self) -> GenesisState
fn clone(&self) -> GenesisState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for GenesisState
impl Debug for GenesisState
Source§impl Default for GenesisState
impl Default for GenesisState
Source§fn default() -> GenesisState
fn default() -> GenesisState
Source§impl<'de> Deserialize<'de> for GenesisState
impl<'de> Deserialize<'de> for GenesisState
Source§fn deserialize<D>(
deserializer: D,
) -> Result<GenesisState, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<GenesisState, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Source§impl Message for GenesisState
impl Message for GenesisState
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 Name for GenesisState
impl Name for GenesisState
Source§const NAME: &'static str = "GenesisState"
const NAME: &'static str = "GenesisState"
Message
.
This name is the same as it appears in the source .proto file, e.g. FooBar
.Source§const PACKAGE: &'static str = "cosmos.gov.v1"
const PACKAGE: &'static str = "cosmos.gov.v1"
.
, e.g. google.protobuf
.Source§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.Source§impl PartialEq for GenesisState
impl PartialEq for GenesisState
Source§impl Serialize for GenesisState
impl Serialize for GenesisState
Source§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
impl StructuralPartialEq for GenesisState
Auto Trait Implementations§
impl Freeze for GenesisState
impl RefUnwindSafe for GenesisState
impl Send for GenesisState
impl Sync for GenesisState
impl Unpin for GenesisState
impl UnwindSafe for GenesisState
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request