v4.0.0-alpha.3
Pre-release
Pre-release
·
843 commits
to master
since this release
4.0.0-alpha.2 was skipped because of an error in the release process
Breaking Changes
New ink crate
The ink_lang crate has been replaced in #1223 by a new top level ink
crate. All existing sub-crates are reexported and should be used via the new ink crate, so e.g. ink::env instead of
ink_env. Contract authors should now import the top level ink crate instead of the individual crates.
Migration
- In
Cargo.tomlReplace all individualink_*crate dependencies with theinkcrate. - In the contract source:
- Remove the commonly used
use ink_lang as inkidiom. - Replace all usages of individual crates with reexports, e.g.
ink_env➜ink::env.
- Remove the commonly used
Storage Rework
#1331 changes the way ink! works with contract storage. Storage keys
are generated at compile-time, and user facing abstractions which determine how contract data is laid out in storage
have changed.
Migration
- Initialize
Mappingfields withMapping::default()instead ofink_lang::utils::initialize_contractin
constructors. Seeerc20and other examples which use aMapping. - Remove
SpreadAllocate,SpreadLayoutandPackedLayoutimplementations.
Removal of wee-alloc support
ink! uses a bump allocator by default, additionally we supported another allocator (wee-alloc)
through a feature flag. wee-alloc is no longer maintained and we removed support for it.
Changed
- Introduce
inkentrance crate ‒ #1223 - Use
XXH32instead ofsha256for calculating storage keys ‒ #1393
Fixed
- Trim single whitespace prefix in the metadata
docsfield ‒ #1385 - Allow pay_with_call to take multiple arguments ‒ #1401
Added
- Add
ink_env::pay_with_call!helper macro for off-chain emulation of sending payments with contract message calls ‒ #1379
Removed
- Remove
wee-alloc‒ #1403