Trait darwinia_staking::pallet::Config
source · [−]pub trait Config: Config + SendTransactionTypes<Call<Self>> {
Show 26 associated items
type Event: From<Event<Self>> + IsType<<Self as Config>::Event>;
type PalletId: Get<PalletId>;
type UnixTime: UnixTime;
type ElectionProvider: ElectionProvider<AccountId = Self::AccountId, BlockNumber = Self::BlockNumber, DataProvider = Pallet<Self>>;
type GenesisElectionProvider: ElectionProvider<AccountId = Self::AccountId, BlockNumber = Self::BlockNumber, DataProvider = Pallet<Self>>;
type SessionsPerEra: Get<SessionIndex>;
type SessionInterface: SessionInterface<Self::AccountId>;
type NextNewSession: EstimateNextNewSession<Self::BlockNumber>;
type SlashDeferDuration: Get<EraIndex>;
type SlashCancelOrigin: EnsureOrigin<Self::Origin>;
type MaxNominatorRewardedPerValidator: Get<u32>;
type OffendingValidatorsThreshold: Get<Perbill>;
type SortedListProvider: SortedListProvider<Self::AccountId>;
type BondingDurationInEra: Get<EraIndex>;
type BondingDurationInBlockNumber: Get<Self::BlockNumber>;
type RingCurrency: LockableCurrency<Self::AccountId>;
type RingRewardRemainder: OnUnbalanced<RingNegativeImbalance<Self>>;
type RingSlash: OnUnbalanced<RingNegativeImbalance<Self>>;
type RingReward: OnUnbalanced<RingPositiveImbalance<Self>>;
type KtonCurrency: LockableCurrency<Self::AccountId>;
type KtonSlash: OnUnbalanced<KtonNegativeImbalance<Self>>;
type KtonReward: OnUnbalanced<KtonPositiveImbalance<Self>>;
type Cap: Get<RingBalance<Self>>;
type TotalPower: Get<Power>;
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.
Required Associated Types
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.
type ElectionProvider: ElectionProvider<AccountId = Self::AccountId, BlockNumber = Self::BlockNumber, DataProvider = Pallet<Self>>
type ElectionProvider: ElectionProvider<AccountId = Self::AccountId, BlockNumber = Self::BlockNumber, DataProvider = Pallet<Self>>
Something that provides the election functionality.
type GenesisElectionProvider: ElectionProvider<AccountId = Self::AccountId, BlockNumber = Self::BlockNumber, DataProvider = Pallet<Self>>
type GenesisElectionProvider: ElectionProvider<AccountId = Self::AccountId, BlockNumber = Self::BlockNumber, DataProvider = Pallet<Self>>
Something that provides the election functionality at genesis.
type SessionsPerEra: Get<SessionIndex>
type SessionsPerEra: Get<SessionIndex>
Number of sessions per era.
type SessionInterface: SessionInterface<Self::AccountId>
type SessionInterface: SessionInterface<Self::AccountId>
Interface for interacting with a session pallet.
type NextNewSession: EstimateNextNewSession<Self::BlockNumber>
type NextNewSession: EstimateNextNewSession<Self::BlockNumber>
Something that can estimate the next session change, accurately or as a best effort guess.
type SlashDeferDuration: Get<EraIndex>
type SlashDeferDuration: Get<EraIndex>
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.
type SlashCancelOrigin: EnsureOrigin<Self::Origin>
type SlashCancelOrigin: EnsureOrigin<Self::Origin>
The origin which can cancel a deferred slash. Root can always do this.
type MaxNominatorRewardedPerValidator: Get<u32>
type MaxNominatorRewardedPerValidator: Get<u32>
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.
type OffendingValidatorsThreshold: Get<Perbill>
type OffendingValidatorsThreshold: Get<Perbill>
The fraction of the validator set that is safe to be offending. After the threshold is reached a new era will be forced.
type SortedListProvider: SortedListProvider<Self::AccountId>
type SortedListProvider: SortedListProvider<Self::AccountId>
Something that can provide a sorted list of voters in a somewhat sorted way. The
original use case for this was designed with [pallet_bags_list::Pallet
] in mind. If
the bags-list is not desired, [impls::UseNominatorsMap
] is likely the desired option.
type BondingDurationInEra: Get<EraIndex>
type BondingDurationInEra: Get<EraIndex>
Number of eras that staked funds must remain bonded for.
type BondingDurationInBlockNumber: Get<Self::BlockNumber>
type BondingDurationInBlockNumber: Get<Self::BlockNumber>
Number of eras that staked funds must remain bonded for.
type RingCurrency: LockableCurrency<Self::AccountId>
type RingCurrency: LockableCurrency<Self::AccountId>
The RING currency.
type RingRewardRemainder: OnUnbalanced<RingNegativeImbalance<Self>>
type RingRewardRemainder: OnUnbalanced<RingNegativeImbalance<Self>>
Tokens have been minted and are unused for validator-reward. See Era payout.
type RingSlash: OnUnbalanced<RingNegativeImbalance<Self>>
type RingSlash: OnUnbalanced<RingNegativeImbalance<Self>>
Handler for the unbalanced RING reduction when slashing a staker.
type RingReward: OnUnbalanced<RingPositiveImbalance<Self>>
type RingReward: OnUnbalanced<RingPositiveImbalance<Self>>
Handler for the unbalanced RING increment when rewarding a staker.
type KtonCurrency: LockableCurrency<Self::AccountId>
type KtonCurrency: LockableCurrency<Self::AccountId>
The KTON currency.
type KtonSlash: OnUnbalanced<KtonNegativeImbalance<Self>>
type KtonSlash: OnUnbalanced<KtonNegativeImbalance<Self>>
Handler for the unbalanced KTON reduction when slashing a staker.
type KtonReward: OnUnbalanced<KtonPositiveImbalance<Self>>
type KtonReward: OnUnbalanced<KtonPositiveImbalance<Self>>
Handler for the unbalanced KTON increment when rewarding a staker.
type Cap: Get<RingBalance<Self>>
type Cap: Get<RingBalance<Self>>
Darwinia’s hard cap default 10_000_000_000 * 10^9
type TotalPower: Get<Power>
type TotalPower: Get<Power>
Darwinia’s staking vote default 1_000_000_000
type WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
Required Associated Constants
const MAX_NOMINATIONS: u32
const MAX_NOMINATIONS: u32
Maximum number of nominations per nominator.