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§

source

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

The overarching event type.

source

type PalletId: Get<PalletId>

Injected identifier for the pallet.

source

type Currency: FunHoldMutate<Self::AccountId, Reason = Self::RuntimeHoldReason> + FunMutate<Self::AccountId> + FunHoldBalanced<Self::AccountId>

Currency type.

source

type OnSlash: OnUnbalanced<Credit<Self::AccountId, Self::Currency>>

Handler for the unbalanced reduction when slashing a delegator.

source

type SlashRewardFraction: Get<Perbill>

Fraction of the slash that is rewarded to the caller of pending slash to the agent.

source

type RuntimeHoldReason: From<HoldReason>

Overarching hold reason.

source

type CoreStaking: StakingUnchecked<Balance = BalanceOf<Self>, AccountId = Self::AccountId>

Core staking implementation.

Object Safety§

This trait is not object safe.

Implementors§