Improve XCM emulator decl_test_parachains
semantics and docs
#2416
Labels
C1-mentor
A task where a mentor is available. Please indicate in the issue who the mentor could be.
C2-good-first-issue
A task for a first time contributor to become familiar with the Polkadot-SDK.
I5-enhancement
An additional feature request.
T10-tests
This PR/Issue is related to tests.
T11-documentation
This PR/Issue is related to documentation.
When writing an XCM emulator test, if we wanted to call
force_xcm_version
for a Rococo runtime, we have to do this<Rococo as RococoPallet>::XcmPallet::force_xcm_version
.In this case,
RococoPallet
is a confusing name, it's a runtime / chain.Instead we want:
<Rococo as RococoRuntime>::XcmPallet::force_xcm_version
Currently this happens because of the logic inside
decl_test_parachains!
macropolkadot-sdk/cumulus/xcm/xcm-emulator/src/lib.rs
Line 697 in 7d89c0a
With this change, old XCM emulator tests will need to be updated.
Additionally, we need some documentation for how the
decl_test_parachains
macro works with emulated chains for both substrate devs and internal developers.The text was updated successfully, but these errors were encountered: