Skip to content

Commit 159e7db

Browse files
authored
Release ink! 3.0.0 (#1160)
* Bump version * Add release notes * Update readme * Update release notes * Update release notes * Update release notes to reflect stabilized `seal_delegate_call`
1 parent a35e159 commit 159e7db

File tree

34 files changed

+253
-175
lines changed

34 files changed

+253
-175
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,9 @@ the relevant links:
250250

251251
| Crate | Docs | Description |
252252
|:--|:--|:--|
253-
`ink_lang` | [![][j1]][j2] | Language features expose by ink!. See [here](https://paritytech.github.io/ink/ink_lang/attr.contract.html) for a detailed description of attributes which you can use in an `#[ink::contract]`. |
253+
`ink_lang` | [![][j1]][j2] | Language features exposed by ink!. See [here](https://paritytech.github.io/ink/ink_lang/attr.contract.html) for a detailed description of attributes which you can use in an `#[ink::contract]`. |
254254
`ink_storage` | [![][f1]][f2] | Data structures available in ink!. |
255-
`ink_env` | [![][g1]][g2] | Low-level interface for interacting with the smart contract Wasm executor. |
255+
`ink_env` | [![][g1]][g2] | Low-level interface for interacting with the smart contract Wasm executor. Contains [the off-chain testing API](https://paritytech.github.io/ink/ink_env/test/index.html) as well. |
256256
`ink_prelude` | [![][i1]][i2] | Common API for no_std and std to access alloc crate types. |
257257

258258

RELEASES.md

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,81 @@
1+
# Version 3.0.0
2+
3+
This is the stable release for ink! 3.0.
4+
5+
It took us a while to get here and going forward we want to do
6+
smaller releases more often.
7+
8+
*Please note that ink! has not been audited.*
9+
10+
## Compatibility
11+
We recommend using a version of the `contracts` pallet later than
12+
[cc282f84ba53ed2a08374d2a655dc8f08cbc5e86](https://github.com/paritytech/substrate/tree/cc282f84ba53ed2a08374d2a655dc8f08cbc5e86)
13+
(March 15, 2022) in your node.
14+
15+
This is the case in the latest release of the `substrate-contracts-node`:
16+
[v0.10.0](https://github.com/paritytech/substrate-contracts-node/releases/tag/v0.10.0).
17+
18+
## Breaking Changes
19+
### We replaced the default off-chain testing environment
20+
The off-chain testing environment can be used to write unit tests
21+
for your smart contract with a simulated chain.
22+
We've now replaced the existing off-chain environment with a new
23+
one, which has a bit of a different API.
24+
25+
The major changes are that there is no longer any notion of "execution
26+
context" ‒ so no more `push_execution_context` or `pop_execution_context`.
27+
You can achieve all the same things with the new API, see [here](https://paritytech.github.io/ink/ink_env/test/index.html)
28+
for the API documentation.
29+
30+
We've also switched all our examples to this new environment, you
31+
can find more "template use-cases" there (e.g. for
32+
[chain extension testing](https://github.com/paritytech/ink/tree/master/examples/rand-extension))
33+
34+
### We removed the dynamic storage allocator
35+
More details on the reasoning behind this can be found in [#1148](https://github.com/paritytech/ink/pull/1148).
36+
37+
### `CallBuilder` API changed to support `delegate` calls
38+
The `CallBuilder` API changed to now support two types of calls:
39+
40+
* `Call`: a cross-contract call.<br/>
41+
This was the default until this new API change.
42+
* `DelegateCall`: a delegated call.<br/>
43+
This enables writing upgradeable contracts using
44+
the `delegate` pattern. An example has been added to demonstrate this:
45+
[`upgradeable-contract`](https://github.com/paritytech/ink/tree/master/examples/upgradeable-contract).
46+
Please note that this is an _unstable_ API for now.
47+
You have to enable the feature `pallet-contracts/unstable-interface` in the target runtime.
48+
For `substrate-contracts-node` this is done by default [here](https://github.com/paritytech/substrate-contracts-node/blob/main/runtime/Cargo.toml).
49+
50+
This is a breaking change, users must now specify the `call_type` to the builder manually.
51+
52+
_If you want to keep existing behavior you just need to specify the type `Call` now._
53+
54+
More details on this change can be found in [#1133](https://github.com/paritytech/ink/pull/1133).
55+
56+
### Unify `ink_env::{eval_contract, invoke_contract}`
57+
58+
The API for `eval_contract` and `invoke_contract` changed. You can read more
59+
about the change in [#1165](https://github.com/paritytech/ink/pull/1165).
60+
61+
## Added
62+
- Added `keep_attr` to `#[ink::contract]` and `#[ink::trait_definition]`[#1145](https://github.com/paritytech/ink/pull/1145) (thanks [@xgreenx](https://github.com/xgreenx))..
63+
- Implemented the `seal_is_contract` and `seal_caller_is_origin` API ‒ [#1129](https://github.com/paritytech/ink/pull/1129) [#1166](https://github.com/paritytech/ink/pull/1166).
64+
- Add tests in experimental off-chain env for `trait-erc20`[#1158](https://github.com/paritytech/ink/pull/1158).
65+
- Add tests in experimental off-chain env for `erc721`[#1157](https://github.com/paritytech/ink/pull/1157).
66+
- Add tests in experimental off-chain env for `multisig`[#1159](https://github.com/paritytech/ink/pull/1159).
67+
- Add tests in experimental off-chain env for `dns`[#1156](https://github.com/paritytech/ink/pull/1156).
68+
- Implemented chain extension testing in experimental off-chain env ‒ [#1152](https://github.com/paritytech/ink/pull/1152).
69+
70+
## Changed
71+
- Replaced default off-chain testing engine with experimental one ‒ [#1144](https://github.com/paritytech/ink/pull/1144).
72+
- Changed `CallBuilder` API to now support delegate calls ‒ [#1133](https://github.com/paritytech/ink/pull/1133) (thanks [@VargSupercolony](https://github.com/VargSupercolony) and [@xgreenx](https://github.com/xgreenx)).
73+
- Unify `ink_env::{eval_contract, invoke_contract}`[#1165](https://github.com/paritytech/ink/pull/1165).
74+
75+
## Removed
76+
- Removed the dynamic storage allocator ‒ [#1148](https://github.com/paritytech/ink/pull/1148).
77+
- Removed `compile_as_dependency` config option ‒ [#1168](https://github.com/paritytech/ink/pull/1168).
78+
179
# Version 3.0-rc9
280

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

crates/allocator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_allocator"
3-
version = "3.0.0-rc9"
3+
version = "3.0.0"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

crates/engine/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_engine"
3-
version = "3.0.0-rc9"
3+
version = "3.0.0"
44
authors = ["Parity Technologies <[email protected]>", "Michael Müller <[email protected]>"]
55
edition = "2021"
66

crates/env/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_env"
3-
version = "3.0.0-rc9"
3+
version = "3.0.0"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

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

1717
[dependencies]
18-
ink_metadata = { version = "3.0.0-rc9", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
19-
ink_allocator = { version = "3.0.0-rc9", path = "../allocator/", default-features = false }
20-
ink_primitives = { version = "3.0.0-rc9", path = "../primitives/", default-features = false }
21-
ink_prelude = { version = "3.0.0-rc9", path = "../prelude/", default-features = false }
18+
ink_metadata = { version = "3.0.0", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
19+
ink_allocator = { version = "3.0.0", path = "../allocator/", default-features = false }
20+
ink_primitives = { version = "3.0.0", path = "../primitives/", default-features = false }
21+
ink_prelude = { version = "3.0.0", path = "../prelude/", default-features = false }
2222

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

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

3737
# Hashes for the off-chain environment.
3838
sha2 = { version = "0.10", optional = true }

crates/eth_compatibility/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_eth_compatibility"
3-
version = "3.0.0-rc9"
3+
version = "3.0.0"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66

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

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

2020
[target.'cfg(not(target_os = "windows"))'.dependencies]
2121
# We do not include `libsecp256k1` on Windows, since it's incompatible.

crates/lang/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_lang"
3-
version = "3.0.0-rc9"
3+
version = "3.0.0"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

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

1717
[dependencies]
18-
ink_env = { version = "3.0.0-rc9", path = "../env", default-features = false }
19-
ink_storage = { version = "3.0.0-rc9", path = "../storage", default-features = false }
20-
ink_primitives = { version = "3.0.0-rc9", path = "../primitives", default-features = false }
21-
ink_metadata = { version = "3.0.0-rc9", path = "../metadata", default-features = false, optional = true }
22-
ink_prelude = { version = "3.0.0-rc9", path = "../prelude", default-features = false }
23-
ink_eth_compatibility = { version = "3.0.0-rc9", path = "../eth_compatibility", default-features = false }
24-
ink_lang_macro = { version = "3.0.0-rc9", path = "macro", default-features = false }
18+
ink_env = { version = "3.0.0", path = "../env", default-features = false }
19+
ink_storage = { version = "3.0.0", path = "../storage", default-features = false }
20+
ink_primitives = { version = "3.0.0", path = "../primitives", default-features = false }
21+
ink_metadata = { version = "3.0.0", path = "../metadata", default-features = false, optional = true }
22+
ink_prelude = { version = "3.0.0", path = "../prelude", default-features = false }
23+
ink_eth_compatibility = { version = "3.0.0", path = "../eth_compatibility", default-features = false }
24+
ink_lang_macro = { version = "3.0.0", path = "macro", default-features = false }
2525

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

2929
[dev-dependencies]
30-
ink_lang_ir = { version = "3.0.0-rc9", path = "ir" }
31-
ink_metadata = { version = "3.0.0-rc9", default-features = false, path = "../metadata" }
30+
ink_lang_ir = { version = "3.0.0", path = "ir" }
31+
ink_metadata = { version = "3.0.0", default-features = false, path = "../metadata" }
3232

3333
trybuild = { version = "1.0.52", features = ["diff"] }
3434
# Required for the doctest of `env_access::EnvAccess::instantiate_contract`

crates/lang/codegen/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_lang_codegen"
3-
version = "3.0.0-rc9"
3+
version = "3.0.0"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

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

2020
[dependencies]
21-
ir = { version = "3.0.0-rc9", package = "ink_lang_ir", path = "../ir", default-features = false }
21+
ir = { version = "3.0.0", package = "ink_lang_ir", path = "../ir", default-features = false }
2222
quote = "1"
2323
syn = { version = "1.0", features = ["parsing", "full", "extra-traits"] }
2424
proc-macro2 = "1.0"

crates/lang/ir/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_lang_ir"
3-
version = "3.0.0-rc9"
3+
version = "3.0.0"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

crates/lang/macro/Cargo.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_lang_macro"
3-
version = "3.0.0-rc9"
3+
version = "3.0.0"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

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

1717
[dependencies]
18-
ink_lang_ir = { version = "3.0.0-rc9", path = "../ir", default-features = false }
19-
ink_lang_codegen = { version = "3.0.0-rc9", path = "../codegen", default-features = false }
20-
ink_primitives = { version = "3.0.0-rc9", path = "../../primitives/", default-features = false }
18+
ink_lang_ir = { version = "3.0.0", path = "../ir", default-features = false }
19+
ink_lang_codegen = { version = "3.0.0", path = "../codegen", default-features = false }
20+
ink_primitives = { version = "3.0.0", path = "../../primitives/", default-features = false }
2121

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

2626
[dev-dependencies]
27-
ink_metadata = { version = "3.0.0-rc9", path = "../../metadata/" }
28-
ink_env = { version = "3.0.0-rc9", path = "../../env/" }
29-
ink_storage = { version = "3.0.0-rc9", path = "../../storage/" }
30-
ink_lang = { version = "3.0.0-rc9", path = ".." }
27+
ink_metadata = { version = "3.0.0", path = "../../metadata/" }
28+
ink_env = { version = "3.0.0", path = "../../env/" }
29+
ink_storage = { version = "3.0.0", path = "../../storage/" }
30+
ink_lang = { version = "3.0.0", path = ".." }
3131
scale-info = { version = "2", default-features = false, features = ["derive"] }
3232

3333
[lib]

crates/metadata/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_metadata"
3-
version = "3.0.0-rc9"
3+
version = "3.0.0"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

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

1717
[dependencies]
18-
ink_prelude = { version = "3.0.0-rc9", path = "../prelude/", default-features = false }
19-
ink_primitives = { version = "3.0.0-rc9", path = "../primitives/", default-features = false }
18+
ink_prelude = { version = "3.0.0", path = "../prelude/", default-features = false }
19+
ink_primitives = { version = "3.0.0", path = "../primitives/", default-features = false }
2020

2121
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] }
2222
impl-serde = "0.3.1"

crates/prelude/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_prelude"
3-
version = "3.0.0-rc9"
3+
version = "3.0.0"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

crates/primitives/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_primitives"
3-
version = "3.0.0-rc9"
3+
version = "3.0.0"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

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

1717
[dependencies]
18-
ink_prelude = { version = "3.0.0-rc9", path = "../prelude/", default-features = false }
18+
ink_prelude = { version = "3.0.0", path = "../prelude/", default-features = false }
1919
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
2020
scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }
2121
cfg-if = "1"

crates/storage/Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_storage"
3-
version = "3.0.0-rc9"
3+
version = "3.0.0"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

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

1717
[dependencies]
18-
ink_env = { version = "3.0.0-rc9", path = "../env/", default-features = false }
19-
ink_metadata = { version = "3.0.0-rc9", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
20-
ink_primitives = { version = "3.0.0-rc9", path = "../primitives/", default-features = false }
21-
ink_storage_derive = { version = "3.0.0-rc9", path = "derive", default-features = false }
22-
ink_prelude = { version = "3.0.0-rc9", path = "../prelude/", default-features = false }
18+
ink_env = { version = "3.0.0", path = "../env/", default-features = false }
19+
ink_metadata = { version = "3.0.0", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
20+
ink_primitives = { version = "3.0.0", path = "../primitives/", default-features = false }
21+
ink_storage_derive = { version = "3.0.0", path = "derive", default-features = false }
22+
ink_prelude = { version = "3.0.0", path = "../prelude/", default-features = false }
2323

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

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

3838
[features]
3939
default = ["std"]

crates/storage/derive/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "ink_storage_derive"
3-
version = "3.0.0-rc9"
3+
version = "3.0.0"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

@@ -25,8 +25,8 @@ synstructure = "0.12.4"
2525

2626
[dev-dependencies]
2727
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
28-
ink_env = { version = "3.0.0-rc9", path = "../../env" }
29-
ink_primitives = { version = "3.0.0-rc9", path = "../../primitives" }
30-
ink_metadata = { version = "3.0.0-rc9", path = "../../metadata" }
31-
ink_prelude = { version = "3.0.0-rc9", path = "../../prelude/" }
32-
ink_storage = { version = "3.0.0-rc9", path = ".." }
28+
ink_env = { version = "3.0.0", path = "../../env" }
29+
ink_primitives = { version = "3.0.0", path = "../../primitives" }
30+
ink_metadata = { version = "3.0.0", path = "../../metadata" }
31+
ink_prelude = { version = "3.0.0", path = "../../prelude/" }
32+
ink_storage = { version = "3.0.0", path = ".." }

examples/contract-terminate/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
[package]
22
name = "contract_terminate"
3-
version = "3.0.0-rc9"
3+
version = "3.0.0"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66

77
[dependencies]
8-
ink_primitives = { version = "3.0.0-rc9", path = "../../crates/primitives", default-features = false }
9-
ink_metadata = { version = "3.0.0-rc9", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
10-
ink_env = { version = "3.0.0-rc9", path = "../../crates/env", default-features = false }
11-
ink_storage = { version = "3.0.0-rc9", path = "../../crates/storage", default-features = false }
12-
ink_lang = { version = "3.0.0-rc9", path = "../../crates/lang", default-features = false }
8+
ink_primitives = { version = "3.0.0", path = "../../crates/primitives", default-features = false }
9+
ink_metadata = { version = "3.0.0", path = "../../crates/metadata", default-features = false, features = ["derive"], optional = true }
10+
ink_env = { version = "3.0.0", path = "../../crates/env", default-features = false }
11+
ink_storage = { version = "3.0.0", path = "../../crates/storage", default-features = false }
12+
ink_lang = { version = "3.0.0", path = "../../crates/lang", default-features = false }
1313

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

0 commit comments

Comments
 (0)