referrerpolicy=no-referrer-when-downgrade

bridge_hub_westend_emulated_chain/
lib.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// SPDX-License-Identifier: Apache-2.0
3
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// 	http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16pub mod genesis;
17
18pub use bridge_hub_westend_runtime::{
19	self, xcm_config::XcmConfig as BridgeHubWestendXcmConfig,
20	ExistentialDeposit as BridgeHubWestendExistentialDeposit,
21	RuntimeOrigin as BridgeHubWestendRuntimeOrigin,
22};
23
24// Substrate
25use frame_support::traits::OnInitialize;
26
27// Cumulus
28use emulated_integration_tests_common::{
29	impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain,
30	impl_xcm_helpers_for_parachain, impls::Parachain, xcm_emulator::decl_test_parachains,
31};
32
33// BridgeHubWestend Parachain declaration
34decl_test_parachains! {
35	pub struct BridgeHubWestend {
36		genesis = genesis::genesis(),
37		on_init = {
38			bridge_hub_westend_runtime::AuraExt::on_initialize(1);
39		},
40		runtime = bridge_hub_westend_runtime,
41		core = {
42			XcmpMessageHandler: bridge_hub_westend_runtime::XcmpQueue,
43			LocationToAccountId: bridge_hub_westend_runtime::xcm_config::LocationToAccountId,
44			ParachainInfo: bridge_hub_westend_runtime::ParachainInfo,
45			MessageOrigin: bridge_hub_common::AggregateMessageOrigin,
46		},
47		pallets = {
48			PolkadotXcm: bridge_hub_westend_runtime::PolkadotXcm,
49			Balances: bridge_hub_westend_runtime::Balances,
50			EthereumSystem: bridge_hub_westend_runtime::EthereumSystem,
51			EthereumInboundQueue: bridge_hub_westend_runtime::EthereumInboundQueue,
52			EthereumOutboundQueue: bridge_hub_westend_runtime::EthereumOutboundQueue,
53			EthereumSystemV2: bridge_hub_westend_runtime::EthereumSystemV2,
54			BridgeRelayers: bridge_hub_westend_runtime::BridgeRelayers,
55		}
56	},
57}
58
59// BridgeHubWestend implementation
60impl_accounts_helpers_for_parachain!(BridgeHubWestend);
61impl_assert_events_helpers_for_parachain!(BridgeHubWestend);
62impl_xcm_helpers_for_parachain!(BridgeHubWestend);