From 3fc4f0c51ccaf00d4bb5aed32f024fed4ff66eac Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 14 Feb 2023 11:14:00 +0000 Subject: [PATCH 1/8] v2.0.0 --- crates/build/Cargo.toml | 4 ++-- crates/cargo-contract/Cargo.toml | 8 ++++---- crates/metadata/Cargo.toml | 2 +- crates/transcode/Cargo.toml | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/crates/build/Cargo.toml b/crates/build/Cargo.toml index 2a9ba7cff..4a78d5bb2 100644 --- a/crates/build/Cargo.toml +++ b/crates/build/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "contract-build" -version = "2.0.0-rc.1" +version = "2.0.0" authors = ["Parity Technologies "] edition = "2021" @@ -36,7 +36,7 @@ wasm-opt = "0.111.0" which = "4.4.0" zip = { version = "0.6.4", default-features = false } -contract-metadata = { version = "2.0.0-rc.1", path = "../metadata" } +contract-metadata = { version = "2.0.0", path = "../metadata" } [build-dependencies] anyhow = "1.0.69" diff --git a/crates/cargo-contract/Cargo.toml b/crates/cargo-contract/Cargo.toml index ec3c652d8..78097ff75 100644 --- a/crates/cargo-contract/Cargo.toml +++ b/crates/cargo-contract/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-contract" -version = "2.0.0-rc.1" +version = "2.0.0" authors = ["Parity Technologies "] build = "build.rs" edition = "2021" @@ -18,9 +18,9 @@ include = [ ] [dependencies] -contract-build = { version = "2.0.0-rc.1", path = "../build" } -contract-metadata = { version = "2.0.0-rc.1", path = "../metadata" } -contract-transcode = { version = "2.0.0-rc.1", path = "../transcode" } +contract-build = { version = "2.0.0", path = "../build" } +contract-metadata = { version = "2.0.0", path = "../metadata" } +contract-transcode = { version = "2.0.0", path = "../transcode" } anyhow = "1.0.69" clap = { version = "4.1.4", features = ["derive", "env"] } diff --git a/crates/metadata/Cargo.toml b/crates/metadata/Cargo.toml index f5ad4fdc2..b60a51e81 100644 --- a/crates/metadata/Cargo.toml +++ b/crates/metadata/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "contract-metadata" -version = "2.0.0-rc.1" +version = "2.0.0" authors = ["Parity Technologies "] edition = "2021" diff --git a/crates/transcode/Cargo.toml b/crates/transcode/Cargo.toml index cf18d03b6..b1b6f79bf 100644 --- a/crates/transcode/Cargo.toml +++ b/crates/transcode/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "contract-transcode" -version = "2.0.0-rc.1" +version = "2.0.0" authors = ["Parity Technologies "] edition = "2021" @@ -18,7 +18,7 @@ path = "src/lib.rs" [dependencies] anyhow = "1.0.69" -contract-metadata = { version = "2.0.0-rc.1", path = "../metadata" } +contract-metadata = { version = "2.0.0", path = "../metadata" } escape8259 = "0.5.2" hex = "0.4.3" indexmap = "1.9.2" From 7d15f48b66ca9919b2e719eb87b88f3758ce2087 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 14 Feb 2023 11:14:40 +0000 Subject: [PATCH 2/8] v2.0.0 --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b69ef8879..e0cf39938 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -552,7 +552,7 @@ dependencies = [ [[package]] name = "cargo-contract" -version = "2.0.0-rc.1" +version = "2.0.0" dependencies = [ "anyhow", "assert_cmd", @@ -721,7 +721,7 @@ dependencies = [ [[package]] name = "contract-build" -version = "2.0.0-rc.1" +version = "2.0.0" dependencies = [ "anyhow", "blake2", @@ -752,7 +752,7 @@ dependencies = [ [[package]] name = "contract-metadata" -version = "2.0.0-rc.1" +version = "2.0.0" dependencies = [ "anyhow", "impl-serde", @@ -765,7 +765,7 @@ dependencies = [ [[package]] name = "contract-transcode" -version = "2.0.0-rc.1" +version = "2.0.0" dependencies = [ "anyhow", "assert_matches", From 44ad76a0d2f0876c58feefb6e1844a1dd7e10907 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 14 Feb 2023 11:23:43 +0000 Subject: [PATCH 3/8] CHANGELOG.md --- CHANGELOG.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 29f129858..92ec66b3e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,12 +4,20 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [Unreleased] +## [2.0.0] + +Major release compatible with `ink! 4.0.0`. For all changes since `1.5` see the notes for +all the `2.0.0-*` pre-releases below. + ### Changed - Rename `metadata.json` to `{contract_name}.json` - [#952](https://github.com/paritytech/cargo-contract/pull/952) +- Do not postprocess or generate metadata if contract unchanged [#964](https://github.com/paritytech/cargo-contract/pull/964) +- Update `subxt` and substrate dependencies [#968](https://github.com/paritytech/cargo-contract/pull/968) ### Fixed - Respect the lockfile [#948](https://github.com/paritytech/cargo-contract/pull/948) +- Error if mismatching # of args for instantiate/call [#966](https://github.com/paritytech/cargo-contract/pull/966) +- Pretty-print call dry-run return data [#967](https://github.com/paritytech/cargo-contract/pull/967) ### Removed - Remove the `test` command [#958](https://github.com/paritytech/cargo-contract/pull/958) From e2464c7d0085d3c25a17c88370d4bf0667ef950f Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 14 Feb 2023 11:43:07 +0000 Subject: [PATCH 4/8] Aggregate all changes since `1.5` --- CHANGELOG.md | 42 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92ec66b3e..05bfc29b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,15 +6,53 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [2.0.0] -Major release compatible with `ink! 4.0.0`. For all changes since `1.5` see the notes for -all the `2.0.0-*` pre-releases below. +Major release compatible with `ink! 4.0.0`. All the changes in aggregate since `1.5`: + +### Added +- Add support for ink!'s `version` metadata field - [#641](https://github.com/paritytech/cargo-contract/pull/641) +- Add Rust specific build info to metadata - [#680](https://github.com/paritytech/cargo-contract/pull/680) +- Log code hash if contract is already uploaded - [#805](https://github.com/paritytech/cargo-contract/pull/805) ### Changed +- Build contracts and dylint driver with stable - [#698](https://github.com/paritytech/cargo-contract/pull/698) +- Compile dylints when compiling the contract - [#703](https://github.com/paritytech/cargo-contract/pull/703) +- Move transcode example to doc test, add helper method - [#705](https://github.com/paritytech/cargo-contract/pull/705) + - Note that alongside this PR we released [`contract-transcode@0.2.0`](https://crates.io/crates/contract-transcode/0.2.0) +- Replace custom RPCs by `state_call` - [#701](https://github.com/paritytech/cargo-contract/pull/701) +- Removed requirement to install binaryen. The `wasm-opt` tool is now compiled into `cargo-contract` - [#766](https://github.com/paritytech/cargo-contract/pull/766). +- Make linting opt in with `--lint` - [#799](https://github.com/paritytech/cargo-contract/pull/799) +- Update to weights v2 - [#809](https://github.com/paritytech/cargo-contract/pull/809) +- Update validation for renamed FFI functions - [#816](https://github.com/paritytech/cargo-contract/pull/816) +- Denominated units for balances in events - [#750](https://github.com/paritytech/cargo-contract/pull/750) +- Upgrade wasm-opt to 0.110.2 - [#802](https://github.com/paritytech/cargo-contract/pull/802) +- Pass `--features` through to `cargo` - [#853](https://github.com/paritytech/cargo-contract/pull/853/files) +- Remove rust toolchain channel check - [#848](https://github.com/paritytech/cargo-contract/pull/848/files) +- Bump minimum requirement of `scale-info` in template to `2.3` - [#847](https://github.com/paritytech/cargo-contract/pull/847/files) +- Remove `unstable` module check, add `--skip-wasm-validation` - [#846](https://github.com/paritytech/cargo-contract/pull/846/files) +- Extract lib for invoking contract build - [#787](https://github.com/paritytech/cargo-contract/pull/787/files) +- Upgrade wasm-opt to 0.111.0 [#888](https://github.com/paritytech/cargo-contract/pull/888) +- Enable `wasm-opt` MVP features only [#891](https://github.com/paritytech/cargo-contract/pull/891) +- Require env_type transcoders to be Send + Sync [#879](https://github.com/paritytech/cargo-contract/pull/879) +- Extrinsics: allow specifying contract artifact directly [#893](https://github.com/paritytech/cargo-contract/pull/893) +- Upgrade `subxt` to `0.26` [#924](https://github.com/paritytech/cargo-contract/pull/924) +- Display detailed cause of an error [#931](https://github.com/paritytech/cargo-contract/pull/931) +- Use package name instead of lib name, default to "rlib" [#929](https://github.com/paritytech/cargo-contract/pull/929) - Rename `metadata.json` to `{contract_name}.json` - [#952](https://github.com/paritytech/cargo-contract/pull/952) - Do not postprocess or generate metadata if contract unchanged [#964](https://github.com/paritytech/cargo-contract/pull/964) - Update `subxt` and substrate dependencies [#968](https://github.com/paritytech/cargo-contract/pull/968) ### Fixed +- Fix `tracing_subscriber` filtering - [#702](https://github.com/paritytech/cargo-contract/pull/702) +- Sync version of transcode crate to fix metadata parsing - [#723](https://githubcom/paritytech/cargo-contract/pull/723) +- Fix numbering of steps during `build` - [#715](https://github.com/paritytech/cargo-contract/pull/715) +- Skip linting if running building in --offline mode - [#737](https://github.com/paritytech/cargo-contract/pull/737) +- Fix storage deposit limit encoding - [#751](https://github.com/paritytech/cargo-contract/pull/751) +- Rewrite relative path for `dev-dependency` - [#760](https://github.com/paritytech/cargo-contract/pull/760) +- Log failure instead of failing when decoding an event - [#769](https://github.com/paritytech/cargo-contract/pull/769) +- Fixed having non-JSON output after calling `instantiate` with `--output-json` - [#839](https://github.com/paritytech/cargo-contract/pull/839/files) +- add `-C target-cpu=mvp` rust flag to build command - [#838](https://github.com/paritytech/cargo-contract/pull/838/files) +- Miscellaneous extrinsics display improvements [#916](https://github.com/paritytech/cargo-contract/pull/916) +- Fix decoding of `LangError` [#919](https://github.com/paritytech/cargo-contract/pull/919) - Respect the lockfile [#948](https://github.com/paritytech/cargo-contract/pull/948) - Error if mismatching # of args for instantiate/call [#966](https://github.com/paritytech/cargo-contract/pull/966) - Pretty-print call dry-run return data [#967](https://github.com/paritytech/cargo-contract/pull/967) From 861a36c7d333e1459e10a2d42db88556bb0b92c3 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Tue, 14 Feb 2023 12:15:29 +0000 Subject: [PATCH 5/8] Move to removed --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05bfc29b7..fba125434 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,7 +26,6 @@ Major release compatible with `ink! 4.0.0`. All the changes in aggregate since ` - Denominated units for balances in events - [#750](https://github.com/paritytech/cargo-contract/pull/750) - Upgrade wasm-opt to 0.110.2 - [#802](https://github.com/paritytech/cargo-contract/pull/802) - Pass `--features` through to `cargo` - [#853](https://github.com/paritytech/cargo-contract/pull/853/files) -- Remove rust toolchain channel check - [#848](https://github.com/paritytech/cargo-contract/pull/848/files) - Bump minimum requirement of `scale-info` in template to `2.3` - [#847](https://github.com/paritytech/cargo-contract/pull/847/files) - Remove `unstable` module check, add `--skip-wasm-validation` - [#846](https://github.com/paritytech/cargo-contract/pull/846/files) - Extract lib for invoking contract build - [#787](https://github.com/paritytech/cargo-contract/pull/787/files) @@ -59,6 +58,7 @@ Major release compatible with `ink! 4.0.0`. All the changes in aggregate since ` ### Removed - Remove the `test` command [#958](https://github.com/paritytech/cargo-contract/pull/958) +- Remove rust toolchain channel check - [#848](https://github.com/paritytech/cargo-contract/pull/848/files) ## [2.0.0-rc.1] - 2023-02-01 Second release candidate compatible with `ink! 4.0.0-rc`. From 56e2b581b04e01f2365ee917e87ce92da46d25d4 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 15 Feb 2023 11:50:34 +0000 Subject: [PATCH 6/8] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 05741c43f..6341a0e68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Major release compatible with `ink! 4.0.0`. All the changes in aggregate since ` - Add support for ink!'s `version` metadata field - [#641](https://github.com/paritytech/cargo-contract/pull/641) - Add Rust specific build info to metadata - [#680](https://github.com/paritytech/cargo-contract/pull/680) - Log code hash if contract is already uploaded - [#805](https://github.com/paritytech/cargo-contract/pull/805) +- Add remove command - [#837](https://github.com/paritytech/cargo-contract/pull/837) ### Changed - Build contracts and dylint driver with stable - [#698](https://github.com/paritytech/cargo-contract/pull/698) From 32c62b9d16c163cdcc53231f520262611662cfa9 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 15 Feb 2023 16:51:35 +0000 Subject: [PATCH 7/8] Use released `ink!` `4.0` crates --- crates/transcode/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/transcode/Cargo.toml b/crates/transcode/Cargo.toml index b1b6f79bf..561ad6ec5 100644 --- a/crates/transcode/Cargo.toml +++ b/crates/transcode/Cargo.toml @@ -22,8 +22,8 @@ contract-metadata = { version = "2.0.0", path = "../metadata" } escape8259 = "0.5.2" hex = "0.4.3" indexmap = "1.9.2" -ink_env = "4.0.0-rc" -ink_metadata = "4.0.0-rc" +ink_env = "4.0.0" +ink_metadata = "4.0.0" itertools = "0.10.5" tracing = "0.1.37" nom = "7.1.3" From 2d20b7cb54de7d4d3c60e220358fa61e96241cdd Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 15 Feb 2023 16:52:22 +0000 Subject: [PATCH 8/8] Cargo.lock --- Cargo.lock | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e0cf39938..9a0754bc8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -413,7 +413,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "822462c1e7b17b31961798a6874b36daea6818e99e0cb7d3b7b0fa3c477751c3" dependencies = [ "borsh-derive", - "hashbrown 0.12.3", + "hashbrown 0.13.2", ] [[package]] @@ -1509,6 +1509,9 @@ name = "hashbrown" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.3", +] [[package]] name = "heck" @@ -1764,9 +1767,9 @@ dependencies = [ [[package]] name = "ink_allocator" -version = "4.0.0-rc" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11052c064f6177fe58103f97cd544088a2fd2ef4d4a3c200dd06a1c139dbd0c9" +checksum = "5323d4f43900266f2d5462cbe2a96d4182d634da0cfc1078d26c74d4117e0ce9" dependencies = [ "cfg-if", ] @@ -1797,9 +1800,9 @@ dependencies = [ [[package]] name = "ink_engine" -version = "4.0.0-rc" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abd293e256cb0b2577fd3eac036f9c308efee5d5c80015a11008c40251a1b2f3" +checksum = "de001b0907475ab10211093569d8b92726ef7a37d04b6e90c8a2864fbe14d050" dependencies = [ "blake2", "derive_more", @@ -1812,9 +1815,9 @@ dependencies = [ [[package]] name = "ink_env" -version = "4.0.0-rc" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aea2051c33b1cb8bce136b8464a4b75ee57b343c4407e07db3adbb7b2bf24a26" +checksum = "b0354567725e4f635a5c5694e4e4cac105e3e78cefd948ca5ab6cc92ea3d8231" dependencies = [ "arrayref", "blake2", @@ -1869,9 +1872,9 @@ dependencies = [ [[package]] name = "ink_metadata" -version = "4.0.0-rc" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e35b68ef9563f20a8494068f95a1e66648fc1e73187ce611f3b8df3c9b6d6bc" +checksum = "9dfb4d5448446656ebf83d800c06effeffc063967ef5986d7d1a277e3e507dae" dependencies = [ "derive_more", "impl-serde", @@ -1883,18 +1886,18 @@ dependencies = [ [[package]] name = "ink_prelude" -version = "4.0.0-rc" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e61cefa8cd1ed242647d59e568b55c5a9dcfc5d9d656def37c5923e81662fcbe" +checksum = "c2626fb0c922f923965774cdd8cddeaaa204931d0ed19e0bf43702b033924173" dependencies = [ "cfg-if", ] [[package]] name = "ink_primitives" -version = "4.0.0-rc" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2561d0e37396960a562be695ca4cb373469b78a47056c625b1aa877c6e1a66ac" +checksum = "91066af898fe4c59b2ed0aca678238928b551dc75f5284bf1422e9f1bb6b2204" dependencies = [ "derive_more", "ink_prelude", @@ -1923,9 +1926,9 @@ dependencies = [ [[package]] name = "ink_storage_traits" -version = "4.0.0-rc" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9efba89e9fb390228a0c0bff27320bf54f293ac179b4f8700acbb0f765041723" +checksum = "da15ceaef6bdbece3e8b6338df899ef94e3921d03387fa941af8df3b38803523" dependencies = [ "ink_metadata", "ink_prelude",