Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v4.0.0-beta.1 #1617

Merged
merged 5 commits into from
Jan 25, 2023
Merged

Release v4.0.0-beta.1 #1617

merged 5 commits into from
Jan 25, 2023

Conversation

HCastano
Copy link
Contributor

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)

Copy link
Collaborator

@cmichi cmichi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such a great release!

@codecov-commenter
Copy link

codecov-commenter commented Jan 24, 2023

Codecov Report

Merging #1617 (0e20426) into master (178a52f) will decrease coverage by 0.07%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1617      +/-   ##
==========================================
- Coverage   70.45%   70.38%   -0.07%     
==========================================
  Files         207      207              
  Lines        6396     6398       +2     
==========================================
- Hits         4506     4503       -3     
- Misses       1890     1895       +5     
Impacted Files Coverage Δ
crates/allocator/src/bump.rs 86.77% <0.00%> (-3.98%) ⬇️
crates/ink/ir/src/ir/attrs.rs 81.79% <0.00%> (-0.29%) ⬇️
crates/metadata/src/layout/mod.rs 80.83% <0.00%> (+0.83%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ascjones
Copy link
Collaborator

@ascjones ascjones merged commit c8aa3ee into master Jan 25, 2023
@ascjones ascjones deleted the v4.0.0-beta.1 branch January 25, 2023 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants