Trait pallet_staking::Config[][src]

pub trait Config: Config + SendTransactionTypes<Call<Self>> {
Show associated items type Currency: LockableCurrency<Self::AccountId, Moment = Self::BlockNumber>; type UnixTime: UnixTime; type CurrencyToVote: CurrencyToVote<BalanceOf<Self>>; type ElectionProvider: ElectionProvider<Self::AccountId, Self::BlockNumber, DataProvider = Pallet<Self>>; type GenesisElectionProvider: ElectionProvider<Self::AccountId, Self::BlockNumber, DataProvider = Pallet<Self>>; type RewardRemainder: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>; type Event: From<Event<Self>> + IsType<<Self as Config>::Event>; type Slash: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>; type Reward: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::PositiveImbalance>; type SessionsPerEra: Get<SessionIndex>; type BondingDuration: Get<EraIndex>; type SlashDeferDuration: Get<EraIndex>; type SlashCancelOrigin: EnsureOrigin<Self::Origin>; type SessionInterface: SessionInterface<Self::AccountId>; type EraPayout: EraPayout<BalanceOf<Self>>; type NextNewSession: EstimateNextNewSession<Self::BlockNumber>; type MaxNominatorRewardedPerValidator: Get<u32>; type WeightInfo: WeightInfo; const MAX_NOMINATIONS: u32;
}
Expand description

Configuration trait of this pallet.

Implement this type for a runtime in order to customize this pallet.

Associated Types

The staking balance.

Time used for computing era duration.

It is guaranteed to start being called from the first on_finalize. Thus value at genesis is not used.

Convert a balance into a number used for election calculation. This must fit into a u64 but is allowed to be sensibly lossy. The u64 is used to communicate with the [sp_npos_elections] crate which accepts u64 numbers and does operations in 128. Consequently, the backward convert is used convert the u128s from sp-elections back to a BalanceOf.

Something that provides the election functionality.

Something that provides the election functionality at genesis.

Tokens have been minted and are unused for validator-reward. See Era payout.

The overarching event type.

Handler for the unbalanced reduction when slashing a staker.

Handler for the unbalanced increment when rewarding a staker.

Number of sessions per era.

Number of eras that staked funds must remain bonded for.

Number of eras that slashes are deferred by, after computation.

This should be less than the bonding duration. Set to 0 if slashes should be applied immediately, without opportunity for intervention.

The origin which can cancel a deferred slash. Root can always do this.

Interface for interacting with a session pallet.

The payout for validators and the system for the current era. See Era payout.

Something that can estimate the next session change, accurately or as a best effort guess.

The maximum number of nominators rewarded for each validator.

For each validator only the $MaxNominatorRewardedPerValidator biggest stakers can claim their reward. This used to limit the i/o cost for the nominator payout.

Weight information for extrinsics in this pallet.

Associated Constants

Maximum number of nominations per nominator.

Implementors