pub trait Config<I: 'static = ()>: Config {
type AnnuityPalletId: Get<PalletId>;
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>;
type Currency: ReservableCurrency<Self::AccountId>;
type BlockRewardProvider: BlockRewardProvider<Self::AccountId, Currency = Self::Currency>;
type BlockNumberToBalance: Convert<BlockNumberFor<Self>, <<Self as Config<I>>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
type EmissionPeriod: Get<BlockNumberFor<Self>>;
type TotalWrapped: Get<<<Self as Config<I>>::Currency as Currency<<Self as Config>::AccountId>>::Balance>;
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.
Configuration
The pallet’s configuration trait.
Required Associated Types§
sourcetype AnnuityPalletId: Get<PalletId>
type AnnuityPalletId: Get<PalletId>
The annuity module id, used for deriving its sovereign account ID.
sourcetype RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event<Self, I>> + IsType<<Self as Config>::RuntimeEvent>
The overarching event type.
sourcetype BlockRewardProvider: BlockRewardProvider<Self::AccountId, Currency = Self::Currency>
type BlockRewardProvider: BlockRewardProvider<Self::AccountId, Currency = Self::Currency>
The block reward provider.
sourcetype BlockNumberToBalance: Convert<BlockNumberFor<Self>, <<Self as Config<I>>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type BlockNumberToBalance: Convert<BlockNumberFor<Self>, <<Self as Config<I>>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
Convert the block number into a balance.
sourcetype EmissionPeriod: Get<BlockNumberFor<Self>>
type EmissionPeriod: Get<BlockNumberFor<Self>>
The emission period for block rewards.
sourcetype TotalWrapped: Get<<<Self as Config<I>>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
type TotalWrapped: Get<<<Self as Config<I>>::Currency as Currency<<Self as Config>::AccountId>>::Balance>
The total amount of the wrapped asset.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for the extrinsics in this module.