mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(rpc): move impl of eth api server out of reth-rpc-eth-api (#9135)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -35,6 +35,8 @@ reth-beacon-consensus.workspace = true
|
||||
reth-optimism-consensus.workspace = true
|
||||
revm-primitives.workspace = true
|
||||
reth-discv5.workspace = true
|
||||
reth-rpc-eth-types.workspace = true
|
||||
reth-rpc-eth-api.workspace = true
|
||||
|
||||
# async
|
||||
async-trait.workspace = true
|
||||
@ -44,11 +46,14 @@ tracing.workspace = true
|
||||
# misc
|
||||
clap.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
eyre.workspace = true
|
||||
parking_lot.workspace = true
|
||||
thiserror.workspace = true
|
||||
|
||||
# rpc
|
||||
jsonrpsee.workspace = true
|
||||
jsonrpsee-types.workspace = true
|
||||
serde_json.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
reth.workspace = true
|
||||
@ -71,4 +76,5 @@ optimism = [
|
||||
"reth-beacon-consensus/optimism",
|
||||
"reth-revm/optimism",
|
||||
"reth-auto-seal-consensus/optimism",
|
||||
"reth-rpc-eth-types/optimism"
|
||||
]
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
//! Helpers for optimism specific RPC implementations.
|
||||
|
||||
use jsonrpsee::types::ErrorObject;
|
||||
use reqwest::Client;
|
||||
use reth_rpc::eth::{
|
||||
error::{EthApiError, EthResult},
|
||||
servers::RawTransactionForwarder,
|
||||
};
|
||||
use reth_rpc_types::ToRpcError;
|
||||
use std::sync::{atomic::AtomicUsize, Arc};
|
||||
|
||||
use jsonrpsee_types::error::{ErrorObject, INTERNAL_ERROR_CODE};
|
||||
use reqwest::Client;
|
||||
use reth_rpc_eth_api::RawTransactionForwarder;
|
||||
use reth_rpc_eth_types::error::{EthApiError, EthResult};
|
||||
use reth_rpc_types::ToRpcError;
|
||||
|
||||
/// Error type when interacting with the Sequencer
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
pub enum SequencerRpcError {
|
||||
@ -22,11 +21,7 @@ pub enum SequencerRpcError {
|
||||
|
||||
impl ToRpcError for SequencerRpcError {
|
||||
fn to_rpc_error(&self) -> ErrorObject<'static> {
|
||||
ErrorObject::owned(
|
||||
jsonrpsee::types::error::INTERNAL_ERROR_CODE,
|
||||
self.to_string(),
|
||||
None::<String>,
|
||||
)
|
||||
ErrorObject::owned(INTERNAL_ERROR_CODE, self.to_string(), None::<String>)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user