pub type PayOverXcm<Interior, XcmConfig, Querier, Timeout, Beneficiary, AssetKind, AssetKindToLocatableAsset, BeneficiaryRefToLocation> = PayOverXcmWithHelper<Interior, TransferOverXcmHelper<XcmConfig, Querier, Timeout, Beneficiary, AssetKind, AssetKindToLocatableAsset, BeneficiaryRefToLocation>>;Expand description
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.
This relies on the XCM TransferAsset instruction. A trait BeneficiaryRefToLocation must be
provided in order to convert the Beneficiary reference into a location usable by
TransferAsset.
PayOverXcm::pay is asynchronous, and returns a QueryId which can then be used in
check_payment to check the status of the XCM transaction.
See also PayAccountId32OverXcm which is similar to this except that BeneficiaryRefToLocation
need not be supplied and Beneficiary must implement Into<[u8; 32]>.
The implementation of this type assumes:
- The sending account on the remote chain is fixed (derived from the
Interiorlocation), rather than being fully configurable. - The remote chain waives the XCM execution fee (
PaysRemoteFee::No).
See also super::transfer::TransferOverXcm for a more generic implementation with a flexible sender account on the remote chain, and not making the assumption that the remote XCM execution fee is waived.
Aliased Type§
pub struct PayOverXcm<Interior, XcmConfig, Querier, Timeout, Beneficiary, AssetKind, AssetKindToLocatableAsset, BeneficiaryRefToLocation>(/* private fields */);