1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
pub use sp_runtime::{Perbill, Permill};
use crate::*;
frame_support::parameter_types! {
pub IsActive: bool = true;
pub DefaultBaseFeePerGas: U256 = U256::from(1_000_000_000);
}
pub struct BaseFeeThreshold;
impl pallet_base_fee::BaseFeeThreshold for BaseFeeThreshold {
fn lower() -> Permill {
Permill::zero()
}
fn ideal() -> Permill {
Permill::from_parts(500_000)
}
fn upper() -> Permill {
Permill::from_parts(1_000_000)
}
}
impl pallet_base_fee::Config for Runtime {
type DefaultBaseFeePerGas = DefaultBaseFeePerGas;
type Event = Event;
type IsActive = IsActive;
type Threshold = BaseFeeThreshold;
}