referrerpolicy=no-referrer-when-downgrade

bridge_hub_rococo_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_rococo_runtime::{
19	self as bridge_hub_rococo_runtime, xcm_config::XcmConfig as BridgeHubRococoXcmConfig,
20	EthereumBeaconClient, EthereumInboundQueue,
21	ExistentialDeposit as BridgeHubRococoExistentialDeposit,
22	RuntimeOrigin as BridgeHubRococoRuntimeOrigin,
23};
24
25// Substrate
26use frame_support::traits::OnInitialize;
27
28// Cumulus
29use emulated_integration_tests_common::{
30	impl_accounts_helpers_for_parachain, impl_assert_events_helpers_for_parachain,
31	impl_xcm_helpers_for_parachain, impls::Parachain, xcm_emulator::decl_test_parachains,
32};
33
34// BridgeHubRococo Parachain declaration
35decl_test_parachains! {
36	pub struct BridgeHubRococo {
37		genesis = genesis::genesis(),
38		on_init = {
39			bridge_hub_rococo_runtime::AuraExt::on_initialize(1);
40		},
41		runtime = bridge_hub_rococo_runtime,
42		core = {
43			XcmpMessageHandler: bridge_hub_rococo_runtime::XcmpQueue,
44			LocationToAccountId: bridge_hub_rococo_runtime::xcm_config::LocationToAccountId,
45			ParachainInfo: bridge_hub_rococo_runtime::ParachainInfo,
46			MessageOrigin: bridge_hub_common::AggregateMessageOrigin,
47		},
48		pallets = {
49			PolkadotXcm: bridge_hub_rococo_runtime::PolkadotXcm,
50			Balances: bridge_hub_rococo_runtime::Balances,
51			EthereumSystem: bridge_hub_rococo_runtime::EthereumSystem,
52			EthereumInboundQueue: bridge_hub_rococo_runtime::EthereumInboundQueue,
53			EthereumOutboundQueue: bridge_hub_rococo_runtime::EthereumOutboundQueue,
54		}
55	},
56}
57
58// BridgeHubRococo implementation
59impl_accounts_helpers_for_parachain!(BridgeHubRococo);
60impl_assert_events_helpers_for_parachain!(BridgeHubRococo);
61impl_xcm_helpers_for_parachain!(BridgeHubRococo);