Skip to content
Unverified Commit 97a06b50 authored by Adrian Catangiu's avatar Adrian Catangiu
Browse files

pallet-xcm: add new flexible transfer_assets() call/extrinsic

Reverts `(limited_)reserve_transfer_assets` to only allow reserve-based transfers
for all `assets` including fees.
Similarly `(limited_)teleport_assets` only allows teleports for all `assets`
including feed.

For complex combinations of asset transfers where assets and fees may have different
reserves or different reserve/teleport trust configurations, users can use the newly
added `transfer_assets()` extrinsic which is more flexible in allowing more complex
scenarios.

`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 to
  `beneficiary`.
- 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
  to `beneficiary`.
- 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 to `dest` to mint
  and deposit reserve-based assets to `beneficiary`.
- for teleports: burn local assets and forward XCM to `dest` chain to mint/teleport
  assets and deposit them to `beneficiary`.
parent df85fceb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment