referrerpolicy=no-referrer-when-downgrade

xcm_simulator_example/parachain/xcm_config/
mod.rs

1// Copyright (C) Parity Technologies (UK) Ltd.
2// This file is part of Polkadot.
3
4// Polkadot is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8
9// Polkadot is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12// GNU General Public License for more details.
13
14// You should have received a copy of the GNU General Public License
15// along with Polkadot.  If not, see <http://www.gnu.org/licenses/>.
16
17pub mod asset_transactor;
18pub mod barrier;
19pub mod constants;
20pub mod location_converter;
21pub mod origin_converter;
22pub mod reserve;
23pub mod teleporter;
24pub mod weigher;
25
26use crate::parachain::{MsgQueue, PolkadotXcm, RuntimeCall};
27use frame_support::traits::{Everything, Nothing};
28use xcm_builder::{EnsureDecodableXcm, FixedRateOfFungible, FrameTransactionalProcessor};
29
30// Generated from `decl_test_network!`
31pub type XcmRouter = EnsureDecodableXcm<crate::ParachainXcmRouter<MsgQueue>>;
32
33pub struct XcmConfig;
34impl xcm_executor::Config for XcmConfig {
35	type RuntimeCall = RuntimeCall;
36	type XcmSender = XcmRouter;
37	type XcmEventEmitter = PolkadotXcm;
38	type AssetTransactor = asset_transactor::AssetTransactor;
39	type OriginConverter = origin_converter::OriginConverter;
40	type IsReserve = reserve::TrustedReserves;
41	type IsTeleporter = teleporter::TrustedTeleporters;
42	type UniversalLocation = constants::UniversalLocation;
43	type Barrier = barrier::Barrier;
44	type Weigher = weigher::Weigher;
45	type Trader = FixedRateOfFungible<constants::KsmPerSecondPerByte, ()>;
46	type ResponseHandler = ();
47	type AssetTrap = ();
48	type AssetLocker = PolkadotXcm;
49	type AssetExchanger = ();
50	type AssetClaims = ();
51	type SubscriptionService = ();
52	type PalletInstancesInfo = ();
53	type FeeManager = ();
54	type MaxAssetsIntoHolding = constants::MaxAssetsIntoHolding;
55	type MessageExporter = ();
56	type UniversalAliases = Nothing;
57	type CallDispatcher = RuntimeCall;
58	type SafeCallFilter = Everything;
59	type Aliasers = Nothing;
60	type TransactionalProcessor = FrameTransactionalProcessor;
61	type HrmpNewChannelOpenRequestHandler = ();
62	type HrmpChannelAcceptedHandler = ();
63	type HrmpChannelClosingHandler = ();
64	type XcmRecorder = PolkadotXcm;
65}