Skip to content

Commit

Permalink
Adjust min gas fee (#1592)
Browse files Browse the repository at this point in the history
  • Loading branch information
hqwangningbo authored Jan 7, 2025
1 parent a48d519 commit e09209a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions runtime/bifrost-polkadot/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1927,6 +1927,7 @@ pub mod migrations {

/// Unreleased migrations. Add new ones here:
pub type Unreleased = (
crate::migration::update_evm_min_gas_price::MigrateMinGasPrice,
// permanent migration, do not remove
pallet_xcm::migration::MigrateToLatestXcmVersion<Runtime>,
);
Expand Down
17 changes: 17 additions & 0 deletions runtime/bifrost-polkadot/src/migration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,3 +463,20 @@ pub mod genesis_evm_storage {
}
}
}

pub mod update_evm_min_gas_price {
use crate::{Runtime, Weight};
use frame_support::traits::OnRuntimeUpgrade;
use pallet_dynamic_fee::MinGasPrice;
use primitive_types::U256;

pub struct MigrateMinGasPrice;

impl OnRuntimeUpgrade for MigrateMinGasPrice {
fn on_runtime_upgrade() -> Weight {
let min_gas_fee: U256 = U256::from(83102775u64);
MinGasPrice::<Runtime>::put(min_gas_fee);
<Runtime as frame_system::Config>::DbWeight::get().reads_writes(0, 2)
}
}
}

0 comments on commit e09209a

Please sign in to comment.