mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 05:51:02 +00:00
* companion for #12663 jsonrpsee v0.16.1 * update deps * update rpc client params * update substrate and polkadot
This commit is contained in:
Generated
+338
-321
File diff suppressed because it is too large
Load Diff
@@ -18,5 +18,5 @@ sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "mas
|
|||||||
futures = "0.3.25"
|
futures = "0.3.25"
|
||||||
async-trait = "0.1.59"
|
async-trait = "0.1.59"
|
||||||
thiserror = "1.0.37"
|
thiserror = "1.0.37"
|
||||||
jsonrpsee-core = "0.15.1"
|
jsonrpsee-core = "0.16.2"
|
||||||
parity-scale-codec = "3.2.1"
|
parity-scale-codec = "3.2.1"
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ tokio = { version = "1.22.0", features = ["sync"] }
|
|||||||
futures = "0.3.25"
|
futures = "0.3.25"
|
||||||
futures-timer = "3.0.2"
|
futures-timer = "3.0.2"
|
||||||
parity-scale-codec = "3.2.1"
|
parity-scale-codec = "3.2.1"
|
||||||
jsonrpsee = { version = "0.15.1", features = ["ws-client"] }
|
jsonrpsee = { version = "0.16.2", features = ["ws-client"] }
|
||||||
tracing = "0.1.37"
|
tracing = "0.1.37"
|
||||||
async-trait = "0.1.59"
|
async-trait = "0.1.59"
|
||||||
url = "2.3.1"
|
url = "2.3.1"
|
||||||
|
|||||||
@@ -35,10 +35,10 @@ use futures::{
|
|||||||
use jsonrpsee::{
|
use jsonrpsee::{
|
||||||
core::{
|
core::{
|
||||||
client::{Client as JsonRpcClient, ClientT, Subscription, SubscriptionClientT},
|
client::{Client as JsonRpcClient, ClientT, Subscription, SubscriptionClientT},
|
||||||
|
params::ArrayParams,
|
||||||
Error as JsonRpseeError,
|
Error as JsonRpseeError,
|
||||||
},
|
},
|
||||||
rpc_params,
|
rpc_params,
|
||||||
types::ParamsSer,
|
|
||||||
ws_client::WsClientBuilder,
|
ws_client::WsClientBuilder,
|
||||||
};
|
};
|
||||||
use parity_scale_codec::{Decode, Encode};
|
use parity_scale_codec::{Decode, Encode};
|
||||||
@@ -264,7 +264,7 @@ impl RelayChainRpcClient {
|
|||||||
async fn request<'a, R>(
|
async fn request<'a, R>(
|
||||||
&self,
|
&self,
|
||||||
method: &'a str,
|
method: &'a str,
|
||||||
params: Option<ParamsSer<'a>>,
|
params: ArrayParams,
|
||||||
) -> Result<R, RelayChainError>
|
) -> Result<R, RelayChainError>
|
||||||
where
|
where
|
||||||
R: DeserializeOwned + std::fmt::Debug,
|
R: DeserializeOwned + std::fmt::Debug,
|
||||||
@@ -281,7 +281,7 @@ impl RelayChainRpcClient {
|
|||||||
async fn request_tracing<'a, R, OR>(
|
async fn request_tracing<'a, R, OR>(
|
||||||
&self,
|
&self,
|
||||||
method: &'a str,
|
method: &'a str,
|
||||||
params: Option<ParamsSer<'a>>,
|
params: ArrayParams,
|
||||||
trace_error: OR,
|
trace_error: OR,
|
||||||
) -> Result<R, RelayChainError>
|
) -> Result<R, RelayChainError>
|
||||||
where
|
where
|
||||||
@@ -359,12 +359,12 @@ impl RelayChainRpcClient {
|
|||||||
|
|
||||||
/// Get local listen address of the node
|
/// Get local listen address of the node
|
||||||
pub async fn system_local_listen_addresses(&self) -> Result<Vec<String>, RelayChainError> {
|
pub async fn system_local_listen_addresses(&self) -> Result<Vec<String>, RelayChainError> {
|
||||||
self.request("system_localListenAddresses", None).await
|
self.request("system_localListenAddresses", rpc_params![]).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get system health information
|
/// Get system health information
|
||||||
pub async fn system_health(&self) -> Result<Health, RelayChainError> {
|
pub async fn system_health(&self) -> Result<Health, RelayChainError> {
|
||||||
self.request("system_health", None).await
|
self.request("system_health", rpc_params![]).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get read proof for `storage_keys`
|
/// Get read proof for `storage_keys`
|
||||||
@@ -449,7 +449,7 @@ impl RelayChainRpcClient {
|
|||||||
|
|
||||||
/// Get hash of last finalized block.
|
/// Get hash of last finalized block.
|
||||||
pub async fn chain_get_finalized_head(&self) -> Result<PHash, RelayChainError> {
|
pub async fn chain_get_finalized_head(&self) -> Result<PHash, RelayChainError> {
|
||||||
self.request("chain_getFinalizedHead", None).await
|
self.request("chain_getFinalizedHead", rpc_params![]).await
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get hash of n-th block.
|
/// Get hash of n-th block.
|
||||||
@@ -680,7 +680,11 @@ impl RelayChainRpcClient {
|
|||||||
ws_client: &JsonRpcClient,
|
ws_client: &JsonRpcClient,
|
||||||
) -> Result<Subscription<PHeader>, RelayChainError> {
|
) -> Result<Subscription<PHeader>, RelayChainError> {
|
||||||
Ok(ws_client
|
Ok(ws_client
|
||||||
.subscribe::<PHeader>("chain_subscribeAllHeads", None, "chain_unsubscribeAllHeads")
|
.subscribe::<PHeader, _>(
|
||||||
|
"chain_subscribeAllHeads",
|
||||||
|
rpc_params![],
|
||||||
|
"chain_unsubscribeAllHeads",
|
||||||
|
)
|
||||||
.await?)
|
.await?)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -688,9 +692,9 @@ impl RelayChainRpcClient {
|
|||||||
ws_client: &JsonRpcClient,
|
ws_client: &JsonRpcClient,
|
||||||
) -> Result<Subscription<PHeader>, RelayChainError> {
|
) -> Result<Subscription<PHeader>, RelayChainError> {
|
||||||
Ok(ws_client
|
Ok(ws_client
|
||||||
.subscribe::<PHeader>(
|
.subscribe::<PHeader, _>(
|
||||||
"chain_subscribeFinalizedHeads",
|
"chain_subscribeFinalizedHeads",
|
||||||
None,
|
rpc_params![],
|
||||||
"chain_unsubscribeFinalizedHeads",
|
"chain_unsubscribeFinalizedHeads",
|
||||||
)
|
)
|
||||||
.await?)
|
.await?)
|
||||||
@@ -700,9 +704,9 @@ impl RelayChainRpcClient {
|
|||||||
ws_client: &JsonRpcClient,
|
ws_client: &JsonRpcClient,
|
||||||
) -> Result<Subscription<PHeader>, RelayChainError> {
|
) -> Result<Subscription<PHeader>, RelayChainError> {
|
||||||
Ok(ws_client
|
Ok(ws_client
|
||||||
.subscribe::<PHeader>(
|
.subscribe::<PHeader, _>(
|
||||||
"chain_subscribeNewHeads",
|
"chain_subscribeNewHeads",
|
||||||
None,
|
rpc_params![],
|
||||||
"chain_unsubscribeFinalizedHeads",
|
"chain_unsubscribeFinalizedHeads",
|
||||||
)
|
)
|
||||||
.await?)
|
.await?)
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ clap = { version = "4.0.29", features = ["derive"] }
|
|||||||
log = "0.4.17"
|
log = "0.4.17"
|
||||||
codec = { package = "parity-scale-codec", version = "3.0.0" }
|
codec = { package = "parity-scale-codec", version = "3.0.0" }
|
||||||
serde = { version = "1.0.149", features = ["derive"] }
|
serde = { version = "1.0.149", features = ["derive"] }
|
||||||
jsonrpsee = { version = "0.15.1", features = ["server"] }
|
jsonrpsee = { version = "0.16.2", features = ["server"] }
|
||||||
|
|
||||||
# Local
|
# Local
|
||||||
parachain-template-runtime = { path = "../runtime" }
|
parachain-template-runtime = { path = "../runtime" }
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ contracts-rococo-runtime = { path = "../parachains/runtimes/contracts/contracts-
|
|||||||
bridge-hub-rococo-runtime = { path = "../parachains/runtimes/bridge-hubs/bridge-hub-rococo" }
|
bridge-hub-rococo-runtime = { path = "../parachains/runtimes/bridge-hubs/bridge-hub-rococo" }
|
||||||
bridge-hub-kusama-runtime = { path = "../parachains/runtimes/bridge-hubs/bridge-hub-kusama" }
|
bridge-hub-kusama-runtime = { path = "../parachains/runtimes/bridge-hubs/bridge-hub-kusama" }
|
||||||
penpal-runtime = { path = "../parachains/runtimes/testing/penpal" }
|
penpal-runtime = { path = "../parachains/runtimes/testing/penpal" }
|
||||||
jsonrpsee = { version = "0.15.1", features = ["server"] }
|
jsonrpsee = { version = "0.16.2", features = ["server"] }
|
||||||
parachains-common = { path = "../parachains/common" }
|
parachains-common = { path = "../parachains/common" }
|
||||||
|
|
||||||
# Substrate
|
# Substrate
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ async-trait = "0.1.59"
|
|||||||
clap = { version = "4.0.29", features = ["derive"] }
|
clap = { version = "4.0.29", features = ["derive"] }
|
||||||
codec = { package = "parity-scale-codec", version = "3.0.0" }
|
codec = { package = "parity-scale-codec", version = "3.0.0" }
|
||||||
criterion = { version = "0.4.0", features = [ "async_tokio" ] }
|
criterion = { version = "0.4.0", features = [ "async_tokio" ] }
|
||||||
jsonrpsee = { version = "0.15.1", features = ["server"] }
|
jsonrpsee = { version = "0.16.2", features = ["server"] }
|
||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
serde = { version = "1.0.149", features = ["derive"] }
|
serde = { version = "1.0.149", features = ["derive"] }
|
||||||
tokio = { version = "1.22.0", features = ["macros"] }
|
tokio = { version = "1.22.0", features = ["macros"] }
|
||||||
|
|||||||
Reference in New Issue
Block a user