From 551b67bc0c37f6d91ff38d1587a735ccd9b4c6cc Mon Sep 17 00:00:00 2001 From: Ivan Leshchenko <128095804+IvanLeshchenko727@users.noreply.github.com> Date: Fri, 21 Jul 2023 13:22:33 +0300 Subject: [PATCH] Polkadot v1.0.0 --- Cargo.toml | 16 +++---- .../rand-extension/chain-extension/Cargo.toml | 2 +- flake.lock | 42 +++++++++++++------ flake.nix | 4 +- .../ui/ink/mock/fail_incorrect_inputs.stderr | 2 +- tests/ui/ink/mock/fail_random_trait.stderr | 1 - .../error/fail_duplicated_ret_val.stderr | 24 +++++++++++ .../error/fail_enforced_ret_val.stderr | 24 +++++++++++ 8 files changed, 90 insertions(+), 25 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index acb53a1..d53da87 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,20 +29,20 @@ scale-info = { version = "2.3", default-features = false, features = ["derive"] obce-macro = { path = "macro", default-features = false } # Substrate deps -sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false, optional = true } -sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false, optional = true } -sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false, optional = true } -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false, optional = true } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false, optional = true } -pallet-contracts = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false, optional = true } +sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } +sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } +sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } +pallet-contracts = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } # Ink deps ink = { version = "4.2.0", default-features = false, optional = true } ink_engine = { version = "4.2.0", default-features = false, optional = true } [dev-dependencies] -frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false, features = ["std"] } -frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false, features = ["std"] } +frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, features = ["std"] } +frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, features = ["std"] } ink = { version = "4.2.0", default-features = false, features = ["std"] } trybuild = "1.0" diff --git a/examples/rand-extension/chain-extension/Cargo.toml b/examples/rand-extension/chain-extension/Cargo.toml index 3c4b790..c6ec8f7 100644 --- a/examples/rand-extension/chain-extension/Cargo.toml +++ b/examples/rand-extension/chain-extension/Cargo.toml @@ -11,7 +11,7 @@ scale-info = { version = "2", default-features = false, features = ["derive"] } ink = { version = "4.2.0", default-features = false, optional = true } -pallet-insecure-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", default-features = false, optional = true } +pallet-insecure-randomness-collective-flip = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v1.0.0", default-features = false, optional = true } [features] default = ["std"] diff --git a/flake.lock b/flake.lock index 2967bcc..e3c31e9 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ "rust-analyzer-src": "rust-analyzer-src" }, "locked": { - "lastModified": 1673677311, - "narHash": "sha256-V7vEMy7vzvD9wyz/822G8rLV+3jkum5EsfAIy9gds1I=", + "lastModified": 1689920490, + "narHash": "sha256-u/mglflFeXa2bUlN6KJmSyKbibpIhTiPgyW1PJ1rC6E=", "owner": "nix-community", "repo": "fenix", - "rev": "39e4f1d72376620d76fefe4cdf52a448f12c90aa", + "rev": "efa52586ba0ba96e06de0c549ee2f614ac928be7", "type": "github" }, "original": { @@ -22,12 +22,15 @@ } }, "flake-utils": { + "inputs": { + "systems": "systems" + }, "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", "owner": "numtide", "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", "type": "github" }, "original": { @@ -38,11 +41,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1672953546, - "narHash": "sha256-oz757DnJ1ITvwyTovuwG3l9cX6j9j6/DH9eH+cXFJmc=", + "lastModified": 1689850295, + "narHash": "sha256-fUYf6WdQlhd2H+3aR8jST5dhFH1d0eE22aes8fNIfyk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a518c77148585023ff56022f09c4b2c418a51ef5", + "rev": "5df4d78d54f7a34e9ea1f84a22b4fd9baebc68d0", "type": "github" }, "original": { @@ -62,11 +65,11 @@ "rust-analyzer-src": { "flake": false, "locked": { - "lastModified": 1673611648, - "narHash": "sha256-Qptnat6M6twwJiXSMt0cJlZdZreExeyzY7cdCG0LicM=", + "lastModified": 1689862834, + "narHash": "sha256-eoFdQ3CbzSN8xCbQEWfHlKwDS+FLZZDFrIwOvK/DDCQ=", "owner": "rust-lang", "repo": "rust-analyzer", - "rev": "a119352adab65d0cab25c13ae0fd7676bed7100f", + "rev": "994f4f6e2e45bef4bebeeabee4e3d67b87727b91", "type": "github" }, "original": { @@ -75,6 +78,21 @@ "repo": "rust-analyzer", "type": "github" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 2cbe014..bbfcee8 100644 --- a/flake.nix +++ b/flake.nix @@ -34,14 +34,14 @@ }; rustToolchain = with fenix.packages.${system}; combine [ - (complete.withComponents [ + (stable.withComponents [ "rustc" "cargo" "clippy" "rustfmt" "rust-src" ]) - targets."wasm32-unknown-unknown".latest.rust-std + targets."wasm32-unknown-unknown".stable.rust-std ]; in { devShells.default = pkgs.mkShell { diff --git a/tests/ui/ink/mock/fail_incorrect_inputs.stderr b/tests/ui/ink/mock/fail_incorrect_inputs.stderr index a700de6..3bbb79a 100644 --- a/tests/ui/ink/mock/fail_incorrect_inputs.stderr +++ b/tests/ui/ink/mock/fail_incorrect_inputs.stderr @@ -7,7 +7,7 @@ error[E0308]: mismatched types | expected `u32`, found `()` | arguments to this function are incorrect | -note: associated function defined here +note: method defined here --> tests/ui/ink/mock/fail_incorrect_inputs.rs:8:8 | 8 | fn method(&self, val: u32) -> u64 { diff --git a/tests/ui/ink/mock/fail_random_trait.stderr b/tests/ui/ink/mock/fail_random_trait.stderr index b8169c7..f91ef0a 100644 --- a/tests/ui/ink/mock/fail_random_trait.stderr +++ b/tests/ui/ink/mock/fail_random_trait.stderr @@ -13,5 +13,4 @@ error[E0277]: the trait bound `(dyn Trait + 'static): ExtensionDescription` is n | ^^^^^^^^^^^^^ the trait `ExtensionDescription` is not implemented for `(dyn Trait + 'static)` | = help: see issue #48214 - = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable = note: this error originates in the attribute macro `obce::mock` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/substrate/error/fail_duplicated_ret_val.stderr b/tests/ui/substrate/error/fail_duplicated_ret_val.stderr index 55b30b2..5d49482 100644 --- a/tests/ui/substrate/error/fail_duplicated_ret_val.stderr +++ b/tests/ui/substrate/error/fail_duplicated_ret_val.stderr @@ -9,9 +9,33 @@ error[E0433]: failed to resolve: use of undeclared type `Error` | 16 | assert_encode_holds(Error::One); | ^^^^^ use of undeclared type `Error` + | +help: consider importing one of these items + | +1 + use core::error::Error; + | +1 + use core::fmt::Error; + | +1 + use frame_support::dispatch::fmt::Error; + | +1 + use frame_system::Error; + | + and 5 other candidates error[E0433]: failed to resolve: use of undeclared type `Error` --> tests/ui/substrate/error/fail_duplicated_ret_val.rs:17:27 | 17 | assert_try_from_holds(Error::One); | ^^^^^ use of undeclared type `Error` + | +help: consider importing one of these items + | +1 + use core::error::Error; + | +1 + use core::fmt::Error; + | +1 + use frame_support::dispatch::fmt::Error; + | +1 + use frame_system::Error; + | + and 5 other candidates diff --git a/tests/ui/substrate/error/fail_enforced_ret_val.stderr b/tests/ui/substrate/error/fail_enforced_ret_val.stderr index 1b5b865..90f2048 100644 --- a/tests/ui/substrate/error/fail_enforced_ret_val.stderr +++ b/tests/ui/substrate/error/fail_enforced_ret_val.stderr @@ -9,9 +9,33 @@ error[E0433]: failed to resolve: use of undeclared type `Error` | 14 | assert_encode_holds(Error::One); | ^^^^^ use of undeclared type `Error` + | +help: consider importing one of these items + | +1 + use core::error::Error; + | +1 + use core::fmt::Error; + | +1 + use frame_support::dispatch::fmt::Error; + | +1 + use frame_system::Error; + | + and 5 other candidates error[E0433]: failed to resolve: use of undeclared type `Error` --> tests/ui/substrate/error/fail_enforced_ret_val.rs:15:27 | 15 | assert_try_from_holds(Error::One); | ^^^^^ use of undeclared type `Error` + | +help: consider importing one of these items + | +1 + use core::error::Error; + | +1 + use core::fmt::Error; + | +1 + use frame_support::dispatch::fmt::Error; + | +1 + use frame_system::Error; + | + and 5 other candidates