ink! 3.0.0 RC 9
Pre-releaseVersion 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 todnsexample contract - #1118 (thanks @agryaznov). - Improved usage documentation of
ink_storage::Mapping- #1138.
Changed
- Updated to
parity-scale-codec = "3"andscale-info = "2"- #1132.
Removed
- Remove
collectionandlazymodules from public ink! API - #1111. - Remove
Memoryfrom public ink! API - #1137.