Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Commit

Permalink
Snowbridge on westend (#157)
Browse files Browse the repository at this point in the history
* Enable bridge config on westend

* Update bridge config for asset hub westend

* Use BridgeHubMessageRouter

* Add unit tests

* Update asset hub config

* Add emulated test
  • Loading branch information
yrong authored Jul 19, 2024
1 parent f7054e7 commit f0abb7e
Show file tree
Hide file tree
Showing 21 changed files with 1,553 additions and 21 deletions.
24 changes: 24 additions & 0 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 bridges/snowbridge/Cargo.lock

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

Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ use emulated_integration_tests_common::{
use parachains_common::Balance;

pub const PARA_ID: u32 = 1002;
pub const ASSETHUB_PARA_ID: u32 = 1000;
pub const ED: Balance = testnet_parachains_constants::westend::currency::EXISTENTIAL_DEPOSIT;

pub fn genesis() -> Storage {
Expand Down Expand Up @@ -64,6 +65,11 @@ pub fn genesis() -> Storage {
owner: Some(get_account_id_from_seed::<sr25519::Public>(accounts::BOB)),
..Default::default()
},
ethereum_system: bridge_hub_westend_runtime::EthereumSystemConfig {
para_id: PARA_ID.into(),
asset_hub_para_id: ASSETHUB_PARA_ID.into(),
..Default::default()
},
..Default::default()
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,17 @@ publish = false
workspace = true

[dependencies]
codec = { package = "parity-scale-codec", version = "3.6.12", default-features = false }
scale-info = { version = "2.11.1", default-features = false, features = ["derive"] }
hex-literal = "0.4.1"

# Substrate
frame-support = { path = "../../../../../../../substrate/frame/support", default-features = false }
pallet-assets = { path = "../../../../../../../substrate/frame/assets", default-features = false }
pallet-asset-conversion = { path = "../../../../../../../substrate/frame/asset-conversion", default-features = false }
pallet-balances = { path = "../../../../../../../substrate/frame/balances", default-features = false }
pallet-message-queue = { path = "../../../../../../../substrate/frame/message-queue" }
sp-core = { path = "../../../../../../../substrate/primitives/core", default-features = false }
sp-runtime = { path = "../../../../../../../substrate/primitives/runtime", default-features = false }

# Polkadot
Expand All @@ -34,3 +38,13 @@ cumulus-pallet-xcmp-queue = { path = "../../../../../../pallets/xcmp-queue", def
bridge-hub-westend-runtime = { path = "../../../../../runtimes/bridge-hubs/bridge-hub-westend", default-features = false }
emulated-integration-tests-common = { path = "../../../common", default-features = false }
rococo-westend-system-emulated-network = { path = "../../../networks/rococo-westend-system" }
testnet-parachains-constants = { path = "../../../../../runtimes/constants", features = ["westend"] }
asset-hub-westend-runtime = { path = "../../../../../runtimes/assets/asset-hub-westend", default-features = false }

# Snowbridge
snowbridge-core = { path = "../../../../../../../bridges/snowbridge/primitives/core", default-features = false }
snowbridge-router-primitives = { path = "../../../../../../../bridges/snowbridge/primitives/router", default-features = false }
snowbridge-pallet-system = { path = "../../../../../../../bridges/snowbridge/pallets/system", default-features = false }
snowbridge-pallet-outbound-queue = { path = "../../../../../../../bridges/snowbridge/pallets/outbound-queue", default-features = false }
snowbridge-pallet-inbound-queue = { path = "../../../../../../../bridges/snowbridge/pallets/inbound-queue", default-features = false }
snowbridge-pallet-inbound-queue-fixtures = { path = "../../../../../../../bridges/snowbridge/pallets/inbound-queue/fixtures" }
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ mod imports {
BridgeHubWestendParaPallet as BridgeHubWestendPallet,
},
penpal_emulated_chain::{PenpalAssetOwner, PenpalBParaPallet as PenpalBPallet},
westend_emulated_chain::WestendRelayPallet as WestendPallet,
westend_emulated_chain::{genesis::ED as WESTEND_ED, WestendRelayPallet as WestendPallet},
AssetHubRococoPara as AssetHubRococo, AssetHubRococoParaReceiver as AssetHubRococoReceiver,
AssetHubRococoParaSender as AssetHubRococoSender, AssetHubWestendPara as AssetHubWestend,
AssetHubWestendParaReceiver as AssetHubWestendReceiver,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ use crate::imports::*;

mod asset_transfers;
mod send_xcm;
mod snowbridge;
mod teleport;

pub(crate) fn asset_hub_rococo_location() -> Location {
Expand Down
Loading

0 comments on commit f0abb7e

Please sign in to comment.