arda-org / xSuite

🛠️ Init, Build, Test, Deploy MultiversX smart contracts in seconds. The full suite for efficiently developing high-quality contracts.
https://xsuite.dev
MIT License
13 stars 4 forks source link

Must update many codeHash in tests when WASMs change #179

Closed lcswillems closed 3 months ago

lcswillems commented 3 months ago

To detect tests where codeHash need to be updated when WASMs are changed:

  1. Introduce innocuous changes in:

    • xsuite/contracts/data/src/lib.rs
    • xsuite/contracts/world/src/lib.rs

    Those changes should not change the logic but still change the WASM.

  2. Run the tests and see which tests fail.

For those tests, instead of using the contracts data / world, we could use a dummy code which is not going to change, e.g. 00. This code most probably doesn't even function, but for those tests that fail, we are just verifying that the codeHash is working correctly, and this should not require the code to be valid.