pallet-xcm::transfer_assets_using_type() supports custom actions on destination (#4260)
Change `transfer_assets_using_type()` to not assume `DepositAssets` as
the intended use of the assets on the destination.
Instead provides the caller with the ability to specify custom XCM that
be executed on `dest` chain as the last step of the transfer, thus
allowing custom usecases for the transferred assets. E.g. some are
used/swapped/etc there, while some are sent further to yet another
chain.
Note: this is a follow-up on
https://github.com/paritytech/polkadot-sdk/pull/3695, bringing in an API
change for `transfer_assets_using_type()`. This is ok as the previous
version has not been yet released. Thus, its first release will include
the new API proposed by this PR.
This allows usecases such as:
https://forum.polkadot.network/t/managing-sas-on-multiple-reserve-chains-for-same-asset/7538/4
BTW: all this pallet-xcm asset transfers code will be massively reduced
once we have https://github.com/paritytech/xcm-format/pull/54
---------
Signed-off-by:
Adrian Catangiu <adrian@parity.io>
Showing
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs 4 additions, 1 deletion...n-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/hybrid_transfers.rs 193 additions, 10 deletions...sts/assets/asset-hub-rococo/src/tests/hybrid_transfers.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/mod.rs 1 addition, 1 deletion...s/emulated/tests/assets/asset-hub-rococo/src/tests/mod.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs 1 addition, 1 deletion...sts/assets/asset-hub-rococo/src/tests/reserve_transfer.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/lib.rs 4 additions, 1 deletion...-tests/emulated/tests/assets/asset-hub-westend/src/lib.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/hybrid_transfers.rs 193 additions, 10 deletions...ts/assets/asset-hub-westend/src/tests/hybrid_transfers.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/mod.rs 1 addition, 1 deletion.../emulated/tests/assets/asset-hub-westend/src/tests/mod.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/reserve_transfer.rs 1 addition, 1 deletion...ts/assets/asset-hub-westend/src/tests/reserve_transfer.rs
- cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/src/tests/asset_transfers.rs 6 additions, 2 deletions...ts/bridges/bridge-hub-rococo/src/tests/asset_transfers.rs
- cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-westend/src/tests/asset_transfers.rs 6 additions, 2 deletions...s/bridges/bridge-hub-westend/src/tests/asset_transfers.rs
- polkadot/xcm/pallet-xcm/src/lib.rs 112 additions, 84 deletionspolkadot/xcm/pallet-xcm/src/lib.rs
- prdoc/pr_3695.prdoc 8 additions, 1 deletionprdoc/pr_3695.prdoc
Please register or sign in to comment