Support Reserve and Non-Reserve Asset Transfer in a Single XCM Message
albertov19 opened this issue · comments
As far as I know, there is no extrinsic to construct an XCM message that can transfer both a Reserve and Non-Reserve asset in a single message.
It would be great for xTokens
to enable this via an extrinsic call that would construct the following XCM message (from an XCM message going from Chain A to Chain B):
- ReserveAssetDeposited - To mint the representation of Reserve Asset A on Chain B.
- WithdrawAsset - To withdraw Reserve Asset B tokens from Chain A’s sovereign account.
- ClearOrigin - To clear all origin info.
- BuyExecution
- DepositAsset
The important thing to note is that we would need to handle fund management in the origin chain (Chain A in this case) as we can't use instructions that would do this like TransferReserveAsset
or InitiateReserveWithdraw
(cc @librelois)