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
Implementations§
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§impl<'de> Deserialize<'de> for GenesisState
impl<'de> Deserialize<'de> for GenesisState
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 From<GenesisState> for Binary
impl From<GenesisState> for Binary
Source§fn from(msg: GenesisState) -> Self
fn from(msg: GenesisState) -> Self
Source§impl<T> From<GenesisState> for CosmosMsg<T>
impl<T> From<GenesisState> for CosmosMsg<T>
Source§fn from(msg: GenesisState) -> Self
fn from(msg: GenesisState) -> Self
Source§impl JsonSchema for GenesisState
impl JsonSchema for GenesisState
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 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 PartialEq for GenesisState
impl PartialEq for GenesisState
Source§impl Serialize for GenesisState
impl Serialize for GenesisState
Source§impl TryFrom<Binary> for GenesisState
impl TryFrom<Binary> for GenesisState
Source§impl TryFrom<SubMsgResult> for GenesisState
impl TryFrom<SubMsgResult> for GenesisState
impl Eq for GenesisState
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<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