pub trait Config: Config {
Show 19 associated items type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>; type RuntimeFreezeReason: From<FreezeReason>; type WeightInfo: WeightInfo; type Currency: MutateFreeze<Self::AccountId, Id = Self::RuntimeFreezeReason> + Mutate<Self::AccountId> + InspectFreeze<Self::AccountId> + InspectFungible<Self::AccountId>; type TargetValidator: TargetValidator; type MinimumStakingAmount: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>; type MinimumTokenBalance: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>; type MaxUnlockingChunks: Get<u32>; type UnstakingThawPeriod: Get<u16>; type MaxEpochLength: Get<BlockNumberFor<Self>>; type EpochNumber: Parameter + Member + MaybeSerializeDeserialize + MaybeDisplay + AtLeast32BitUnsigned + Default + Copy + Hash + MaxEncodedLen + TypeInfo; type CapacityPerToken: Get<Perbill>; type EraLength: Get<u32>; type ProviderBoostHistoryLimit: Get<u32>; type RewardsProvider: ProviderBoostRewardsProvider<Self>; type MaxRetargetsPerRewardEra: Get<u32>; type RewardPoolPerEra: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>; type RewardPercentCap: Get<Permill>; type RewardPoolChunkLength: 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§

source

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

The overarching event type.

source

type RuntimeFreezeReason: From<FreezeReason>

The overarching freeze reason.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

source

type Currency: MutateFreeze<Self::AccountId, Id = Self::RuntimeFreezeReason> + Mutate<Self::AccountId> + InspectFreeze<Self::AccountId> + InspectFungible<Self::AccountId>

Functions that allow a fungible balance to be changed or frozen.

source

type TargetValidator: TargetValidator

Function that checks if an MSA is a valid target.

source

type MinimumStakingAmount: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>

The minimum required token amount to stake. It facilitates cleaning dust when unstaking.

source

type MinimumTokenBalance: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>

The minimum required token amount to remain in the account after staking.

source

type MaxUnlockingChunks: Get<u32>

The maximum number of unlocking chunks a StakingAccountLedger can have. It determines how many concurrent unstaked chunks may exist.

source

type UnstakingThawPeriod: Get<u16>

The number of Epochs before you can unlock tokens after unstaking.

source

type MaxEpochLength: Get<BlockNumberFor<Self>>

Maximum number of blocks an epoch can be

source

type EpochNumber: Parameter + Member + MaybeSerializeDeserialize + MaybeDisplay + AtLeast32BitUnsigned + Default + Copy + Hash + MaxEncodedLen + TypeInfo

A type that provides an Epoch number traits pulled from frame_system::Config::BlockNumber

source

type CapacityPerToken: Get<Perbill>

How much FRQCY one unit of Capacity costs

source

type EraLength: Get<u32>

The number of blocks in a RewardEra

source

type ProviderBoostHistoryLimit: Get<u32>

The maximum number of eras over which one can claim rewards Note that you can claim rewards even if you no longer are boosting, because you may claim rewards for past eras up to the history limit. MUST be a multiple of Self::RewardPoolChunkLength

source

type RewardsProvider: ProviderBoostRewardsProvider<Self>

The ProviderBoostRewardsProvider used by this pallet in a given runtime

source

type MaxRetargetsPerRewardEra: Get<u32>

A staker may not retarget more than MaxRetargetsPerRewardEra

source

type RewardPoolPerEra: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>

The fixed size of the reward pool in each Reward Era.

source

type RewardPercentCap: Get<Permill>

the percentage cap per era of an individual Provider Boost reward

source

type RewardPoolChunkLength: Get<u32>

The number of chunks of Reward Pool history we expect to store Is a divisor of Self::ProviderBoostHistoryLimit

Object Safety§

This trait is not object safe.

Implementors§