Trait pallet_dynamic_evm_base_fee::pallet::Config
source · 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§
sourcetype RuntimeEvent: From<Event> + IsType<<Self as Config>::RuntimeEvent>
type RuntimeEvent: From<Event> + IsType<<Self as Config>::RuntimeEvent>
Overarching event type
sourcetype DefaultBaseFeePerGas: Get<U256>
type DefaultBaseFeePerGas: Get<U256>
Default base fee per gas value. Used in genesis if no other value specified explicitly.
sourcetype MinBaseFeePerGas: Get<U256>
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.
sourcetype MaxBaseFeePerGas: Get<U256>
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.
sourcetype AdjustmentFactor: Get<FixedU128>
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).
sourcetype WeightFactor: Get<u128>
type WeightFactor: Get<u128>
The so-called weight_factor
in the ‘base fee per gas’ formula.
sourcetype StepLimitRatio: Get<Perquintill>
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.
sourcetype WeightInfo: WeightInfo
type WeightInfo: WeightInfo
Weight information for extrinsics & functions of this pallet.