Trait pallet_fast_unstake::pallet::Config

source ·
pub trait Config: Config {
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent> + TryInto<Event<Self>>;
    type Currency: ReservableCurrency<Self::AccountId>;
    type Deposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
    type ControlOrigin: EnsureOrigin<Self::RuntimeOrigin>;
    type BatchSize: Get<u32>;
    type Staking: StakingInterface<Balance = <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance, AccountId = Self::AccountId>;
    type MaxErasToCheckPerBlock: 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.

Required Associated Types§

source

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

The overarching event type.

source

type Currency: ReservableCurrency<Self::AccountId>

The currency used for deposits.

source

type Deposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>

Deposit to take for unstaking, to make sure we’re able to slash the it in order to cover the costs of resources on unsuccessful unstake.

source

type ControlOrigin: EnsureOrigin<Self::RuntimeOrigin>

The origin that can control this pallet, in other words invoke Pallet::control.

source

type BatchSize: Get<u32>

Batch size.

This many stashes are processed in each unstake request.

source

type Staking: StakingInterface<Balance = <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance, AccountId = Self::AccountId>

The access to staking functionality.

source

type MaxErasToCheckPerBlock: Get<u32>

Maximum value for ErasToCheckPerBlock, checked in Pallet::control.

This should be slightly bigger than the actual value in order to have accurate benchmarks.

source

type WeightInfo: WeightInfo

The weight information of this pallet.

Object Safety§

This trait is not object safe.

Implementors§