Skip to content

Conversation

- reserve withdraw: burn local assets and append a `WithdrawAsset` XCM instruction to the
XCM program to be sent onward to the `destination` location,

The onward XCM is then appended a `ClearOrigin` to allow safe execution of any following
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe worth to mention here already that ClearOrigin being appended or not depends on preserve_origin flag

assets are **reserved** for fees, they are sent to the fees register rather than holding.
Best practice is to only add here enough to cover fees, and transfer the rest through the
`assets` parameter.
- `preserve_origin`: Specifies whether the original origin should be preserved or cleared,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think its worth to mention that its not actually "original orign" but the sovereign account of original origin on the destination chain

transferred over to `destination` using the specified transfer type, and deposited to
holding on `destination`.
- `remote_xcm`: Custom instructions that will be executed on the `destination` chain. Note
that these instructions will be executed after a `ClearOrigin` so their origin will be
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whether its None also depends on preserve_origin

Operands:

- `destination`: The location of the program next hop.
- `remote_fees`: If set to `Some(asset_xfer_filter)`, the single asset matching
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would also mention that:

  1. you can set transfer type (same as in assets case) separately for remote_fees
  2. you can use RefundSuprlus to transfer leftovers from fees register to holding register

@gui1117
Copy link

gui1117 commented Aug 23, 2025

in paragraph 2 https://github.com/polkadot-fellows/xcm-format?tab=readme-ov-file#2-basic-top-level-format
it says:

This document defines only XCM messages whose version identifier is 2. Messages whose version is lower than this may be defined in earlier versions of this document.

Should we update to 5?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants