pub trait Config: Config {
    type RuntimeEvent: From<Event<Self>> + IsType<<Self as Config>::RuntimeEvent>;
    type MaxValuesPerBlock: Get<u32>;
    type ProcessBlockValues: ProcessBlockValues;
    type NativeCurrencyId: Get<CurrencyId>;
    type CircularBufferLength: Get<u32>;
    type AggregationDuration: Get<BlockNumberFor<Self>>;
    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 MaxValuesPerBlock: Get<u32>

Maximum number of distinct currency values we can store during a single block.

source

type ProcessBlockValues: ProcessBlockValues

Used to process accumulated values in the current block.

source

type NativeCurrencyId: Get<CurrencyId>

Native currency ID that this pallet is supposed to track.

source

type CircularBufferLength: Get<u32>

Maximum length of the circular buffer used to calculate the moving average.

source

type AggregationDuration: Get<BlockNumberFor<Self>>

Duration of aggregation period expressed in the number of blocks. During this time, currency values are aggregated, and are then used to calculate the average value.

source

type WeightInfo: WeightInfo

Object Safety§

This trait is not object safe.

Implementors§