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 ink! 3.0.0-rc8 #1105

Merged
merged 6 commits into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 53 additions & 3 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,60 @@
# Version 3.0-rc8 (UNRELEASED)
# Version 3.0-rc8

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

## Change
## Compatibility

You need to upgrade to a new version of the `contracts` pallet in order to use this
ink! release. Specifically we recommend you upgrade to at least the pallet version
[249dbbb](https://github.com/paritytech/substrate/commit/249dbbba6a1a277a3098c2a5b302645da16451ad)
(or newer than Jan 17, 2022).

For `substrate-contracts-node` we just issued a new release `v0.5.0`, which has been synchronized
to the latest Substrate `master` and hence is compatible with this ink! release candidate.

Also, the metadata changed with this release, so you need to have a recent version of
the user interface you are using. For `polkadot-js/api` and `polkadot-js/apps` the metadata
changes are supported since Jan 19, 2022.

## Metadata Changes
There are two metadata changes in this release candidate:

### For messages and constructors: `name: Array` ➔ `label: String`

The messages and constructors exposed by a contract were previously denoted with
```json
"name": ["foo", "bar"]
```
Now they are instead denoted with
```json
"label": "foo"
```
For public contract methods that are implemented from a trait, the trait name is prefixed to
the method name with `::` as the separator. So e.g. `trait_name::get_owner`.

The ink! PR which implemented this is [#923](https://github.com/paritytech/ink/pull/923),
for the `polkadot-js/api` it was [polkadot-js/api#4255](https://github.com/polkadot-js/api/pull/4255).

### Constructors got a new field: `payable: bool`
Constructors now have to be specified `payable` if it's intended for them to receive value
(i.e. tokens). This is a breaking change, beforehand they were by default payable,
now they are by default non-payable.

The ink! PR which implemented this is [#1065](https://github.com/paritytech/ink/pull/1065), the PR that updated the 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).
- 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).
- Allow specifying payable constructors - [#1065](https://github.com/paritytech/ink/pull/1065)
- Removed the error codes `BelowSubsistenceThreshold` and `NewContractNotFunded` ‒ [#1062](https://github.com/paritytech/ink/pull/1062).
- Updated ink! to use the most recent `contracts` pallet API ‒ [#1053](https://github.com/paritytech/ink/pull/1053).
- Explicitly link against `rlibc` to get non-buggy version of `memcpy` ‒ [#1049](https://github.com/paritytech/ink/pull/1049).
- Changed the metadata field `name` to `label` for messages and constructors ‒ [#923](https://github.com/paritytech/ink/pull/923) (thanks [@xgreenx](https://github.com/xgreenx)).

## Added
- Added a `remove` method to the `Mapping` data structure ‒ [#1023](https://github.com/paritytech/ink/pull/1023).

# Version 3.0-rc7

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-rc7"
version = "3.0.0-rc8"
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-rc7"
version = "3.0.0-rc8"
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-rc7"
version = "3.0.0-rc8"
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-rc7", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_allocator = { version = "3.0.0-rc7", path = "../allocator/", default-features = false }
ink_primitives = { version = "3.0.0-rc7", path = "../primitives/", default-features = false }
ink_prelude = { version = "3.0.0-rc7", path = "../prelude/", default-features = false }
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 }

scale = { package = "parity-scale-codec", version = "2.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-rc7", path = "../engine/", default-features = false, optional = true }
ink_engine = { version = "3.0.0-rc8", path = "../engine/", default-features = false, 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-rc7"
version = "3.0.0-rc8"
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-rc7", path = "../env", default-features = false }
ink_env = { version = "3.0.0-rc8", 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-rc7"
version = "3.0.0-rc8"
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-rc7", path = "../env", default-features = false }
ink_storage = { version = "3.0.0-rc7", path = "../storage", default-features = false }
ink_primitives = { version = "3.0.0-rc7", path = "../primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc7", path = "../metadata", default-features = false, optional = true }
ink_prelude = { version = "3.0.0-rc7", path = "../prelude", default-features = false }
ink_eth_compatibility = { version = "3.0.0-rc7", path = "../eth_compatibility", default-features = false }
ink_lang_macro = { version = "3.0.0-rc7", path = "macro", default-features = false }
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 }

scale = { package = "parity-scale-codec", version = "2.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-rc7", path = "ir" }
ink_metadata = { version = "3.0.0-rc7", default-features = false, path = "../metadata" }
ink_lang_ir = { version = "3.0.0-rc8", path = "ir" }
ink_metadata = { version = "3.0.0-rc8", 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-rc7"
version = "3.0.0-rc8"
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-rc7", package = "ink_lang_ir", path = "../ir", default-features = false }
ir = { version = "3.0.0-rc8", 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-rc7"
version = "3.0.0-rc8"
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-rc7"
version = "3.0.0-rc8"
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-rc7", path = "../ir", default-features = false }
ink_lang_codegen = { version = "3.0.0-rc7", path = "../codegen", default-features = false }
ink_primitives = { version = "3.0.0-rc7", path = "../../primitives/", default-features = false }
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 }

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

[dev-dependencies]
ink_metadata = { version = "3.0.0-rc7", path = "../../metadata/" }
ink_env = { version = "3.0.0-rc7", path = "../../env/" }
ink_storage = { version = "3.0.0-rc7", path = "../../storage/" }
ink_lang = { version = "3.0.0-rc7", path = ".." }
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 = ".." }
scale-info = { version = "1.0", 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-rc7"
version = "3.0.0-rc8"
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-rc7", path = "../prelude/", default-features = false }
ink_primitives = { version = "3.0.0-rc7", path = "../primitives/", default-features = false }
ink_prelude = { version = "3.0.0-rc8", path = "../prelude/", default-features = false }
ink_primitives = { version = "3.0.0-rc8", 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-rc7"
version = "3.0.0-rc8"
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-rc7"
version = "3.0.0-rc8"
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-rc7", path = "../prelude/", default-features = false }
ink_prelude = { version = "3.0.0-rc8", path = "../prelude/", default-features = false }
scale = { package = "parity-scale-codec", version = "2.3", default-features = false, features = ["derive", "full"] }
scale-info = { version = "1.0", default-features = false, features = ["derive"], optional = true }
cfg-if = "1"
Expand Down
12 changes: 6 additions & 6 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-rc7"
version = "3.0.0-rc8"
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-rc7", path = "../env/", default-features = false }
ink_metadata = { version = "3.0.0-rc7", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_primitives = { version = "3.0.0-rc7", path = "../primitives/", default-features = false }
ink_storage_derive = { version = "3.0.0-rc7", path = "derive", default-features = false }
ink_prelude = { version = "3.0.0-rc7", path = "../prelude/", default-features = false }
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 }

scale = { package = "parity-scale-codec", version = "2.3", default-features = false, features = ["derive", "full"] }
derive_more = { version = "0.99", default-features = false, features = ["from", "display"] }
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-rc7"
version = "3.0.0-rc8"
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 = "2.3", default-features = false, features = ["derive", "full"] }
ink_env = { version = "3.0.0-rc7", path = "../../env" }
ink_primitives = { version = "3.0.0-rc7", path = "../../primitives" }
ink_metadata = { version = "3.0.0-rc7", path = "../../metadata" }
ink_prelude = { version = "3.0.0-rc7", path = "../../prelude/" }
ink_storage = { version = "3.0.0-rc7", path = ".." }
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 = ".." }
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-rc7"
version = "3.0.0-rc8"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

[dependencies]
ink_primitives = { version = "3.0.0-rc7", path = "../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc7", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc7", path = "../../crates/env", default-features = false }
ink_storage = { version = "3.0.0-rc7", path = "../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc7", path = "../../crates/lang", default-features = false }
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 }

scale = { package = "parity-scale-codec", version = "2", default-features = false, features = ["derive"] }
scale-info = { version = "1", 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-rc7"
version = "3.0.0-rc8"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

[dependencies]
ink_primitives = { version = "3.0.0-rc7", path = "../../crates/primitives", default-features = false }
ink_metadata = { version = "3.0.0-rc7", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
ink_env = { version = "3.0.0-rc7", path = "../../crates/env", default-features = false, features = [ "ink-debug" ] }
ink_storage = { version = "3.0.0-rc7", path = "../../crates/storage", default-features = false }
ink_lang = { version = "3.0.0-rc7", path = "../../crates/lang", default-features = false }
ink_prelude = { version = "3.0.0-rc7", path = "../../crates/prelude", default-features = false }
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 }

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