github multiversx/mx-sdk-rs v0.22.0
elrond-wasm 0.22.0

latest releases: v0.43.0, v0.42.0, v0.41.3...
2 years ago

Features

  • Mechanism for generating contract endpoints based on ABI. Previously, all endpoints from all modules from a crate were automatically included, now they can be filtered based on what modules are used.
  • Contract meta crates are now capable of building the respective contracts and the ABIs without relying on erdpy.
  • Renamed feature arwen-tests to mandos-go-tests

Important: how to upgrade contracts to 0.22.0:

  1. Rename crates abi -> meta. Both directories and in the workspace Cargo.toml
  2. Mass replace elrond_wasm_debug::abi_json::print_abi:: -> elrond_wasm_debug::meta::perform:: this will fix all the meta crate sources
  3. Remove elrond-wasm-node as dependency from all main contract crates. Feature wasm-output-mode is no longer needed here, no optionals either. Just freely import anything you need.
  4. (optional) If they are still around, feel free to also remove all references to elrond-wasm-derive from all your crates. It is already brought by elrond-wasm, no need to re-import in the contract.
  5. Change wasm crate dependencies as follows: Cargo.toml should contain:
[dependencies.<contract(parent)>]
path = ".."

[dependencies.elrond-wasm-node]
version = "0.22.0"

[dependencies.elrond-wasm-output]
version = "0.22.0"
features = ["wasm-output-mode"]
  1. Build all contracts - this will also auto-generate all lib.rs sources in all wasm crates. The easiest way to do it is to have a copy of build-wasm.sh from this repo in your repo's root and run it.
  2. (optional) One crate can now safely contain multiple modules. You can simplify the workspace by coalescing module crates if you think this helps. (edited)

If you get stuck at any point, feel free to copy one of the example contracts and just replace the code. If you do so, make sure you get rid of all paths in all Cargo.toml.

Don't miss a new mx-sdk-rs release

NewReleases is sending notifications on new releases.