pub struct GenesisConfig<T: Config> {
pub validator_count: u32,
pub invulnerables: BoundedVec<T::AccountId, T::MaxInvulnerables>,
pub force_era: Forcing,
pub slash_reward_fraction: Perbill,
pub canceled_payout: BalanceOf<T>,
pub stakers: Vec<(T::AccountId, BalanceOf<T>, StakerStatus<T::AccountId>)>,
pub min_nominator_bond: BalanceOf<T>,
pub min_validator_bond: BalanceOf<T>,
pub max_validator_count: Option<u32>,
pub max_nominator_count: Option<u32>,
pub dev_stakers: Option<(u32, u32)>,
pub active_era: (u32, u32, u64),
}Expand description
Can be used to configure the genesis state of this pallet.
Fields§
§validator_count: u32§invulnerables: BoundedVec<T::AccountId, T::MaxInvulnerables>§force_era: Forcing§slash_reward_fraction: Perbill§canceled_payout: BalanceOf<T>§stakers: Vec<(T::AccountId, BalanceOf<T>, StakerStatus<T::AccountId>)>§min_nominator_bond: BalanceOf<T>§min_validator_bond: BalanceOf<T>§max_validator_count: Option<u32>§max_nominator_count: Option<u32>§dev_stakers: Option<(u32, u32)>Create the given number of validators and nominators.
These account need not be in the endowment list of balances, and are auto-topped up here.
Useful for testing genesis config.
active_era: (u32, u32, u64)initial active era, corresponding session index and start timestamp.
Trait Implementations§
Source§impl<T: Config> BuildGenesisConfig for GenesisConfig<T>
impl<T: Config> BuildGenesisConfig for GenesisConfig<T>
Source§impl<T: Config> BuildStorage for GenesisConfig<T>
impl<T: Config> BuildStorage for GenesisConfig<T>
Source§impl<T: Config> Debug for GenesisConfig<T>
impl<T: Config> Debug for GenesisConfig<T>
Source§impl<T: Config> Default for GenesisConfig<T>
impl<T: Config> Default for GenesisConfig<T>
Source§impl<'de, T: Config> Deserialize<'de> for GenesisConfig<T>
impl<'de, T: Config> Deserialize<'de> for GenesisConfig<T>
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> Freeze for GenesisConfig<T>
impl<T> RefUnwindSafe for GenesisConfig<T>where
<T as Config>::RuntimeEvent: Sized,
<T as Config>::CurrencyBalance: RefUnwindSafe,
<T as Config>::MaxInvulnerables: RefUnwindSafe,
<T as Config>::AccountId: RefUnwindSafe,
impl<T> Send for GenesisConfig<T>
impl<T> Sync for GenesisConfig<T>
impl<T> Unpin for GenesisConfig<T>where
<T as Config>::RuntimeEvent: Sized,
<T as Config>::CurrencyBalance: Unpin,
<T as Config>::MaxInvulnerables: Unpin,
<T as Config>::AccountId: Unpin,
impl<T> UnwindSafe for GenesisConfig<T>where
<T as Config>::RuntimeEvent: Sized,
<T as Config>::CurrencyBalance: UnwindSafe,
<T as Config>::MaxInvulnerables: UnwindSafe,
<T as Config>::AccountId: UnwindSafe,
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
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
Source§impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
impl<T, U> DefensiveTruncateInto<U> for Twhere
U: DefensiveTruncateFrom<T>,
Source§fn defensive_truncate_into(self) -> U
fn defensive_truncate_into(self) -> U
Defensively truncate a value and convert it into its bounded form.
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> 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>
Converts
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>
Converts
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 moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T. Read moreSource§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
Source§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T.