Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Dinonard committed Sep 25, 2023
1 parent de96e49 commit 3d1d15d
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pallets/dynamic-evm-base-fee/src/benchmarking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ mod benchmarks {
#[cfg(test)]
mod tests {
use crate::mock;
use sp_io::TestExternalities;
use frame_support::sp_io::TestExternalities;

pub fn new_test_ext() -> TestExternalities {
mock::ExtBuilder::default().build()
mock::ExtBuilder::build()
}
}
11 changes: 10 additions & 1 deletion pallets/dynamic-evm-base-fee/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
//!
//! The core formula this pallet tries to satisfy is:
//!
//! base_fee_per_gas = adjustment_factor * weight_factor * 25 / 98974
//! base_fee_per_gas = adjustment_factor * weight_factor * 25 / 98974
//!
//! Where:
//! * **adjustment_factor** - is a value that changes in-between the blocks, related to the block fill ratio.
Expand Down Expand Up @@ -92,6 +92,15 @@ pub trait WeightInfo {
fn set_base_fee_per_gas() -> Weight;
}

impl WeightInfo for () {
fn base_fee_per_gas_adjustment() -> Weight {
Weight::zero()
}
fn set_base_fee_per_gas() -> Weight {
Weight::zero()
}
}

#[frame_support::pallet]
pub mod pallet {
use frame_support::pallet_prelude::*;
Expand Down
1 change: 1 addition & 0 deletions pallets/dynamic-evm-base-fee/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ impl pallet_dynamic_evm_base_fee::Config for TestRuntime {
type AdjustmentFactor = GetAdjustmentFactor;
type WeightFactor = ConstU128<30_000_000_000_000_000>;
type StepLimitRatio = StepLimitRation;
type WeightInfo = ();
}

type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic<TestRuntime>;
Expand Down

0 comments on commit 3d1d15d

Please sign in to comment.