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

Use released substrate dependencies #375

Merged
merged 8 commits into from
Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from 3 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
8 changes: 4 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ 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"

[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"
Expand Down
4 changes: 0 additions & 4 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We may want to parameterize DispatchError and allow the definition in the metadata to be used, in case of such a mismatch in the DispatchError type between the target node and the released version of sp_runtime

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working on that in #394

DispatchError::Arithmetic(_math_error) => {
Ok(Self::Other("math_error".into()))
}
Expand Down
4 changes: 2 additions & 2 deletions test-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"