Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust min gas fee #1592

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}
}
}