diff --git a/Cargo.lock b/Cargo.lock index 9e32ce9be0c2..b1de67d82bf1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1990,6 +1990,7 @@ name = "bridge-hub-rococo-integration-tests" version = "1.0.0" dependencies = [ "asset-hub-rococo-emulated-chain", + "asset-hub-rococo-runtime", "asset-test-utils", "bp-messages", "bridge-hub-rococo-emulated-chain", diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml index b6e3d60d549e..53b667e63402 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml @@ -44,8 +44,9 @@ rococo-westend-system-emulated-network = { path = "../../../networks/rococo-west bridge-hub-rococo-emulated-chain = { path = "../../../chains/parachains/bridges/bridge-hub-rococo" } asset-hub-rococo-emulated-chain = { path = "../../../chains/parachains/assets/asset-hub-rococo" } penpal-emulated-chain = { path = "../../../chains/parachains/testing/penpal" } -penpal-runtime = { path = "../../../../../runtimes/testing/penpal" } +penpal-runtime = { path = "../../../../../runtimes/testing/penpal", default-features = false } rococo-system-emulated-network = { path = "../../../networks/rococo-system" } +asset-hub-rococo-runtime = { path = "../../../../../runtimes/assets/asset-hub-rococo", default-features = false } # Snowbridge snowbridge-core = { path = "../../../../../../../../parachain/primitives/core", default-features = false } diff --git a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs index 78a648260abb..61763f13812c 100644 --- a/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs +++ b/cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/snowbridge.rs @@ -393,6 +393,7 @@ fn send_token() { #[test] fn reserve_transfer_token() { + use asset_hub_rococo_runtime::xcm_config::bridging::to_ethereum::DefaultBridgeHubEthereumBaseFee; let assethub_sovereign = BridgeHubRococo::sovereign_account_id_of(MultiLocation { parents: 1, interior: X1(Parachain(ASSETHUB_PARA_ID)), @@ -476,6 +477,9 @@ fn reserve_transfer_token() { interior: X1(AccountKey20 { network: None, key: ETHEREUM_DESTINATION_ADDRESS.into() }), }); + let free_balance_before = ::Balances::free_balance( + AssetHubRococoReceiver::get(), + ); ::PolkadotXcm::reserve_transfer_assets( RuntimeOrigin::signed(AssetHubRococoReceiver::get()), Box::new(destination), @@ -484,6 +488,12 @@ fn reserve_transfer_token() { 0, ) .unwrap(); + let free_balance_after = ::Balances::free_balance( + AssetHubRococoReceiver::get(), + ); + // assert at least DefaultBridgeHubEthereumBaseFee charged from the sender + let free_balance_diff = free_balance_before - free_balance_after; + assert!(free_balance_diff > DefaultBridgeHubEthereumBaseFee::get()); }); BridgeHubRococo::execute_with(|| { @@ -508,7 +518,7 @@ fn reserve_transfer_token() { events.iter().any(|event| matches!( event, RuntimeEvent::Balances(pallet_balances::Event::Deposit{ who, amount }) - if *who == assethub_sovereign && *amount == 2680000000000 + if *who == assethub_sovereign && *amount == 2680000000000, )), "Assethub sovereign takes remote fee." );