pub type PolkadotXcm = Pallet<Runtime>;
Aliased Type§
struct PolkadotXcm(/* private fields */);
Implementations
Source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
Sourcepub fn request_version_notify(dest: impl Into<Location>) -> Result<(), Error>
pub fn request_version_notify(dest: impl Into<Location>) -> Result<(), Error>
Request that dest
informs us of its version.
Sourcepub fn unrequest_version_notify(dest: impl Into<Location>) -> Result<(), Error>
pub fn unrequest_version_notify(dest: impl Into<Location>) -> Result<(), Error>
Request that dest
ceases informing us of its version.
Sourcepub fn send_xcm(
interior: impl Into<Junctions>,
dest: impl Into<Location>,
message: Xcm<()>,
) -> Result<[u8; 32], SendError>
pub fn send_xcm( interior: impl Into<Junctions>, dest: impl Into<Location>, message: Xcm<()>, ) -> Result<[u8; 32], SendError>
Relay an XCM message
from a given interior
location in this context to a given dest
location. The fee_payer
is charged for the delivery unless None
in which case fees
are not charged (and instead borne by the chain).
pub fn check_account() -> <T as Config>::AccountId
Sourcepub fn dry_run_call<Runtime, Router, OriginCaller, RuntimeCall>(
origin: OriginCaller,
call: RuntimeCall,
result_xcms_version: u32,
) -> Result<CallDryRunEffects<<Runtime as Config>::RuntimeEvent>, Error>where
Runtime: Config,
Router: InspectMessageQueues,
RuntimeCall: Dispatchable<PostInfo = PostDispatchInfo>,
<RuntimeCall as Dispatchable>::RuntimeOrigin: From<OriginCaller>,
pub fn dry_run_call<Runtime, Router, OriginCaller, RuntimeCall>(
origin: OriginCaller,
call: RuntimeCall,
result_xcms_version: u32,
) -> Result<CallDryRunEffects<<Runtime as Config>::RuntimeEvent>, Error>where
Runtime: Config,
Router: InspectMessageQueues,
RuntimeCall: Dispatchable<PostInfo = PostDispatchInfo>,
<RuntimeCall as Dispatchable>::RuntimeOrigin: From<OriginCaller>,
Dry-runs call
with the given origin
.
Returns not only the call result and events, but also the local XCM, if any,
and any XCMs forwarded to other locations.
Meant to be used in the xcm_runtime_apis::dry_run::DryRunApi
runtime API.
Sourcepub fn dry_run_xcm<Runtime, Router, RuntimeCall, XcmConfig>(
origin_location: VersionedLocation,
xcm: VersionedXcm<RuntimeCall>,
) -> Result<XcmDryRunEffects<<Runtime as Config>::RuntimeEvent>, Error>where
RuntimeCall: Decode + GetDispatchInfo,
Runtime: Config,
Router: InspectMessageQueues,
XcmConfig: Config<RuntimeCall = RuntimeCall>,
pub fn dry_run_xcm<Runtime, Router, RuntimeCall, XcmConfig>(
origin_location: VersionedLocation,
xcm: VersionedXcm<RuntimeCall>,
) -> Result<XcmDryRunEffects<<Runtime as Config>::RuntimeEvent>, Error>where
RuntimeCall: Decode + GetDispatchInfo,
Runtime: Config,
Router: InspectMessageQueues,
XcmConfig: Config<RuntimeCall = RuntimeCall>,
Dry-runs xcm
with the given origin_location
.
Returns execution result, events, and any forwarded XCMs to other locations.
Meant to be used in the xcm_runtime_apis::dry_run::DryRunApi
runtime API.
Sourcepub fn query_acceptable_payment_assets(
version: u32,
asset_ids: Vec<AssetId>,
) -> Result<Vec<VersionedAssetId>, Error>
pub fn query_acceptable_payment_assets( version: u32, asset_ids: Vec<AssetId>, ) -> Result<Vec<VersionedAssetId>, Error>
Given a list of asset ids, returns the correct API response for
XcmPaymentApi::query_acceptable_payment_assets
.
The assets passed in have to be supported for fee payment.
pub fn query_xcm_weight(message: VersionedXcm<()>) -> Result<Weight, Error>
Sourcepub fn is_trusted_reserve(
asset: VersionedAsset,
location: VersionedLocation,
) -> Result<bool, Error>
pub fn is_trusted_reserve( asset: VersionedAsset, location: VersionedLocation, ) -> Result<bool, Error>
Given an Asset and a Location, returns if the provided location is a trusted reserve for the given asset.
Sourcepub fn is_trusted_teleporter(
asset: VersionedAsset,
location: VersionedLocation,
) -> Result<bool, Error>
pub fn is_trusted_teleporter( asset: VersionedAsset, location: VersionedLocation, ) -> Result<bool, Error>
Given an Asset and a Location, returns if the asset can be teleported to provided location.
pub fn query_delivery_fees( destination: VersionedLocation, message: VersionedXcm<()>, ) -> Result<VersionedAssets, Error>
Sourcepub fn report_outcome_notify(
message: &mut Xcm<()>,
responder: impl Into<Location>,
notify: impl Into<<T as Config>::RuntimeCall>,
timeout: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
) -> Result<(), Error>
pub fn report_outcome_notify( message: &mut Xcm<()>, responder: impl Into<Location>, notify: impl Into<<T as Config>::RuntimeCall>, timeout: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, ) -> Result<(), Error>
Consume message
and return another which is equivalent to it except that it reports
back the outcome and dispatches notify
on this chain.
message
: The message whose outcome should be reported.responder
: The origin from which a response should be expected.notify
: A dispatchable function which will be called once the outcome ofmessage
is known. It may be a dispatchable in any pallet of the local chain, but other than the usual origin, it must accept exactly two arguments:query_id: QueryId
andoutcome: Response
, and in that order. It should expect that the origin isOrigin::Response
and will contain the responder’s location.timeout
: The block number after which it is permissible fornotify
not to be called even if a response is received.
report_outcome_notify
may return an error if the responder
is not invertible.
It is assumed that the querier of the response will be Here
.
NOTE: notify
gets called as part of handling an incoming message, so it should be
lightweight. Its weight is estimated during this function and stored ready for
weighing ReportOutcome
on the way back. If it turns out to be heavier once it returns
then reporting the outcome will fail. Futhermore if the estimate is too high, then it
may be put in the overweight queue and need to be manually executed.
Sourcepub fn new_notify_query(
responder: impl Into<Location>,
notify: impl Into<<T as Config>::RuntimeCall>,
timeout: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
match_querier: impl Into<Location>,
) -> u64
pub fn new_notify_query( responder: impl Into<Location>, notify: impl Into<<T as Config>::RuntimeCall>, timeout: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, match_querier: impl Into<Location>, ) -> u64
Attempt to create a new query ID and register it as a query that is yet to respond, and which will call a dispatchable when a response happens.
Sourcepub fn do_try_state() -> Result<(), DispatchError>
pub fn do_try_state() -> Result<(), DispatchError>
Ensure the correctness of the state of this pallet.
This should be valid before and after each state transition of this pallet.
§Invariants
All entries stored in the SupportedVersion
/ VersionNotifiers
/ VersionNotifyTargets
need to be migrated to the XCM_VERSION
. If they are not, then CurrentMigration
has to be
set.
Source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
Sourcepub fn asset_trap<KArg>(k: KArg) -> u32where
KArg: EncodeLike<H256>,
pub fn asset_trap<KArg>(k: KArg) -> u32where
KArg: EncodeLike<H256>,
An auto-generated getter for AssetTraps
.
Source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
pub fn send( origin: <T as Config>::RuntimeOrigin, dest: Box<VersionedLocation>, message: Box<VersionedXcm<()>>, ) -> Result<(), DispatchError>
Sourcepub fn teleport_assets(
origin: <T as Config>::RuntimeOrigin,
dest: Box<VersionedLocation>,
beneficiary: Box<VersionedLocation>,
assets: Box<VersionedAssets>,
fee_asset_item: u32,
) -> Result<(), DispatchError>
👎Deprecated: This extrinsic uses WeightLimit::Unlimited
, please migrate to limited_teleport_assets
or transfer_assets
pub fn teleport_assets( origin: <T as Config>::RuntimeOrigin, dest: Box<VersionedLocation>, beneficiary: Box<VersionedLocation>, assets: Box<VersionedAssets>, fee_asset_item: u32, ) -> Result<(), DispatchError>
WeightLimit::Unlimited
, please migrate to limited_teleport_assets
or transfer_assets
Teleport some assets from the local chain to some destination chain.
This function is deprecated: Use limited_teleport_assets
instead.
Fee payment on the destination side is made from the asset in the assets
vector of
index fee_asset_item
. The weight limit for fees is not provided and thus is unlimited,
with all fees taken as needed from the asset.
origin
: Must be capable of withdrawing theassets
and executing XCM.dest
: Destination context for the assets. Will typically be[Parent, Parachain(..)]
to send from parachain to parachain, or[Parachain(..)]
to send from relay to parachain.beneficiary
: A beneficiary location for the assets in the context ofdest
. Will generally be anAccountId32
value.assets
: The assets to be withdrawn. This should include the assets used to pay the fee on thedest
chain.fee_asset_item
: The index intoassets
of the item which should be used to pay fees.
Sourcepub fn reserve_transfer_assets(
origin: <T as Config>::RuntimeOrigin,
dest: Box<VersionedLocation>,
beneficiary: Box<VersionedLocation>,
assets: Box<VersionedAssets>,
fee_asset_item: u32,
) -> Result<(), DispatchError>
👎Deprecated: This extrinsic uses WeightLimit::Unlimited
, please migrate to limited_reserve_transfer_assets
or transfer_assets
pub fn reserve_transfer_assets( origin: <T as Config>::RuntimeOrigin, dest: Box<VersionedLocation>, beneficiary: Box<VersionedLocation>, assets: Box<VersionedAssets>, fee_asset_item: u32, ) -> Result<(), DispatchError>
WeightLimit::Unlimited
, please migrate to limited_reserve_transfer_assets
or transfer_assets
Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve.
assets
must have same reserve location and may not be teleportable to dest
.
assets
have local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM todest
to mint and deposit reserve-based assets tobeneficiary
.assets
have destination reserve: burn local assets and forward a notification todest
chain to withdraw the reserve assets from this chain’s sovereign account and deposit them tobeneficiary
.assets
have remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain’s SA todest
chain’s SA, and forward another XCM todest
to mint and deposit reserve-based assets tobeneficiary
.
This function is deprecated: Use limited_reserve_transfer_assets
instead.
Fee payment on the destination side is made from the asset in the assets
vector of
index fee_asset_item
. The weight limit for fees is not provided and thus is unlimited,
with all fees taken as needed from the asset.
origin
: Must be capable of withdrawing theassets
and executing XCM.dest
: Destination context for the assets. Will typically be[Parent, Parachain(..)]
to send from parachain to parachain, or[Parachain(..)]
to send from relay to parachain.beneficiary
: A beneficiary location for the assets in the context ofdest
. Will generally be anAccountId32
value.assets
: The assets to be withdrawn. This should include the assets used to pay the fee on thedest
(and possibly reserve) chains.fee_asset_item
: The index intoassets
of the item which should be used to pay fees.
Sourcepub fn execute(
origin: <T as Config>::RuntimeOrigin,
message: Box<VersionedXcm<<T as Config>::RuntimeCall>>,
max_weight: Weight,
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn execute( origin: <T as Config>::RuntimeOrigin, message: Box<VersionedXcm<<T as Config>::RuntimeCall>>, max_weight: Weight, ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Execute an XCM message from a local, signed, origin.
An event is deposited indicating whether msg
could be executed completely or only
partially.
No more than max_weight
will be used in its attempted execution. If this is less than
the maximum amount of weight that the message could take to be executed, then no
execution attempt will be made.
Sourcepub fn force_xcm_version(
origin: <T as Config>::RuntimeOrigin,
location: Box<Location>,
version: u32,
) -> Result<(), DispatchError>
pub fn force_xcm_version( origin: <T as Config>::RuntimeOrigin, location: Box<Location>, version: u32, ) -> Result<(), DispatchError>
Extoll that a particular destination can be communicated with through a particular version of XCM.
origin
: Must be an origin specified by AdminOrigin.location
: The destination that is being described.xcm_version
: The latest version of XCM thatlocation
supports.
Sourcepub fn force_default_xcm_version(
origin: <T as Config>::RuntimeOrigin,
maybe_xcm_version: Option<u32>,
) -> Result<(), DispatchError>
pub fn force_default_xcm_version( origin: <T as Config>::RuntimeOrigin, maybe_xcm_version: Option<u32>, ) -> Result<(), DispatchError>
Set a safe XCM version (the version that XCM should be encoded with if the most recent version a destination can accept is unknown).
origin
: Must be an origin specified by AdminOrigin.maybe_xcm_version
: The default XCM encoding version, orNone
to disable.
Sourcepub fn force_subscribe_version_notify(
origin: <T as Config>::RuntimeOrigin,
location: Box<VersionedLocation>,
) -> Result<(), DispatchError>
pub fn force_subscribe_version_notify( origin: <T as Config>::RuntimeOrigin, location: Box<VersionedLocation>, ) -> Result<(), DispatchError>
Ask a location to notify us regarding their XCM version and any changes to it.
origin
: Must be an origin specified by AdminOrigin.location
: The location to which we should subscribe for XCM version notifications.
Sourcepub fn force_unsubscribe_version_notify(
origin: <T as Config>::RuntimeOrigin,
location: Box<VersionedLocation>,
) -> Result<(), DispatchError>
pub fn force_unsubscribe_version_notify( origin: <T as Config>::RuntimeOrigin, location: Box<VersionedLocation>, ) -> Result<(), DispatchError>
Require that a particular destination should no longer notify us regarding any XCM version changes.
origin
: Must be an origin specified by AdminOrigin.location
: The location to which we are currently subscribed for XCM version notifications which we no longer desire.
Sourcepub fn limited_reserve_transfer_assets(
origin: <T as Config>::RuntimeOrigin,
dest: Box<VersionedLocation>,
beneficiary: Box<VersionedLocation>,
assets: Box<VersionedAssets>,
fee_asset_item: u32,
weight_limit: WeightLimit,
) -> Result<(), DispatchError>
pub fn limited_reserve_transfer_assets( origin: <T as Config>::RuntimeOrigin, dest: Box<VersionedLocation>, beneficiary: Box<VersionedLocation>, assets: Box<VersionedAssets>, fee_asset_item: u32, weight_limit: WeightLimit, ) -> Result<(), DispatchError>
Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve.
assets
must have same reserve location and may not be teleportable to dest
.
assets
have local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM todest
to mint and deposit reserve-based assets tobeneficiary
.assets
have destination reserve: burn local assets and forward a notification todest
chain to withdraw the reserve assets from this chain’s sovereign account and deposit them tobeneficiary
.assets
have remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain’s SA todest
chain’s SA, and forward another XCM todest
to mint and deposit reserve-based assets tobeneficiary
.
Fee payment on the destination side is made from the asset in the assets
vector of
index fee_asset_item
, up to enough to pay for weight_limit
of weight. If more weight
is needed than weight_limit
, then the operation will fail and the sent assets may be
at risk.
origin
: Must be capable of withdrawing theassets
and executing XCM.dest
: Destination context for the assets. Will typically be[Parent, Parachain(..)]
to send from parachain to parachain, or[Parachain(..)]
to send from relay to parachain.beneficiary
: A beneficiary location for the assets in the context ofdest
. Will generally be anAccountId32
value.assets
: The assets to be withdrawn. This should include the assets used to pay the fee on thedest
(and possibly reserve) chains.fee_asset_item
: The index intoassets
of the item which should be used to pay fees.weight_limit
: The remote-side weight limit, if any, for the XCM fee purchase.
Sourcepub fn limited_teleport_assets(
origin: <T as Config>::RuntimeOrigin,
dest: Box<VersionedLocation>,
beneficiary: Box<VersionedLocation>,
assets: Box<VersionedAssets>,
fee_asset_item: u32,
weight_limit: WeightLimit,
) -> Result<(), DispatchError>
pub fn limited_teleport_assets( origin: <T as Config>::RuntimeOrigin, dest: Box<VersionedLocation>, beneficiary: Box<VersionedLocation>, assets: Box<VersionedAssets>, fee_asset_item: u32, weight_limit: WeightLimit, ) -> Result<(), DispatchError>
Teleport some assets from the local chain to some destination chain.
Fee payment on the destination side is made from the asset in the assets
vector of
index fee_asset_item
, up to enough to pay for weight_limit
of weight. If more weight
is needed than weight_limit
, then the operation will fail and the sent assets may be
at risk.
origin
: Must be capable of withdrawing theassets
and executing XCM.dest
: Destination context for the assets. Will typically be[Parent, Parachain(..)]
to send from parachain to parachain, or[Parachain(..)]
to send from relay to parachain.beneficiary
: A beneficiary location for the assets in the context ofdest
. Will generally be anAccountId32
value.assets
: The assets to be withdrawn. This should include the assets used to pay the fee on thedest
chain.fee_asset_item
: The index intoassets
of the item which should be used to pay fees.weight_limit
: The remote-side weight limit, if any, for the XCM fee purchase.
Sourcepub fn force_suspension(
origin: <T as Config>::RuntimeOrigin,
suspended: bool,
) -> Result<(), DispatchError>
pub fn force_suspension( origin: <T as Config>::RuntimeOrigin, suspended: bool, ) -> Result<(), DispatchError>
Set or unset the global suspension state of the XCM executor.
origin
: Must be an origin specified by AdminOrigin.suspended
:true
to suspend,false
to resume.
Sourcepub fn transfer_assets(
origin: <T as Config>::RuntimeOrigin,
dest: Box<VersionedLocation>,
beneficiary: Box<VersionedLocation>,
assets: Box<VersionedAssets>,
fee_asset_item: u32,
weight_limit: WeightLimit,
) -> Result<(), DispatchError>
pub fn transfer_assets( origin: <T as Config>::RuntimeOrigin, dest: Box<VersionedLocation>, beneficiary: Box<VersionedLocation>, assets: Box<VersionedAssets>, fee_asset_item: u32, weight_limit: WeightLimit, ) -> Result<(), DispatchError>
Transfer some assets from the local chain to the destination chain through their local, destination or remote reserve, or through teleports.
Fee payment on the destination side is made from the asset in the assets
vector of
index fee_asset_item
(hence referred to as fees
), up to enough to pay for
weight_limit
of weight. If more weight is needed than weight_limit
, then the
operation will fail and the sent assets may be at risk.
assets
(excluding fees
) must have same reserve location or otherwise be teleportable
to dest
, no limitations imposed on fees
.
-
for local reserve: transfer assets to sovereign account of destination chain and forward a notification XCM to
dest
to mint and deposit reserve-based assets tobeneficiary
. -
for destination reserve: burn local assets and forward a notification to
dest
chain to withdraw the reserve assets from this chain’s sovereign account and deposit them tobeneficiary
. -
for remote reserve: burn local assets, forward XCM to reserve chain to move reserves from this chain’s SA to
dest
chain’s SA, and forward another XCM todest
to mint and deposit reserve-based assets tobeneficiary
. -
for teleports: burn local assets and forward XCM to
dest
chain to mint/teleport assets and deposit them tobeneficiary
. -
origin
: Must be capable of withdrawing theassets
and executing XCM. -
dest
: Destination context for the assets. Will typically beX2(Parent, Parachain(..))
to send from parachain to parachain, orX1(Parachain(..))
to send from relay to parachain. -
beneficiary
: A beneficiary location for the assets in the context ofdest
. Will generally be anAccountId32
value. -
assets
: The assets to be withdrawn. This should include the assets used to pay the fee on thedest
(and possibly reserve) chains. -
fee_asset_item
: The index intoassets
of the item which should be used to pay fees. -
weight_limit
: The remote-side weight limit, if any, for the XCM fee purchase.
Sourcepub fn claim_assets(
origin: <T as Config>::RuntimeOrigin,
assets: Box<VersionedAssets>,
beneficiary: Box<VersionedLocation>,
) -> Result<(), DispatchError>
pub fn claim_assets( origin: <T as Config>::RuntimeOrigin, assets: Box<VersionedAssets>, beneficiary: Box<VersionedLocation>, ) -> Result<(), DispatchError>
Claims assets trapped on this pallet because of leftover assets during XCM execution.
origin
: Anyone can call this extrinsic.assets
: The exact assets that were trapped. Use the version to specify what version was the latest when they were trapped.beneficiary
: The location/account where the claimed assets will be deposited.
Sourcepub fn transfer_assets_using_type_and_then(
origin: <T as Config>::RuntimeOrigin,
dest: Box<VersionedLocation>,
assets: Box<VersionedAssets>,
assets_transfer_type: Box<TransferType>,
remote_fees_id: Box<VersionedAssetId>,
fees_transfer_type: Box<TransferType>,
custom_xcm_on_dest: Box<VersionedXcm<()>>,
weight_limit: WeightLimit,
) -> Result<(), DispatchError>
pub fn transfer_assets_using_type_and_then( origin: <T as Config>::RuntimeOrigin, dest: Box<VersionedLocation>, assets: Box<VersionedAssets>, assets_transfer_type: Box<TransferType>, remote_fees_id: Box<VersionedAssetId>, fees_transfer_type: Box<TransferType>, custom_xcm_on_dest: Box<VersionedXcm<()>>, weight_limit: WeightLimit, ) -> Result<(), DispatchError>
Transfer assets from the local chain to the destination chain using explicit transfer types for assets and fees.
assets
must have same reserve location or may be teleportable to dest
. Caller must
provide the assets_transfer_type
to be used for assets
:
TransferType::LocalReserve
: transfer assets to sovereign account of destination chain and forward a notification XCM todest
to mint and deposit reserve-based assets tobeneficiary
.TransferType::DestinationReserve
: burn local assets and forward a notification todest
chain to withdraw the reserve assets from this chain’s sovereign account and deposit them tobeneficiary
.TransferType::RemoteReserve(reserve)
: burn local assets, forward XCM toreserve
chain to move reserves from this chain’s SA todest
chain’s SA, and forward another XCM todest
to mint and deposit reserve-based assets tobeneficiary
. Typically the remotereserve
is Asset Hub.TransferType::Teleport
: burn local assets and forward XCM todest
chain to mint/teleport assets and deposit them tobeneficiary
.
On the destination chain, as well as any intermediary hops, BuyExecution
is used to
buy execution using transferred assets
identified by remote_fees_id
.
Make sure enough of the specified remote_fees_id
asset is included in the given list
of assets
. remote_fees_id
should be enough to pay for weight_limit
. If more weight
is needed than weight_limit
, then the operation will fail and the sent assets may be
at risk.
remote_fees_id
may use different transfer type than rest of assets
and can be
specified through fees_transfer_type
.
The caller needs to specify what should happen to the transferred assets once they reach
the dest
chain. This is done through the custom_xcm_on_dest
parameter, which
contains the instructions to execute on dest
as a final step.
This is usually as simple as:
Xcm(vec![DepositAsset { assets: Wild(AllCounted(assets.len())), beneficiary }])
,
but could be something more exotic like sending the assets
even further.
origin
: Must be capable of withdrawing theassets
and executing XCM.dest
: Destination context for the assets. Will typically be[Parent, Parachain(..)]
to send from parachain to parachain, or[Parachain(..)]
to send from relay to parachain, or(parents: 2, (GlobalConsensus(..), ..))
to send from parachain across a bridge to another ecosystem destination.assets
: The assets to be withdrawn. This should include the assets used to pay the fee on thedest
(and possibly reserve) chains.assets_transfer_type
: The XCMTransferType
used to transfer theassets
.remote_fees_id
: One of the includedassets
to be used to pay fees.fees_transfer_type
: The XCMTransferType
used to transfer thefees
assets.custom_xcm_on_dest
: The XCM to be executed ondest
chain as the last step of the transfer, which also determines what happens to the assets on the destination chain.weight_limit
: The remote-side weight limit, if any, for the XCM fee purchase.
Trait Implementations
Source§impl<T> AssetLock for Pallet<T>where
T: Config,
impl<T> AssetLock for Pallet<T>where
T: Config,
Source§type LockTicket = LockTicket<T>
type LockTicket = LockTicket<T>
Enact
implementer for prepare_lock
. This type may be dropped safely to avoid doing the
lock.Source§type UnlockTicket = UnlockTicket<T>
type UnlockTicket = UnlockTicket<T>
Enact
implementer for prepare_unlock
. This type may be dropped safely to avoid doing the
unlock.Source§type ReduceTicket = ReduceTicket<T>
type ReduceTicket = ReduceTicket<T>
Enact
implementer for prepare_reduce_unlockable
. This type may be dropped safely to
avoid doing the unlock.Source§fn prepare_lock(
unlocker: Location,
asset: Asset,
owner: Location,
) -> Result<LockTicket<T>, LockError>
fn prepare_lock( unlocker: Location, asset: Asset, owner: Location, ) -> Result<LockTicket<T>, LockError>
Self::LockTicket
it returned, which can be used
to actually enact the lock. Read moreSource§fn prepare_unlock(
unlocker: Location,
asset: Asset,
owner: Location,
) -> Result<UnlockTicket<T>, LockError>
fn prepare_unlock( unlocker: Location, asset: Asset, owner: Location, ) -> Result<UnlockTicket<T>, LockError>
Self::UnlockTicket
it returned, which can be
used to actually enact the lock. Read moreSource§impl<T> BeforeAllRuntimeMigrations for Pallet<T>where
T: Config,
impl<T> BeforeAllRuntimeMigrations for Pallet<T>where
T: Config,
Source§fn before_all_runtime_migrations() -> Weight
fn before_all_runtime_migrations() -> Weight
Source§impl<T> CheckSuspension for Pallet<T>where
T: Config,
impl<T> CheckSuspension for Pallet<T>where
T: Config,
fn is_suspended<Call>( _origin: &Location, _instructions: &mut [Instruction<Call>], _max_weight: Weight, _properties: &mut Properties, ) -> bool
Source§impl<T> ClaimAssets for Pallet<T>where
T: Config,
impl<T> ClaimAssets for Pallet<T>where
T: Config,
Source§fn claim_assets(
origin: &Location,
ticket: &Location,
assets: &Assets,
_context: &XcmContext,
) -> bool
fn claim_assets( origin: &Location, ticket: &Location, assets: &Assets, _context: &XcmContext, ) -> bool
origin
and return them in a single Assets
value, together
with the weight used by this operation.Source§impl<T> DispatchViewFunction for Pallet<T>where
T: Config,
impl<T> DispatchViewFunction for Pallet<T>where
T: Config,
fn dispatch_view_function<O>(
id: &ViewFunctionId,
input: &mut &[u8],
output: &mut O,
) -> Result<(), ViewFunctionDispatchError>where
O: Output,
Source§impl<T> DropAssets for Pallet<T>where
T: Config,
impl<T> DropAssets for Pallet<T>where
T: Config,
Source§fn drop_assets(
origin: &Location,
assets: AssetsInHolding,
_context: &XcmContext,
) -> Weight
fn drop_assets( origin: &Location, assets: AssetsInHolding, _context: &XcmContext, ) -> Weight
Source§impl<T> EventEmitter for Pallet<T>where
T: Config,
impl<T> EventEmitter for Pallet<T>where
T: Config,
Source§fn emit_sent_event(
origin: Location,
destination: Location,
message: Option<Xcm<()>>,
message_id: [u8; 32],
)
fn emit_sent_event( origin: Location, destination: Location, message: Option<Xcm<()>>, message_id: [u8; 32], )
Source§impl<T> ExecuteController<<T as Config>::RuntimeOrigin, <T as Config>::RuntimeCall> for Pallet<T>where
T: Config,
impl<T> ExecuteController<<T as Config>::RuntimeOrigin, <T as Config>::RuntimeCall> for Pallet<T>where
T: Config,
Source§type WeightInfo = Pallet<T>
type WeightInfo = Pallet<T>
Source§fn execute(
origin: <T as Config>::RuntimeOrigin,
message: Box<VersionedXcm<<T as Config>::RuntimeCall>>,
max_weight: Weight,
) -> Result<Weight, DispatchErrorWithPostInfo<PostDispatchInfo>>
fn execute( origin: <T as Config>::RuntimeOrigin, message: Box<VersionedXcm<<T as Config>::RuntimeCall>>, max_weight: Weight, ) -> Result<Weight, DispatchErrorWithPostInfo<PostDispatchInfo>>
Source§impl<T> ExecuteControllerWeightInfo for Pallet<T>where
T: Config,
impl<T> ExecuteControllerWeightInfo for Pallet<T>where
T: Config,
Source§fn execute() -> Weight
fn execute() -> Weight
ExecuteController::execute
Source§impl<T> GetStorageVersion for Pallet<T>where
T: Config,
impl<T> GetStorageVersion for Pallet<T>where
T: Config,
Source§fn in_code_storage_version() -> <Pallet<T> as GetStorageVersion>::InCodeStorageVersion
fn in_code_storage_version() -> <Pallet<T> as GetStorageVersion>::InCodeStorageVersion
storage_version
attribute, or
NoStorageVersionSet
if the attribute is missing.Source§fn on_chain_storage_version() -> StorageVersion
fn on_chain_storage_version() -> StorageVersion
Source§fn current_storage_version() -> Self::InCodeStorageVersion
fn current_storage_version() -> Self::InCodeStorageVersion
in_code_storage_version
and will be removed after March 2024.Self::current_storage_version
instead. Read moreSource§impl<T> GetVersion for Pallet<T>where
T: Config,
impl<T> GetVersion for Pallet<T>where
T: Config,
Source§impl<T> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§fn on_initialize(
_n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
) -> Weight
fn on_initialize( _n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, ) -> Weight
Source§fn try_state(
_n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
) -> Result<(), DispatchError>
fn try_state( _n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, ) -> Result<(), DispatchError>
Source§fn on_finalize(_n: BlockNumber)
fn on_finalize(_n: BlockNumber)
Source§fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
Hooks::on_finalize
). Read moreSource§fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
Source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Executive
pallet. Read moreSource§fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
Source§fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>
fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>
Source§fn offchain_worker(_n: BlockNumber)
fn offchain_worker(_n: BlockNumber)
Source§fn integrity_test()
fn integrity_test()
Source§impl<T> IntegrityTest for Pallet<T>where
T: Config,
impl<T> IntegrityTest for Pallet<T>where
T: Config,
Source§impl<T> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§impl<T> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§fn on_finalize(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
)
fn on_finalize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, )
Hooks::on_finalize
.Source§impl<T> OnGenesis for Pallet<T>where
T: Config,
impl<T> OnGenesis for Pallet<T>where
T: Config,
Source§fn on_genesis()
fn on_genesis()
Source§impl<T> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§impl<T> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§fn on_initialize(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
) -> Weight
fn on_initialize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, ) -> Weight
Hooks::on_initialize
.Source§impl<T> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§impl<T> OnResponse for Pallet<T>where
T: Config,
impl<T> OnResponse for Pallet<T>where
T: Config,
Source§impl<T> OnRuntimeUpgrade for Pallet<T>where
T: Config,
impl<T> OnRuntimeUpgrade for Pallet<T>where
T: Config,
Source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Source§fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
Hooks::pre_upgrade
.Source§fn post_upgrade(state: Vec<u8>) -> Result<(), DispatchError>
fn post_upgrade(state: Vec<u8>) -> Result<(), DispatchError>
Hooks::post_upgrade
.Source§fn try_on_runtime_upgrade(checks: bool) -> Result<Weight, DispatchError>
fn try_on_runtime_upgrade(checks: bool) -> Result<Weight, DispatchError>
pre_upgrade
->
on_runtime_upgrade
-> post_upgrade
hooks for a migration. Read moreSource§impl<T> PalletInfoAccess for Pallet<T>where
T: Config,
impl<T> PalletInfoAccess for Pallet<T>where
T: Config,
Source§fn module_name() -> &'static str
fn module_name() -> &'static str
Source§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
Source§impl<T> PalletsInfoAccess for Pallet<T>where
T: Config,
impl<T> PalletsInfoAccess for Pallet<T>where
T: Config,
Source§impl<T> QueryController<<T as Config>::RuntimeOrigin, <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> QueryController<<T as Config>::RuntimeOrigin, <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§type WeightInfo = Pallet<T>
type WeightInfo = Pallet<T>
Source§fn query(
origin: <T as Config>::RuntimeOrigin,
timeout: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
match_querier: VersionedLocation,
) -> Result<u64, DispatchError>
fn query( origin: <T as Config>::RuntimeOrigin, timeout: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, match_querier: VersionedLocation, ) -> Result<u64, DispatchError>
Source§impl<T> QueryControllerWeightInfo for Pallet<T>where
T: Config,
impl<T> QueryControllerWeightInfo for Pallet<T>where
T: Config,
Source§fn query() -> Weight
fn query() -> Weight
QueryController::query
Source§fn take_response() -> Weight
fn take_response() -> Weight
QueryHandler::take_response
Source§impl<T> QueryHandler for Pallet<T>where
T: Config,
impl<T> QueryHandler for Pallet<T>where
T: Config,
Source§fn new_query(
responder: impl Into<Location>,
timeout: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
match_querier: impl Into<Location>,
) -> u64
fn new_query( responder: impl Into<Location>, timeout: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, match_querier: impl Into<Location>, ) -> u64
Attempt to create a new query ID and register it as a query that is yet to respond.
Source§fn report_outcome(
message: &mut Xcm<()>,
responder: impl Into<Location>,
timeout: <Pallet<T> as QueryHandler>::BlockNumber,
) -> Result<u64, <Pallet<T> as QueryHandler>::Error>
fn report_outcome( message: &mut Xcm<()>, responder: impl Into<Location>, timeout: <Pallet<T> as QueryHandler>::BlockNumber, ) -> Result<u64, <Pallet<T> as QueryHandler>::Error>
To check the status of the query, use fn query()
passing the resultant QueryId
value.
Source§fn take_response(
query_id: u64,
) -> QueryResponseStatus<<Pallet<T> as QueryHandler>::BlockNumber>
fn take_response( query_id: u64, ) -> QueryResponseStatus<<Pallet<T> as QueryHandler>::BlockNumber>
Removes response when ready and emits Event::ResponseTaken event.
type BlockNumber = <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number
type Error = Error
type UniversalLocation = <T as Config>::UniversalLocation
Source§fn expect_response(id: u64, response: Response)
fn expect_response(id: u64, response: Response)
Source§impl<T> RecordXcm for Pallet<T>where
T: Config,
impl<T> RecordXcm for Pallet<T>where
T: Config,
Source§fn should_record() -> bool
fn should_record() -> bool
Source§fn set_record_xcm(enabled: bool)
fn set_record_xcm(enabled: bool)
Source§impl<T> SendController<<T as Config>::RuntimeOrigin> for Pallet<T>where
T: Config,
impl<T> SendController<<T as Config>::RuntimeOrigin> for Pallet<T>where
T: Config,
Source§type WeightInfo = Pallet<T>
type WeightInfo = Pallet<T>
Source§fn send(
origin: <T as Config>::RuntimeOrigin,
dest: Box<VersionedLocation>,
message: Box<VersionedXcm<()>>,
) -> Result<[u8; 32], DispatchError>
fn send( origin: <T as Config>::RuntimeOrigin, dest: Box<VersionedLocation>, message: Box<VersionedXcm<()>>, ) -> Result<[u8; 32], DispatchError>
Source§impl<T> SendControllerWeightInfo for Pallet<T>where
T: Config,
impl<T> SendControllerWeightInfo for Pallet<T>where
T: Config,
Source§fn send() -> Weight
fn send() -> Weight
SendController::send
Source§impl<T> StorageInfoTrait for Pallet<T>where
T: Config,
impl<T> StorageInfoTrait for Pallet<T>where
T: Config,
fn storage_info() -> Vec<StorageInfo>
Source§impl<T> TryDecodeEntireStorage for Pallet<T>where
T: Config,
impl<T> TryDecodeEntireStorage for Pallet<T>where
T: Config,
Source§fn try_decode_entire_state() -> Result<usize, Vec<TryDecodeEntireStorageError>>
fn try_decode_entire_state() -> Result<usize, Vec<TryDecodeEntireStorageError>>
Ok(bytes_decoded)
if success.Source§impl<T> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§impl<T> VersionChangeNotifier for Pallet<T>where
T: Config,
impl<T> VersionChangeNotifier for Pallet<T>where
T: Config,
Source§fn start(
dest: &Location,
query_id: u64,
max_weight: Weight,
_context: &XcmContext,
) -> Result<(), Error>
fn start( dest: &Location, query_id: u64, max_weight: Weight, _context: &XcmContext, ) -> Result<(), Error>
Start notifying location
should the XCM version of this chain change.
When it does, this type should ensure a QueryResponse
message is sent with the given
query_id
& max_weight
and with a response
of Response::Version
. This should happen
until/unless stop
is called with the correct query_id
.
If the location
has an ongoing notification and when this function is called, then an
error should be returned.
Source§fn stop(dest: &Location, _context: &XcmContext) -> Result<(), Error>
fn stop(dest: &Location, _context: &XcmContext) -> Result<(), Error>
Stop notifying location
should the XCM change. This is a no-op if there was never a
subscription.
Source§fn is_subscribed(dest: &Location) -> bool
fn is_subscribed(dest: &Location) -> bool
Return true if a location is subscribed to XCM version changes.
Source§impl<T> WhitelistedStorageKeys for Pallet<T>where
T: Config,
impl<T> WhitelistedStorageKeys for Pallet<T>where
T: Config,
Source§fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
Vec<TrackedStorageKey>
indicating the storage keys that
should be whitelisted during benchmarking. This means that those keys
will be excluded from the benchmarking performance calculation.