mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 09:17:58 +00:00
Upgrade remote-externalities to use jsonrpsee v0.3 (#9342)
This commit is contained in:
@@ -13,8 +13,8 @@ readme = "README.md"
|
||||
targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
jsonrpsee-ws-client = { version = "0.2.0", default-features = false, features = ["tokio02"] }
|
||||
jsonrpsee-proc-macros = "0.2.0"
|
||||
jsonrpsee-ws-client = { version = "0.3.0", default-features = false, features = ["tokio02"] }
|
||||
jsonrpsee-proc-macros = "0.3.0"
|
||||
|
||||
hex = "0.4.0"
|
||||
env_logger = "0.8.2"
|
||||
|
||||
@@ -34,7 +34,7 @@ use sp_core::{
|
||||
use codec::{Encode, Decode};
|
||||
use sp_runtime::traits::Block as BlockT;
|
||||
use jsonrpsee_ws_client::{
|
||||
WsClientBuilder, WsClient, v2::params::JsonRpcParams,
|
||||
WsClientBuilder, WsClient, types::v2::params::JsonRpcParams,
|
||||
};
|
||||
|
||||
pub mod rpc_api;
|
||||
@@ -275,7 +275,7 @@ impl<B: BlockT> Builder<B> {
|
||||
prefix: StorageKey,
|
||||
at: B::Hash,
|
||||
) -> Result<Vec<KeyPair>, &'static str> {
|
||||
use jsonrpsee_ws_client::traits::Client;
|
||||
use jsonrpsee_ws_client::types::traits::Client;
|
||||
use serde_json::to_value;
|
||||
let keys = self.get_keys_paged(prefix, at).await?;
|
||||
let keys_count = keys.len();
|
||||
|
||||
@@ -19,7 +19,14 @@
|
||||
// TODO: Consolidate one off RPC calls https://github.com/paritytech/substrate/issues/8988
|
||||
|
||||
use sp_runtime::{generic::SignedBlock, traits::{Block as BlockT, Header as HeaderT}};
|
||||
use jsonrpsee_ws_client::{WsClientBuilder, WsClient, v2::params::JsonRpcParams, traits::Client};
|
||||
use jsonrpsee_ws_client::{
|
||||
WsClientBuilder,
|
||||
WsClient,
|
||||
types::{
|
||||
v2::params::JsonRpcParams,
|
||||
traits::Client
|
||||
},
|
||||
};
|
||||
|
||||
/// Get the header of the block identified by `at`
|
||||
pub async fn get_header<Block, S>(from: S, at: Block::Hash) -> Result<Block::Header, String>
|
||||
|
||||
Reference in New Issue
Block a user