From f857771ce829dffc08b7bcb0b43d02b48f55dd60 Mon Sep 17 00:00:00 2001 From: Niklas Adolfsson Date: Tue, 20 Apr 2021 21:03:01 +0200 Subject: [PATCH] Update jsonrpsee to 0.2.0-alpha.5 (#914) * update jsonrpsee to 0.2.0-alpha.5 * cargo fmt --- bridges/relays/client-ethereum/Cargo.toml | 5 ++--- bridges/relays/client-ethereum/src/error.rs | 2 +- bridges/relays/client-substrate/Cargo.toml | 5 ++--- bridges/relays/client-substrate/src/chain.rs | 2 +- bridges/relays/client-substrate/src/client.rs | 6 +++--- bridges/relays/client-substrate/src/error.rs | 2 +- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/bridges/relays/client-ethereum/Cargo.toml b/bridges/relays/client-ethereum/Cargo.toml index 486f84b135..ebae252ed5 100644 --- a/bridges/relays/client-ethereum/Cargo.toml +++ b/bridges/relays/client-ethereum/Cargo.toml @@ -10,9 +10,8 @@ bp-eth-poa = { path = "../../primitives/ethereum-poa" } codec = { package = "parity-scale-codec", version = "2.0.0" } headers-relay = { path = "../headers" } hex-literal = "0.3" -jsonrpsee-proc-macros = { git = "https://github.com/paritytech/jsonrpsee", rev = "de7b58a881512cd5ab8bbf16a56241ca808c7765" } -jsonrpsee-types = { git = "https://github.com/paritytech/jsonrpsee", rev = "de7b58a881512cd5ab8bbf16a56241ca808c7765" } -jsonrpsee-ws-client = { git = "https://github.com/paritytech/jsonrpsee", rev = "de7b58a881512cd5ab8bbf16a56241ca808c7765" } +jsonrpsee-proc-macros = "=0.2.0-alpha.5" +jsonrpsee-ws-client = "=0.2.0-alpha.5" libsecp256k1 = { version = "0.3.4", default-features = false, features = ["hmac"] } log = "0.4.11" relay-utils = { path = "../utils" } diff --git a/bridges/relays/client-ethereum/src/error.rs b/bridges/relays/client-ethereum/src/error.rs index 69ade23f74..bcd8edc3f3 100644 --- a/bridges/relays/client-ethereum/src/error.rs +++ b/bridges/relays/client-ethereum/src/error.rs @@ -18,7 +18,7 @@ use crate::types::U256; -use jsonrpsee_types::error::Error as RpcError; +use jsonrpsee_ws_client::Error as RpcError; use relay_utils::MaybeConnectionError; /// Result type used by Ethereum client. diff --git a/bridges/relays/client-substrate/Cargo.toml b/bridges/relays/client-substrate/Cargo.toml index ee9ce1ace0..7b3f46230f 100644 --- a/bridges/relays/client-substrate/Cargo.toml +++ b/bridges/relays/client-substrate/Cargo.toml @@ -9,9 +9,8 @@ license = "GPL-3.0-or-later WITH Classpath-exception-2.0" async-std = "1.6.5" async-trait = "0.1.40" codec = { package = "parity-scale-codec", version = "2.0.0" } -jsonrpsee-proc-macros = { git = "https://github.com/paritytech/jsonrpsee", rev = "de7b58a881512cd5ab8bbf16a56241ca808c7765" } -jsonrpsee-types = { git = "https://github.com/paritytech/jsonrpsee", rev = "de7b58a881512cd5ab8bbf16a56241ca808c7765" } -jsonrpsee-ws-client = { git = "https://github.com/paritytech/jsonrpsee", rev = "de7b58a881512cd5ab8bbf16a56241ca808c7765" } +jsonrpsee-proc-macros = "=0.2.0-alpha.5" +jsonrpsee-ws-client = "=0.2.0-alpha.5" log = "0.4.11" num-traits = "0.2" rand = "0.7" diff --git a/bridges/relays/client-substrate/src/chain.rs b/bridges/relays/client-substrate/src/chain.rs index 6676873ee6..64c0d6af52 100644 --- a/bridges/relays/client-substrate/src/chain.rs +++ b/bridges/relays/client-substrate/src/chain.rs @@ -16,7 +16,7 @@ use bp_runtime::Chain as ChainBase; use frame_support::Parameter; -use jsonrpsee_types::jsonrpc::{DeserializeOwned, Serialize}; +use jsonrpsee_ws_client::{DeserializeOwned, Serialize}; use num_traits::{CheckedSub, Zero}; use sp_core::{storage::StorageKey, Pair}; use sp_runtime::{ diff --git a/bridges/relays/client-substrate/src/client.rs b/bridges/relays/client-substrate/src/client.rs index 1f7be7c805..892a63d6d5 100644 --- a/bridges/relays/client-substrate/src/client.rs +++ b/bridges/relays/client-substrate/src/client.rs @@ -23,8 +23,8 @@ use crate::{ConnectionParams, Error, Result}; use async_std::sync::{Arc, Mutex}; use codec::Decode; use frame_system::AccountInfo; -use jsonrpsee_types::{jsonrpc::DeserializeOwned, traits::SubscriptionClient}; -use jsonrpsee_ws_client::{WsClient as RpcClient, WsClientBuilder as RpcClientBuilder, WsSubscription as Subscription}; +use jsonrpsee_ws_client::{traits::SubscriptionClient, v2::params::JsonRpcParams, DeserializeOwned}; +use jsonrpsee_ws_client::{Subscription, WsClient as RpcClient, WsClientBuilder as RpcClientBuilder}; use num_traits::Zero; use pallet_balances::AccountData; use sp_core::{storage::StorageKey, Bytes}; @@ -267,7 +267,7 @@ impl Client { .client .subscribe( "grandpa_subscribeJustifications", - jsonrpsee_types::jsonrpc::Params::None, + JsonRpcParams::NoParams, "grandpa_unsubscribeJustifications", ) .await?) diff --git a/bridges/relays/client-substrate/src/error.rs b/bridges/relays/client-substrate/src/error.rs index 7aee28df18..304229ede1 100644 --- a/bridges/relays/client-substrate/src/error.rs +++ b/bridges/relays/client-substrate/src/error.rs @@ -16,7 +16,7 @@ //! Substrate node RPC errors. -use jsonrpsee_types::error::Error as RpcError; +use jsonrpsee_ws_client::Error as RpcError; use relay_utils::MaybeConnectionError; use sc_rpc_api::system::Health;