From 434008760bac5a42f8d1caa0d468e273f4f75827 Mon Sep 17 00:00:00 2001 From: lucyliucode Date: Sun, 19 Jan 2025 12:10:26 +0800 Subject: [PATCH] Include bridge module into pioneer --- Cargo.lock | 1 + runtime/pioneer/Cargo.toml | 4 +++- runtime/pioneer/src/lib.rs | 13 +++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 23b66e533..0102f47bc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -8600,6 +8600,7 @@ dependencies = [ "hex-literal", "log", "metaverse-runtime-common", + "modules-bridge", "orml-currencies", "orml-nft", "orml-oracle", diff --git a/runtime/pioneer/Cargo.toml b/runtime/pioneer/Cargo.toml index 2a91dfd7e..d86288492 100644 --- a/runtime/pioneer/Cargo.toml +++ b/runtime/pioneer/Cargo.toml @@ -43,6 +43,7 @@ emergency = { package = "pallet-emergency", path = "../../pallets/emergency", ve core-primitives = { path = "../../traits/core-primitives", default-features = false } asset-manager = { path = "../../pallets/asset-manager", default-features = false } reward = { package = "pallet-reward", path = "../../pallets/reward", version = "2.0.0-rc6", default-features = false } +modules-bridge = { path = "../../modules/bridge", default-features = false } ## Substrate Primitive Dependencies sp-api = { workspace = true } @@ -194,5 +195,6 @@ std = [ "reward/std", 'pallet-collator-selection/std', "pallet-preimage/std", - "metaverse-runtime-common/std" + "metaverse-runtime-common/std", + "modules-bridge/std" ] diff --git a/runtime/pioneer/src/lib.rs b/runtime/pioneer/src/lib.rs index 426757ba8..1bbe88582 100644 --- a/runtime/pioneer/src/lib.rs +++ b/runtime/pioneer/src/lib.rs @@ -492,6 +492,7 @@ parameter_types! { pub const CollatorPotPalletId: PalletId = PalletId(*b"bcPotStk"); pub const EconomyTreasuryPalletId: PalletId = PalletId(*b"bit/econ"); pub const LandTreasuryPalletId: PalletId = PalletId(*b"bit/land"); + pub const BridgeSovereignPalletId: PalletId = PalletId(*b"bit/brgd"); } // Treasury and Bounty @@ -1747,6 +1748,16 @@ impl reward::Config for Runtime { type WeightInfo = weights::module_reward::WeightInfo; } +impl modules_bridge::Config for Runtime { + type RuntimeEvent = RuntimeEvent; + type BridgeOrigin = EnsureRootOrTwoThirdsCouncilCollective; + type Currency = Balances; + type MultiCurrency = Currencies; + type NFTHandler = Nft; + type NativeCurrencyId = GetNativeCurrencyId; + type PalletId = BridgeSovereignPalletId; +} + // Create the runtime by composing the FRAME pallets that were previously configured. construct_runtime!( pub enum Runtime where @@ -1830,6 +1841,8 @@ construct_runtime!( Reward: reward::{Pallet, Call, Storage ,Event} = 68, // Crowdloan Crowdloan: crowdloan::{Pallet, Call, Storage, Event} = 70, + // Bridge + BridgeSupport: modules_bridge::{Pallet, Call, Storage, Event} = 71, } );