Skip to content

ink! 3.0.0 RC 9

Pre-release
Pre-release
Compare
Choose a tag to compare
@cmichi cmichi released this 23 Feb 07:48
· 718 commits to master since this release
07a8ed9

Version 3.0-rc9

This is the 9th release candidate for ink! 3.0.

Breaking Changes

We removed all data structures other than Mapping from the public ink! API

This is a drastic breaking change; it was no easy decision for us.
It affects Lazy and Memory as well. The rationale behind this change,
as well as some notes on migrating existing contracts, are explained
in #1111 and
#1137.

If you used Memory in your contract, you can achieve the same functionality
by passing this data via arguments. If you think there's a case to be
made for bringing it back, please get in contact with us.

If you use ink_storage::Mapping
in your contract, you need to initialize the data structure using the helper function
ink_lang::utils::initialize_contract(…).
For more code examples you can take a look at our examples, e.g.
erc20.

Please upgrade scale-info and parity-scale-codec in your contract's dependencies

In this release candidate we upgraded scale-info and parity-scale-codec. You have to use a compatible
version in your contract's Cargo.toml as well; cargo-contract will throw an error otherwise.

The Cargo.toml should contain

scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }

Added

  • Export ink_lang::utils::initialize_contract(…) - #1077.
  • Add get_owner() function to dns example contract - #1118 (thanks @agryaznov).
  • Improved usage documentation of ink_storage::Mapping - #1138.

Changed

  • Updated to parity-scale-codec = "3" and scale-info = "2" - #1132.

Removed

  • Remove collection and lazy modules from public ink! API - #1111.
  • Remove Memory from public ink! API - #1137.

Fixed

  • Fix bug with referencing two external trait definitions - #1141.
  • Explicitly specify trait in dispatching - #1131 (thanks @xgreenx).
  • Make rust-analyzer expand ink! macros without warning - #1107.