Skip to content

Commit

Permalink
Release ink! 3.0.0-rc9 (#1135)
Browse files Browse the repository at this point in the history
* Bump crate versions to `3.0.0-rc9`

* Improve documentation of `ink_storage::Mapping`

* Hide `Memory`

* Update release notes

* Remove `Memory`

* Remove `Memory`

* Fix doc test

* Add `Changed` section to release notes

* Update release notes

* Update release notes
  • Loading branch information
cmichi authored Feb 23, 2022
1 parent 2f86746 commit 07a8ed9
Show file tree
Hide file tree
Showing 32 changed files with 206 additions and 168 deletions.
42 changes: 40 additions & 2 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
# Unreleased
# 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](https://github.com/paritytech/ink/pull/1111) and
[#1137](https://github.com/paritytech/ink/pull/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`](https://paritytech.github.io/ink/ink_storage/struct.Mapping.html)
in your contract, you need to initialize the data structure using the helper function
[`ink_lang::utils::initialize_contract(…)`](https://paritytech.github.io/ink/ink_lang/utils/fn.initialize_contract.html).
For more code examples you can take a look at our examples, e.g.
[`erc20`](https://github.com/paritytech/ink/blob/master/examples/erc20/lib.rs).

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

Expand All @@ -11,6 +32,23 @@ scale-info = { version = "2", default-features = false, features = ["derive"], o
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
```

## Added
- Export `ink_lang::utils::initialize_contract(…)` - [#1077](https://github.com/paritytech/ink/pull/1077).
- Add `get_owner()` function to `dns` example contract - [#1118](https://github.com/paritytech/ink/pull/1118) (thanks [@agryaznov](https://github.com/agryaznov)).
- Improved usage documentation of `ink_storage::Mapping` - [#1138](https://github.com/paritytech/ink/pull/1138).

## Changed
- Updated to `parity-scale-codec = "3"` and `scale-info = "2"` - [#1132](https://github.com/paritytech/ink/pull/1132).

## Removed
- Remove `collection` and `lazy` modules from public ink! API - [#1111](https://github.com/paritytech/ink/pull/1111).
- Remove `Memory` from public ink! API - [#1137](https://github.com/paritytech/ink/pull/1137).

## Fixed
- Fix bug with referencing two external trait definitions - [#1141](https://github.com/paritytech/ink/pull/1141).
- Explicitly specify trait in dispatching - [#1131](https://github.com/paritytech/ink/pull/1131) (thanks [@xgreenx](https://github.com/xgreenx)).
- Make `rust-analyzer` expand ink! macros without warning - [#1107](https://github.com/paritytech/ink/pull/1107).

# Version 3.0-rc8

This is the 8th release candidate for ink! 3.0.
Expand Down Expand Up @@ -57,7 +95,7 @@ The ink! PR which implemented this is [#1065](https://github.com/paritytech/ink/
metadata to V3 is [#1100](https://github.com/paritytech/ink/pull/1100), and for the `polkadot-js/api` it was [polkadot-js/api#4432](https://github.com/polkadot-js/api/pull/4432).

## Changed
- Update metadate to support payable constructors - [#1100](https://github.com/paritytech/ink/pull/1100).
- Update metadata to support payable constructors - [#1100](https://github.com/paritytech/ink/pull/1100).
- Make constructors non-payable by default, require specifying `payable` explicitly - [#1065](https://github.com/paritytech/ink/pull/1065).
- Renamed the error code `EcdsaRecoverFailed` to `EcdsaRecoveryFailed`[#1064](https://github.com/paritytech/ink/pull/1064).
- Renamed the `ink_env` function `transferred_balance()` to `transferred_value()`[#1063](https://github.com/paritytech/ink/pull/1063).
Expand Down
2 changes: 1 addition & 1 deletion crates/allocator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_allocator"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion crates/engine/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_engine"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>", "Michael Müller <michi@parity.io>"]
edition = "2021"

Expand Down
12 changes: 6 additions & 6 deletions crates/env/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_env"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

Expand All @@ -15,10 +15,10 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_metadata = { version = "3.0.0-rc8", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_allocator = { version = "3.0.0-rc8", path = "../allocator/", default-features = false }
ink_primitives = { version = "3.0.0-rc8", path = "../primitives/", default-features = false }
ink_prelude = { version = "3.0.0-rc8", path = "../prelude/", default-features = false }
ink_metadata = { version = "3.0.0-rc9", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_allocator = { version = "3.0.0-rc9", path = "../allocator/", default-features = false }
ink_primitives = { version = "3.0.0-rc9", path = "../primitives/", default-features = false }
ink_prelude = { version = "3.0.0-rc9", path = "../prelude/", default-features = false }

scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
derive_more = { version = "0.99", default-features = false, features = ["from", "display"] }
Expand All @@ -32,7 +32,7 @@ static_assertions = "1.1"
rlibc = "1"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
ink_engine = { version = "3.0.0-rc8", path = "../engine/", optional = true }
ink_engine = { version = "3.0.0-rc9", path = "../engine/", optional = true }

# Hashes for the off-chain environment.
sha2 = { version = "0.10", optional = true }
Expand Down
4 changes: 2 additions & 2 deletions crates/eth_compatibility/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_eth_compatibility"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

Expand All @@ -15,7 +15,7 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "/README.md", "/LICENSE"]

[dependencies]
ink_env = { version = "3.0.0-rc8", path = "../env", default-features = false }
ink_env = { version = "3.0.0-rc9", path = "../env", default-features = false }

[target.'cfg(not(target_os = "windows"))'.dependencies]
# We do not include `libsecp256k1` on Windows, since it's incompatible.
Expand Down
20 changes: 10 additions & 10 deletions crates/lang/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_lang"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

Expand All @@ -15,20 +15,20 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_env = { version = "3.0.0-rc8", path = "../env", default-features = false }
ink_storage = { version = "3.0.0-rc8", path = "../storage", default-features = false }
ink_primitives = { version = "3.0.0-rc8", path = "../primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc8", path = "../metadata", default-features = false, optional = true }
ink_prelude = { version = "3.0.0-rc8", path = "../prelude", default-features = false }
ink_eth_compatibility = { version = "3.0.0-rc8", path = "../eth_compatibility", default-features = false }
ink_lang_macro = { version = "3.0.0-rc8", path = "macro", default-features = false }
ink_env = { version = "3.0.0-rc9", path = "../env", default-features = false }
ink_storage = { version = "3.0.0-rc9", path = "../storage", default-features = false }
ink_primitives = { version = "3.0.0-rc9", path = "../primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc9", path = "../metadata", default-features = false, optional = true }
ink_prelude = { version = "3.0.0-rc9", path = "../prelude", default-features = false }
ink_eth_compatibility = { version = "3.0.0-rc9", path = "../eth_compatibility", default-features = false }
ink_lang_macro = { version = "3.0.0-rc9", path = "macro", default-features = false }

scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
derive_more = { version = "0.99", default-features = false, features = ["from"] }

[dev-dependencies]
ink_lang_ir = { version = "3.0.0-rc8", path = "ir" }
ink_metadata = { version = "3.0.0-rc8", default-features = false, path = "../metadata" }
ink_lang_ir = { version = "3.0.0-rc9", path = "ir" }
ink_metadata = { version = "3.0.0-rc9", default-features = false, path = "../metadata" }

trybuild = { version = "1.0.52", features = ["diff"] }
# Required for the doctest of `env_access::EnvAccess::instantiate_contract`
Expand Down
4 changes: 2 additions & 2 deletions crates/lang/codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_lang_codegen"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

Expand All @@ -18,7 +18,7 @@ include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]
name = "ink_lang_codegen"

[dependencies]
ir = { version = "3.0.0-rc8", package = "ink_lang_ir", path = "../ir", default-features = false }
ir = { version = "3.0.0-rc9", package = "ink_lang_ir", path = "../ir", default-features = false }
quote = "1"
syn = { version = "1.0", features = ["parsing", "full", "extra-traits"] }
proc-macro2 = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion crates/lang/ir/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_lang_ir"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

Expand Down
16 changes: 8 additions & 8 deletions crates/lang/macro/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_lang_macro"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

Expand All @@ -15,19 +15,19 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_lang_ir = { version = "3.0.0-rc8", path = "../ir", default-features = false }
ink_lang_codegen = { version = "3.0.0-rc8", path = "../codegen", default-features = false }
ink_primitives = { version = "3.0.0-rc8", path = "../../primitives/", default-features = false }
ink_lang_ir = { version = "3.0.0-rc9", path = "../ir", default-features = false }
ink_lang_codegen = { version = "3.0.0-rc9", path = "../codegen", default-features = false }
ink_primitives = { version = "3.0.0-rc9", path = "../../primitives/", default-features = false }

scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
syn = "1"
proc-macro2 = "1"

[dev-dependencies]
ink_metadata = { version = "3.0.0-rc8", path = "../../metadata/" }
ink_env = { version = "3.0.0-rc8", path = "../../env/" }
ink_storage = { version = "3.0.0-rc8", path = "../../storage/" }
ink_lang = { version = "3.0.0-rc8", path = ".." }
ink_metadata = { version = "3.0.0-rc9", path = "../../metadata/" }
ink_env = { version = "3.0.0-rc9", path = "../../env/" }
ink_storage = { version = "3.0.0-rc9", path = "../../storage/" }
ink_lang = { version = "3.0.0-rc9", path = ".." }
scale-info = { version = "2", default-features = false, features = ["derive"] }

[lib]
Expand Down
6 changes: 3 additions & 3 deletions crates/metadata/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_metadata"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

Expand All @@ -15,8 +15,8 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_prelude = { version = "3.0.0-rc8", path = "../prelude/", default-features = false }
ink_primitives = { version = "3.0.0-rc8", path = "../primitives/", default-features = false }
ink_prelude = { version = "3.0.0-rc9", path = "../prelude/", default-features = false }
ink_primitives = { version = "3.0.0-rc9", path = "../primitives/", default-features = false }

serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] }
impl-serde = "0.3.1"
Expand Down
2 changes: 1 addition & 1 deletion crates/prelude/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_prelude"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

Expand Down
4 changes: 2 additions & 2 deletions crates/primitives/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_primitives"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

Expand All @@ -15,7 +15,7 @@ categories = ["no-std", "embedded"]
include = ["/Cargo.toml", "src/**/*.rs", "/README.md", "/LICENSE"]

[dependencies]
ink_prelude = { version = "3.0.0-rc8", path = "../prelude/", default-features = false }
ink_prelude = { version = "3.0.0-rc9", path = "../prelude/", default-features = false }
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }
cfg-if = "1"
Expand Down
14 changes: 7 additions & 7 deletions crates/storage/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_storage"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

Expand All @@ -15,11 +15,11 @@ categories = ["no-std", "embedded"]
include = ["Cargo.toml", "src/**/*.rs", "README.md", "LICENSE"]

[dependencies]
ink_env = { version = "3.0.0-rc8", path = "../env/", default-features = false }
ink_metadata = { version = "3.0.0-rc8", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_primitives = { version = "3.0.0-rc8", path = "../primitives/", default-features = false }
ink_storage_derive = { version = "3.0.0-rc8", path = "derive", default-features = false }
ink_prelude = { version = "3.0.0-rc8", path = "../prelude/", default-features = false }
ink_env = { version = "3.0.0-rc9", path = "../env/", default-features = false }
ink_metadata = { version = "3.0.0-rc9", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_primitives = { version = "3.0.0-rc9", path = "../primitives/", default-features = false }
ink_storage_derive = { version = "3.0.0-rc9", path = "derive", default-features = false }
ink_prelude = { version = "3.0.0-rc9", path = "../prelude/", default-features = false }

scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
derive_more = { version = "0.99", default-features = false, features = ["from", "display"] }
Expand All @@ -33,7 +33,7 @@ quickcheck_macros = "1.0"
itertools = "0.10"
paste = "1.0"

ink_lang = { version = "3.0.0-rc8", path = "../lang/", default-features = false }
ink_lang = { version = "3.0.0-rc9", path = "../lang/", default-features = false }

[features]
default = ["std"]
Expand Down
12 changes: 6 additions & 6 deletions crates/storage/derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_storage_derive"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

Expand All @@ -25,8 +25,8 @@ synstructure = "0.12.4"

[dev-dependencies]
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
ink_env = { version = "3.0.0-rc8", path = "../../env" }
ink_primitives = { version = "3.0.0-rc8", path = "../../primitives" }
ink_metadata = { version = "3.0.0-rc8", path = "../../metadata" }
ink_prelude = { version = "3.0.0-rc8", path = "../../prelude/" }
ink_storage = { version = "3.0.0-rc8", path = ".." }
ink_env = { version = "3.0.0-rc9", path = "../../env" }
ink_primitives = { version = "3.0.0-rc9", path = "../../primitives" }
ink_metadata = { version = "3.0.0-rc9", path = "../../metadata" }
ink_prelude = { version = "3.0.0-rc9", path = "../../prelude/" }
ink_storage = { version = "3.0.0-rc9", path = ".." }
12 changes: 6 additions & 6 deletions examples/contract-terminate/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "contract_terminate"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

[dependencies]
ink_primitives = { version = "3.0.0-rc8", path = "../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc8", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc8", path = "../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc8", path = "../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc8", path = "../../crates/lang", default-features = false }
ink_primitives = { version = "3.0.0-rc9", path = "../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc9", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc9", path = "../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc9", path = "../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc9", path = "../../crates/lang", default-features = false }

scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }
Expand Down
14 changes: 7 additions & 7 deletions examples/contract-transfer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "contract_transfer"
version = "3.0.0-rc8"
version = "3.0.0-rc9"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

[dependencies]
ink_primitives = { version = "3.0.0-rc8", path = "../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc8", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc8", path = "../../crates/env", default-features = false, features = [ "ink-debug" ] }
ink_storage = { version = "3.0.0-rc8", path = "../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc8", path = "../../crates/lang", default-features = false }
ink_prelude = { version = "3.0.0-rc8", path = "../../crates/prelude", default-features = false }
ink_primitives = { version = "3.0.0-rc9", path = "../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc9", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc9", path = "../../crates/env", default-features = false, features = [ "ink-debug" ] }
ink_storage = { version = "3.0.0-rc9", path = "../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc9", path = "../../crates/lang", default-features = false }
ink_prelude = { version = "3.0.0-rc9", path = "../../crates/prelude", default-features = false }

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

0 comments on commit 07a8ed9

Please sign in to comment.