From cc0f980d95ecb50b0cb1d885936105c788ec045f Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Mon, 17 Jan 2022 14:25:15 +0000 Subject: [PATCH] Use released substrate dependencies (#375) * WIP update dependencies to crates versions * Use released versions of sp-version and sp-arithmetic * Attempt to align version of sp-keyring used to correspond to 4.0.0 releases. No luck but closer * sp-keyring 4.0.0 * also sp-keyring 4.0.0 for macro crate * simplify cargo.tomls Co-authored-by: James Wilson --- Cargo.toml | 11 +++++------ macro/Cargo.toml | 3 +-- src/error.rs | 4 ---- test-runtime/Cargo.toml | 4 ++-- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index fc0110a298..5b3fc3fb3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,15 +34,15 @@ 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-version = { package = "sp-version", git = "https://github.com/paritytech/substrate/", branch = "master" } +sp-core = { version = "4.0.0", default-features = false } +sp-runtime = { version = "4.0.0", default-features = false } +sp-version = "4.0.0" frame-metadata = "14.0.0" derivative = "2.2.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" @@ -50,5 +50,4 @@ tempdir = "0.3.7" 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 = "4.0.0" diff --git a/macro/Cargo.toml b/macro/Cargo.toml index 4457b5d2e8..f725631faf 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 = { git = "https://github.com/paritytech/substrate/", branch = "master" } +sp-keyring = "4.0.0" diff --git a/src/error.rs b/src/error.rs index f74e376374..4368b2777c 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"