diff --git a/bridges/relays/client-ethereum/Cargo.toml b/bridges/relays/client-ethereum/Cargo.toml index 56e3464173..486f84b135 100644 --- a/bridges/relays/client-ethereum/Cargo.toml +++ b/bridges/relays/client-ethereum/Cargo.toml @@ -10,9 +10,9 @@ 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 = "=0.2.0-alpha.3" -jsonrpsee-types = "=0.2.0-alpha.3" -jsonrpsee-ws-client = "=0.2.0-alpha.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" } 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/client.rs b/bridges/relays/client-ethereum/src/client.rs index 10fba1fb99..e2def5fb03 100644 --- a/bridges/relays/client-ethereum/src/client.rs +++ b/bridges/relays/client-ethereum/src/client.rs @@ -21,7 +21,7 @@ use crate::types::{ }; use crate::{ConnectionParams, Error, Result}; -use jsonrpsee_ws_client::{WsClient as RpcClient, WsConfig as RpcConfig}; +use jsonrpsee_ws_client::{WsClient as RpcClient, WsClientBuilder as RpcClientBuilder}; use std::sync::Arc; /// Number of headers missing from the Ethereum node for us to consider node not synced. @@ -46,7 +46,7 @@ impl Client { /// Build client to use in connection. async fn build_client(params: &ConnectionParams) -> Result> { let uri = format!("ws://{}:{}", params.host, params.port); - let client = RpcClient::new(RpcConfig::with_url(&uri)).await?; + let client = RpcClientBuilder::default().build(&uri).await?; Ok(Arc::new(client)) } diff --git a/bridges/relays/client-substrate/Cargo.toml b/bridges/relays/client-substrate/Cargo.toml index 012913d4a4..ee9ce1ace0 100644 --- a/bridges/relays/client-substrate/Cargo.toml +++ b/bridges/relays/client-substrate/Cargo.toml @@ -9,9 +9,9 @@ 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 = "=0.2.0-alpha.3" -jsonrpsee-types = "=0.2.0-alpha.3" -jsonrpsee-ws-client = "=0.2.0-alpha.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" } log = "0.4.11" num-traits = "0.2" rand = "0.7" diff --git a/bridges/relays/client-substrate/src/client.rs b/bridges/relays/client-substrate/src/client.rs index ce91f4e33f..1f7be7c805 100644 --- a/bridges/relays/client-substrate/src/client.rs +++ b/bridges/relays/client-substrate/src/client.rs @@ -24,7 +24,7 @@ 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, WsConfig as RpcConfig, WsSubscription as Subscription}; +use jsonrpsee_ws_client::{WsClient as RpcClient, WsClientBuilder as RpcClientBuilder, WsSubscription as Subscription}; use num_traits::Zero; use pallet_balances::AccountData; use sp_core::{storage::StorageKey, Bytes}; @@ -105,9 +105,10 @@ impl Client { params.host, params.port, ); - let mut config = RpcConfig::with_url(&uri); - config.max_notifs_per_subscription = MAX_SUBSCRIPTION_CAPACITY; - let client = RpcClient::new(config).await?; + let client = RpcClientBuilder::default() + .max_notifs_per_subscription(MAX_SUBSCRIPTION_CAPACITY) + .build(&uri) + .await?; Ok(Arc::new(client)) }