Trait pallet_capacity::pallet::Config
source · 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§
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 RuntimeFreezeReason: From<FreezeReason>
type RuntimeFreezeReason: From<FreezeReason>
The overarching freeze reason.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
sourcetype Currency: MutateFreeze<Self::AccountId, Id = Self::RuntimeFreezeReason> + Mutate<Self::AccountId> + InspectFreeze<Self::AccountId> + InspectFungible<Self::AccountId>
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.
sourcetype TargetValidator: TargetValidator
type TargetValidator: TargetValidator
Function that checks if an MSA is a valid target.
sourcetype MinimumStakingAmount: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>
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.
sourcetype MinimumTokenBalance: 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>
The minimum required token amount to remain in the account after staking.
sourcetype MaxUnlockingChunks: Get<u32>
type MaxUnlockingChunks: Get<u32>
The maximum number of unlocking chunks a StakingAccountLedger can have. It determines how many concurrent unstaked chunks may exist.
sourcetype UnstakingThawPeriod: Get<u16>
type UnstakingThawPeriod: Get<u16>
The number of Epochs before you can unlock tokens after unstaking.
sourcetype MaxEpochLength: Get<BlockNumberFor<Self>>
type MaxEpochLength: Get<BlockNumberFor<Self>>
Maximum number of blocks an epoch can be
sourcetype EpochNumber: Parameter + Member + MaybeSerializeDeserialize + MaybeDisplay + AtLeast32BitUnsigned + Default + Copy + Hash + MaxEncodedLen + TypeInfo
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
sourcetype CapacityPerToken: Get<Perbill>
type CapacityPerToken: Get<Perbill>
How much FRQCY one unit of Capacity costs
sourcetype ProviderBoostHistoryLimit: Get<u32>
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
sourcetype RewardsProvider: ProviderBoostRewardsProvider<Self>
type RewardsProvider: ProviderBoostRewardsProvider<Self>
The ProviderBoostRewardsProvider used by this pallet in a given runtime
sourcetype MaxRetargetsPerRewardEra: Get<u32>
type MaxRetargetsPerRewardEra: Get<u32>
A staker may not retarget more than MaxRetargetsPerRewardEra
sourcetype RewardPoolPerEra: Get<<<Self as Config>::Currency as InspectFungible<<Self as Config>::AccountId>>::Balance>
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.
sourcetype RewardPercentCap: Get<Permill>
type RewardPercentCap: Get<Permill>
the percentage cap per era of an individual Provider Boost reward
sourcetype RewardPoolChunkLength: Get<u32>
type RewardPoolChunkLength: Get<u32>
The number of chunks of Reward Pool history we expect to store
Is a divisor of Self::ProviderBoostHistoryLimit