Trait pallet_parachain_staking::pallet::Config
source · 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§
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
Overarching event type
sourcetype Currency: Currency<Self::AccountId> + ReservableCurrency<Self::AccountId> + LockableCurrency<Self::AccountId>
type Currency: Currency<Self::AccountId> + ReservableCurrency<Self::AccountId> + LockableCurrency<Self::AccountId>
The currency type
sourcetype MonetaryGovernanceOrigin: EnsureOrigin<Self::RuntimeOrigin>
type MonetaryGovernanceOrigin: EnsureOrigin<Self::RuntimeOrigin>
The origin for monetary governance
sourcetype MinBlocksPerRound: Get<u32>
type MinBlocksPerRound: Get<u32>
Minimum number of blocks per round
sourcetype MaxOfflineRounds: Get<u32>
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.
sourcetype LeaveCandidatesDelay: Get<RoundIndex>
type LeaveCandidatesDelay: Get<RoundIndex>
Number of rounds that candidates remain bonded before exit request is executable
sourcetype CandidateBondLessDelay: Get<RoundIndex>
type CandidateBondLessDelay: Get<RoundIndex>
Number of rounds candidate requests to decrease self-bond must wait to be executable
sourcetype LeaveDelegatorsDelay: Get<RoundIndex>
type LeaveDelegatorsDelay: Get<RoundIndex>
Number of rounds that delegators remain bonded before exit request is executable
sourcetype RevokeDelegationDelay: Get<RoundIndex>
type RevokeDelegationDelay: Get<RoundIndex>
Number of rounds that delegations remain bonded before revocation request is executable
sourcetype DelegationBondLessDelay: Get<RoundIndex>
type DelegationBondLessDelay: Get<RoundIndex>
Number of rounds that delegation less requests must wait before executable
sourcetype RewardPaymentDelay: Get<RoundIndex>
type RewardPaymentDelay: Get<RoundIndex>
Number of rounds after which block authors are rewarded
sourcetype MinSelectedCandidates: Get<u32>
type MinSelectedCandidates: Get<u32>
Minimum number of selected candidates every round
sourcetype MaxTopDelegationsPerCandidate: Get<u32>
type MaxTopDelegationsPerCandidate: Get<u32>
Maximum top delegations counted per candidate
sourcetype MaxBottomDelegationsPerCandidate: Get<u32>
type MaxBottomDelegationsPerCandidate: Get<u32>
Maximum bottom delegations (not counted) per candidate
sourcetype MaxDelegationsPerDelegator: Get<u32>
type MaxDelegationsPerDelegator: Get<u32>
Maximum delegations per delegator
sourcetype MinCandidateStk: Get<BalanceOf<Self>>
type MinCandidateStk: Get<BalanceOf<Self>>
Minimum stake required for any account to be a collator candidate
sourcetype MinDelegation: Get<BalanceOf<Self>>
type MinDelegation: Get<BalanceOf<Self>>
Minimum stake for any registered on-chain account to delegate
sourcetype BlockAuthor: Get<Self::AccountId>
type BlockAuthor: Get<Self::AccountId>
Get the current block author
sourcetype OnCollatorPayout: OnCollatorPayout<Self::AccountId, BalanceOf<Self>>
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 ()
.
sourcetype PayoutCollatorReward: PayoutCollatorReward<Self>
type PayoutCollatorReward: PayoutCollatorReward<Self>
Handler to distribute a collator’s reward.
To use the default implementation of minting rewards, specify the type ()
.
sourcetype OnInactiveCollator: OnInactiveCollator<Self>
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 ()
.
sourcetype OnNewRound: OnNewRound
type OnNewRound: OnNewRound
Handler to notify the runtime when a new round begin.
If you don’t need it, you can specify the type ()
.
sourcetype SlotProvider: Get<Slot>
type SlotProvider: Get<Slot>
Get the current slot number
sourcetype SlotDuration: Get<u64>
type SlotDuration: Get<u64>
Get the slot duration in milliseconds
sourcetype MaxCandidates: Get<u32>
type MaxCandidates: Get<u32>
Maximum candidates
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.