Make System Parachains trusted Teleporters (#1368)

Make System Parachain trusted Teleporters of each other.

Migration of https://github.com/paritytech/cumulus/pull/2842

---------

Co-authored-by: command-bot <>
Co-authored-by: joe petrowski <25483142+joepetrowski@users.noreply.github.com>
This commit is contained in:
Ignacio Palacios
2023-10-16 19:52:33 +02:00
committed by GitHub
parent 4145902f1c
commit e0065cb81b
24 changed files with 465 additions and 84 deletions
@@ -27,6 +27,7 @@ pub use integration_tests_common::{
asset_hub_westend::ED as ASSET_HUB_WESTEND_ED, westend::ED as WESTEND_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
},
test_parachain_is_trusted_teleporter,
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
AssetHubWestend, AssetHubWestendPallet, AssetHubWestendReceiver, AssetHubWestendSender,
PenpalWestendA, PenpalWestendAPallet, PenpalWestendAReceiver, PenpalWestendASender, Westend,
@@ -88,5 +89,4 @@ pub fn system_para_test_args(
}
#[cfg(test)]
#[cfg(not(feature = "runtime-benchmarks"))]
mod tests;
@@ -357,3 +357,17 @@ fn teleport_native_assets_from_system_para_to_relay_fails() {
// Receiver's balance does not change
assert_eq!(receiver_balance_after, receiver_balance_before);
}
// TODO: uncomment when CollectivesWestend and BridgeHubWestend are implemented
// https://github.com/paritytech/polkadot-sdk/pull/1737 (CollectivesWestend)
// #[test]
// fn teleport_to_other_system_parachains_works() {
// let amount = ASSET_HUB_WESTEND_ED * 100;
// let native_asset: VersionedMultiAssets = (Parent, amount).into();
// test_parachain_is_trusted_teleporter!(
// AssetHubWestend, // Origin
// vec![CollectivesWestend, BridgeHubWestend], // Destinations
// (native_asset, amount)
// );
// }