Crate xcm_builder
source ·Expand description
XCM-Builder
Types and helpers for building XCM configuration.
Modules
Structs
- Extracts the
AccountId32
from the passedlocation
if the network matches. - Allows only messages if the generic
ResponseHandler
expects them viaexpecting_response
. - Allows execution from
origin
if it is just a straightSubscribeVerison
orUnsubscribeVersion
instruction. - Allows execution from
origin
if it is contained inT
(i.e.T::Contains(origin)
) taking payments into account. - Allows execution from any origin that is contained in
T
(i.e.T::Contains(origin)
) without any payments. Use only for executions from trusted origin groups. - Converter struct implementing
AssetIdConversion
converting a numeric asset ID (must beTryFrom/TryInto<u128>
) into aGeneralIndex
junction, prefixed by someMultiLocation
value. TheMultiLocation
value will typically be aPalletInstance
junction. Convert
implementation to convert from some an origin which implementsBacking
into a correspondingPlurality
MultiLocation
.- Accepts an asset if it is contained in the given
T
’sGet
implementation. - Simple adapter to use a currency as asset transactor. This type can be used as
type AssetTransactor
inxcm::Config
. EnsureOrigin
barrier to convert from dispatch origin to XCM origin, if one exists.- FixedRateOfConcreteFungibleDeprecatedSimple fee calculator that requires payment in a single concrete fungible at a fixed rate.
- Simple fee calculator that requires payment in a single fungible at a fixed rate.
- Same as
IsConcrete
but for a fungible with abstract location. - Allows a message only if it is from a system-level child parachain.
- Converts a
MultiAsset
into balanceB
if it is a concrete fungible with an id equal to that given byT
’sGet
. - Simple location inverter; give it this location’s ancestry and it’ll figure out the inverted location.
- Accepts an asset iff it is a native asset.
Convert
implementation to convert from an origin which passes the check of anEnsureOrigin
into a voice of a given pluralisticBody
.Convert
implementation to convert from some aSigned
(system)Origin
into anAccountId32
.- Sovereign accounts use the system’s
Signed
origin with an account ID derived from theLocationConverter
. - Execution barrier that just takes
max_weight
fromweight_credit
. - Weight trader which uses the
TransactionPayment
pallet to set the right price for weight and then places any weight bought into the right account.
Traits
- Function trait for handling some revenue. Similar to a negative imbalance (credit) handler, but for a
MultiAsset
. Sensible implementations will deposit the asset in some known treasury or block-author account.