[pallet-xcm] fix transport fees for remote reserve transfers (#3792)
Currently `transfer_assets` from pallet-xcm covers 4 main different transfer types: - `localReserve` - `DestinationReserve` - `Teleport` - `RemoteReserve` For the first three, the local execution and the remote message sending are separated, and fees are deducted in pallet-xcm itself: https://github.com/paritytech/polkadot-sdk/blob/3410dfb3 /polkadot/xcm/pallet-xcm/src/lib.rs#L1758. For the 4th case `RemoteReserve`, pallet-xcm is still relying on the xcm-executor itself to send the message (through the `initiateReserveWithdraw` instruction). In this case, if delivery fees need to be charged, it is not possible to do so because the `jit_withdraw` mode has not being set. This PR proposes to still use the `initiateReserveWithdraw` but prepending a `setFeesMode { jit_withdraw: true }` to make sure delivery fees can be paid. A test-case is also added to present the aforementioned case --------- Co-authored-by:Adrian Catangiu <adrian@parity.io>
parent
2f59e9ef
Branches
Pipeline
#458055
failed
with stages
in
58 minutes and 55 seconds
Stage:
Stage:
Stage:
Stage:
Stage:
Stage:
Showing
- cumulus/parachains/integration-tests/emulated/common/src/macros.rs 1 addition, 1 deletion...arachains/integration-tests/emulated/common/src/macros.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs 2 additions, 6 deletions...n-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/reserve_transfer.rs 14 additions, 59 deletions...sts/assets/asset-hub-rococo/src/tests/reserve_transfer.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/teleport.rs 7 additions, 7 deletions...lated/tests/assets/asset-hub-rococo/src/tests/teleport.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/lib.rs 2 additions, 6 deletions...-tests/emulated/tests/assets/asset-hub-westend/src/lib.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/reserve_transfer.rs 13 additions, 58 deletions...ts/assets/asset-hub-westend/src/tests/reserve_transfer.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-westend/src/tests/teleport.rs 7 additions, 7 deletions...ated/tests/assets/asset-hub-westend/src/tests/teleport.rs
- cumulus/parachains/integration-tests/emulated/tests/people/people-rococo/src/tests/teleport.rs 3 additions, 3 deletions...emulated/tests/people/people-rococo/src/tests/teleport.rs
- cumulus/parachains/integration-tests/emulated/tests/people/people-westend/src/tests/teleport.rs 3 additions, 3 deletions...mulated/tests/people/people-westend/src/tests/teleport.rs
- cumulus/parachains/runtimes/assets/test-utils/src/test_cases.rs 2 additions, 2 deletions...s/parachains/runtimes/assets/test-utils/src/test_cases.rs
- cumulus/parachains/runtimes/assets/test-utils/src/xcm_helpers.rs 2 additions, 3 deletions.../parachains/runtimes/assets/test-utils/src/xcm_helpers.rs
- cumulus/parachains/runtimes/testing/penpal/src/lib.rs 16 additions, 3 deletionscumulus/parachains/runtimes/testing/penpal/src/lib.rs
- cumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs 14 additions, 5 deletionscumulus/parachains/runtimes/testing/penpal/src/xcm_config.rs
- polkadot/xcm/pallet-xcm/src/lib.rs 1 addition, 0 deletionspolkadot/xcm/pallet-xcm/src/lib.rs
- polkadot/xcm/pallet-xcm/src/mock.rs 14 additions, 1 deletionpolkadot/xcm/pallet-xcm/src/mock.rs
- polkadot/xcm/pallet-xcm/src/tests/assets_transfer.rs 171 additions, 0 deletionspolkadot/xcm/pallet-xcm/src/tests/assets_transfer.rs
- prdoc/pr_3792.prdoc 19 additions, 0 deletionsprdoc/pr_3792.prdoc
Please register or sign in to comment