xcm-emulator: add Rococo<>Westend bridge and add tests for assets transfers over the bridge (#2251)

- switch from Rococo<>Wococo to Rococo<>Westend bridge
- add bidirectional simple tests
- remove Wococo chains from xcm-emulator
- added tests for assets transfers over Rococo<>Westend bridge 

fixes https://github.com/paritytech/parity-bridges-common/issues/2405
This commit is contained in:
Adrian Catangiu
2023-11-14 14:47:04 +02:00
committed by GitHub
parent a393cfcb28
commit 39cc95740a
30 changed files with 711 additions and 469 deletions
@@ -1,30 +0,0 @@
[package]
name = "wococo-emulated-chain"
version = "0.0.0"
authors.workspace = true
edition.workspace = true
license = "Apache-2.0"
description = "Wococo emulated chain"
publish = false
[dependencies]
serde_json = "1.0.104"
# Substrate
sp-core = { path = "../../../../../../../substrate/primitives/core", default-features = false }
sp-runtime = { path = "../../../../../../../substrate/primitives/runtime", default-features = false }
sp-authority-discovery = { path = "../../../../../../../substrate/primitives/authority-discovery", default-features = false }
sp-consensus-babe = { path = "../../../../../../../substrate/primitives/consensus/babe", default-features = false }
beefy-primitives = { package = "sp-consensus-beefy", path = "../../../../../../../substrate/primitives/consensus/beefy" }
grandpa = { package = "sc-consensus-grandpa", path = "../../../../../../../substrate/client/consensus/grandpa", default-features = false }
pallet-im-online = { path = "../../../../../../../substrate/frame/im-online", default-features = false }
# Polkadot
polkadot-primitives = { path = "../../../../../../../polkadot/primitives", default-features = false }
rococo-runtime-constants = { path = "../../../../../../../polkadot/runtime/rococo/constants", default-features = false }
rococo-runtime = { path = "../../../../../../../polkadot/runtime/rococo" }
# Cumulus
parachains-common = { path = "../../../../../../parachains/common" }
emulated-integration-tests-common = { path = "../../../common", default-features = false }
rococo-emulated-chain = { path = "../rococo" }
@@ -1,46 +0,0 @@
// 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.
// Cumulus
use emulated_integration_tests_common::{
impl_accounts_helpers_for_relay_chain, impl_assert_events_helpers_for_relay_chain,
impl_hrmp_channels_helpers_for_relay_chain, impl_send_transact_helpers_for_relay_chain,
xcm_emulator::decl_test_relay_chains,
};
// Wococo declaration
decl_test_relay_chains! {
#[api_version(8)]
pub struct Wococo {
genesis = rococo_emulated_chain::genesis::genesis(),
on_init = (),
runtime = rococo_runtime,
core = {
SovereignAccountOf: rococo_runtime::xcm_config::LocationConverter,
},
pallets = {
XcmPallet: rococo_runtime::XcmPallet,
Sudo: rococo_runtime::Sudo,
Balances: rococo_runtime::Balances,
Hrmp: rococo_runtime::Hrmp,
}
},
}
// Wococo implementation
impl_accounts_helpers_for_relay_chain!(Wococo);
impl_assert_events_helpers_for_relay_chain!(Wococo);
impl_hrmp_channels_helpers_for_relay_chain!(Wococo);
impl_send_transact_helpers_for_relay_chain!(Wococo);