Trait pallet_checked_inflation::pallet::Config

source ·
pub trait Config: Config {
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type Currency: LockableCurrency<Self::AccountId, Moment = BlockNumberFor<Self>> + ReservableCurrency<Self::AccountId> + Currency<Self::AccountId>;
    type BlocksPerEra: Get<BlockNumberFor<Self>>;
    type ErasPerYear: Get<u32>;
    type Inflation: Get<InflationMethod<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>>;
    type DealWithInflation: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>;
    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.

Required Associated Types§

source

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

The overarching event type.

source

type Currency: LockableCurrency<Self::AccountId, Moment = BlockNumberFor<Self>> + ReservableCurrency<Self::AccountId> + Currency<Self::AccountId>

The currency (token) used in this pallet.

source

type BlocksPerEra: Get<BlockNumberFor<Self>>

Number of blocks per era.

source

type ErasPerYear: Get<u32>

Number of eras per year.

source

type Inflation: Get<InflationMethod<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>>

The inflation method and its amount.

source

type DealWithInflation: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>

The NegativeImbalanceOf the currency, i.e. the amount of inflation to be applied.

source

type WeightInfo: WeightInfo

Weight information for extrinsics in this pallet.

Object Safety§

This trait is not object safe.

Implementors§