Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve XCM emulator decl_test_parachains semantics and docs #2416

Open
0xmovses opened this issue Nov 20, 2023 · 0 comments
Open

Improve XCM emulator decl_test_parachains semantics and docs #2416

0xmovses opened this issue Nov 20, 2023 · 0 comments
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.

Comments

@0xmovses
Copy link
Contributor

0xmovses commented Nov 20, 2023

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! macro

pub trait [<$name ParaPallet>] {

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.

@0xmovses 0xmovses added T6-XCM This PR/Issue is related to XCM. I5-enhancement An additional feature request. T11-documentation This PR/Issue is related to documentation. labels Nov 20, 2023
@0xmovses 0xmovses changed the title Improve XCM decl_test_parachains semantics and docs Improve XCM emulator decl_test_parachains semantics and docs Nov 20, 2023
@acatangiu acatangiu added T10-tests This PR/Issue is related to tests. C2-good-first-issue A task for a first time contributor to become familiar with the Polkadot-SDK. C1-mentor A task where a mentor is available. Please indicate in the issue who the mentor could be. and removed T6-XCM This PR/Issue is related to XCM. labels Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

2 participants