pub trait Config: Config {
    type RuntimeEvent: From<Event> + IsType<<Self as Config>::RuntimeEvent>;
    type DefaultBaseFeePerGas: Get<U256>;
    type MinBaseFeePerGas: Get<U256>;
    type MaxBaseFeePerGas: Get<U256>;
    type AdjustmentFactor: Get<FixedU128>;
    type WeightFactor: Get<u128>;
    type StepLimitRatio: Get<Perquintill>;
    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> + IsType<<Self as Config>::RuntimeEvent>

Overarching event type

source

type DefaultBaseFeePerGas: Get<U256>

Default base fee per gas value. Used in genesis if no other value specified explicitly.

source

type MinBaseFeePerGas: Get<U256>

Minimum value ‘base fee per gas’ can be adjusted to. This is a defensive measure to prevent the fee from being too low.

source

type MaxBaseFeePerGas: Get<U256>

Maximum value ‘base fee per gas’ can be adjusted to. This is a defensive measure to prevent the fee from being too high.

source

type AdjustmentFactor: Get<FixedU128>

Getter for the fee adjustment factor used in ‘base fee per gas’ formula. This is expected to change in-between the blocks (doesn’t have to though).

source

type WeightFactor: Get<u128>

The so-called weight_factor in the ‘base fee per gas’ formula.

source

type StepLimitRatio: Get<Perquintill>

Ratio limit on how much the ‘base fee per gas’ can change in-between two blocks. It’s expressed as percentage, and used to calculate the delta between the old and new value. E.g. if the current ‘base fee per gas’ is 100, and the limit is 10%, then the new base fee per gas can be between 90 and 110.

source

type WeightInfo: WeightInfo

Weight information for extrinsics & functions of this pallet.

Object Safety§

This trait is not object safe.

Implementors§