ink! 3.0.0 RC 4
Pre-release
Pre-release
Version 3.0-rc4 (2021-07-19)
This is the 4th release candidate for ink! 3.0.
The list below shows the additions, changes and fixes that are visible to users of ink!.
Compatibility
ink! 3.0-rc4 is compatible with
- The "ink! CLI"
cargo-contract
version0.13.0or newer.- Install the newest version using
cargo install --force cargo-contract.
- Install the newest version using
- Substrate version
4.0.0-devincluding thecontracts-palletversion4.0.0-dev. canvas-nodeversion0.19.0or newer.- Install the newest version using
cargo install canvas-node --git https://github.com/paritytech/canvas-node.git --force.
- Install the newest version using
The documentation on our Documentation Portal
is up to date with this release candidate. Since the last release candidate we notabley
added a number of Frequently Asked Questions
there.
Quality Assurance
In order to ensure a continuously high quality of our codebase we implemented a number
of key improvements to our testing setup:
- We've put an emphasis on automated testing of the usage examples in our crate documentation.
Those are now tested in the context of a complete ink! contract. In the past this was not
always the case, sometimes usage examples were just isolated code snippets. - We started our
ink-waterfallproject,
which runs End-to-End tests through our entire stack.
All our examples are continuously built using the latestcargo-contract. They are
subsequently deployed on the latestcanvas-nodeby emulating browser interactions with
both thecanvas-uiand the
polkadot-jsUI.
This testing setup enables us to detect bugs which only appear in the context of using
multiple components together early on. - To improve the readability of our documentation we introduced automated grammar and spell
checking into our Continuous Integration environment.
Added
- Added support for the new
seal_randomAPI ‒ #734. - Added missing documentation for the
ink_storage_deriveprocedural macros ‒ #711. - Implemented the (unstable)
seal_rent_paramsAPI ‒ #755. - Implemented the (unstable)
seal_rent_statusAPI ‒ #798. - Implemented the (unstable)
seal_debug_messageAPI ‒ #792.- Printing debug messages can now be achieved via
ink_env::debug_println!(…). - See our documentation
for more information. - The examples have been updated to reflect this new way of printing debug messages.
- Printing debug messages can now be achieved via
- Added usage comments with code examples to the
ink_envAPI ‒ #797.- The published crate documentation now contains
much more code examples for the methods behindself.env()andSelf::env().
- The published crate documentation now contains
- Added an example implementation for ERC-1155, a multi-token standard ‒ #800.
- Implemented binary search for
collections::Vec‒ #836. - Added the ability of submitting payable transactions to the
multisigexample ‒ #820. - Implemented
DecodeforErrortypes in the examples, enabling building them as dependencies ‒ #761. - We started working on a new off-chain environment testing engine ‒ #712.
- The old testing environment has a number of limitations, which we are well aware of.
We're confident that with the new testing engine we will be able to conduct much more
elaborate testing in an emulated chain environment. - For the moment, the new engine is unstable and only available behind a feature flag.
A number of examples have already been converted to support the new testing engine.
- The old testing environment has a number of limitations, which we are well aware of.
Changed
- To reduce a contract's space footprint we switched the default allocator to a bump allocator implementation ‒ #831.
- A couple of readme's have been reworked:
- With the stabilization of Rust 1.51 we ware able to remove the
ink-unstablefeature, making
collections::SmallVecandlazy::LazyArrayavailable by default ‒ #746. - To resolve confusion, we migrated all usages of
#[test]in our examples to#[ink::test]‒ #746.- The difference is that
#[ink::test]spawns an emulated chain environment (an "off-chain" environment)
and hence comes with a bit of overhead. It was not always clear to users when they require
an off-chain environment, we decided to mitigate this confusion by using an emulated chain
environment for all our example tests.
- The difference is that
- With the stabilization of Rust's
min_const_genericswe were able to replace the fixed
size implementations ofSpreadLayoutandPackedLayoutfor Arrays. These traits are
now implemented for all Arrays of sizeusize‒ #754. - We were able to remove the pinned
funtydependency ‒ #711. - The
contract-transferexample has been improved for better UI support ‒ #789. - The
contract-transferexample has been improved for better error handling ‒ #790.
Fixed
- Catch illegal
structdestructuring pattern in ink! message arguments ‒ #846. - Removed an erroneous
Salttype in code generation for cross-contract calls ‒ #842. - Do not generate metadata if compiled as dependency ‒ #811.
- Fix execution context parameters in DNS example tests ‒ #723.
- Fixed the
Greetercontract example from our doc comments ‒ #773.