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;
type MaxBackersPerValidator: Get<u32>;
}
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> + TryInto<Event<Self>>
type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent> + TryInto<Event<Self>>
The overarching event type.
sourcetype Currency: ReservableCurrency<Self::AccountId>
type Currency: ReservableCurrency<Self::AccountId>
The currency used for deposits.
sourcetype Deposit: Get<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
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.
sourcetype ControlOrigin: EnsureOrigin<Self::RuntimeOrigin>
type ControlOrigin: EnsureOrigin<Self::RuntimeOrigin>
The origin that can control this pallet, in other words invoke Pallet::control
.
sourcetype Staking: StakingInterface<Balance = <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance, AccountId = Self::AccountId>
type Staking: StakingInterface<Balance = <<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance, AccountId = Self::AccountId>
The access to staking functionality.
sourcetype MaxErasToCheckPerBlock: Get<u32>
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.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
The weight information of this pallet.
sourcetype MaxBackersPerValidator: Get<u32>
type MaxBackersPerValidator: Get<u32>
Use only for benchmarking.