diff --git a/Cargo.lock b/Cargo.lock index 05654bec6..061b72f47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -968,7 +968,7 @@ dependencies = [ [[package]] name = "bifrost-cli" -version = "0.12.0" +version = "0.12.1" dependencies = [ "bifrost-primitives", "bifrost-service", diff --git a/node/cli/Cargo.toml b/node/cli/Cargo.toml index 299baeac0..c30589326 100644 --- a/node/cli/Cargo.toml +++ b/node/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bifrost-cli" -version = "0.12.0" +version = "0.12.1" authors = ["Liebi Technologies "] description = "Bifrost Parachain Node" build = "build.rs" diff --git a/node/service/res/bifrost-kusama.json b/node/service/res/bifrost-kusama.json index e5300c253..2a4953ace 100644 --- a/node/service/res/bifrost-kusama.json +++ b/node/service/res/bifrost-kusama.json @@ -42,6 +42,7 @@ }, "relayChain": "kusama", "paraId": 2001, + "evmSince": 1, "consensusEngine": null, "codeSubstitutes": {}, "genesis": { diff --git a/node/service/res/bifrost-polkadot.json b/node/service/res/bifrost-polkadot.json index 80dbfaba9..7ecd5a0b2 100644 --- a/node/service/res/bifrost-polkadot.json +++ b/node/service/res/bifrost-polkadot.json @@ -26,6 +26,7 @@ }, "relayChain": "polkadot", "paraId": 2030, + "evmSince": 5795196, "codeSubstitutes": {}, "genesis": { "raw": { diff --git a/runtime/bifrost-polkadot/src/lib.rs b/runtime/bifrost-polkadot/src/lib.rs index ad88865f2..04c3d0a45 100644 --- a/runtime/bifrost-polkadot/src/lib.rs +++ b/runtime/bifrost-polkadot/src/lib.rs @@ -171,7 +171,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { spec_name: create_runtime_str!("bifrost_polkadot"), impl_name: create_runtime_str!("bifrost_polkadot"), authoring_version: 0, - spec_version: 12000, + spec_version: 12001, impl_version: 0, apis: RUNTIME_API_VERSIONS, transaction_version: 1, @@ -1896,6 +1896,7 @@ pub mod migrations { Runtime, governance::fellowship::FellowshipCollectiveInstance, >, + crate::migration::genesis_evm_storage::GenesisEVMStorage, ); } diff --git a/runtime/bifrost-polkadot/src/migration.rs b/runtime/bifrost-polkadot/src/migration.rs index 26814daab..f6b3651df 100644 --- a/runtime/bifrost-polkadot/src/migration.rs +++ b/runtime/bifrost-polkadot/src/migration.rs @@ -398,3 +398,23 @@ pub mod opengov { } } } + +pub mod genesis_evm_storage { + use crate::{Runtime, Weight}; + use frame_support::traits::OnRuntimeUpgrade; + use pallet_dynamic_fee::MinGasPrice; + use pallet_evm_chain_id::ChainId; + use primitive_types::U256; + + pub struct GenesisEVMStorage; + + impl OnRuntimeUpgrade for GenesisEVMStorage { + fn on_runtime_upgrade() -> Weight { + let evm_id: u64 = 996u64; + let min_gas_fee: U256 = U256::from(560174200u64); + ChainId::::put(evm_id); + MinGasPrice::::put(min_gas_fee); + ::DbWeight::get().reads_writes(0, 2) + } + } +}