Skip to content

Commit

Permalink
Include bridge module into pioneer
Browse files Browse the repository at this point in the history
  • Loading branch information
lucyliucode committed Jan 19, 2025
1 parent 31e473a commit 4340087
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion runtime/pioneer/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down Expand Up @@ -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"
]
13 changes: 13 additions & 0 deletions runtime/pioneer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1747,6 +1748,16 @@ impl reward::Config for Runtime {
type WeightInfo = weights::module_reward::WeightInfo<Runtime>;
}

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
Expand Down Expand Up @@ -1830,6 +1841,8 @@ construct_runtime!(
Reward: reward::{Pallet, Call, Storage ,Event<T>} = 68,
// Crowdloan
Crowdloan: crowdloan::{Pallet, Call, Storage, Event<T>} = 70,
// Bridge
BridgeSupport: modules_bridge::{Pallet, Call, Storage, Event<T>} = 71,
}
);

Expand Down

0 comments on commit 4340087

Please sign in to comment.