Trait annuity::pallet::Config

source ·
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§

source

type AnnuityPalletId: Get<PalletId>

The annuity module id, used for deriving its sovereign account ID.

source

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

The overarching event type.

source

type Currency: ReservableCurrency<Self::AccountId>

The native currency for emission.

source

type BlockRewardProvider: BlockRewardProvider<Self::AccountId, Currency = Self::Currency>

The block reward provider.

source

type BlockNumberToBalance: Convert<BlockNumberFor<Self>, <<Self as Config<I>>::Currency as Currency<<Self as Config>::AccountId>>::Balance>

Convert the block number into a balance.

source

type EmissionPeriod: Get<BlockNumberFor<Self>>

The emission period for block rewards.

source

type TotalWrapped: Get<<<Self as Config<I>>::Currency as Currency<<Self as Config>::AccountId>>::Balance>

The total amount of the wrapped asset.

source

type WeightInfo: WeightInfo

Weight information for the extrinsics in this module.

Implementors§