Skip to content

Commit 6f2beed

Browse files
ascjonescmichi
andauthored
Release v4.0.0 alpha.2 (#1408)
* Bump versions * Update CHANGELOG * Add Storage Rework detail * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md Co-authored-by: Michael Müller <[email protected]> * Update CHANGELOG.md Co-authored-by: Michael Müller <[email protected]> * Add reference to examples * Update CHANGELOG.md * Add version to ink_primitives Co-authored-by: Michael Müller <[email protected]>
1 parent b04f097 commit 6f2beed

File tree

38 files changed

+83
-67
lines changed

38 files changed

+83
-67
lines changed

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## Version 4.0.0-alpha.2
10+
911
### Breaking Changes
1012

1113
#### New `ink` crate
@@ -19,6 +21,16 @@ crate. All existing sub-crates are reexported and should be used via the new `in
1921
- Remove the commonly used `use ink_lang as ink` idiom.
2022
- Replace all usages of individual crates with reexports, e.g. `ink_env``ink::env`.
2123

24+
#### Storage Rework
25+
[#1331](https://github.com/paritytech/ink/pull/1331) changes the way `ink!` works with contract storage. Storage keys
26+
are generated at compile-time, and user facing abstractions which determine how contract data is laid out in storage
27+
have changed.
28+
29+
##### Migration
30+
- Initialize `Mapping` fields with `Mapping::default()` instead of `ink_lang::utils::initialize_contract` in
31+
constructors. See [`erc20`](./examples/erc20/lib.rs) and other examples which use a `Mapping`.
32+
- Remove `SpreadAllocate`, `SpreadLayout` and `PackedLayout` implementations.
33+
2234
#### Removal of `wee-alloc` support
2335
ink! uses a bump allocator by default, additionally we supported another allocator (`wee-alloc`)
2436
through a feature flag. `wee-alloc` is no longer maintained and we removed support for it.
@@ -29,6 +41,10 @@ through a feature flag. `wee-alloc` is no longer maintained and we removed suppo
2941

3042
### Fixed
3143
- Trim single whitespace prefix in the metadata `docs` field ‒ [#1385](https://github.com/paritytech/ink/pull/1385)
44+
- Allow pay_with_call to take multiple arguments ‒ [#1401](https://github.com/paritytech/ink/pull/1401)
45+
46+
### Added
47+
- Add `ink_env::pay_with_call!` helper macro for off-chain emulation of sending payments with contract message calls ‒ [#1379](https://github.com/paritytech/ink/pull/1379)
3248

3349
### Removed
3450
- Remove `wee-alloc`[#1403](https://github.com/paritytech/ink/pull/1403)

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 = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

crates/engine/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_engine"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>", "Michael Müller <[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_primitives = { path = "../../crates/primitives", default-features = false }
18+
ink_primitives = { version = "4.0.0-alpha.2", path = "../../crates/primitives", default-features = false }
1919
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
2020
derive_more = { version = "0.99", default-features = false, features = ["from", "display"] }
2121

crates/env/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_env"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
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_metadata = { version = "4.0.0-alpha.1", path = "../metadata", default-features = false, features = ["derive"], optional = true }
19-
ink_allocator = { version = "4.0.0-alpha.1", path = "../allocator", default-features = false }
20-
ink_storage_traits = { version = "4.0.0-alpha.1", path = "../storage/traits", default-features = false }
21-
ink_prelude = { version = "4.0.0-alpha.1", path = "../prelude", default-features = false }
22-
ink_primitives = { version = "4.0.0-alpha.1", path = "../primitives", default-features = false }
18+
ink_metadata = { version = "4.0.0-alpha.2", path = "../metadata", default-features = false, features = ["derive"], optional = true }
19+
ink_allocator = { version = "4.0.0-alpha.2", path = "../allocator", default-features = false }
20+
ink_storage_traits = { version = "4.0.0-alpha.2", path = "../storage/traits", default-features = false }
21+
ink_prelude = { version = "4.0.0-alpha.2", path = "../prelude", default-features = false }
22+
ink_primitives = { version = "4.0.0-alpha.2", path = "../primitives", 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 @@ static_assertions = "1.1"
3333
rlibc = "1"
3434

3535
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
36-
ink_engine = { version = "4.0.0-alpha.1", path = "../engine/", optional = true }
36+
ink_engine = { version = "4.0.0-alpha.2", path = "../engine/", optional = true }
3737

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

crates/ink/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"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

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

1717
[dependencies]
18-
ink_env = { version = "4.0.0-alpha.1", path = "../env", default-features = false }
19-
ink_storage = { version = "4.0.0-alpha.1", path = "../storage", default-features = false }
20-
ink_primitives = { version = "4.0.0-alpha.1", path = "../primitives", default-features = false }
21-
ink_metadata = { version = "4.0.0-alpha.1", path = "../metadata", default-features = false, optional = true }
22-
ink_prelude = { version = "4.0.0-alpha.1", path = "../prelude", default-features = false }
23-
ink_macro = { version = "4.0.0-alpha.1", path = "macro", default-features = false }
18+
ink_env = { version = "4.0.0-alpha.2", path = "../env", default-features = false }
19+
ink_storage = { version = "4.0.0-alpha.2", path = "../storage", default-features = false }
20+
ink_primitives = { version = "4.0.0-alpha.2", path = "../primitives", default-features = false }
21+
ink_metadata = { version = "4.0.0-alpha.2", path = "../metadata", default-features = false, optional = true }
22+
ink_prelude = { version = "4.0.0-alpha.2", path = "../prelude", default-features = false }
23+
ink_macro = { version = "4.0.0-alpha.2", path = "macro", default-features = false }
2424

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

crates/ink/codegen/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_codegen"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

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

2020
[dependencies]
21-
ink_primitives = { version = "4.0.0-alpha.1", path = "../../primitives" }
22-
ir = { version = "4.0.0-alpha.1", package = "ink_ir", path = "../ir", default-features = false }
21+
ink_primitives = { version = "4.0.0-alpha.2", path = "../../primitives" }
22+
ir = { version = "4.0.0-alpha.2", package = "ink_ir", path = "../ir", default-features = false }
2323
quote = "1"
2424
syn = { version = "1.0", features = ["parsing", "full", "extra-traits"] }
2525
proc-macro2 = "1.0"

crates/ink/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_ir"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

crates/ink/macro/Cargo.toml

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

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

1717
[dependencies]
18-
ink_ir = { version = "4.0.0-alpha.1", path = "../ir", default-features = false }
19-
ink_codegen = { version = "4.0.0-alpha.1", path = "../codegen", default-features = false }
20-
ink_primitives = { version = "4.0.0-alpha.1", path = "../../primitives/", default-features = false }
18+
ink_ir = { version = "4.0.0-alpha.2", path = "../ir", default-features = false }
19+
ink_codegen = { version = "4.0.0-alpha.2", path = "../codegen", default-features = false }
20+
ink_primitives = { version = "4.0.0-alpha.2", path = "../../primitives/", default-features = false }
2121

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

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 = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
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 = "4.0.0-alpha.1", path = "../prelude/", default-features = false }
19-
ink_primitives = { version = "4.0.0-alpha.1", path = "../primitives/", default-features = false }
18+
ink_prelude = { version = "4.0.0-alpha.2", path = "../prelude/", default-features = false }
19+
ink_primitives = { version = "4.0.0-alpha.2", path = "../primitives/", default-features = false }
2020

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

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 = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
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 = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>", "Robin Freyler <[email protected]>"]
55
edition = "2021"
66

@@ -16,7 +16,7 @@ include = ["/Cargo.toml", "src/**/*.rs", "/README.md", "/LICENSE"]
1616

1717
[dependencies]
1818
derive_more = { version = "0.99", default-features = false, features = ["from", "display"] }
19-
ink_prelude = { version = "4.0.0-alpha.1", path = "../prelude/", default-features = false }
19+
ink_prelude = { version = "4.0.0-alpha.2", path = "../prelude/", default-features = false }
2020
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
2121
scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }
2222
xxhash-rust = { version = "0.8", features = ["const_xxh32"] }

crates/storage/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"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
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 = "4.0.0-alpha.1", path = "../env/", default-features = false }
19-
ink_metadata = { version = "4.0.0-alpha.1", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
20-
ink_primitives = { version = "4.0.0-alpha.1", path = "../primitives/", default-features = false }
21-
ink_storage_traits = { version = "4.0.0-alpha.1", path = "traits", default-features = false }
22-
ink_prelude = { version = "4.0.0-alpha.1", path = "../prelude/", default-features = false }
18+
ink_env = { version = "4.0.0-alpha.2", path = "../env/", default-features = false }
19+
ink_metadata = { version = "4.0.0-alpha.2", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
20+
ink_primitives = { version = "4.0.0-alpha.2", path = "../primitives/", default-features = false }
21+
ink_storage_traits = { version = "4.0.0-alpha.2", path = "traits", default-features = false }
22+
ink_prelude = { version = "4.0.0-alpha.2", 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"] }

crates/storage/traits/Cargo.toml

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

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

1717
[dependencies]
18-
ink_metadata = { version = "4.0.0-alpha.1", path = "../../metadata", default-features = false, features = ["derive"], optional = true }
19-
ink_primitives = { version = "4.0.0-alpha.1", path = "../../primitives", default-features = false }
20-
ink_prelude = { version = "4.0.0-alpha.1", path = "../../prelude", default-features = false }
18+
ink_metadata = { version = "4.0.0-alpha.2", path = "../../metadata", default-features = false, features = ["derive"], optional = true }
19+
ink_primitives = { version = "4.0.0-alpha.2", path = "../../primitives", default-features = false }
20+
ink_prelude = { version = "4.0.0-alpha.2", path = "../../prelude", default-features = false }
2121
scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive", "full"] }
2222
scale-info = { version = "2", default-features = false, features = ["derive"], optional = true }
2323
syn = { version = "1", features = ["full"] }
2424

2525
[dev-dependencies]
2626
paste = "1.0"
27-
ink_env = { version = "4.0.0-alpha.1", path = "../../env" }
27+
ink_env = { version = "4.0.0-alpha.2", path = "../../env" }
2828

2929
[features]
3030
default = ["std"]

examples/contract-terminate/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "contract_terminate"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66
publish = false

examples/contract-transfer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "contract_transfer"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66
publish = false

examples/delegator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "delegator"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66
publish = false

examples/delegator/accumulator/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "accumulator"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66

examples/delegator/adder/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "adder"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66

examples/delegator/subber/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "subber"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66

examples/dns/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dns"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66
publish = false

examples/erc1155/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "erc1155"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66
publish = false

examples/erc20/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "erc20"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66
publish = false

examples/erc721/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "erc721"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66
publish = false

examples/flipper/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "flipper"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66
publish = false

examples/incrementer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "incrementer"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66
publish = false

examples/mother/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "mother"
33
description = "Mother of all contracts"
4-
version = "4.0.0-alpha.1"
4+
version = "4.0.0-alpha.2"
55
authors = ["Parity Technologies <[email protected]>"]
66
edition = "2021"
77
publish = false

examples/multisig/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "multisig"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66
publish = false

examples/payment-channel/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "payment_channel"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66
publish = false

examples/psp22-extension/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "psp22_extension"
3-
version = "4.0.0-alpha.1"
3+
version = "4.0.0-alpha.2"
44
authors = ["Parity Technologies <[email protected]>"]
55
edition = "2021"
66
publish = false

0 commit comments

Comments
 (0)