referrerpolicy=no-referrer-when-downgrade

Crate staging_xcm_builder

source ·
Expand description

§XCM-Builder

Types and helpers for building XCM configuration.

Modules§

Structs§

  • Extracts the AccountId32 from the passed location if the network matches.
  • Alias a descendant location of the original origin.
  • Alias a Foreign AccountId32 with a local AccountId32 if the foreign AccountId32 matches the Prefix pattern.
  • Alias a location if it passes Filter and the original origin is root of Origin.
  • Conversion implementation which converts from a [u8; 32]-based AccountId into a Location consisting solely of a AccountId32 junction with a fixed value for its network (provided by Network) and the AccountId’s [u8; 32] datum for the id.
  • Implementation of Get<Vec<AssetFilter>> which accepts every asset. (For example, it can be used with LocationWithAssetFilters).
  • Allows execution from any origin that is contained in T (i.e. T::Contains(origin)) if the message begins with the instruction UnpaidExecution.
  • Allows execution for the Relay Chain origin (represented as Location::parent()) if it is just a straight HrmpNewChannelOpenRequest, HrmpChannelAccepted, or HrmpChannelClosing instruction.
  • Allows only messages if the generic ResponseHandler expects them via expecting_response.
  • Allows execution from origin if it is just a straight SubscribeVersion or UnsubscribeVersion instruction.
  • Allows execution from origin if it is contained in T (i.e. T::Contains(origin)) taking payments into account.
  • Allows execution from any origin that is contained in T (i.e. T::Contains(origin)).
  • Converter struct implementing AssetIdConversion converting a numeric asset ID (must be TryFrom/TryInto<u128>) into a GeneralIndex junction, prefixed by some Location value. The Location value will typically be a PalletInstance junction.
  • Convert implementation to convert from some an origin which implements Backing into a corresponding Plurality Location.
  • Accepts an asset if it is contained in the given T’s Get implementation.
  • CurrencyAdapterDeprecated
    Simple adapter to use a currency as asset transactor. This type can be used as type AssetTransactor in xcm::Config.
  • 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.
  • Create a description of the remote treasury location if possible. No two locations should have the same descriptor.
  • Implementation of AssetChecking which subjects a given set of assets L to having their teleportations recorded with a MintLocation::Local and a second set of assets R to having their teleportations recorded with a MintLocation::NonLocal.
  • 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.
  • EnsureOrigin barrier to convert from dispatch origin to XCM origin, if one exists.
  • Adapter struct which implements a conversion from any AssetKind into a LocatableAssetId value using a fixed Location for the location field.
  • Simple fee calculator that requires payment in a single fungible at a fixed rate.
  • Transactional processor implementation using frame transactional layers.
  • 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.
  • TransactAsset implementation that allows the use of a [fungible] implementation for handling an asset in the XCM executor. Works for everything but transfers.
  • TransactAsset implementation that allows the use of a [fungible] implementation for handling an asset in the XCM executor. Only works for transfers.
  • TransactAsset implementation to convert a fungibles implementation to become usable in XCM.
  • Converts a location which is a top-level relay chain (which provides its own consensus) into a 32-byte AccountId.
  • 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.
  • Allows a message only if it is from a system-level child parachain.
  • Converts a Asset into balance B if its id is equal to that given by T’s Get.
  • Matches if the given location contains only the specified amount of parents and no interior junctions.
  • Matches if the given location is a system-level sibling parachain.
  • Implementation of AssetChecking which subjects a given set of assets T to having their teleportations recorded with a MintLocation::Local.
  • Returns specified TreasuryAccount as AccountId32 if passed location matches Treasury plurality.
  • Simple struct which contains both an XCM location and asset_id to identify an asset which exists on some chain.
  • Accepts a tuple (location, assets) if the location is contained in the Contains implementation of the given Location and if every asset from assets matches at least one of the AssetFilter instances provided by the Get implementation of AssetFilters.
  • Struct created from calling fn matcher() on a mutable slice of Instructions.
  • Accepts an asset iff it is a native asset.
  • An adapter for the implementation of ExporterFor, which attempts to find the (bridge_location, payment) for the requested network and remote_location in the provided T table containing various exporters.
  • Configuration item representing a single exporter in the NetworkExportTable.
  • Implementation of AssetChecking which subjects no assets to having their teleportations recorded.
  • TransactAsset implementation that allows the use of a [nonfungible] implementation for handling an asset in the XCM executor. Works for everything.
  • TransactAsset implementation that allows the use of a [nonfungible] implementation for handling an asset in the XCM executor. Works for teleport bookkeeping.
  • TransactAsset implementation that allows the use of a [nonfungible] implementation for handling an asset in the XCM executor. Only works for transfers.
  • TransactAsset implementation that allows the use of a [nonfungibles] implementation for handling an asset in the XCM executor. Works for everything.
  • TransactAsset implementation that allows the use of a [nonfungibles] implementation for handling an asset in the XCM executor. Only works for teleport bookkeeping.
  • TransactAsset implementation that allows the use of a [nonfungibles] implementation for handling an asset in the XCM executor. Only works for transfers.
  • Implementation of AssetChecking which subjects a given set of assets T to having their teleportations recorded with a MintLocation::NonLocal.
  • Convert implementation to convert from an origin which passes the check of an EnsureOrigin into a voice of a given pluralistic Body.
  • A Location consisting of a single Parent Junction will be converted to the parent AccountId.
  • Implementation of the frame_support::traits::tokens::Pay trait, to allow for XCM-based payments of a given Balance of some asset ID existing on some chain under ownership of some Interior location of the local chain to a particular Beneficiary. The AssetKind value is not itself bounded (to avoid the issue of needing to wrap some preexisting datatype), however a converter type AssetKindToLocatableAsset must be provided in order to translate it into a LocatableAsset, which comprises both an XCM Location describing the XCM endpoint on which the asset to be paid resides and an XCM AssetId to identify the specific asset at that endpoint.
  • A message processor that delegates execution to an XcmExecutor.
  • Barrier condition that allows for a SuspensionChecker that controls whether or not the XCM executor will be suspended from executing the given XCM.
  • A HandleFee implementation that simply deposits the fees into a specific on-chain ReceiverAccount.
  • Convert implementation to convert from some a Signed (system) Origin into an AccountId32.
  • An adapter from [pallet_asset_conversion::SwapCredit] and [pallet_asset_conversion::QuotePrice] to xcm_executor::traits::AssetExchange.
  • Implementation of SendXcm which wraps the message inside an ExportMessage instruction and sends it to a destination known to be able to handle it.
  • Sovereign accounts use the system’s Signed origin with an account ID derived from the LocationConverter.
  • An implementation of Contains that checks for Location or InteriorLocation if starts with the provided type T.
  • An implementation of Contains that checks for Location or InteriorLocation if starts with expected GlobalConsensus(NetworkId) provided as type T.
  • Execution barrier that just takes max_weight from properties.weight_credit.
  • Sets the message ID to t using a SetTopic(t) in the last position if present.
  • Implementation of SendXcm which uses the given ExportXcm implementation in order to forward the message over a bridge.
  • Implementation of SendXcm which wraps the message inside an ExportMessage instruction and sends it to a destination known to be able to handle it.
  • Weight trader which uses the configured WeightToFee to set the right price for weight and then places any weight bought into the right account.
  • A derivative barrier, which scans the first MaxPrefixes instructions for origin-alterers and then evaluates should_execute of the InnerBarrier based on the remaining instructions and the newly computed origin.
  • An adapter implementation of MaybeEquivalence which can convert between the latest Location and other versions that implement TryInto<Location> and TryFrom<Location>.
  • Wrapper router which, if the message does not already end with a SetTopic instruction, prepends one to the message filled with an ID from TopicSource. This ID is returned from a successful deliver.
  • 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 successful deliver.
  • A FeeManager implementation that permits the specified WaivedLocations to not pay for fees and that uses the provided HandleFee implementation otherwise.

Enums§

Traits§

Functions§

  • Try to deposit the given fee in the specified account. Burns the fee in case of a failure.
  • 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 at universal_local within the consensus universe. If dest is not a location in remote consensus, then an error is returned.

Type Aliases§