chore(deps): migrate to jsonrpsee 0.22 (#5894)

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
This commit is contained in:
Matthias Seitz
2024-04-05 18:02:05 +02:00
committed by GitHub
parent 3236baef5e
commit 67cfb06fbb
29 changed files with 715 additions and 549 deletions

View File

@@ -5,7 +5,6 @@ use crate::utils::{launch_http, launch_http_ws, launch_ws};
use jsonrpsee::{
core::{
client::{ClientT, SubscriptionClientT},
error::Error,
params::ArrayParams,
},
http_client::HttpClient,
@@ -30,9 +29,9 @@ use serde::{de::DeserializeOwned, Deserialize, Serialize};
use serde_json::Value;
use std::collections::HashSet;
fn is_unimplemented(err: Error) -> bool {
fn is_unimplemented(err: jsonrpsee::core::client::Error) -> bool {
match err {
Error::Call(error_obj) => {
jsonrpsee::core::client::Error::Call(error_obj) => {
error_obj.code() == ErrorCode::InternalError.code() &&
error_obj.message() == "unimplemented"
}

View File

@@ -2,7 +2,7 @@
use crate::utils::launch_http;
use jsonrpsee::{
core::{client::ClientT, traits::ToRpcParams, Error},
core::{client::ClientT, traits::ToRpcParams},
types::Request,
};
use reth_primitives::U256;
@@ -12,7 +12,7 @@ use serde_json::value::RawValue;
struct RawRpcParams(Box<RawValue>);
impl ToRpcParams for RawRpcParams {
fn to_rpc_params(self) -> Result<Option<Box<RawValue>>, Error> {
fn to_rpc_params(self) -> Result<Option<Box<RawValue>>, serde_json::Error> {
Ok(Some(self.0))
}
}