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-alpha.3 #1409

Merged
merged 18 commits into from
Sep 21, 2022
Merged

Release v4.0.0-alpha.3 #1409

merged 18 commits into from
Sep 21, 2022

Conversation

ascjones
Copy link
Collaborator

@ascjones ascjones commented Sep 21, 2022

When attempting to release alpha.2, the cargo release auto bumped the version to alpha.3 (see commits in this PR) because I supplied simply alpha as the level instead of the specific version v4.0.0 alpha.2. The result was some crates were published as v4.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 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.toml Replace all individual ink_* crate dependencies with the ink crate.
  • In the contract source:
    • Remove the commonly used use ink_lang as ink idiom.
    • Replace all usages of individual crates with reexports, e.g. ink_envink::env.

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 Mapping fields with Mapping::default() instead of ink_lang::utils::initialize_contract in
    constructors. See erc20 and other examples which use a Mapping.
  • Remove SpreadAllocate, SpreadLayout and PackedLayout implementations.

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 ink entrance crate ‒ #1223
  • Use XXH32 instead of sha256 for calculating storage keys ‒ #1393

Fixed

  • Trim single whitespace prefix in the metadata docs field ‒ #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

@ascjones ascjones changed the title Release v4.0.0 alpha.3 Release v4.0.0-alpha.3 Sep 21, 2022
Copy link
Contributor

@HCastano HCastano left a comment

Choose a reason for hiding this comment

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

:shipit:

CHANGELOG.md Outdated Show resolved Hide resolved
Co-authored-by: Hernando Castano <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Sep 21, 2022

Codecov Report

Merging #1409 (290856d) into master (6f2beed) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #1409      +/-   ##
==========================================
+ Coverage   71.98%   71.99%   +0.01%     
==========================================
  Files         187      187              
  Lines        5953     5953              
==========================================
+ Hits         4285     4286       +1     
+ Misses       1668     1667       -1     
Impacted Files Coverage Δ
crates/storage/traits/src/impls/mod.rs 0.00% <ø> (ø)
crates/ink/ir/src/ir/attrs.rs 82.27% <0.00%> (+0.27%) ⬆️

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

@ascjones ascjones merged commit c2c0a9f into master Sep 21, 2022
@ascjones ascjones deleted the aj/release-4.0.0-alpha.3 branch September 21, 2022 12:07
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.

4 participants