Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cumulus: add asset-hub-rococo runtime based on asset-hub-kusama and add asset-bridging support to it #1215

Merged
merged 93 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
93 commits
Select commit Hold shift + click to select a range
d6044a0
add `asset-hub-rococo-runtime` as a copy of `asset-hub-kusama-runtime`
acatangiu Sep 8, 2023
ec28f46
update new `asset-hub-rococo-runtime` with rococo-specific components
acatangiu Sep 8, 2023
b320b1f
asset-hub-rococo-runtime: add asset transfer over bridge capabilities
acatangiu Sep 8, 2023
b3c1810
asset-hub-rococo-runtime: add asset transfer over bridge tests
acatangiu Sep 8, 2023
3bc4634
fix toml formatting
acatangiu Sep 8, 2023
4eccdf4
add more tests to Bridge Hubs
acatangiu Sep 8, 2023
e3d77f8
bridge-hubs: add script for testing Rococo <> Wococo bridge
acatangiu Sep 11, 2023
52c7cd5
Do not consume `msg` on `NotApplicable` for remote exporters
bkontur Sep 12, 2023
ff2891c
Added bridging configuration + tests for AssetHubRococo vs AssetHubWo…
bkontur Sep 13, 2023
4f0776d
Merge remote-tracking branch 'origin/master' into bko-asset-hub-rococ…
bkontur Sep 13, 2023
f18f146
".git/.scripts/commands/fmt/fmt.sh"
Sep 13, 2023
a717e91
Merge branch 'master' into asset-hub-rococo-runtime
bkontur Sep 13, 2023
754ed42
Added `asset-hub-(r/w)ococo` to `polkadot-parachain`
bkontur Sep 13, 2023
ddc09d3
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Sep 13, 2023
03b1bb4
Merge branch 'master' into asset-hub-rococo-runtime
bkontur Sep 14, 2023
00cfa54
Finished local run asset transfer for AssetHubRococo/AssetHubWococo
bkontur Sep 14, 2023
116010f
Zombienet tweaks
bkontur Sep 14, 2023
ab648a5
Just paid `ExportMessage` on BridgeHubRococo/BridgeHubWococo
bkontur Sep 15, 2023
b78343b
Added congestion to BridgeHubs + nits
bkontur Sep 15, 2023
3f3081b
fix typos
acatangiu Sep 15, 2023
5d318c5
Typo
bkontur Sep 15, 2023
85b7f84
Fixed benchmarks for asset-hub-rococo
bkontur Sep 15, 2023
642e29e
Tweaks to BridgeHubRococo
bkontur Sep 15, 2023
09e8c15
From PR review
bkontur Sep 15, 2023
bc44872
xcm-emulator nits
bkontur Sep 15, 2023
8df113a
Merge branch 'master' into asset-hub-rococo-runtime
bkontur Sep 15, 2023
d64d1fc
Fix features
bkontur Sep 15, 2023
b20c353
Fixed
bkontur Sep 15, 2023
d04bf3a
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Sep 19, 2023
9f0d255
Fix for benchmarks
bkontur Sep 19, 2023
1faec85
".git/.scripts/commands/bench/bench.sh" --subcommand=pallet --runtime…
Sep 19, 2023
76e513d
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Sep 19, 2023
99e001c
Added xcm-emulator integration test for AssetHubRococo (as copy of As…
bkontur Sep 20, 2023
3a0b3c1
Addressing pr comments for xcmp-queue
bkontur Sep 21, 2023
791b88a
Added test for `AllowUnpaidTransactsFrom`
bkontur Sep 21, 2023
a4f3f4e
Nit
bkontur Sep 21, 2023
a4ef4f5
Simplify Location and AssetFilter
bkontur Sep 21, 2023
713d7ad
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Sep 21, 2023
33b672c
fmt
bkontur Sep 21, 2023
474b8a4
ensure_configuration -> prepare_configuration
bkontur Sep 22, 2023
b500fbc
Constants nit
bkontur Sep 22, 2023
d4dc7c8
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Sep 25, 2023
559b954
Add claiming relayer rewards to Ro/Wo demo
bkontur Sep 27, 2023
89fc271
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Sep 27, 2023
6e7e53d
Deduplicate with `build_congestion_message`
bkontur Sep 27, 2023
7cbfbb2
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Sep 27, 2023
42d6fe4
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Oct 3, 2023
132c5a0
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Oct 4, 2023
94619d7
Compile
bkontur Oct 5, 2023
5f785b6
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Oct 5, 2023
58c4089
Fix to compile
bkontur Oct 5, 2023
14c2855
Merge remote-tracking branch 'origin/master' into asset-hub-rococo-ru…
bkontur Oct 5, 2023
653b9fb
Add filtering capabilities for remote location to `NetworkExportTable`
bkontur Oct 11, 2023
62bbee0
Expose `BridgeMessage` field as `pub` because it cannot be access out…
bkontur Oct 11, 2023
19381bd
Move `StartsWith` and `Equals` to `xcm-builder`
bkontur Oct 11, 2023
255595e
Refactored and simplified xcm stuff
bkontur Oct 11, 2023
ecf0688
Merge branch 'bko-xcm-builder-enhancements' into asset-hub-rococo-run…
bkontur Oct 11, 2023
1269bd7
Fix import
bkontur Oct 11, 2023
8dcca0f
Merge remote-tracking branch 'origin/bko-xcm-builder-enhancements' in…
bkontur Oct 11, 2023
c7b1625
Added generic `EqualsTo` implementation for `frame_support::traits::C…
bkontur Oct 11, 2023
296dc1c
Merge remote-tracking branch 'origin/master' into bko-xcm-builder-enh…
bkontur Oct 11, 2023
889e9e2
Removed import
bkontur Oct 11, 2023
e95ec38
Merge remote-tracking branch 'origin/bko-xcm-builder-enhancements' in…
bkontur Oct 11, 2023
04cabcd
More fixes
bkontur Oct 12, 2023
5fdd787
PR comments + added `LocationWithAssetFilters` useful for `XcmTelepor…
bkontur Oct 13, 2023
ea0997b
PR comments
bkontur Oct 14, 2023
668756d
Merge branch 'bko-xcm-builder-enhancements' into asset-hub-rococo-run…
bkontur Oct 15, 2023
fa87f2a
Removed unnecessary import
bkontur Oct 15, 2023
65761b5
Merge remote-tracking branch 'origin/bko-xcm-builder-enhancements' in…
bkontur Oct 15, 2023
6c087c2
Update cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs
bkontur Oct 15, 2023
4d07d71
Removed unnecessary import
bkontur Oct 15, 2023
39a227f
Fmt
bkontur Oct 15, 2023
0cfd718
Merge remote-tracking branch 'origin/bko-xcm-builder-enhancements' in…
bkontur Oct 15, 2023
34a438d
Update cumulus/parachains/runtimes/assets/asset-hub-rococo/src/lib.rs
bkontur Oct 16, 2023
2555615
PR comments - removed `FellowsBodyId`
bkontur Oct 16, 2023
3ade1cf
Doc
bkontur Oct 16, 2023
3089154
Serban's nit + test
bkontur Oct 16, 2023
2c04796
Merge branch 'bko-xcm-builder-enhancements' into asset-hub-rococo-run…
bkontur Oct 16, 2023
79f6794
Removed comment
bkontur Oct 16, 2023
98efacd
Changed `RuntimeVersion` to be compatible with live Rococo' AssetHub …
bkontur Oct 16, 2023
c26fde1
Typo
bkontur Oct 16, 2023
be2210a
PR comments - Added `UnpaidExecution` + refactor of `AllowTransactsFrom`
bkontur Oct 16, 2023
49d45ba
Removed unnecessary barrier `AllowTransactsFrom`
bkontur Oct 16, 2023
2c32b43
Update polkadot/xcm/xcm-builder/src/universal_exports.rs
bkontur Oct 17, 2023
ee1d681
PR comment - case with payment to the test
bkontur Oct 17, 2023
cfa2616
Merge remote-tracking branch 'origin/master' into bko-xcm-builder-enh…
bkontur Oct 17, 2023
4941b44
Merge remote-tracking branch 'origin/bko-xcm-builder-enhancements' in…
bkontur Oct 17, 2023
e82b712
Update cumulus/parachains/runtimes/assets/test-utils/src/test_cases_o…
bkontur Oct 17, 2023
0887912
Update cumulus/parachains/runtimes/assets/test-utils/src/test_cases_o…
bkontur Oct 17, 2023
2ddf42e
Update cumulus/parachains/runtimes/assets/test-utils/src/test_cases_o…
bkontur Oct 17, 2023
f98ee90
Merge branch 'master' of github.com:paritytech/polkadot-sdk into asse…
acatangiu Oct 17, 2023
1fb29e8
AssetHub Rococo: make all SPs trusted teleporters
acatangiu Oct 17, 2023
5392057
Merge branch 'master' into asset-hub-rococo-runtime
acatangiu Oct 18, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions bridges/modules/xcm-bridge-hub-router/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
use crate as pallet_xcm_bridge_hub_router;

use bp_xcm_bridge_hub_router::XcmChannelStatusProvider;
use frame_support::{construct_runtime, parameter_types};
use frame_support::{construct_runtime, parameter_types, traits::Everything};
use frame_system::EnsureRoot;
use sp_core::H256;
use sp_runtime::{
traits::{BlakeTwo256, ConstU128, IdentityLookup},
BuildStorage,
};
use xcm::prelude::*;
use xcm_builder::NetworkExportTable;
use xcm_builder::{InteriorLocationMatcher, NetworkExportTable, NetworkExportTableItem};

pub type AccountId = u64;
type Block = frame_system::mocking::MockBlock<TestRuntime>;
Expand All @@ -53,8 +53,15 @@ parameter_types! {
pub UniversalLocation: InteriorMultiLocation = X2(GlobalConsensus(ThisNetworkId::get()), Parachain(1000));
pub SiblingBridgeHubLocation: MultiLocation = ParentThen(X1(Parachain(1002))).into();
pub BridgeFeeAsset: AssetId = MultiLocation::parent().into();
pub BridgeTable: Vec<(NetworkId, MultiLocation, Option<MultiAsset>)>
= vec![(BridgedNetworkId::get(), SiblingBridgeHubLocation::get(), Some((BridgeFeeAsset::get(), BASE_FEE).into()))];
pub BridgeTable: Vec<NetworkExportTableItem>
= vec![
NetworkExportTableItem::new(
BridgedNetworkId::get(),
InteriorLocationMatcher::<Everything>::new(),
SiblingBridgeHubLocation::get(),
Some((BridgeFeeAsset::get(), BASE_FEE).into())
)
];
}

impl frame_system::Config for TestRuntime {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ impl_send_transact_helpers_for_relay_chain!(Westend);
impl_accounts_helpers_for_relay_chain!(Rococo);
impl_assert_events_helpers_for_relay_chain!(Rococo);
impl_hrmp_channels_helpers_for_relay_chain!(Rococo);
impl_send_transact_helpers_for_relay_chain!(Rococo);

// Wococo implementation
impl_accounts_helpers_for_relay_chain!(Wococo);
Expand Down
4 changes: 2 additions & 2 deletions cumulus/parachains/runtimes/assets/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ pub mod local_and_foreign_assets;
pub mod matching;
pub mod runtime_api;

use crate::matching::{Equals, LocalMultiLocationPattern, ParentLocation, StartsWith};
use crate::matching::{LocalMultiLocationPattern, ParentLocation};
use frame_support::traits::EverythingBut;
use parachains_common::AssetIdForTrustBackedAssets;
use xcm::prelude::MultiLocation;
use xcm_builder::{AsPrefixedGeneralIndex, MatchedConvertedConcreteId};
use xcm_builder::{AsPrefixedGeneralIndex, Equals, MatchedConvertedConcreteId, StartsWith};
use xcm_executor::traits::{Identity, JustTry};

/// `MultiLocation` vs `AssetIdForTrustBackedAssets` converter for `TrustBackedAssets`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,13 +407,14 @@ where
#[cfg(test)]
mod tests {
use crate::{
local_and_foreign_assets::MultiLocationConverter, matching::StartsWith,
AssetIdForPoolAssetsConvert, AssetIdForTrustBackedAssetsConvert,
local_and_foreign_assets::MultiLocationConverter, AssetIdForPoolAssetsConvert,
AssetIdForTrustBackedAssetsConvert,
};
use frame_support::traits::EverythingBut;
use pallet_asset_conversion::{MultiAssetIdConversionResult, MultiAssetIdConverter};
use sp_runtime::traits::MaybeEquivalence;
use xcm::latest::prelude::*;
use xcm_builder::StartsWith;

#[test]
fn test_multi_location_converter_works() {
Expand Down
14 changes: 0 additions & 14 deletions cumulus/parachains/runtimes/assets/common/src/matching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,6 @@ use xcm::{
};
use xcm_builder::{ensure_is_remote, ExporterFor, MatchesLocation};

pub struct StartsWith<T>(sp_std::marker::PhantomData<T>);
impl<Location: Get<MultiLocation>> Contains<MultiLocation> for StartsWith<Location> {
fn contains(t: &MultiLocation) -> bool {
t.starts_with(&Location::get())
}
}

pub struct Equals<T>(sp_std::marker::PhantomData<T>);
impl<Location: Get<MultiLocation>> Contains<MultiLocation> for Equals<Location> {
fn contains(t: &MultiLocation) -> bool {
t == &Location::get()
}
}

pub struct StartsWithExplicitGlobalConsensus<T>(sp_std::marker::PhantomData<T>);
impl<Network: Get<NetworkId>> Contains<MultiLocation>
for StartsWithExplicitGlobalConsensus<Network>
Expand Down
4 changes: 2 additions & 2 deletions cumulus/polkadot-parachain/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -903,14 +903,14 @@ pub fn run() -> Result<()> {
.await
.map(|r| r.0)
.map_err(Into::into),
Runtime::AssetHubRococo | Runtime::AssetHubWococo => crate::service::start_generic_aura_node::<
Runtime::AssetHubRococo | Runtime::AssetHubWococo => crate::service::start_asset_hub_node::<
asset_hub_rococo_runtime::RuntimeApi,
AuraId,
>(config, polkadot_config, collator_options, id, hwbench)
.await
.map(|r| r.0)
.map_err(Into::into),
Runtime::AssetHubWestend => crate::service::start_generic_aura_node::<
Runtime::AssetHubWestend => crate::service::start_asset_hub_node::<
asset_hub_westend_runtime::RuntimeApi,
AuraId,
>(config, polkadot_config, collator_options, id, hwbench)
Expand Down
8 changes: 7 additions & 1 deletion polkadot/xcm/xcm-builder/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ pub use weight::{
FixedRateOfFungible, FixedWeightBounds, TakeRevenue, UsingComponents, WeightInfoBounds,
};

mod matches_location;
pub use matches_location::{
Equals, InteriorLocationMatcher, LocationMatcher, MatchesLocation, MatchesLocationAdapter,
StartsWith,
};

mod matches_token;
pub use matches_token::{IsAbstract, IsConcrete};

Expand All @@ -99,7 +105,7 @@ mod universal_exports;
pub use universal_exports::{
ensure_is_remote, BridgeBlobDispatcher, BridgeMessage, DispatchBlob, DispatchBlobError,
ExporterFor, HaulBlob, HaulBlobError, HaulBlobExporter, NetworkExportTable,
SovereignPaidRemoteExporter, UnpaidLocalExporter, UnpaidRemoteExporter,
NetworkExportTableItem, SovereignPaidRemoteExporter, UnpaidLocalExporter, UnpaidRemoteExporter,
};

mod origin_aliases;
Expand Down
131 changes: 131 additions & 0 deletions polkadot/xcm/xcm-builder/src/matches_location.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
// Copyright (C) Parity Technologies (UK) Ltd.
// This file is part of Polkadot.

// Polkadot is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// Polkadot is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with Polkadot. If not, see <http://www.gnu.org/licenses/>.

//! Various implementations and utilities for matching and filtering `MultiLocation` and
//! `InteriorMultiLocation` types.

use frame_support::traits::{Contains, Everything, Get};
use xcm::latest::{InteriorMultiLocation, MultiLocation};

/// Trait for matching location of type `T`.
pub trait MatchesLocation<T> {
fn matches(&self, location: &T) -> bool;
}

/// A [`MatchesLocation`] implementation that matches every value.
impl<T> MatchesLocation<T> for Everything {
fn matches(&self, _: &T) -> bool {
true
}
}

/// Adapter for using `trait Contains` with `trait MatchesLocation` were we can provide a tuple of
bkontur marked this conversation as resolved.
Show resolved Hide resolved
/// `Contains` implementations which are used for matching location of type `T`.
pub struct MatchesLocationAdapter<T, Filter> {
_marker: sp_std::marker::PhantomData<(T, Filter)>,
}
impl<T, Filter> MatchesLocationAdapter<T, Filter>
where
Filter: Contains<T>,
{
pub fn new() -> Self {
Self { _marker: sp_std::marker::PhantomData }
}
}
impl<T, Filter> MatchesLocation<T> for MatchesLocationAdapter<T, Filter>
where
Filter: Contains<T>,
{
fn matches(&self, location: &T) -> bool {
Filter::contains(location)
}
}

/// Type alias for `MatchesLocationAdapter` implementation which works with `InteriorMultiLocation`.
pub type InteriorLocationMatcher<Filter> = MatchesLocationAdapter<InteriorMultiLocation, Filter>;

/// Type alias for `MatchesLocationAdapter` implementation which works with `MultiLocation`.
pub type LocationMatcher<Filter> = MatchesLocationAdapter<MultiLocation, Filter>;

/// An implementation of [frame_support::traits::Contains] that checks for `MultiLocation` or
/// `InteriorMultiLocation` if it starts with the provided type `T`.
pub struct StartsWith<T>(sp_std::marker::PhantomData<T>);
bkontur marked this conversation as resolved.
Show resolved Hide resolved
impl<T: Get<MultiLocation>> Contains<MultiLocation> for StartsWith<T> {
fn contains(t: &MultiLocation) -> bool {
t.starts_with(&T::get())
}
}
impl<T: Get<InteriorMultiLocation>> Contains<InteriorMultiLocation> for StartsWith<T> {
fn contains(t: &InteriorMultiLocation) -> bool {
t.starts_with(&T::get())
}
}

/// An implementation of [frame_support::traits::Contains] that checks the equality of MultiLocation
/// or InteriorMultiLocation with the provided type T.
pub struct Equals<T>(sp_std::marker::PhantomData<T>);
impl<T: Get<MultiLocation>> Contains<MultiLocation> for Equals<T> {
fn contains(t: &MultiLocation) -> bool {
t == &T::get()
}
}
impl<T: Get<InteriorMultiLocation>> Contains<InteriorMultiLocation> for Equals<T> {
fn contains(t: &InteriorMultiLocation) -> bool {
t == &T::get()
}
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn matches_location_adapter_with_contains_tuple_works() {
type Loc = usize;
frame_support::match_types! {
pub type AllowOnly2000And3000And4000: impl Contains<Loc> = {
2000 | 3000 | 4000
};
}
struct Between5000And5003;
impl Contains<Loc> for Between5000And5003 {
fn contains(t: &Loc) -> bool {
(&5000 < t) && (t < &5003)
}
}

let test_data = vec![
(1000, false),
(2000, true),
(3000, true),
(4000, true),
(5000, false),
(5001, true),
(5002, true),
(5003, false),
];

for (location, expected_result) in test_data {
assert_eq!(
MatchesLocationAdapter::<
Loc,
(AllowOnly2000And3000And4000, Between5000And5003)
>::new().matches(&location),
expected_result,
)
}
}
}
9 changes: 7 additions & 2 deletions polkadot/xcm/xcm-builder/src/tests/bridging/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,11 @@
//! Tests specific to the bridging primitives

use super::mock::*;
use crate::{universal_exports::*, WithTopicSource};
use frame_support::{parameter_types, traits::Get};
use crate::{universal_exports::*, InteriorLocationMatcher, WithTopicSource};
use frame_support::{
parameter_types,
traits::{Everything, Get},
};
use std::{cell::RefCell, marker::PhantomData};
use xcm_executor::{
traits::{export_xcm, validate_export},
Expand All @@ -44,6 +47,8 @@ std::thread_local! {
static BRIDGE_TRAFFIC: RefCell<Vec<Vec<u8>>> = RefCell::new(Vec::new());
}

type AllowAll = InteriorLocationMatcher<Everything>;

fn maybe_with_topic(f: impl Fn()) {
UsingTopic::set(false);
f();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,14 @@ parameter_types! {
pub UniversalLocation: Junctions = X2(GlobalConsensus(Local::get()), Parachain(100));
pub RelayUniversalLocation: Junctions = X1(GlobalConsensus(Local::get()));
pub RemoteUniversalLocation: Junctions = X1(GlobalConsensus(Remote::get()));
pub BridgeTable: Vec<(NetworkId, MultiLocation, Option<MultiAsset>)>
= vec![(Remote::get(), MultiLocation::parent(), Some((Parent, 200u128 + if UsingTopic::get() { 20 } else { 0 }).into()))];
pub BridgeTable: Vec<NetworkExportTableItem> = vec![
NetworkExportTableItem::new(
Remote::get(),
AllowAll::new(),
MultiLocation::parent(),
Some((Parent, 200u128 + if UsingTopic::get() { 20 } else { 0 }).into())
)
];
// ^^^ 100 to use the bridge (export) and 100 for the remote execution weight (5 instructions
// x (10 + 10) weight each).
}
Expand Down
10 changes: 8 additions & 2 deletions polkadot/xcm/xcm-builder/src/tests/bridging/remote_para_para.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ parameter_types! {
pub UniversalLocation: Junctions = X2(GlobalConsensus(Local::get()), Parachain(1000));
pub ParaBridgeUniversalLocation: Junctions = X2(GlobalConsensus(Local::get()), Parachain(1));
pub RemoteParaBridgeUniversalLocation: Junctions = X2(GlobalConsensus(Remote::get()), Parachain(1));
pub BridgeTable: Vec<(NetworkId, MultiLocation, Option<MultiAsset>)>
= vec![(Remote::get(), (Parent, Parachain(1)).into(), None)];
pub BridgeTable: Vec<NetworkExportTableItem> = vec![
NetworkExportTableItem::new(
Remote::get(),
AllowAll::new(),
(Parent, Parachain(1)).into(),
None
)
];
}
type TheBridge = TestBridge<
BridgeBlobDispatcher<TestRemoteIncomingRouter, RemoteParaBridgeUniversalLocation, ()>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ parameter_types! {
pub UniversalLocation: Junctions = X1(GlobalConsensus(Local::get()));
pub ParaBridgeUniversalLocation: Junctions = X2(GlobalConsensus(Local::get()), Parachain(1));
pub RemoteParaBridgeUniversalLocation: Junctions = X2(GlobalConsensus(Remote::get()), Parachain(1));
pub BridgeTable: Vec<(NetworkId, MultiLocation, Option<MultiAsset>)>
= vec![(Remote::get(), Parachain(1).into(), None)];
pub BridgeTable: Vec<NetworkExportTableItem> = vec![
NetworkExportTableItem::new(
Remote::get(),
AllowAll::new(),
Parachain(1).into(),
None
)
];
}
type TheBridge = TestBridge<
BridgeBlobDispatcher<TestRemoteIncomingRouter, RemoteParaBridgeUniversalLocation, ()>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,14 @@ parameter_types! {
pub UniversalLocation: Junctions = X2(GlobalConsensus(Local::get()), Parachain(1000));
pub RelayUniversalLocation: Junctions = X1(GlobalConsensus(Local::get()));
pub RemoteUniversalLocation: Junctions = X1(GlobalConsensus(Remote::get()));
pub BridgeTable: Vec<(NetworkId, MultiLocation, Option<MultiAsset>)>
= vec![(Remote::get(), MultiLocation::parent(), None)];
pub BridgeTable: Vec<NetworkExportTableItem> = vec![
NetworkExportTableItem::new(
Remote::get(),
AllowAll::new(),
MultiLocation::parent(),
None
)
];
}
type TheBridge =
TestBridge<BridgeBlobDispatcher<TestRemoteIncomingRouter, RemoteUniversalLocation, ()>>;
Expand Down
Loading