Trait pallet_delegated_staking::pallet::Config
source · pub trait Config: Config {
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
type PalletId: Get<PalletId>;
type Currency: FunHoldMutate<Self::AccountId, Reason = Self::RuntimeHoldReason> + FunMutate<Self::AccountId> + FunHoldBalanced<Self::AccountId>;
type OnSlash: OnUnbalanced<Credit<Self::AccountId, Self::Currency>>;
type SlashRewardFraction: Get<Perbill>;
type RuntimeHoldReason: From<HoldReason>;
type CoreStaking: StakingUnchecked<Balance = BalanceOf<Self>, AccountId = Self::AccountId>;
}
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.
Required Associated Types§
sourcetype RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype Currency: FunHoldMutate<Self::AccountId, Reason = Self::RuntimeHoldReason> + FunMutate<Self::AccountId> + FunHoldBalanced<Self::AccountId>
type Currency: FunHoldMutate<Self::AccountId, Reason = Self::RuntimeHoldReason> + FunMutate<Self::AccountId> + FunHoldBalanced<Self::AccountId>
Currency type.
sourcetype OnSlash: OnUnbalanced<Credit<Self::AccountId, Self::Currency>>
type OnSlash: OnUnbalanced<Credit<Self::AccountId, Self::Currency>>
Handler for the unbalanced reduction when slashing a delegator.
sourcetype SlashRewardFraction: Get<Perbill>
type SlashRewardFraction: Get<Perbill>
Fraction of the slash that is rewarded to the caller of pending slash to the agent.
sourcetype RuntimeHoldReason: From<HoldReason>
type RuntimeHoldReason: From<HoldReason>
Overarching hold reason.
sourcetype CoreStaking: StakingUnchecked<Balance = BalanceOf<Self>, AccountId = Self::AccountId>
type CoreStaking: StakingUnchecked<Balance = BalanceOf<Self>, AccountId = Self::AccountId>
Core staking implementation.
Object Safety§
This trait is not object safe.