pub trait Config: Config {
Show 27 associated items type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>; type Currency: Currency<Self::AccountId> + ReservableCurrency<Self::AccountId> + LockableCurrency<Self::AccountId>; type MonetaryGovernanceOrigin: EnsureOrigin<Self::RuntimeOrigin>; type MinBlocksPerRound: Get<u32>; type MaxOfflineRounds: Get<u32>; type LeaveCandidatesDelay: Get<RoundIndex>; type CandidateBondLessDelay: Get<RoundIndex>; type LeaveDelegatorsDelay: Get<RoundIndex>; type RevokeDelegationDelay: Get<RoundIndex>; type DelegationBondLessDelay: Get<RoundIndex>; type RewardPaymentDelay: Get<RoundIndex>; type MinSelectedCandidates: Get<u32>; type MaxTopDelegationsPerCandidate: Get<u32>; type MaxBottomDelegationsPerCandidate: Get<u32>; type MaxDelegationsPerDelegator: Get<u32>; type MinCandidateStk: Get<BalanceOf<Self>>; type MinDelegation: Get<BalanceOf<Self>>; type BlockAuthor: Get<Self::AccountId>; type OnCollatorPayout: OnCollatorPayout<Self::AccountId, BalanceOf<Self>>; type PayoutCollatorReward: PayoutCollatorReward<Self>; type OnInactiveCollator: OnInactiveCollator<Self>; type OnNewRound: OnNewRound; type SlotProvider: Get<Slot>; type SlotDuration: Get<u64>; type BlockTime: Get<u64>; type MaxCandidates: Get<u32>; type WeightInfo: WeightInfo;
}
Expand description

Configuration trait of this pallet.

The main purpose of this trait is to act as an interface between this pallet and the runtime in which it is embedded in. A type, function, or constant in this trait is essentially left to be configured by the runtime that includes this pallet.

Consequently, a runtime that wants to include this pallet must implement this trait. Configuration trait of this pallet.

Required Associated Types§

source

type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>

Overarching event type

source

type Currency: Currency<Self::AccountId> + ReservableCurrency<Self::AccountId> + LockableCurrency<Self::AccountId>

The currency type

source

type MonetaryGovernanceOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin for monetary governance

source

type MinBlocksPerRound: Get<u32>

Minimum number of blocks per round

source

type MaxOfflineRounds: Get<u32>

If a collator doesn’t produce any block on this number of rounds, it is notified as inactive. This value must be less than or equal to RewardPaymentDelay.

source

type LeaveCandidatesDelay: Get<RoundIndex>

Number of rounds that candidates remain bonded before exit request is executable

source

type CandidateBondLessDelay: Get<RoundIndex>

Number of rounds candidate requests to decrease self-bond must wait to be executable

source

type LeaveDelegatorsDelay: Get<RoundIndex>

Number of rounds that delegators remain bonded before exit request is executable

source

type RevokeDelegationDelay: Get<RoundIndex>

Number of rounds that delegations remain bonded before revocation request is executable

source

type DelegationBondLessDelay: Get<RoundIndex>

Number of rounds that delegation less requests must wait before executable

source

type RewardPaymentDelay: Get<RoundIndex>

Number of rounds after which block authors are rewarded

source

type MinSelectedCandidates: Get<u32>

Minimum number of selected candidates every round

source

type MaxTopDelegationsPerCandidate: Get<u32>

Maximum top delegations counted per candidate

source

type MaxBottomDelegationsPerCandidate: Get<u32>

Maximum bottom delegations (not counted) per candidate

source

type MaxDelegationsPerDelegator: Get<u32>

Maximum delegations per delegator

source

type MinCandidateStk: Get<BalanceOf<Self>>

Minimum stake required for any account to be a collator candidate

source

type MinDelegation: Get<BalanceOf<Self>>

Minimum stake for any registered on-chain account to delegate

source

type BlockAuthor: Get<Self::AccountId>

Get the current block author

source

type OnCollatorPayout: OnCollatorPayout<Self::AccountId, BalanceOf<Self>>

Handler to notify the runtime when a collator is paid. If you don’t need it, you can specify the type ().

source

type PayoutCollatorReward: PayoutCollatorReward<Self>

Handler to distribute a collator’s reward. To use the default implementation of minting rewards, specify the type ().

source

type OnInactiveCollator: OnInactiveCollator<Self>

Handler to notify the runtime when a collator is inactive. The default behavior is to mark the collator as offline. If you need to use the default implementation, specify the type ().

source

type OnNewRound: OnNewRound

Handler to notify the runtime when a new round begin. If you don’t need it, you can specify the type ().

source

type SlotProvider: Get<Slot>

Get the current slot number

source

type SlotDuration: Get<u64>

Get the slot duration in milliseconds

source

type BlockTime: Get<u64>

Get the average time beetween 2 blocks in milliseconds

source

type MaxCandidates: Get<u32>

Maximum candidates

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

Object Safety§

This trait is not object safe.

Implementors§