Skip to content

v4.0.0-beta.1

Pre-release
Pre-release
Compare
Choose a tag to compare
@ascjones ascjones released this 25 Jan 11:23
· 502 commits to master since this release
c8aa3ee

This supersedes #1590, but RC coming soon™

Version 4.0.0-beta.1

The coolest feature included in this release is the first first published version of
ink!'s native "end-to-end" (E2E) testing framework.

This enables testing of a contract by deploying and calling it on a Substrate node with
pallet-contracts. See the erc20 example for usage.

Breaking Changes

This release includes a couple of breaking changes.

  1. The CallBuilder::returns() method does not require an extra MessageResult anymore
    as the type is now added under the hood (#1525)
  2. The CallBuilder::invoke() and CreateBuilder::instantiate() methods now unwrap the
    Result from pallet-contracts under the hood (#1602)
    If you wish to handle the error use the new try_ variants of those methods instead.
  3. The CallBuilder::fire() method has been renamed to invoke()
    (#1604)
  4. The returns_result flag has been removed from the #[ink(extension = …)] attribute
    (#1569)
    We now infer this information at compile time. If handle_status is set to true,
    the return type will still be wrapped into Result as before.
  5. The Minimum Supported Rust Version (MSRV) has been set to 1.63.0. This was already
    the case, but previously it was enforced by cargo-contract instead of ink!
    (#1609)

Added

  • Add E2E testing framework MVP ‒ #1395
  • Add E2E tests for Mapping functions - #1492

Fixed

  • Add Determinism enum from pallet-contracts ‒ #1547
  • Added missed WhereClosure for the generics into storage_item#1536 (thanks @xgreenx)

Changed

  • Handle LangError from instantiate ‒ #1512
  • FFI: no more __unstable__ wasm import module ‒ #1522
  • Clean up CallBuilder return() type ‒ #1525
  • Fix trait message return type metadata ‒ #1531
  • Bump Dylint dependencies ‒ #1551
  • Stabilize take_storage#1568
  • Chain Extension: Evaluation of method return type at compile time ‒ #1569
  • Make more functions be const ‒ #1574 (thanks @yjhmelody)
  • Unify fallible and non fallible instantiate methods ‒ #1591
  • Make CallBuilder and CreateBuilder error handling optional ‒ #1602
  • Rename CallBuilder::fire() method to invoke()#1604
  • chore: add minimum rust version to the ink crate ‒ #1609 (thanks @Kurtsley)