Improve Penpal runtime + emulated tests (#3543)
Issues addressed in this PR: - Improve *Penpal* runtime: - Properly handled received assets. Previously, it treated `(1, Here)` as the local native currency, whereas it should be treated as a `ForeignAsset`. This wasn't a great example of standard Parachain behaviour, as no Parachain treats the system asset as the local currency. - Remove `AllowExplicitUnpaidExecutionFrom` the system. Again, this wasn't a great example of standard Parachain behaviour. - Move duplicated `ForeignAssetFeeAsExistentialDepositMultiplierFeeCharger` to `assets_common` crate. - Improve emulated tests: - Update *Penpal* tests to new runtime. - To simplify tests, register the reserve transferred, teleported, and system assets in *Penpal* and *AssetHub* genesis. This saves us from having to create the assets repeatedly for each test - Add missing test case: `reserve_transfer_assets_from_para_to_system_para`. - Cleanup. - Prevent integration tests crates imports from being re-exported, as they were polluting the `polkadot-sdk` docs. There is still a test case missing for reserve transfers: - Reserve transfer of system asset from *Parachain* to *Parachain* trough *AssetHub*. - This is not yet possible with `pallet-xcm` due to the reasons explained in https://github.com/paritytech/polkadot-sdk/pull/3339 --------- Co-authored-by: command-bot <>
Showing
- Cargo.lock 4 additions, 2 deletionsCargo.lock
- cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/src/genesis.rs 26 additions, 3 deletions.../chains/parachains/assets/asset-hub-rococo/src/genesis.rs
- cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-rococo/src/lib.rs 3 additions, 3 deletions...ated/chains/parachains/assets/asset-hub-rococo/src/lib.rs
- cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/src/genesis.rs 26 additions, 3 deletions...chains/parachains/assets/asset-hub-westend/src/genesis.rs
- cumulus/parachains/integration-tests/emulated/chains/parachains/assets/asset-hub-westend/src/lib.rs 3 additions, 3 deletions...ted/chains/parachains/assets/asset-hub-westend/src/lib.rs
- cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/Cargo.toml 3 additions, 2 deletions...ests/emulated/chains/parachains/testing/penpal/Cargo.toml
- cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/src/genesis.rs 39 additions, 4 deletions.../emulated/chains/parachains/testing/penpal/src/genesis.rs
- cumulus/parachains/integration-tests/emulated/chains/parachains/testing/penpal/src/lib.rs 4 additions, 7 deletions...ests/emulated/chains/parachains/testing/penpal/src/lib.rs
- cumulus/parachains/integration-tests/emulated/common/Cargo.toml 1 addition, 0 deletions...s/parachains/integration-tests/emulated/common/Cargo.toml
- cumulus/parachains/integration-tests/emulated/common/src/impls.rs 115 additions, 35 deletions...parachains/integration-tests/emulated/common/src/impls.rs
- cumulus/parachains/integration-tests/emulated/common/src/lib.rs 22 additions, 1 deletion...s/parachains/integration-tests/emulated/common/src/lib.rs
- cumulus/parachains/integration-tests/emulated/common/src/macros.rs 11 additions, 100 deletions...arachains/integration-tests/emulated/common/src/macros.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml 1 addition, 0 deletions...n-tests/emulated/tests/assets/asset-hub-rococo/Cargo.toml
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs 68 additions, 48 deletions...n-tests/emulated/tests/assets/asset-hub-rococo/src/lib.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/mod.rs 0 additions, 8 deletions...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 677 additions, 152 deletions...sts/assets/asset-hub-rococo/src/tests/reserve_transfer.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/send.rs 111 additions, 18 deletions.../emulated/tests/assets/asset-hub-rococo/src/tests/send.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/set_xcm_versions.rs 1 addition, 1 deletion...sts/assets/asset-hub-rococo/src/tests/set_xcm_versions.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/swap.rs 23 additions, 35 deletions.../emulated/tests/assets/asset-hub-rococo/src/tests/swap.rs
- cumulus/parachains/integration-tests/emulated/tests/assets/asset-hub-rococo/src/tests/teleport.rs 93 additions, 42 deletions...lated/tests/assets/asset-hub-rococo/src/tests/teleport.rs
Please register or sign in to comment