Expand description
§XCM-Builder
Types and helpers for building XCM configuration.
Modules§
Structs§
- Account32
Hash - Account
Id32 Aliases - Extracts the
AccountId32
from the passedlocation
if the network matches. - Account
Key20 Aliases - Alias
Child Location - Alias a descendant location of the original origin.
- Alias
Foreign Account Id32 - Alias a Foreign
AccountId32
with a localAccountId32
if the foreignAccountId32
matches thePrefix
pattern. - Alias
Origin Root Using Filter - Alias a location if it passes
Filter
and the original origin is root ofOrigin
. - Aliases
Into Account Id32 - Conversion implementation which converts from a
[u8; 32]
-basedAccountId
into aLocation
consisting solely of aAccountId32
junction with a fixed value for its network (provided byNetwork
) and theAccountId
’s[u8; 32]
datum for theid
. - AllAssets
- Implementation of
Get<Vec<AssetFilter>>
which accepts every asset. (For example, it can be used withLocationWithAssetFilters
). - Allow
Explicit Unpaid Execution From - Allows execution from any origin that is contained in
T
(i.e.T::Contains(origin)
) if the message explicitly includes theUnpaidExecution
instruction. - Allow
Hrmp Notifications From Relay Chain - Allows execution for the Relay Chain origin (represented as
Location::parent()
) if it is just a straightHrmpNewChannelOpenRequest
,HrmpChannelAccepted
, orHrmpChannelClosing
instruction. - Allow
Known Query Responses - Allows only messages if the generic
ResponseHandler
expects them viaexpecting_response
. - Allow
Subscriptions From - Allows execution from
origin
if it is just a straightSubscribeVersion
orUnsubscribeVersion
instruction. - Allow
TopLevel Paid Execution From - Allows execution from
origin
if it is contained inT
(i.e.T::Contains(origin)
) taking payments into account. - Allow
Unpaid Execution From - Allows execution from any origin that is contained in
T
(i.e.T::Contains(origin)
). - AsPrefixed
General Index - Converter struct implementing
AssetIdConversion
converting a numeric asset ID (must beTryFrom/TryInto<u128>
) into aGeneralIndex
junction, prefixed by someLocation
value. TheLocation
value will typically be aPalletInstance
junction. - Backing
ToPlurality Convert
implementation to convert from some an origin which implementsBacking
into a correspondingPlurality
Location
.- Bridge
Blob Dispatcher - Bridge
Message - Case
- Accepts an asset if it is contained in the given
T
’sGet
implementation. - Child
Parachain AsNative - Child
Parachain Converts Via - Child
System Parachain AsSuperuser - Converted
Concrete Id - Currency
Adapter Deprecated - Simple adapter to use a currency as asset transactor. This type can be used as
type AssetTransactor
inxcm::Config
. - Deny
Recursively - Denies execution if the XCM contains instructions not meant to run on this chain, first checking at the top-level and then recursively.
- Deny
Reserve Transfer ToRelay Chain - Deny
Then Try - Deny executing the XCM if it matches any of the Deny filter regardless of anything else. If it passes the Deny, and matches one of the Allow cases then it is let through.
- Describe
Account Id32 Terminal - Describe
Account Key20 Terminal - Describe
Body Terminal - Describe
Family - Describe
Pallet Terminal - Describe
Terminus - Describe
Treasury Voice Terminal - Create a description of the remote treasury
location
if possible. No two locations should have the same descriptor. - Dual
Mint - Implementation of
AssetChecking
which subjects a given set of assetsL
to having their teleportations recorded with aMintLocation::Local
and a second set of assetsR
to having their teleportations recorded with aMintLocation::NonLocal
. - Ensure
Decodable Xcm - A wrapper router that attempts to encode and decode passed XCM
message
to ensure that the receiving side will be able to decode, at least with the same XCM version. - Ensure
XcmOrigin EnsureOrigin
barrier to convert from dispatch origin to XCM origin, if one exists.- External
Consensus Locations Converter For - Converts locations from external global consensus systems (e.g., Ethereum, other parachains)
into
AccountId
. - Fixed
Location - Adapter
struct
which implements a conversion from anyAssetKind
into aLocatableAssetId
value using a fixedLocation
for thelocation
field. - Fixed
Rate OfFungible - Simple fee calculator that requires payment in a single fungible at a fixed rate.
- Fixed
Weight Bounds - Frame
Transactional Processor - Transactional processor implementation using frame transactional layers.
- Fungible
Adapter TransactAsset
implementation that allows the use of a [fungible
] implementation for handling an asset in the XCM executor. Works for everything, transfers and teleport bookkeeping.- Fungible
Mutate Adapter TransactAsset
implementation that allows the use of a [fungible
] implementation for handling an asset in the XCM executor. Works for everything but transfers.- Fungible
Transfer Adapter TransactAsset
implementation that allows the use of a [fungible
] implementation for handling an asset in the XCM executor. Only works for transfers.- Fungibles
Adapter - Fungibles
Mutate Adapter - Fungibles
Transfer Adapter TransactAsset
implementation to convert afungibles
implementation to become usable in XCM.- Global
Consensus Converts For - Converts a location which is a top-level relay chain (which provides its own consensus) into a
32-byte
AccountId
. - Global
Consensus Parachain Converts For - Converts a location which is a top-level parachain (i.e. a parachain held on a
Relay-chain which provides its own consensus) into a 32-byte
AccountId
. - Hashed
Description - Haul
Blob Exporter - IsChild
System Parachain - Allows a message only if it is from a system-level child parachain.
- IsConcrete
- Converts a
Asset
into balanceB
if its id is equal to that given byT
’sGet
. - IsParents
Only - Matches if the given location contains only the specified amount of parents and no interior junctions.
- IsSibling
System Parachain - Matches if the given location is a system-level sibling parachain.
- Local
Exporter - Implementation of
SendXcm
which uses the givenExportXcm
implementation in order to forward the message over a bridge. - Local
Mint - Implementation of
AssetChecking
which subjects a given set of assetsT
to having their teleportations recorded with aMintLocation::Local
. - Local
Treasury Voice Converts Via - Returns specified
TreasuryAccount
asAccountId32
if passedlocation
matches Treasury plurality. - Locatable
Asset Id - Simple struct which contains both an XCM
location
andasset_id
to identify an asset which exists on some chain. - Location
AsSuperuser - Converter that allows specific
Location
s to act as a superuser (RuntimeOrigin::root()
) if it matches the predefinedWhitelistedSuperuserLocations
filter andOriginKind::Superuser
. - Location
With Asset Filters - Accepts a tuple
(location, assets)
if thelocation
is contained in theContains
implementation of the givenLocation
and if every asset fromassets
matches at least one of theAssetFilter
instances provided by theGet
implementation ofAssetFilters
. - Matched
Converted Concrete Id - Matcher
- Struct created from calling
fn matcher()
on a mutable slice ofInstruction
s. - Native
Asset - Accepts an asset iff it is a native asset.
- Network
Export Table - An adapter for the implementation of
ExporterFor
, which attempts to find the(bridge_location, payment)
for the requestednetwork
andremote_location
in the providedT
table containing various exporters. - Network
Export Table Item - Configuration item representing a single exporter in the
NetworkExportTable
. - NoChecking
- Implementation of
AssetChecking
which subjects no assets to having their teleportations recorded. - NonFungible
Adapter TransactAsset
implementation that allows the use of a [nonfungible
] implementation for handling an asset in the XCM executor. Works for everything.- NonFungible
Mutate Adapter TransactAsset
implementation that allows the use of a [nonfungible
] implementation for handling an asset in the XCM executor. Works for teleport bookkeeping.- NonFungible
Transfer Adapter TransactAsset
implementation that allows the use of a [nonfungible
] implementation for handling an asset in the XCM executor. Only works for transfers.- NonFungibles
Adapter TransactAsset
implementation that allows the use of a [nonfungibles
] implementation for handling an asset in the XCM executor. Works for everything.- NonFungibles
Mutate Adapter TransactAsset
implementation that allows the use of a [nonfungibles
] implementation for handling an asset in the XCM executor. Only works for teleport bookkeeping.- NonFungibles
Transfer Adapter TransactAsset
implementation that allows the use of a [nonfungibles
] implementation for handling an asset in the XCM executor. Only works for transfers.- NonLocal
Mint - Implementation of
AssetChecking
which subjects a given set of assetsT
to having their teleportations recorded with aMintLocation::NonLocal
. - Origin
ToPlurality Voice Convert
implementation to convert from an origin which passes the check of anEnsureOrigin
into a voice of a given pluralisticBody
.- Parent
AsSuperuser - Parent
IsPreset - A
Location
consisting of a singleParent
Junction
will be converted to the parentAccountId
. - PayOver
Xcm - Implementation of the
frame_support::traits::tokens::Pay
trait, to allow for XCM-based payments of a givenBalance
of some asset ID existing on some chain under ownership of someInterior
location of the local chain to a particularBeneficiary
. TheAssetKind
value is not itself bounded (to avoid the issue of needing to wrap some preexisting datatype), however a converter typeAssetKindToLocatableAsset
must be provided in order to translate it into aLocatableAsset
, which comprises both an XCMLocation
describing the XCM endpoint on which the asset to be paid resides and an XCMAssetId
to identify the specific asset at that endpoint. - Process
XcmMessage - A message processor that delegates execution to an
XcmExecutor
. - Relay
Chain AsNative - Respect
Suspension - Barrier condition that allows for a
SuspensionChecker
that controls whether or not the XCM executor will be suspended from executing the given XCM. - Send
XcmFee ToAccount - A
HandleFee
implementation that simply deposits the fees into a specific on-chainReceiverAccount
. - Sibling
Parachain AsNative - Sibling
Parachain Converts Via - Sibling
System Parachain AsSuperuser - Signed
Account Id32 AsNative - Signed
Account Key20 AsNative - Signed
ToAccount Id32 Convert
implementation to convert from some aSigned
(system)Origin
into anAccountId32
.- Single
Asset Exchange Adapter - An adapter from [
pallet_asset_conversion::SwapCredit
] and [pallet_asset_conversion::QuotePrice
] toxcm_executor::traits::AssetExchange
. - Sovereign
Paid Remote Exporter - Implementation of
SendXcm
which wraps the message inside anExportMessage
instruction and sends it to a destination known to be able to handle it. - Sovereign
Signed ViaLocation - Sovereign accounts use the system’s
Signed
origin with an account ID derived from theLocationConverter
. - Starts
With - An implementation of
Contains
that checks forLocation
orInteriorLocation
if starts with the provided typeT
. - Starts
With Explicit Global Consensus - An implementation of
Contains
that checks forLocation
orInteriorLocation
if starts with expectedGlobalConsensus(NetworkId)
provided as typeT
. - Take
Weight Credit - Execution barrier that just takes
max_weight
fromproperties.weight_credit
. - Trailing
SetTopic AsId - Sets the message ID to
t
using aSetTopic(t)
in the last position if present. - Unpaid
Local Exporter Deprecated - Implementation of
SendXcm
which uses the givenExportXcm
implementation in order to forward the message over a bridge. - Unpaid
Remote Exporter - Implementation of
SendXcm
which wraps the message inside anExportMessage
instruction and sends it to a destination known to be able to handle it. - Using
Components - Weight trader which uses the configured
WeightToFee
to set the right price for weight and then places any weight bought into the right account. - Weight
Info Bounds - With
Computed Origin - A derivative barrier, which scans the first
MaxPrefixes
instructions for origin-alterers and then evaluatesshould_execute
of theInnerBarrier
based on the remaining instructions and the newly computed origin. - With
Latest Location Converter - An adapter implementation of
MaybeEquivalence
which can convert between the latestLocation
and other versions that implementTryInto<Location>
andTryFrom<Location>
. - With
Topic Source - Wrapper router which, if the message does not already end with a
SetTopic
instruction, prepends one to the message filled with an ID fromTopicSource
. This ID is returned from a successfuldeliver
. - With
Unique Topic - Wrapper router which, if the message does not already end with a
SetTopic
instruction, appends one to the message filled with a universally unique ID. This ID is returned from a successfuldeliver
. - XcmFee
Manager From Components - A
FeeManager
implementation that permits the specifiedWaivedLocations
to not pay for fees and that uses the providedHandleFee
implementation otherwise.
Enums§
- Dispatch
Blob Error - Haul
Blob Error - Mint
Location - The location which is allowed to mint a particular asset.
Traits§
- Asset
Checking - Simple trait to indicate whether an asset is subject to having its teleportation into and out of
this chain recorded and if so in what
MintLocation
. - Controller
- Umbrella trait for all Controller traits.
- Create
Matcher - Creates an instruction matcher from an XCM. Since XCM versions differ, we need to make a trait here to unify the interfaces among them.
- Describe
Location - Means of converting a location into a stable and unique descriptive identifier.
- Dispatch
Blob - Ensure
Delivery - Trait for a type which ensures all requirements for successful delivery with XCM transport layers.
- Execute
Controller - Execute an XCM locally, for a given origin.
- Execute
Controller Weight Info - Weight functions needed for
ExecuteController
. - Exporter
For - Handle
Fee - Handles the fees that are taken by certain XCM instructions.
- Haul
Blob - Inspect
Message Queues - Inspects messages in queues. Meant to be used in runtime APIs, not in runtimes.
- Match
Xcm - API that allows to pattern-match against anything that is contained within an XCM.
- Query
Controller - Query a remote location, from a given origin.
- Query
Controller Weight Info - Weight functions needed for
QueryController
. - Query
Handler - Provides methods to expect responses from XCMs and query their status.
- Send
Controller - Send an XCM from a given origin.
- Send
Controller Weight Info - Weight functions needed for
SendController
. - Take
Revenue - Function trait for handling some revenue. Similar to a negative imbalance (credit) handler, but
for a
Asset
. Sensible implementations will deposit the asset in some known treasury or block-author account.
Functions§
- deposit_
or_ burn_ fee - Try to deposit the given fee in the specified account. Burns the fee in case of a failure.
- ensure_
is_ remote - Returns the network ID and consensus location within that network of the remote
location
dest
which is itself specified as a location relative to the local chain, itself situated atuniversal_local
within the consensus universe. Ifdest
is not a location in remote consensus, then an error is returned.
Type Aliases§
- Converted
Concrete Asset Id Deprecated - Describe
Account IdTerminal - Describe
AllTerminal - Foreign
Chain Alias Account Deprecated - This is deprecated in favor of the more modular
HashedDescription
converter. If your chain has previously used this, then you can retain backwards compatibility usingHashedDescription
and a tuple withLegacyDescribeForeignChainAccount
as the first element. For example: - PayAccount
Id32 OnChain Over Xcm - Specialization of the
PayOverXcm
trait to allow[u8; 32]
-basedAccountId
values to be paid on a remote chain.