v4.0.0-alpha.1
Pre-release
Pre-release
HCastano
released this
25 Aug 18:14
·
639 commits
to master
since this release
Version 4.0.0-alpha.1
Compatibility
In order to build contracts which use ink! v4.0.0-alpha.1
you need to use cargo-contract
v2.0.0-alpha.1
. You can install it as follows:
cargo install cargo-contract --version 2.0.0-alpha.1
We recommend using a version of the pallet-contracts
later than 6b85535
(Aug 12, 2022) in your node.
The compatibility issues will be with ChainExtension
's and the functions mentioned above.
Breaking Changes
This release contains a few breaking changes. These are indicated with the ❌ emoji.
Most of these were intitially introduced in v3.1.0
and v3.2.0
releases but
compatibility was restored in v3.3.0
.
- As part of #1224 the return type of
ink_env::set_contract_storage()
was changed to
return anOption<u32>
instead of()
. - As part of #1233 the
eth_compatibility
crate was removed. The
ecdsa_to_eth_address()
function from it can now be found in theink_env
crate. - As part of #1267 an argument to
ink_lang::codegen::execute_constructor()
(which is
used internally by the ink! macros) was removed. - As part of #1313 the ink! ABI was changed so that the version was specified using a
dedicatedversion
key instead of an implicit key which wrapped the entire ABI.
Added
- ❌ Add
Mapping::contains(key)
andMapping::insert_return_size(key, val)
‒ #1224 - Add
payment-channel
example ‒ #1248 - ❌ Add
version
field to ink! metadata ‒ #1313 - The
rand-extension
example has been adapted to an updated version of theChainExtension
API ‒ #1356
Changed
- ❌ Contract size optimization in case contract doesn't accept payment ‒ #1267 (thanks @xgreenx).
- Move ink! linter into
ink
repository ‒ #1361
Removed
- ❌ Implement ecdsa_to_eth_address() and remove eth_compatibility crate ‒ #1233