staging_xcm_builder/
lib.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
17//! # XCM-Builder
18//!
19//! Types and helpers for *building* XCM configuration.
20
21#![cfg_attr(not(feature = "std"), no_std)]
22
23extern crate alloc;
24extern crate core;
25
26#[cfg(test)]
27mod tests;
28
29#[cfg(feature = "std")]
30pub mod test_utils;
31
32mod asset_conversion;
33#[allow(deprecated)]
34pub use asset_conversion::ConvertedConcreteAssetId;
35pub use asset_conversion::{
36	AsPrefixedGeneralIndex, ConvertedConcreteId, MatchClasslessInstances, MatchInClassInstances,
37	MatchedConvertedConcreteId,
38};
39
40mod asset_exchange;
41pub use asset_exchange::SingleAssetExchangeAdapter;
42
43mod barriers;
44pub use barriers::{
45	AllowExplicitUnpaidExecutionFrom, AllowHrmpNotificationsFromRelayChain,
46	AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom,
47	AllowUnpaidExecutionFrom, DenyRecursively, DenyReserveTransferToRelayChain, DenyThenTry,
48	IsChildSystemParachain, IsParentsOnly, IsSiblingSystemParachain, RespectSuspension,
49	TakeWeightCredit, TrailingSetTopicAsId, WithComputedOrigin,
50};
51
52mod controller;
53pub use controller::{
54	Controller, ExecuteController, ExecuteControllerWeightInfo, QueryController,
55	QueryControllerWeightInfo, QueryHandler, SendController, SendControllerWeightInfo,
56};
57
58mod currency_adapter;
59#[allow(deprecated)]
60pub use currency_adapter::CurrencyAdapter;
61
62mod fee_handling;
63pub use fee_handling::{
64	deposit_or_burn_fee, HandleFee, SendXcmFeeToAccount, XcmFeeManagerFromComponents,
65};
66
67mod filter_asset_location;
68pub use filter_asset_location::{AllAssets, Case, LocationWithAssetFilters, NativeAsset};
69
70mod fungible_adapter;
71pub use fungible_adapter::{FungibleAdapter, FungibleMutateAdapter, FungibleTransferAdapter};
72
73mod fungibles_adapter;
74pub use fungibles_adapter::{
75	AssetChecking, DualMint, FungiblesAdapter, FungiblesMutateAdapter, FungiblesTransferAdapter,
76	LocalMint, MintLocation, NoChecking, NonLocalMint,
77};
78
79mod location_conversion;
80#[allow(deprecated)]
81pub use location_conversion::ForeignChainAliasAccount;
82pub use location_conversion::{
83	Account32Hash, AccountId32Aliases, AccountKey20Aliases, AliasesIntoAccountId32,
84	ChildParachainConvertsVia, DescribeAccountId32Terminal, DescribeAccountIdTerminal,
85	DescribeAccountKey20Terminal, DescribeAllTerminal, DescribeBodyTerminal, DescribeFamily,
86	DescribeLocation, DescribePalletTerminal, DescribeTerminus, DescribeTreasuryVoiceTerminal,
87	ExternalConsensusLocationsConverterFor, GlobalConsensusConvertsFor,
88	GlobalConsensusParachainConvertsFor, HashedDescription, LocalTreasuryVoiceConvertsVia,
89	ParentIsPreset, SiblingParachainConvertsVia,
90};
91
92mod matches_location;
93pub use matches_location::{
94	StartsWith, StartsWithExplicitGlobalConsensus, WithLatestLocationConverter,
95};
96
97mod matches_token;
98pub use matches_token::IsConcrete;
99
100mod matcher;
101pub use matcher::{CreateMatcher, MatchXcm, Matcher};
102
103pub mod unique_instances;
104
105mod nonfungibles_adapter;
106pub use nonfungibles_adapter::{
107	NonFungiblesAdapter, NonFungiblesMutateAdapter, NonFungiblesTransferAdapter,
108};
109
110mod nonfungible_adapter;
111pub use nonfungible_adapter::{
112	NonFungibleAdapter, NonFungibleMutateAdapter, NonFungibleTransferAdapter,
113};
114
115mod origin_aliases;
116pub use origin_aliases::*;
117
118mod origin_conversion;
119pub use origin_conversion::{
120	BackingToPlurality, ChildParachainAsNative, ChildSystemParachainAsSuperuser, EnsureXcmOrigin,
121	LocationAsSuperuser, OriginToPluralityVoice, ParentAsSuperuser, RelayChainAsNative,
122	SiblingParachainAsNative, SiblingSystemParachainAsSuperuser, SignedAccountId32AsNative,
123	SignedAccountKey20AsNative, SignedToAccountId32, SovereignSignedViaLocation,
124};
125
126mod pay;
127pub use pay::{
128	FixedLocation, LocatableAssetId, PayAccountId32OnChainOverXcm, PayOverXcm, PayOverXcmWithHelper,
129};
130
131mod process_xcm_message;
132pub use process_xcm_message::ProcessXcmMessage;
133
134mod routing;
135pub use routing::{
136	EnsureDecodableXcm, EnsureDelivery, InspectMessageQueues, WithTopicSource, WithUniqueTopic,
137};
138
139mod transactional;
140pub use transactional::FrameTransactionalProcessor;
141
142#[allow(deprecated)]
143pub use universal_exports::UnpaidLocalExporter;
144
145mod transfer;
146pub use transfer::{Transfer, TransferOverXcm, TransferOverXcmHelper, TransferStatus};
147
148mod universal_exports;
149pub use universal_exports::{
150	ensure_is_remote, BridgeBlobDispatcher, BridgeMessage, DispatchBlob, DispatchBlobError,
151	ExporterFor, HaulBlob, HaulBlobError, HaulBlobExporter, LocalExporter, NetworkExportTable,
152	NetworkExportTableItem, SovereignPaidRemoteExporter, UnpaidRemoteExporter,
153};
154
155mod weight;
156pub use weight::{
157	FixedRateOfFungible, FixedWeightBounds, TakeRevenue, UsingComponents, WeightInfoBounds,
158};