mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 21:41:02 +00:00
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:
+17
-14
@@ -25,7 +25,10 @@ tokio1 = ["jsonrpsee-http-client/tokio1", "jsonrpsee-ws-client/tokio1"]
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
async-trait = "0.1.49"
|
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"
|
dyn-clone = "1.0.4"
|
||||||
futures = "0.3.13"
|
futures = "0.3.13"
|
||||||
hex = "0.4.3"
|
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-client = { version = "0.7.0", path = "client", optional = true }
|
||||||
substrate-subxt-proc-macro = { version = "0.15.0", path = "proc-macro" }
|
substrate-subxt-proc-macro = { version = "0.15.0", path = "proc-macro" }
|
||||||
|
|
||||||
sp-application-crypto = "3.0.0"
|
sp-application-crypto = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
sp-core = "3.0.0"
|
sp-core = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
sp-rpc = "3.0.0"
|
sp-rpc = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
sp-runtime = "3.0.0"
|
sp-runtime = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
sp-std = "3.0.0"
|
sp-std = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
sp-version = "3.0.0"
|
sp-version = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
|
|
||||||
frame-metadata = "13.0.0"
|
frame-metadata = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
frame-support = "3.0.0"
|
frame-support = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
pallet-indices = "3.0.0"
|
pallet-indices = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
pallet-staking = "3.0.0"
|
pallet-staking = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
assert_matches = "1.5.0"
|
assert_matches = "1.5.0"
|
||||||
@@ -62,6 +65,6 @@ env_logger = "0.8.3"
|
|||||||
tempdir = "0.3.7"
|
tempdir = "0.3.7"
|
||||||
wabt = "0.10.0"
|
wabt = "0.10.0"
|
||||||
which = "4.0.2"
|
which = "4.0.2"
|
||||||
sp-keyring = "3.0.0"
|
sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
frame-system = "3.0.0"
|
frame-system = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
pallet-balances = "3.0.0"
|
pallet-balances = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
|
|||||||
+11
-6
@@ -1,7 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "substrate-subxt-client"
|
name = "substrate-subxt-client"
|
||||||
version = "0.7.0"
|
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"
|
edition = "2018"
|
||||||
|
|
||||||
license = "GPL-3.0"
|
license = "GPL-3.0"
|
||||||
@@ -20,13 +23,15 @@ log = "0.4.13"
|
|||||||
serde_json = "1.0.61"
|
serde_json = "1.0.61"
|
||||||
thiserror = "1.0.23"
|
thiserror = "1.0.23"
|
||||||
|
|
||||||
sc-client-db = "0.9.0"
|
sc-client-db = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
sp-keyring = "3.0.0"
|
sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
sc-network = { version = "0.9.0", default-features = false }
|
sc-network = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10", default-features = false }
|
||||||
sc-service = { version = "0.9.0", 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]
|
[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]
|
[dev-dependencies]
|
||||||
async-std = { version = "1.8.0", features = ["attributes"] }
|
async-std = { version = "1.8.0", features = ["attributes"] }
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "substrate-subxt-proc-macro"
|
name = "substrate-subxt-proc-macro"
|
||||||
version = "0.15.0"
|
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"
|
edition = "2018"
|
||||||
autotests = false
|
autotests = false
|
||||||
|
|
||||||
@@ -26,13 +29,15 @@ synstructure = "0.12.4"
|
|||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
async-std = { version = "1.8.0", features = ["attributes"] }
|
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"
|
env_logger = "0.8.2"
|
||||||
pretty_assertions = "0.6.1"
|
pretty_assertions = "0.6.1"
|
||||||
substrate-subxt = { path = ".." }
|
substrate-subxt = { path = ".." }
|
||||||
trybuild = "1.0.38"
|
trybuild = "1.0.38"
|
||||||
|
|
||||||
sp-keyring = "3.0.0"
|
sp-keyring = { git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.10" }
|
||||||
|
|
||||||
[[test]]
|
[[test]]
|
||||||
name = "balances"
|
name = "balances"
|
||||||
|
|||||||
+5
-1
@@ -139,7 +139,11 @@ impl RuntimeError {
|
|||||||
DispatchError::CannotLookup => Ok(Self::CannotLookup),
|
DispatchError::CannotLookup => Ok(Self::CannotLookup),
|
||||||
DispatchError::ConsumerRemaining => Ok(Self::ConsumerRemaining),
|
DispatchError::ConsumerRemaining => Ok(Self::ConsumerRemaining),
|
||||||
DispatchError::NoProviders => Ok(Self::NoProviders),
|
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
@@ -361,7 +361,7 @@ mod tests {
|
|||||||
ModuleMetadata,
|
ModuleMetadata,
|
||||||
RuntimeMetadata,
|
RuntimeMetadata,
|
||||||
RuntimeMetadataPrefixed,
|
RuntimeMetadataPrefixed,
|
||||||
RuntimeMetadataV12,
|
RuntimeMetadataV13,
|
||||||
META_RESERVED,
|
META_RESERVED,
|
||||||
};
|
};
|
||||||
use std::convert::TryFrom;
|
use std::convert::TryFrom;
|
||||||
@@ -399,7 +399,7 @@ mod tests {
|
|||||||
let decoder = EventsDecoder::<TestRuntime>::new(
|
let decoder = EventsDecoder::<TestRuntime>::new(
|
||||||
Metadata::try_from(RuntimeMetadataPrefixed(
|
Metadata::try_from(RuntimeMetadataPrefixed(
|
||||||
META_RESERVED,
|
META_RESERVED,
|
||||||
RuntimeMetadata::V12(RuntimeMetadataV12 {
|
RuntimeMetadata::V13(RuntimeMetadataV13 {
|
||||||
modules: DecodeDifferent::Decoded(vec![ModuleMetadata {
|
modules: DecodeDifferent::Decoded(vec![ModuleMetadata {
|
||||||
name: DecodeDifferent::Decoded("System".to_string()),
|
name: DecodeDifferent::Decoded("System".to_string()),
|
||||||
storage: None,
|
storage: None,
|
||||||
|
|||||||
+1
-1
@@ -529,7 +529,7 @@ impl TryFrom<RuntimeMetadataPrefixed> for Metadata {
|
|||||||
return Err(ConversionError::InvalidPrefix.into())
|
return Err(ConversionError::InvalidPrefix.into())
|
||||||
}
|
}
|
||||||
let meta = match metadata.1 {
|
let meta = match metadata.1 {
|
||||||
RuntimeMetadata::V12(meta) => meta,
|
RuntimeMetadata::V13(meta) => meta,
|
||||||
_ => return Err(ConversionError::InvalidVersion.into()),
|
_ => return Err(ConversionError::InvalidVersion.into()),
|
||||||
};
|
};
|
||||||
let mut modules = HashMap::new();
|
let mut modules = HashMap::new();
|
||||||
|
|||||||
Reference in New Issue
Block a user