-
Notifications
You must be signed in to change notification settings - Fork 312
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
Migrate XCM TS tests to Moonwall #2441
Conversation
Coverage generated "Tue Aug 22 15:08:19 UTC 2023": Master coverage: 87.39% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realise that a lot of these tests are ported over from old ones, but there is a lot of unnecessary casting to any
across tests - presumably from when the tests predated the api-augment
package we have lovingly made. This should be removed as we want type safety in our tests where possible.
I've only done one comment for each new change, because there is a lot of overlapping copypasting (so probably best solved with find& replace).
Other than that, theres a few comments to use some of the moonwall library functions and polkadotJs types, so we dont rely on hardcoded string/replaces.
test/suites/dev/test-xcm-v2/test-mock-dmp-error-and-appendix-1.ts
Outdated
Show resolved
Hide resolved
test/suites/dev/test-xcm-v2/test-mock-dmp-error-and-appendix-1.ts
Outdated
Show resolved
Hide resolved
test/suites/dev/test-xcm-v2/test-mock-dmp-error-and-appendix-4.ts
Outdated
Show resolved
Hide resolved
test/suites/dev/test-xcm-v2/test-mock-hrmp-transact-ethereum-1.ts
Outdated
Show resolved
Hide resolved
test/suites/dev/test-xcm-v2/test-mock-hrmp-transact-ethereum-10.ts
Outdated
Show resolved
Hide resolved
test/suites/dev/test-xcm-v2/test-mock-hrmp-transact-ethereum-12.ts
Outdated
Show resolved
Hide resolved
test/suites/dev/test-xcm-v2/test-mock-hrmp-transact-ethereum-2.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was mistaken with previous comment, V1 & V2 referred to XcmPrimitivesEthereumXcmEthereumXcmTransaction not XCM version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great 💪
* progress on PoV tests * started precompile migration * finished author precompile tests * bn and callpermit precompiles done * collective precompile done * beginning conviction voting tests * Updated to moonwall4 * fix * added erc20 precompile tests * progress on local asset precompile * Added Local assets tests * modexp tests done * Added proxy tests * progress on proxy tests * finished proxy tests * updated precompile tests * added more precompile tests * progress * added more precompile tests * refactored wormhole tests * added XCM transactor tests * started xcm utils tests * Precompile tests done * done proxy tests * randomness tests * randomness tests * randomness tests * finished randomness tests * added receipt tests * staking tests * more staking tests * more staking * progress * completed staking tests * added subscription tests * added sudo tests * added treasury tests * update moonwall config * added missing conviction tests * txpool progress * tx pool tests done * CI fix * updated prettier CI * editorconfig * pnpm cache * changed CI * fix CI * changes * fix CI * fixed some tests * more test fixes * fixed tests * lint * editor config * pkg fix * updated lockfile * pkg updates * fix import * fix import * archived old-style dev-tests * lint * PR comments * Port ERC20-XCM tests. Add excess gas tests (#2410) * ERC20XCM tests * Add tsx * Moved expect out of xcm helper * Removed unused imports * removed old tests * editorconfig grr * begin xcm migration * migrate more xcm tests to moonwall using xcmv3 * removed smoke tests * Upgraded randomness smoketest * updated randomness comments * Fix conviction MaxVotes (#2401) * Reduce the ConvictionVoting MaxVotes from 512 to 30 * Set MaxVote to 20 * Run toml-sort and update repo reference (#2426) * [MOON-2434] remove deprecated leave delegator functionality (#2349) * remove leave delegator functionality * remove precompile methods * return error for removed call indices * removed scheduleLeaveDelegators calls * de-bun 🫓 the CI * fix * migrate hrmp-asset-transfer tests * apply some fixes * migrate test-mock-hrmp-transact-ethereum * small fixes * migrate test-mock-hrmp-transact * migrate more tests to moonwall * migrate test-xcmv3-new-instructions and max weight * create separate folders for v2 and v3 * migrate test-mock-hrmp-transact tests to v3 * migrate mock-hrmp-transact-ethereum tests to v3 * fix network "Any" in tests * fix order in xcmv2 tests * fix order in xcmv3 tests * remove replaceNetworkAny * prettier * fmt * fix orders * remove "Any" type from test-xcm-erc20-v3-filter * use proper GLMR constant * remove cast to any in xcmv2 tests * remove cast to any in xcmv3 tests and re-org * small fixes * add expect messages * refactor registerForeignAsset * fixes in test-mock-dmp-queue * remove BN from AssetMetadata * use proper readContract function * use proper deployContract function * remove BN from requireWeightAtMost * use sovereignAccountOfSibling helper function * remove expectOk --------- Co-authored-by: timbrinded <79199034+timbrinded@users.noreply.github.com> Co-authored-by: Francisco Gamundi <52399794+fgamundi@users.noreply.github.com> Co-authored-by: Alan Sapede <alan.sapede@gmail.com>
What does it do?
Performs the entire migration of the XCM TS tests to Moonwall framework. I have also adapted all the XCM tests that were written in XCM V2 (mostly building messages using this version) to also test them against XCM V3.
Notes
test-xcm-v2
folder.test-xcm-v3
folder.test-xcm-v3
folder (like test-xcm-transactor ones for instance).