Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When attempting to release
alpha.2
, thecargo release
auto bumped the version toalpha.3
(see commits in this PR) because I supplied simplyalpha
as thelevel
instead of the specific versionv4.0.0 alpha.2
. The result was some crates were published asv4.0.0-alpha.3
, with others not being published because the inter-crate dependency versions were not updated.Version 4.0.0-alpha.3
Breaking Changes
New
ink
crateThe
ink_lang
crate has been replaced in #1223 by a new top levelink
crate. All existing sub-crates are reexported and should be used via the new
ink
crate, so e.g.ink::env
instead ofink_env
. Contract authors should now import the top levelink
crate instead of the individual crates.Migration
Cargo.toml
Replace all individualink_*
crate dependencies with theink
crate.use ink_lang as ink
idiom.ink_env
➜ink::env
.Storage Rework
#1331 changes the way
ink!
works with contract storage. Storage keysare generated at compile-time, and user facing abstractions which determine how contract data is laid out in storage
have changed.
Migration
Mapping
fields withMapping::default()
instead ofink_lang::utils::initialize_contract
inconstructors. See
erc20
and other examples which use aMapping
.SpreadAllocate
,SpreadLayout
andPackedLayout
implementations.Removal of
wee-alloc
supportink! 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
ink
entrance crate ‒ #1223XXH32
instead ofsha256
for calculating storage keys ‒ #1393Fixed
docs
field ‒ #1385Added
ink_env::pay_with_call!
helper macro for off-chain emulation of sending payments with contract message calls ‒ #1379Removed
wee-alloc
‒ #1403