From bfdb2b7f92a5848d48e0f9f895854448210feffa Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Mon, 13 Dec 2021 10:57:41 +0000 Subject: [PATCH 1/6] WIP update dependencies to crates versions --- Cargo.toml | 4 ++-- src/error.rs | 4 ---- test-runtime/Cargo.toml | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 604562f4c7..a98281bd98 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,8 +34,8 @@ url = "2.2.1" subxt-macro = { version = "0.1.0", path = "macro" } -sp-core = { git = "https://github.com/paritytech/substrate/", branch = "master", default-features = false } -sp-runtime = { git = "https://github.com/paritytech/substrate/", branch = "master", default-features = false } +sp-core = { version = "4.0.0", default-features = false } +sp-runtime = { version = "4.0.0", default-features = false } sp-version = { package = "sp-version", git = "https://github.com/paritytech/substrate/", branch = "master" } frame-metadata = "14.0.0" diff --git a/src/error.rs b/src/error.rs index bef8b18aff..1ff6fc49df 100644 --- a/src/error.rs +++ b/src/error.rs @@ -107,9 +107,6 @@ pub enum RuntimeError { /// There are no providers so the account cannot be created. #[error("There are no providers so the account cannot be created.")] NoProviders, - /// There are too many consumers so the account cannot be created. - #[error("There are too many consumers so the account cannot be created.")] - TooManyConsumers, /// Bad origin. #[error("Bad origin: throw by ensure_signed, ensure_root or ensure_none.")] BadOrigin, @@ -144,7 +141,6 @@ impl RuntimeError { DispatchError::CannotLookup => Ok(Self::CannotLookup), DispatchError::ConsumerRemaining => Ok(Self::ConsumerRemaining), DispatchError::NoProviders => Ok(Self::NoProviders), - DispatchError::TooManyConsumers => Ok(Self::TooManyConsumers), DispatchError::Arithmetic(_math_error) => { Ok(Self::Other("math_error".into())) } diff --git a/test-runtime/Cargo.toml b/test-runtime/Cargo.toml index 3b10fbc37b..b0034a923b 100644 --- a/test-runtime/Cargo.toml +++ b/test-runtime/Cargo.toml @@ -5,11 +5,11 @@ edition = "2021" [dependencies] subxt = { path = ".." } -sp-runtime = { package = "sp-runtime", git = "https://github.com/paritytech/substrate/", branch = "master" } +sp-runtime = "4.0.0" codec = { package = "parity-scale-codec", version = "2", default-features = false, features = ["derive", "full", "bit-vec"] } [build-dependencies] subxt = { path = ".." } -sp-core = { package = "sp-core", git = "https://github.com/paritytech/substrate/", branch = "master" } +sp-core = "4.0.0" async-std = { version = "1.9.0", features = ["attributes", "tokio1"] } which = "4.2.2" From 1281d17c6285c96acb26d0247c31a99f3b2c7a31 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Mon, 20 Dec 2021 12:49:09 +0000 Subject: [PATCH 2/6] Use released versions of sp-version and sp-arithmetic --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a98281bd98..f104a6f6ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,12 +36,12 @@ subxt-macro = { version = "0.1.0", path = "macro" } sp-core = { version = "4.0.0", default-features = false } sp-runtime = { version = "4.0.0", default-features = false } -sp-version = { package = "sp-version", git = "https://github.com/paritytech/substrate/", branch = "master" } +sp-version = "4.0.0" frame-metadata = "14.0.0" [dev-dependencies] -sp-arithmetic = { git = "https://github.com/paritytech/substrate/", branch = "master", default-features = false } +sp-arithmetic = { version = "4.0.0", default-features = false } assert_matches = "1.5.0" async-std = { version = "1.9.0", features = ["attributes", "tokio1"] } env_logger = "0.8.3" From 15c41894f0279e10f236151f286a23387fda05b4 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Tue, 11 Jan 2022 13:50:10 +0000 Subject: [PATCH 3/6] Attempt to align version of sp-keyring used to correspond to 4.0.0 releases. No luck but closer --- Cargo.toml | 2 +- macro/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ece5101ae5..adeffcdc4d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -50,4 +50,4 @@ wabt = "0.10.0" which = "4.0.2" test-runtime = { path = "test-runtime" } -sp-keyring = { package = "sp-keyring", git = "https://github.com/paritytech/substrate/", branch = "master" } +sp-keyring = { version = "4.0.0-dev", package = "sp-keyring", git = "https://github.com/paritytech/substrate/", tag = "publish-sp-version-v4.0.0" } diff --git a/macro/Cargo.toml b/macro/Cargo.toml index 4457b5d2e8..7b5c2064ef 100644 --- a/macro/Cargo.toml +++ b/macro/Cargo.toml @@ -34,4 +34,4 @@ pretty_assertions = "0.6.1" subxt = { path = ".." } trybuild = "1.0.38" -sp-keyring = { git = "https://github.com/paritytech/substrate/", branch = "master" } +sp-keyring = { version = "4.0.0-dev", package = "sp-keyring", git = "https://github.com/paritytech/substrate/", tag = "publish-sp-version-v4.0.0" } From d52819c5931f0d178241ca8f8279e9fd75bdd358 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 17 Jan 2022 13:49:34 +0000 Subject: [PATCH 4/6] sp-keyring 4.0.0 --- Cargo.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index adeffcdc4d..b7bf9a4d14 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,5 +49,4 @@ tempdir = "0.3.7" wabt = "0.10.0" which = "4.0.2" test-runtime = { path = "test-runtime" } - -sp-keyring = { version = "4.0.0-dev", package = "sp-keyring", git = "https://github.com/paritytech/substrate/", tag = "publish-sp-version-v4.0.0" } +sp-keyring = { version = "4.0.0" } From c8bb252e0529395194c808ffcfd0d662da8d3bb7 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 17 Jan 2022 13:56:16 +0000 Subject: [PATCH 5/6] also sp-keyring 4.0.0 for macro crate --- macro/Cargo.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/macro/Cargo.toml b/macro/Cargo.toml index 7b5c2064ef..32bbea9bc6 100644 --- a/macro/Cargo.toml +++ b/macro/Cargo.toml @@ -33,5 +33,4 @@ subxt-codegen = { version = "0.2.0", path = "../codegen" } pretty_assertions = "0.6.1" subxt = { path = ".." } trybuild = "1.0.38" - -sp-keyring = { version = "4.0.0-dev", package = "sp-keyring", git = "https://github.com/paritytech/substrate/", tag = "publish-sp-version-v4.0.0" } +sp-keyring = { version = "4.0.0" } From 3701671740aa5b2addd402fb04579d6328067361 Mon Sep 17 00:00:00 2001 From: James Wilson Date: Mon, 17 Jan 2022 14:16:41 +0000 Subject: [PATCH 6/6] simplify cargo.tomls --- Cargo.toml | 2 +- macro/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b7bf9a4d14..bab78951b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -49,4 +49,4 @@ tempdir = "0.3.7" wabt = "0.10.0" which = "4.0.2" test-runtime = { path = "test-runtime" } -sp-keyring = { version = "4.0.0" } +sp-keyring = "4.0.0" diff --git a/macro/Cargo.toml b/macro/Cargo.toml index 32bbea9bc6..f725631faf 100644 --- a/macro/Cargo.toml +++ b/macro/Cargo.toml @@ -33,4 +33,4 @@ subxt-codegen = { version = "0.2.0", path = "../codegen" } pretty_assertions = "0.6.1" subxt = { path = ".." } trybuild = "1.0.38" -sp-keyring = { version = "4.0.0" } +sp-keyring = "4.0.0"