referrerpolicy=no-referrer-when-downgrade

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 forwarder;
63pub use forwarder::TeleportForwarderForAccountId32;
64
65mod fee_handling;
66pub use fee_handling::{
67	deposit_or_burn_fee, HandleFee, SendXcmFeeToAccount, XcmFeeManagerFromComponents,
68};
69
70mod filter_asset_location;
71pub use filter_asset_location::{AllAssets, Case, LocationWithAssetFilters, NativeAsset};
72
73mod fungible_adapter;
74pub use fungible_adapter::{FungibleAdapter, FungibleMutateAdapter, FungibleTransferAdapter};
75
76mod fungibles_adapter;
77pub use fungibles_adapter::{
78	AssetChecking, DualMint, FungiblesAdapter, FungiblesMutateAdapter, FungiblesTransferAdapter,
79	LocalMint, MintLocation, NoChecking, NonLocalMint,
80};
81
82mod location_conversion;
83#[allow(deprecated)]
84pub use location_conversion::ForeignChainAliasAccount;
85pub use location_conversion::{
86	Account32Hash, AccountId32Aliases, AccountKey20Aliases, AliasesIntoAccountId32,
87	ChildParachainConvertsVia, DescribeAccountId32Terminal, DescribeAccountIdTerminal,
88	DescribeAccountKey20Terminal, DescribeAllTerminal, DescribeBodyTerminal, DescribeFamily,
89	DescribeLocation, DescribePalletTerminal, DescribeTerminus, DescribeTreasuryVoiceTerminal,
90	ExternalConsensusLocationsConverterFor, GlobalConsensusConvertsFor,
91	GlobalConsensusParachainConvertsFor, HashedDescription, LocalTreasuryVoiceConvertsVia,
92	ParentIsPreset, SiblingParachainConvertsVia,
93};
94
95mod matches_location;
96pub use matches_location::{
97	StartsWith, StartsWithExplicitGlobalConsensus, WithLatestLocationConverter,
98};
99
100mod matches_token;
101pub use matches_token::IsConcrete;
102
103mod matcher;
104pub use matcher::{CreateMatcher, MatchXcm, Matcher};
105
106pub mod unique_instances;
107
108mod nonfungibles_adapter;
109pub use nonfungibles_adapter::{
110	NonFungiblesAdapter, NonFungiblesMutateAdapter, NonFungiblesTransferAdapter,
111};
112
113mod nonfungible_adapter;
114pub use nonfungible_adapter::{
115	NonFungibleAdapter, NonFungibleMutateAdapter, NonFungibleTransferAdapter,
116};
117
118mod origin_aliases;
119pub use origin_aliases::*;
120
121mod origin_conversion;
122pub use origin_conversion::{
123	BackingToPlurality, ChildParachainAsNative, ChildSystemParachainAsSuperuser, EnsureXcmOrigin,
124	LocationAsSuperuser, OriginToPluralityVoice, ParentAsSuperuser, RelayChainAsNative,
125	SiblingParachainAsNative, SiblingSystemParachainAsSuperuser, SignedAccountId32AsNative,
126	SignedAccountKey20AsNative, SignedToAccountId32, SovereignSignedViaLocation,
127};
128
129mod pay;
130pub use pay::{
131	FixedLocation, LocatableAssetId, PayAccountId32OnChainOverXcm, PayOverXcm, PayOverXcmWithHelper,
132};
133
134mod process_xcm_message;
135pub use process_xcm_message::ProcessXcmMessage;
136
137mod routing;
138pub use routing::{
139	EnsureDecodableXcm, EnsureDelivery, InspectMessageQueues, WithTopicSource, WithUniqueTopic,
140};
141
142mod transactional;
143pub use transactional::FrameTransactionalProcessor;
144
145#[allow(deprecated)]
146pub use universal_exports::UnpaidLocalExporter;
147
148mod transfer;
149pub use transfer::{Transfer, TransferOverXcm, TransferOverXcmHelper, TransferStatus};
150
151mod universal_exports;
152pub use universal_exports::{
153	ensure_is_remote, BridgeBlobDispatcher, BridgeMessage, DispatchBlob, DispatchBlobError,
154	ExporterFor, HaulBlob, HaulBlobError, HaulBlobExporter, LocalExporter, NetworkExportTable,
155	NetworkExportTableItem, SovereignPaidRemoteExporter, UnpaidRemoteExporter,
156};
157
158mod weight;
159pub use weight::{
160	FixedRateOfFungible, FixedWeightBounds, TakeRevenue, UsingComponents, WeightInfoBounds,
161};