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
@@ -17,12 +17,13 @@ pub use bp_messages::LaneId;
pub use frame_support::assert_ok;
pub use integration_tests_common::{
constants::{
asset_hub_rococo::ED as ASSET_HUB_ROCOCO_ED, rococo::ED as ROCOCO_ED, PROOF_SIZE_THRESHOLD,
REF_TIME_THRESHOLD, XCM_V3,
bridge_hub_rococo::ED as BRIDGE_HUB_ROCOCO_ED, rococo::ED as ROCOCO_ED,
PROOF_SIZE_THRESHOLD, REF_TIME_THRESHOLD, XCM_V3,
},
test_parachain_is_trusted_teleporter,
xcm_helpers::{xcm_transact_paid_execution, xcm_transact_unpaid_execution},
AssetHubRococo, AssetHubRococoReceiver, AssetHubWococo, BridgeHubRococo, BridgeHubWococo,
PenpalRococoA, Rococo, RococoPallet,
AssetHubRococo, AssetHubRococoReceiver, AssetHubWococo, BridgeHubRococo, BridgeHubRococoPallet,
BridgeHubRococoSender, BridgeHubWococo, PenpalRococoA, Rococo, RococoPallet,
};
pub use parachains_common::{AccountId, Balance};
pub use xcm::{
@@ -63,5 +64,4 @@ pub fn relay_test_args(amount: Balance) -> TestArgs {
}
#[cfg(test)]
#[cfg(not(feature = "runtime-benchmarks"))]
mod tests;
@@ -14,3 +14,4 @@
// limitations under the License.
mod example;
mod teleport;
@@ -0,0 +1,28 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use crate::*;
#[test]
fn teleport_to_other_system_parachains_works() {
let amount = BRIDGE_HUB_ROCOCO_ED * 100;
let native_asset: VersionedMultiAssets = (Parent, amount).into();
test_parachain_is_trusted_teleporter!(
BridgeHubRococo, // Origin
vec![AssetHubRococo], // Destinations
(native_asset, amount)
);
}