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§
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 Currency: LockableCurrency<Self::AccountId, Moment = BlockNumberFor<Self>> + ReservableCurrency<Self::AccountId> + Currency<Self::AccountId>
type Currency: LockableCurrency<Self::AccountId, Moment = BlockNumberFor<Self>> + ReservableCurrency<Self::AccountId> + Currency<Self::AccountId>
The currency (token) used in this pallet.
sourcetype BlocksPerEra: Get<BlockNumberFor<Self>>
type BlocksPerEra: Get<BlockNumberFor<Self>>
Number of blocks per era.
sourcetype ErasPerYear: Get<u32>
type ErasPerYear: Get<u32>
Number of eras per year.
sourcetype Inflation: Get<InflationMethod<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>>
type Inflation: Get<InflationMethod<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::Balance>>
The inflation method and its amount.
sourcetype DealWithInflation: OnUnbalanced<<<Self as Config>::Currency as Currency<<Self as Config>::AccountId>>::NegativeImbalance>
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.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics in this pallet.
Object Safety§
This trait is not object safe.