referrerpolicy=no-referrer-when-downgrade

xcm_docs/cookbook/relay_token_transactor/parachain/
mod.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
3// This file is part of Polkadot.
4
5// Polkadot is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9
10// Polkadot is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13// GNU General Public License for more details.
14
15// You should have received a copy of the GNU General Public License
16// along with Polkadot.  If not, see <http://www.gnu.org/licenses/>.
17
18//! # Runtime
19
20use frame::{deps::frame_system, runtime::prelude::*, traits::IdentityLookup};
21use xcm_executor::XcmExecutor;
22use xcm_simulator::mock_message_queue;
23
24mod xcm_config;
25use xcm_config::XcmConfig;
26
27pub type Block = frame_system::mocking::MockBlock<Runtime>;
28pub type AccountId = frame::deps::sp_runtime::AccountId32;
29pub type Balance = u64;
30
31construct_runtime! {
32	pub struct Runtime {
33		System: frame_system,
34		MessageQueue: mock_message_queue,
35		Balances: pallet_balances,
36		XcmPallet: pallet_xcm,
37	}
38}
39
40#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
41impl frame_system::Config for Runtime {
42	type Block = Block;
43	type AccountId = AccountId;
44	type Lookup = IdentityLookup<AccountId>;
45	type AccountData = pallet_balances::AccountData<Balance>;
46}
47
48impl mock_message_queue::Config for Runtime {
49	type RuntimeEvent = RuntimeEvent;
50	type XcmExecutor = XcmExecutor<XcmConfig>;
51}
52
53#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
54impl pallet_balances::Config for Runtime {
55	type AccountStore = System;
56}