Skip to main content

penpal_runtime/
xcm_config.rs

1// This file is part of Cumulus.
2// SPDX-License-Identifier: Unlicense
3
4// This is free and unencumbered software released into the public domain.
5
6// Anyone is free to copy, modify, publish, use, compile, sell, or
7// distribute this software, either in source code form or as a compiled
8// binary, for any purpose, commercial or non-commercial, and by any
9// means.
10
11// In jurisdictions that recognize copyright laws, the author or authors
12// of this software dedicate any and all copyright interest in the
13// software to the public domain. We make this dedication for the benefit
14// of the public at large and to the detriment of our heirs and
15// successors. We intend this dedication to be an overt act of
16// relinquishment in perpetuity of all present and future rights to this
17// software under copyright law.
18
19// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
20// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22// IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25// OTHER DEALINGS IN THE SOFTWARE.
26
27// For more information, please refer to <http://unlicense.org/>
28
29//! Holds the XCM specific configuration that would otherwise be in lib.rs
30//!
31//! This configuration dictates how the Penpal chain will communicate with other chains.
32//!
33//! One of the main uses of the penpal chain will be to be a benefactor of reserve asset transfers
34//! with Asset Hub as the reserve. At present no derivative tokens are minted on receipt of a
35//! `ReserveAssetTransferDeposited` message but that will but the intension will be to support this
36//! soon.
37use super::{
38	AccountId, AllPalletsWithSystem, Assets, Authorship, Balance, Balances, CollatorSelection,
39	ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent,
40	RuntimeHoldReason, RuntimeOrigin, WeightToFee, XcmpQueue,
41};
42use crate::{BaseDeliveryFee, FeeAssetId, TransactionByteFee};
43use core::marker::PhantomData;
44use frame_support::{
45	parameter_types,
46	traits::{
47		fungible::HoldConsideration, tokens::imbalance::ResolveAssetTo, ConstU32, Contains,
48		ContainsPair, Equals, Everything, EverythingBut, Get, LinearStoragePrice, Nothing,
49		PalletInfoAccess,
50	},
51	weights::Weight,
52};
53use frame_system::EnsureRoot;
54use pallet_xcm::{AuthorizedAliasers, XcmPassthrough};
55use parachains_common::{
56	impls::NonZeroIssuance, xcm_config::ConcreteAssetFromSystem, TREASURY_PALLET_ID,
57};
58use polkadot_parachain_primitives::primitives::Sibling;
59use polkadot_runtime_common::{impls::ToAuthor, xcm_sender::ExponentialPrice};
60use sp_runtime::traits::{AccountIdConversion, Identity, TryConvertInto};
61use testnet_parachains_constants::westend::currency::deposit;
62use xcm::latest::{prelude::*, WESTEND_GENESIS_HASH};
63use xcm_builder::{
64	AccountId32Aliases, AliasChildLocation, AliasOriginRootUsingFilter,
65	AllowExplicitUnpaidExecutionFrom, AllowHrmpNotificationsFromRelayChain,
66	AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom,
67	DescribeAllTerminal, DescribeFamily, DescribeTerminus, EnsureXcmOrigin,
68	ExternalConsensusLocationsConverterFor, FixedWeightBounds, FrameTransactionalProcessor,
69	FungibleAdapter, FungiblesAdapter, HashedDescription, IsConcrete, LocalMint, NativeAsset,
70	NoChecking, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SendXcmFeeToAccount,
71	SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
72	SignedToAccountId32, SingleAssetExchangeAdapter, SovereignSignedViaLocation, StartsWith,
73	TakeWeightCredit, TrailingSetTopicAsId, UsingComponents, WithComputedOrigin, WithUniqueTopic,
74	XcmFeeManagerFromComponents,
75};
76use xcm_executor::XcmExecutor;
77
78parameter_types! {
79	pub const RelayLocation: Location = Location::parent();
80	// Local native currency which is stored in `pallet_balances`
81	pub const PenpalNativeCurrency: Location = Location::here();
82	// The Penpal runtime is utilized for testing with various environment setups.
83	// This storage item allows us to customize the `NetworkId` where Penpal is deployed.
84	// By default, it is set to `Westend Network` and can be changed using `System::set_storage`.
85	pub storage RelayNetworkId: NetworkId = NetworkId::ByGenesis(WESTEND_GENESIS_HASH);
86	pub RelayNetwork: Option<NetworkId> = Some(RelayNetworkId::get());
87	pub RelayChainOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
88	pub UniversalLocation: InteriorLocation = [
89		GlobalConsensus(RelayNetworkId::get()),
90		Parachain(ParachainInfo::parachain_id().into())
91	].into();
92	pub TreasuryAccount: AccountId = TREASURY_PALLET_ID.into_account_truncating();
93	pub StakingPot: AccountId = CollatorSelection::account_id();
94	pub AssetsPalletIndex: u8 = <Assets as PalletInfoAccess>::index() as u8;
95	pub AssetsPalletLocation: Location =
96		PalletInstance(AssetsPalletIndex::get()).into();
97}
98
99/// Type for specifying how a `Location` can be converted into an `AccountId`. This is used
100/// when determining ownership of accounts for asset transacting and when attempting to use XCM
101/// `Transact` in order to determine the dispatch Origin.
102pub type LocationToAccountId = (
103	// The parent (Relay-chain) origin converts to the parent `AccountId`.
104	ParentIsPreset<AccountId>,
105	// Sibling parachain origins convert to AccountId via the `ParaId::into`.
106	SiblingParachainConvertsVia<Sibling, AccountId>,
107	// Straight up local `AccountId32` origins just alias directly to `AccountId`.
108	AccountId32Aliases<RelayNetwork, AccountId>,
109	// Foreign locations alias into accounts according to a hash of their standard description.
110	HashedDescription<AccountId, (DescribeTerminus, DescribeFamily<DescribeAllTerminal>)>,
111	// Different global consensus locations sovereign accounts.
112	ExternalConsensusLocationsConverterFor<UniversalLocation, AccountId>,
113);
114
115/// Means for transacting assets on this chain.
116pub type FungibleTransactor = FungibleAdapter<
117	// Use this currency:
118	Balances,
119	// Use this currency when it is a fungible asset matching the given location or name:
120	IsConcrete<PenpalNativeCurrency>,
121	// Do a simple punn to convert an AccountId32 Location into a native chain account ID:
122	LocationToAccountId,
123	// Our chain's account ID type (we can't get away without mentioning it explicitly):
124	AccountId,
125	// We don't track any teleports.
126	(),
127>;
128
129/// Means for transacting assets besides the native currency on this chain that start with a local
130/// location pattern.
131pub type LocalFungiblesTransactor = FungiblesAdapter<
132	// Use this fungibles implementation:
133	Assets,
134	// Only allow locations that are local.
135	LocalAssetsConvertedConcreteId,
136	// Convert an XCM Location into a local account id:
137	LocationToAccountId,
138	// Our chain's account ID type (we can't get away without mentioning it explicitly):
139	AccountId,
140	// We only want to allow teleports of known assets. We use non-zero issuance as an indication
141	// that this asset is known.
142	LocalMint<NonZeroIssuance<AccountId, Assets>>,
143	// The account to use for tracking teleports.
144	CheckingAccount,
145>;
146
147// Using the latest `Location`, we don't need to worry about migrations for Penpal.
148pub type AssetsAssetId = Location;
149pub type ForeignAssetsConvertedConcreteId = xcm_builder::MatchedConvertedConcreteId<
150	Location,
151	Balance,
152	EverythingBut<(
153		// Here we rely on fact that something like this works:
154		// assert!(Location::new(1,
155		// [Parachain(100)]).starts_with(&Location::parent()));
156		// assert!([Parachain(100)].into().starts_with(&Here));
157		StartsWith<assets_common::matching::LocalLocationPattern>,
158	)>,
159	Identity,
160	TryConvertInto,
161>;
162
163pub type LocalAssetsConvertedConcreteId = xcm_builder::MatchedConvertedConcreteId<
164	Location,
165	Balance,
166	// Only allow patterns with local
167	(
168		// Here we rely on fact that something like this works:
169		// assert!(Location::new(1,
170		// [Parachain(100)]).starts_with(&Location::parent()));
171		// assert!([Parachain(100)].into().starts_with(&Here));
172		StartsWith<assets_common::matching::LocalLocationPattern>,
173	),
174	Identity,
175	TryConvertInto,
176>;
177
178/// Means for transacting foreign assets from different global consensus.
179pub type ForeignFungiblesTransactor = FungiblesAdapter<
180	// Use this fungibles implementation:
181	Assets,
182	// Use this currency when it is a fungible asset matching the given location or name:
183	ForeignAssetsConvertedConcreteId,
184	// Convert an XCM Location into a local account id:
185	LocationToAccountId,
186	// Our chain's account ID type (we can't get away without mentioning it explicitly):
187	AccountId,
188	// We don't need to check teleports here.
189	NoChecking,
190	// The account to use for tracking teleports.
191	CheckingAccount,
192>;
193
194/// Means for transacting assets on this chain.
195pub type AssetTransactors =
196	(FungibleTransactor, ForeignFungiblesTransactor, LocalFungiblesTransactor);
197
198/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,
199/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can
200/// biases the kind of local `Origin` it will become.
201pub type XcmOriginToTransactDispatchOrigin = (
202	// Sovereign account converter; this attempts to derive an `AccountId` from the origin location
203	// using `LocationToAccountId` and then turn that into the usual `Signed` origin. Useful for
204	// foreign chains who want to have a local sovereign account on this chain which they control.
205	SovereignSignedViaLocation<LocationToAccountId, RuntimeOrigin>,
206	// Native converter for Relay-chain (Parent) location; will convert to a `Relay` origin when
207	// recognized.
208	RelayChainAsNative<RelayChainOrigin, RuntimeOrigin>,
209	// Native converter for sibling Parachains; will convert to a `SiblingPara` origin when
210	// recognized.
211	SiblingParachainAsNative<cumulus_pallet_xcm::Origin, RuntimeOrigin>,
212	// Superuser converter for the Relay-chain (Parent) location. This will allow it to issue a
213	// transaction from the Root origin.
214	ParentAsSuperuser<RuntimeOrigin>,
215	// Native signed account converter; this just converts an `AccountId32` origin into a normal
216	// `RuntimeOrigin::Signed` origin of the same 32-byte value.
217	SignedAccountId32AsNative<RelayNetwork, RuntimeOrigin>,
218	// Xcm origins can be represented natively under the Xcm pallet's Xcm origin.
219	XcmPassthrough<RuntimeOrigin>,
220);
221
222parameter_types! {
223	pub const RootLocation: Location = Location::here();
224	// One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
225	pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024);
226	pub const MaxInstructions: u32 = 100;
227	pub const MaxAssetsIntoHolding: u32 = 64;
228	pub XcmAssetFeesReceiver: Option<AccountId> = Authorship::author();
229}
230
231pub struct ParentOrParentsExecutivePlurality;
232impl Contains<Location> for ParentOrParentsExecutivePlurality {
233	fn contains(location: &Location) -> bool {
234		matches!(location.unpack(), (1, []) | (1, [Plurality { id: BodyId::Executive, .. }]))
235	}
236}
237
238pub type Barrier = TrailingSetTopicAsId<(
239	TakeWeightCredit,
240	// Expected responses are OK.
241	AllowKnownQueryResponses<PolkadotXcm>,
242	// Allow XCMs with some computed origins to pass through.
243	WithComputedOrigin<
244		(
245			// If the message is one that immediately attempts to pay for execution, then
246			// allow it.
247			AllowTopLevelPaidExecutionFrom<Everything>,
248			// Parent and its pluralities (i.e. governance bodies) get free execution.
249			AllowExplicitUnpaidExecutionFrom<(ParentOrParentsExecutivePlurality,)>,
250			// Subscriptions for version tracking are OK.
251			AllowSubscriptionsFrom<Everything>,
252			// HRMP notifications from the relay chain are OK.
253			AllowHrmpNotificationsFromRelayChain,
254		),
255		UniversalLocation,
256		ConstU32<8>,
257	>,
258)>;
259
260/// Type alias to conveniently refer to `frame_system`'s `Config::AccountId`.
261pub type AccountIdOf<R> = <R as frame_system::Config>::AccountId;
262
263/// Asset filter that allows all assets from a certain location matching asset id.
264pub struct AssetPrefixFrom<Prefix, Origin>(PhantomData<(Prefix, Origin)>);
265impl<Prefix, Origin> ContainsPair<Asset, Location> for AssetPrefixFrom<Prefix, Origin>
266where
267	Prefix: Get<Location>,
268	Origin: Get<Location>,
269{
270	fn contains(asset: &Asset, origin: &Location) -> bool {
271		let loc = Origin::get();
272		&loc == origin &&
273			matches!(asset, Asset { id: AssetId(asset_loc), fun: Fungible(_a) }
274			if asset_loc.starts_with(&Prefix::get()))
275	}
276}
277
278type AssetsFrom<T> = AssetPrefixFrom<T, T>;
279
280// This asset can be added to AH as Asset and reserved transfer between Penpal and AH
281pub const RESERVABLE_ASSET_ID: u32 = 1;
282// This asset can be added to AH as ForeignAsset and teleported between Penpal and AH
283pub const PEN2_TELEPORTABLE_GENERAL_INDEX: u32 = 2;
284
285pub const ASSET_HUB_ASSETS_PALLET_ID: u8 = 50;
286pub const ASSET_HUB_ID: u32 = 1000;
287
288pub const PENPAL_ASSETS_PALLET_ID: u8 = 50;
289
290pub const USDT_ASSET_ID: u128 = 1984;
291
292pub const SEPOLIA_ID: u64 = 11155111;
293// The minimum balance for assets pre-registered in emulated tests.
294pub const ETHER_MIN_BALANCE: u128 = 1000;
295pub const USDT_ED: Balance = 70_000;
296
297parameter_types! {
298	/// The location that this chain recognizes as the Relay network's Asset Hub.
299	pub SystemAssetHubLocation: Location = Location::new(1, [Parachain(ASSET_HUB_ID)]);
300	// the Relay Chain's Asset Hub's Assets pallet index
301	pub SystemAssetHubAssetsPalletLocation: Location =
302		Location::new(1, [Parachain(ASSET_HUB_ID), PalletInstance(ASSET_HUB_ASSETS_PALLET_ID)]);
303	pub CheckingAccount: AccountId = PolkadotXcm::check_account();
304	pub LocalReservableFromAssetHub: Location = Location::new(
305		1,
306		[Parachain(ASSET_HUB_ID), PalletInstance(ASSET_HUB_ASSETS_PALLET_ID), GeneralIndex(RESERVABLE_ASSET_ID.into())]
307	);
308	pub UsdtFromAssetHub: Location = Location::new(
309		1,
310		[Parachain(ASSET_HUB_ID), PalletInstance(ASSET_HUB_ASSETS_PALLET_ID), GeneralIndex(USDT_ASSET_ID)],
311	);
312
313	pub EthFromEthereum: Location = Location::new(
314		2,
315		[GlobalConsensus(Ethereum { chain_id: SEPOLIA_ID})],
316	);
317
318	/// A PEN2 test asset.
319	pub LocalPen2Asset: Location = Location::new(0, [PalletInstance(PENPAL_ASSETS_PALLET_ID), GeneralIndex(PEN2_TELEPORTABLE_GENERAL_INDEX.into())]);
320
321	/// The Penpal runtime is utilized for testing with various environment setups.
322	/// This storage item provides the opportunity to customize testing scenarios
323	/// by configuring the trusted asset from the `SystemAssetHub`.
324	///
325	/// By default, it is configured as a `SystemAssetHubLocation` and can be modified using `System::set_storage`.
326	pub storage CustomizableAssetFromSystemAssetHub: Location = SystemAssetHubLocation::get();
327	pub storage LocalTeleportableToAssetHub: Location = LocalPen2Asset::get();
328
329	pub const NativeAssetId: AssetId = AssetId(Location::here());
330	pub const NativeAssetFilter: AssetFilter = Wild(AllOf { fun: WildFungible, id: NativeAssetId::get() });
331	pub AssetHubTrustedTeleporter: (AssetFilter, Location) = (NativeAssetFilter::get(), SystemAssetHubLocation::get());
332}
333
334/// Accepts asset with ID `AssetLocation` and is coming from `Origin` chain.
335pub struct AssetFromChain<AssetLocation, Origin>(PhantomData<(AssetLocation, Origin)>);
336impl<AssetLocation: Get<Location>, Origin: Get<Location>> ContainsPair<Asset, Location>
337	for AssetFromChain<AssetLocation, Origin>
338{
339	fn contains(asset: &Asset, origin: &Location) -> bool {
340		tracing::trace!(target: "xcm::contains", ?asset, ?origin, "AssetFromChain");
341		*origin == Origin::get() &&
342			matches!(asset.id.clone(), AssetId(id) if id == AssetLocation::get())
343	}
344}
345
346pub type TrustedReserves = (
347	NativeAsset,
348	ConcreteAssetFromSystem<RelayLocation>,
349	AssetsFrom<SystemAssetHubLocation>,
350	AssetPrefixFrom<CustomizableAssetFromSystemAssetHub, SystemAssetHubLocation>,
351);
352
353pub type TrustedTeleporters = (
354	AssetFromChain<PenpalNativeCurrency, SystemAssetHubLocation>,
355	AssetFromChain<LocalTeleportableToAssetHub, SystemAssetHubLocation>,
356	// This is used in the `IsTeleporter` configuration, meaning it accepts
357	// native tokens teleported from Asset Hub.
358	xcm_builder::Case<AssetHubTrustedTeleporter>,
359);
360
361/// Defines origin aliasing rules for this chain.
362///
363/// - Allow any origin to alias into a child sub-location (equivalent to DescendOrigin),
364/// - Allow AssetHub root to alias into anything,
365/// - Allow origins explicitly authorized by the alias target location.
366pub type TrustedAliasers = (
367	AliasChildLocation,
368	AliasOriginRootUsingFilter<SystemAssetHubLocation, Everything>,
369	AuthorizedAliasers<Runtime>,
370);
371
372pub type WaivedLocations = Equals<RootLocation>;
373
374/// Asset converter for pool assets.
375/// Used to convert assets in pools to the asset required for fee payment.
376/// The pool must be between the first asset and the one required for fee payment.
377/// This type allows paying fees with any asset in a pool with the asset required for fee payment.
378pub type PoolAssetsExchanger = SingleAssetExchangeAdapter<
379	crate::AssetConversion,
380	crate::NativeAndAssets,
381	(LocalAssetsConvertedConcreteId, ForeignAssetsConvertedConcreteId),
382	AccountId,
383>;
384
385pub struct XcmConfig;
386impl xcm_executor::Config for XcmConfig {
387	type RuntimeCall = RuntimeCall;
388	type XcmSender = XcmRouter;
389	type XcmEventEmitter = PolkadotXcm;
390	// How to withdraw and deposit an asset.
391	type AssetTransactor = AssetTransactors;
392	type OriginConverter = XcmOriginToTransactDispatchOrigin;
393	type IsReserve = TrustedReserves;
394	// no teleport trust established with other chains
395	type IsTeleporter = TrustedTeleporters;
396	type UniversalLocation = UniversalLocation;
397	type Barrier = Barrier;
398	type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
399	type Trader = (
400		// Allow native asset to pay the execution fee
401		UsingComponents<WeightToFee, PenpalNativeCurrency, AccountId, Balances, ToAuthor<Runtime>>,
402		// This trader allows to pay with any assets exchangeable to native asset with
403		// [`AssetConversion`].
404		cumulus_primitives_utility::SwapFirstAssetTrader<
405			PenpalNativeCurrency,
406			crate::AssetConversion,
407			WeightToFee,
408			crate::NativeAndAssets,
409			(LocalAssetsConvertedConcreteId, ForeignAssetsConvertedConcreteId),
410			ResolveAssetTo<StakingPot, crate::NativeAndAssets>,
411			AccountId,
412		>,
413	);
414	type ResponseHandler = PolkadotXcm;
415	type AssetTrap = PolkadotXcm;
416	type SubscriptionService = PolkadotXcm;
417	type PalletInstancesInfo = AllPalletsWithSystem;
418	type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
419	type AssetLocker = ();
420	type AssetExchanger = PoolAssetsExchanger;
421	type FeeManager = XcmFeeManagerFromComponents<
422		WaivedLocations,
423		SendXcmFeeToAccount<Self::AssetTransactor, TreasuryAccount>,
424	>;
425	type MessageExporter = ();
426	type UniversalAliases = Nothing;
427	type CallDispatcher = RuntimeCall;
428	type SafeCallFilter = Everything;
429	type Aliasers = TrustedAliasers;
430	type TransactionalProcessor = FrameTransactionalProcessor;
431	type HrmpNewChannelOpenRequestHandler = ();
432	type HrmpChannelAcceptedHandler = ();
433	type HrmpChannelClosingHandler = ();
434	type XcmRecorder = PolkadotXcm;
435}
436
437/// Converts a local signed origin into an XCM location. Forms the basis for local origins
438/// sending/executing XCMs.
439pub type LocalOriginToLocation = SignedToAccountId32<RuntimeOrigin, AccountId, RelayNetwork>;
440
441pub type PriceForParentDelivery =
442	ExponentialPrice<FeeAssetId, BaseDeliveryFee, TransactionByteFee, ParachainSystem>;
443
444/// The means for routing XCM messages which are not for local execution into the right message
445/// queues.
446pub type XcmRouter = WithUniqueTopic<(
447	// Two routers - use UMP to communicate with the relay chain:
448	cumulus_primitives_utility::ParentAsUmp<ParachainSystem, PolkadotXcm, PriceForParentDelivery>,
449	// ..and XCMP to communicate with the sibling chains.
450	XcmpQueue,
451)>;
452
453parameter_types! {
454	pub const DepositPerItem: Balance = deposit(1, 0);
455	pub const DepositPerByte: Balance = deposit(0, 1);
456	pub const AuthorizeAliasHoldReason: RuntimeHoldReason = RuntimeHoldReason::PolkadotXcm(pallet_xcm::HoldReason::AuthorizeAlias);
457}
458
459impl pallet_xcm::Config for Runtime {
460	type RuntimeEvent = RuntimeEvent;
461	type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
462	type XcmRouter = XcmRouter;
463	type ExecuteXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
464	type XcmExecuteFilter = Everything;
465	type XcmExecutor = XcmExecutor<XcmConfig>;
466	type XcmTeleportFilter = Everything;
467	type XcmReserveTransferFilter = Everything;
468	type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
469	type UniversalLocation = UniversalLocation;
470	type RuntimeOrigin = RuntimeOrigin;
471	type RuntimeCall = RuntimeCall;
472
473	const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
474	// ^ Override for AdvertisedXcmVersion default
475	type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
476	type Currency = Balances;
477	type CurrencyMatcher = ();
478	type TrustedLockers = ();
479	type SovereignAccountOf = LocationToAccountId;
480	type MaxLockers = ConstU32<8>;
481	type WeightInfo = pallet_xcm::TestWeightInfo;
482	type AdminOrigin = EnsureRoot<AccountId>;
483	type MaxRemoteLockConsumers = ConstU32<0>;
484	type RemoteLockConsumerIdentifier = ();
485	// xcm_executor::Config::Aliasers also uses pallet_xcm::AuthorizedAliasers.
486	type AuthorizedAliasConsideration = HoldConsideration<
487		AccountId,
488		Balances,
489		AuthorizeAliasHoldReason,
490		LinearStoragePrice<DepositPerItem, DepositPerByte, Balance>,
491	>;
492}
493
494impl cumulus_pallet_xcm::Config for Runtime {
495	type RuntimeEvent = RuntimeEvent;
496	type XcmExecutor = XcmExecutor<XcmConfig>;
497}