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.2 #1408

Merged
merged 11 commits into from
Sep 21, 2022
Merged

Release v4.0.0 alpha.2 #1408

merged 11 commits into from
Sep 21, 2022

Conversation

ascjones
Copy link
Collaborator

@ascjones ascjones commented Sep 20, 2022

Version 4.0.0-alpha.2

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

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Collaborator

@cmichi cmichi left a comment

Choose a reason for hiding this comment

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

Please include the suggestions I made, other than that 👍 .

@HCastano
Copy link
Contributor

Small thing, can we make sure #1401 gets in to the release?

@ascjones
Copy link
Collaborator Author

Small thing, can we make sure #1401 gets in to the release?

Sure, I will pick this up again tomorrow and include that

@codecov-commenter
Copy link

codecov-commenter commented Sep 21, 2022

Codecov Report

Merging #1408 (8841505) into master (b04f097) will decrease coverage by 5.82%.
The diff coverage is n/a.

❗ Current head 8841505 differs from pull request most recent head 1da9af9. Consider uploading reports for the commit 1da9af9 to get more accurate results

@@            Coverage Diff             @@
##           master    #1408      +/-   ##
==========================================
- Coverage   71.98%   66.15%   -5.83%     
==========================================
  Files         187      186       -1     
  Lines        5953     5927      -26     
==========================================
- Hits         4285     3921     -364     
- Misses       1668     2006     +338     
Impacted Files Coverage Δ
crates/ink/ir/src/ir/contract.rs 0.00% <0.00%> (-100.00%) ⬇️
crates/ink/ir/src/ir/ink_test.rs 0.00% <0.00%> (-87.50%) ⬇️
crates/ink/ir/src/ir/trait_def/mod.rs 0.00% <0.00%> (-83.34%) ⬇️
crates/ink/ir/src/ir/storage_item/config.rs 0.00% <0.00%> (-73.34%) ⬇️
crates/ink/ir/src/ir/storage_item/mod.rs 0.00% <0.00%> (-72.35%) ⬇️
crates/ink/ir/src/ir/blake2.rs 20.00% <0.00%> (-60.00%) ⬇️
crates/ink/ir/src/ir/trait_def/config.rs 7.14% <0.00%> (-57.15%) ⬇️
crates/ink/ir/src/ir/trait_def/item/trait_item.rs 45.90% <0.00%> (-45.91%) ⬇️
crates/ink/ir/src/ir/config.rs 64.00% <0.00%> (-36.00%) ⬇️
crates/ink/ir/src/ir/utils.rs 57.40% <0.00%> (-35.19%) ⬇️
... and 17 more

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

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:

@ascjones ascjones merged commit 6f2beed into master Sep 21, 2022
@ascjones ascjones deleted the aj/release-4.0.0-alpha.2 branch September 21, 2022 09:49
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