Updated to later version of substrate so that it compiles. (#295)

* Updated to later version of substrate so that it compiles.

(Referencing substrate this way you only have to search and replace one string to upgrade)

* cargo fmt
This commit is contained in:
Squirrel
2021-09-20 09:33:33 +01:00
committed by GitHub
parent 156db74102
commit d582479367
6 changed files with 44 additions and 27 deletions
+17 -14
View File
@@ -25,7 +25,10 @@ tokio1 = ["jsonrpsee-http-client/tokio1", "jsonrpsee-ws-client/tokio1"]
[dependencies]
async-trait = "0.1.49"
codec = { package = "parity-scale-codec", version = "2.1", default-features = false, features = ["derive", "full"] }
codec = { package = "parity-scale-codec", version = "2.1", default-features = false, features = [
"derive",
"full",
] }
dyn-clone = "1.0.4"
futures = "0.3.13"
hex = "0.4.3"
@@ -43,17 +46,17 @@ url = "2.2.1"
substrate-subxt-client = { version = "0.7.0", path = "client", optional = true }
substrate-subxt-proc-macro = { version = "0.15.0", path = "proc-macro" }
sp-application-crypto = "3.0.0"
sp-core = "3.0.0"
sp-rpc = "3.0.0"
sp-runtime = "3.0.0"
sp-std = "3.0.0"
sp-version = "3.0.0"
sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
sp-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
frame-metadata = "13.0.0"
frame-support = "3.0.0"
pallet-indices = "3.0.0"
pallet-staking = "3.0.0"
frame-metadata = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
pallet-indices = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
pallet-staking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
[dev-dependencies]
assert_matches = "1.5.0"
@@ -62,6 +65,6 @@ env_logger = "0.8.3"
tempdir = "0.3.7"
wabt = "0.10.0"
which = "4.0.2"
sp-keyring = "3.0.0"
frame-system = "3.0.0"
pallet-balances = "3.0.0"
sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
+11 -6
View File
@@ -1,7 +1,10 @@
[package]
name = "substrate-subxt-client"
version = "0.7.0"
authors = ["David Craven <david@craven.ch>", "Parity Technologies <admin@parity.io>"]
authors = [
"David Craven <david@craven.ch>",
"Parity Technologies <admin@parity.io>",
]
edition = "2018"
license = "GPL-3.0"
@@ -20,13 +23,15 @@ log = "0.4.13"
serde_json = "1.0.61"
thiserror = "1.0.23"
sc-client-db = "0.9.0"
sp-keyring = "3.0.0"
sc-network = { version = "0.9.0", default-features = false }
sc-service = { version = "0.9.0", default-features = false }
sc-client-db = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
sc-network = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10", default-features = false }
sc-service = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10", default-features = false }
[target.'cfg(target_arch="x86_64")'.dependencies]
sc-service = { version = "0.9.0", default-features = false, features = ["wasmtime"] }
sc-service = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10", default-features = false, features = [
"wasmtime",
] }
[dev-dependencies]
async-std = { version = "1.8.0", features = ["attributes"] }
+8 -3
View File
@@ -1,7 +1,10 @@
[package]
name = "substrate-subxt-proc-macro"
version = "0.15.0"
authors = ["David Craven <david@craven.ch>", "Parity Technologies <admin@parity.io>"]
authors = [
"David Craven <david@craven.ch>",
"Parity Technologies <admin@parity.io>",
]
edition = "2018"
autotests = false
@@ -26,13 +29,15 @@ synstructure = "0.12.4"
[dev-dependencies]
async-std = { version = "1.8.0", features = ["attributes"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = ["derive"] }
codec = { package = "parity-scale-codec", version = "2.0.0", features = [
"derive",
] }
env_logger = "0.8.2"
pretty_assertions = "0.6.1"
substrate-subxt = { path = ".." }
trybuild = "1.0.38"
sp-keyring = "3.0.0"
sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
[[test]]
name = "balances"
+5 -1
View File
@@ -139,7 +139,11 @@ impl RuntimeError {
DispatchError::CannotLookup => Ok(Self::CannotLookup),
DispatchError::ConsumerRemaining => Ok(Self::ConsumerRemaining),
DispatchError::NoProviders => Ok(Self::NoProviders),
DispatchError::Other(msg) => Ok(Self::Other(msg.into())),
DispatchError::Arithmetic(_math_error) => {
Ok(Self::Other("math_error".into()))
}
DispatchError::Token(_token_error) => Ok(Self::Other("token error".into())),
DispatchError::Other(msg) => Ok(Self::Other(msg.to_string())),
}
}
}
+2 -2
View File
@@ -361,7 +361,7 @@ mod tests {
ModuleMetadata,
RuntimeMetadata,
RuntimeMetadataPrefixed,
RuntimeMetadataV12,
RuntimeMetadataV13,
META_RESERVED,
};
use std::convert::TryFrom;
@@ -399,7 +399,7 @@ mod tests {
let decoder = EventsDecoder::<TestRuntime>::new(
Metadata::try_from(RuntimeMetadataPrefixed(
META_RESERVED,
RuntimeMetadata::V12(RuntimeMetadataV12 {
RuntimeMetadata::V13(RuntimeMetadataV13 {
modules: DecodeDifferent::Decoded(vec![ModuleMetadata {
name: DecodeDifferent::Decoded("System".to_string()),
storage: None,
+1 -1
View File
@@ -529,7 +529,7 @@ impl TryFrom<RuntimeMetadataPrefixed> for Metadata {
return Err(ConversionError::InvalidPrefix.into())
}
let meta = match metadata.1 {
RuntimeMetadata::V12(meta) => meta,
RuntimeMetadata::V13(meta) => meta,
_ => return Err(ConversionError::InvalidVersion.into()),
};
let mut modules = HashMap::new();