v4.0.0-beta.1
Pre-release
Pre-release
ascjones
released this
25 Jan 11:23
·
502 commits
to master
since this release
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.
- The
CallBuilder::returns()
method does not require an extraMessageResult
anymore
as the type is now added under the hood (#1525) - The
CallBuilder::invoke()
andCreateBuilder::instantiate()
methods now unwrap the
Result
frompallet-contracts
under the hood (#1602)
If you wish to handle the error use the newtry_
variants of those methods instead. - The
CallBuilder::fire()
method has been renamed toinvoke()
(#1604) - The
returns_result
flag has been removed from the#[ink(extension = …)]
attribute
(#1569)
We now infer this information at compile time. Ifhandle_status
is set totrue
,
the return type will still be wrapped intoResult
as before. - The Minimum Supported Rust Version (MSRV) has been set to
1.63.0
. This was already
the case, but previously it was enforced bycargo-contract
instead of ink!
(#1609)
Added
Fixed
- Add Determinism enum from pallet-contracts ‒ #1547
- Added missed
WhereClosure
for the generics intostorage_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
andCreateBuilder
error handling optional ‒ #1602 - Rename
CallBuilder::fire()
method toinvoke()
‒ #1604 - chore: add minimum rust version to the ink crate ‒ #1609 (thanks @Kurtsley)