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 onerdpy
. - Renamed feature
arwen-tests
tomandos-go-tests
Important: how to upgrade contracts to 0.22.0:
- Rename crates
abi
->meta
. Both directories and in the workspace Cargo.toml - Mass replace
elrond_wasm_debug::abi_json::print_abi::
->elrond_wasm_debug::meta::perform::
this will fix all themeta
crate sources - Remove
elrond-wasm-node
as dependency from all main contract crates. Featurewasm-output-mode
is no longer needed here, no optionals either. Just freely import anything you need. - (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 byelrond-wasm
, no need to re-import in the contract. - 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"]
- Build all contracts - this will also auto-generate all
lib.rs
sources in allwasm
crates. The easiest way to do it is to have a copy ofbuild-wasm.sh
from this repo in your repo's root and run it. - (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 path
s in all Cargo.toml.