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 v4.0.0 alpha.2 #1408

Merged
merged 11 commits into from
Sep 21, 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
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## Version 4.0.0-alpha.2

### Breaking Changes

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

#### Storage Rework
[#1331](https://github.com/paritytech/ink/pull/1331) changes the way `ink!` works with contract storage. Storage keys
are generated at compile-time, and user facing abstractions which determine how contract data is laid out in storage
have changed.

##### Migration
- Initialize `Mapping` fields with `Mapping::default()` instead of `ink_lang::utils::initialize_contract` in
constructors. See [`erc20`](./examples/erc20/lib.rs) and other examples which use a `Mapping`.
- Remove `SpreadAllocate`, `SpreadLayout` and `PackedLayout` implementations.

#### Removal of `wee-alloc` support
ink! uses a bump allocator by default, additionally we supported another allocator (`wee-alloc`)
through a feature flag. `wee-alloc` is no longer maintained and we removed support for it.
Expand All @@ -29,6 +41,10 @@ through a feature flag. `wee-alloc` is no longer maintained and we removed suppo

### Fixed
- Trim single whitespace prefix in the metadata `docs` field ‒ [#1385](https://github.com/paritytech/ink/pull/1385)
- Allow pay_with_call to take multiple arguments ‒ [#1401](https://github.com/paritytech/ink/pull/1401)

### Added
- 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)

### Removed
- Remove `wee-alloc` ‒ [#1403](https://github.com/paritytech/ink/pull/1403)
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 = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

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

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

[dependencies]
ink_primitives = { path = "../../crates/primitives", default-features = false }
ink_primitives = { version = "4.0.0-alpha.2", path = "../../crates/primitives", 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 Down
14 changes: 7 additions & 7 deletions crates/env/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_env"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
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_metadata = { version = "4.0.0-alpha.1", path = "../metadata", default-features = false, features = ["derive"], optional = true }
ink_allocator = { version = "4.0.0-alpha.1", path = "../allocator", default-features = false }
ink_storage_traits = { version = "4.0.0-alpha.1", path = "../storage/traits", default-features = false }
ink_prelude = { version = "4.0.0-alpha.1", path = "../prelude", default-features = false }
ink_primitives = { version = "4.0.0-alpha.1", path = "../primitives", default-features = false }
ink_metadata = { version = "4.0.0-alpha.2", path = "../metadata", default-features = false, features = ["derive"], optional = true }
ink_allocator = { version = "4.0.0-alpha.2", path = "../allocator", default-features = false }
ink_storage_traits = { version = "4.0.0-alpha.2", path = "../storage/traits", default-features = false }
ink_prelude = { version = "4.0.0-alpha.2", path = "../prelude", default-features = false }
ink_primitives = { version = "4.0.0-alpha.2", path = "../primitives", 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 @@ static_assertions = "1.1"
rlibc = "1"

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

# Hashes for the off-chain environment.
sha2 = { version = "0.10", optional = true }
Expand Down
14 changes: 7 additions & 7 deletions crates/ink/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

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

[dependencies]
ink_env = { version = "4.0.0-alpha.1", path = "../env", default-features = false }
ink_storage = { version = "4.0.0-alpha.1", path = "../storage", default-features = false }
ink_primitives = { version = "4.0.0-alpha.1", path = "../primitives", default-features = false }
ink_metadata = { version = "4.0.0-alpha.1", path = "../metadata", default-features = false, optional = true }
ink_prelude = { version = "4.0.0-alpha.1", path = "../prelude", default-features = false }
ink_macro = { version = "4.0.0-alpha.1", path = "macro", default-features = false }
ink_env = { version = "4.0.0-alpha.2", path = "../env", default-features = false }
ink_storage = { version = "4.0.0-alpha.2", path = "../storage", default-features = false }
ink_primitives = { version = "4.0.0-alpha.2", path = "../primitives", default-features = false }
ink_metadata = { version = "4.0.0-alpha.2", path = "../metadata", default-features = false, optional = true }
ink_prelude = { version = "4.0.0-alpha.2", path = "../prelude", default-features = false }
ink_macro = { version = "4.0.0-alpha.2", 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"] }
Expand Down
6 changes: 3 additions & 3 deletions crates/ink/codegen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_codegen"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

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

[dependencies]
ink_primitives = { version = "4.0.0-alpha.1", path = "../../primitives" }
ir = { version = "4.0.0-alpha.1", package = "ink_ir", path = "../ir", default-features = false }
ink_primitives = { version = "4.0.0-alpha.2", path = "../../primitives" }
ir = { version = "4.0.0-alpha.2", package = "ink_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/ink/ir/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_ir"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

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

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

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

scale = { package = "parity-scale-codec", version = "3", default-features = false, features = ["derive"] }
syn = "1"
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 = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
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 = "4.0.0-alpha.1", path = "../prelude/", default-features = false }
ink_primitives = { version = "4.0.0-alpha.1", path = "../primitives/", default-features = false }
ink_prelude = { version = "4.0.0-alpha.2", path = "../prelude/", default-features = false }
ink_primitives = { version = "4.0.0-alpha.2", path = "../primitives/", default-features = false }

serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] }
impl-serde = "0.4.0"
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 = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
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 = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>", "Robin Freyler <robin@parity.io>"]
edition = "2021"

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

[dependencies]
derive_more = { version = "0.99", default-features = false, features = ["from", "display"] }
ink_prelude = { version = "4.0.0-alpha.1", path = "../prelude/", default-features = false }
ink_prelude = { version = "4.0.0-alpha.2", 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 }
xxhash-rust = { version = "0.8", features = ["const_xxh32"] }
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 = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
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 = "4.0.0-alpha.1", path = "../env/", default-features = false }
ink_metadata = { version = "4.0.0-alpha.1", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_primitives = { version = "4.0.0-alpha.1", path = "../primitives/", default-features = false }
ink_storage_traits = { version = "4.0.0-alpha.1", path = "traits", default-features = false }
ink_prelude = { version = "4.0.0-alpha.1", path = "../prelude/", default-features = false }
ink_env = { version = "4.0.0-alpha.2", path = "../env/", default-features = false }
ink_metadata = { version = "4.0.0-alpha.2", path = "../metadata/", default-features = false, features = ["derive"], optional = true }
ink_primitives = { version = "4.0.0-alpha.2", path = "../primitives/", default-features = false }
ink_storage_traits = { version = "4.0.0-alpha.2", path = "traits", default-features = false }
ink_prelude = { version = "4.0.0-alpha.2", 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 Down
10 changes: 5 additions & 5 deletions crates/storage/traits/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ink_storage_traits"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

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

[dependencies]
ink_metadata = { version = "4.0.0-alpha.1", path = "../../metadata", default-features = false, features = ["derive"], optional = true }
ink_primitives = { version = "4.0.0-alpha.1", path = "../../primitives", default-features = false }
ink_prelude = { version = "4.0.0-alpha.1", path = "../../prelude", default-features = false }
ink_metadata = { version = "4.0.0-alpha.2", path = "../../metadata", default-features = false, features = ["derive"], optional = true }
ink_primitives = { version = "4.0.0-alpha.2", path = "../../primitives", default-features = false }
ink_prelude = { version = "4.0.0-alpha.2", 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 }
syn = { version = "1", features = ["full"] }

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

[features]
default = ["std"]
Expand Down
2 changes: 1 addition & 1 deletion examples/contract-terminate/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "contract_terminate"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/contract-transfer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "contract_transfer"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/delegator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "delegator"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/delegator/accumulator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "accumulator"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/delegator/adder/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "adder"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/delegator/subber/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "subber"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"

Expand Down
2 changes: 1 addition & 1 deletion examples/dns/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dns"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/erc1155/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "erc1155"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/erc20/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "erc20"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/erc721/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "erc721"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/flipper/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "flipper"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/incrementer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "incrementer"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/mother/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "mother"
description = "Mother of all contracts"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/multisig/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "multisig"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/payment-channel/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "payment_channel"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
Expand Down
2 changes: 1 addition & 1 deletion examples/psp22-extension/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "psp22_extension"
version = "4.0.0-alpha.1"
version = "4.0.0-alpha.2"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
publish = false
Expand Down
Loading