mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: EthApi traits abstraction (#13170)
This commit is contained in:
@ -97,7 +97,9 @@ where
|
||||
where
|
||||
Engine::ExecutionPayloadEnvelopeV3: From<Engine::BuiltPayload> + PayloadEnvelopeExt,
|
||||
Engine::ExecutionPayloadEnvelopeV4: From<Engine::BuiltPayload> + PayloadEnvelopeExt,
|
||||
AddOns::EthApi: EthApiSpec + EthTransactions + TraceExt,
|
||||
AddOns::EthApi: EthApiSpec<Provider: BlockReader<Block = reth_primitives::Block>>
|
||||
+ EthTransactions
|
||||
+ TraceExt,
|
||||
{
|
||||
let mut chain = Vec::with_capacity(length as usize);
|
||||
for i in 0..length {
|
||||
|
||||
@ -4,6 +4,7 @@ use alloy_primitives::{Bytes, B256};
|
||||
use reth_chainspec::EthereumHardforks;
|
||||
use reth_node_api::{FullNodeComponents, NodePrimitives};
|
||||
use reth_node_builder::{rpc::RpcRegistry, NodeTypes};
|
||||
use reth_provider::BlockReader;
|
||||
use reth_rpc_api::DebugApiServer;
|
||||
use reth_rpc_eth_api::{
|
||||
helpers::{EthApiSpec, EthTransactions, TraceExt},
|
||||
@ -26,7 +27,9 @@ where
|
||||
>,
|
||||
>,
|
||||
>,
|
||||
EthApi: EthApiSpec + EthTransactions + TraceExt,
|
||||
EthApi: EthApiSpec<Provider: BlockReader<Block = reth_primitives::Block>>
|
||||
+ EthTransactions
|
||||
+ TraceExt,
|
||||
{
|
||||
/// Injects a raw transaction into the node tx pool via RPC server
|
||||
pub async fn inject_tx(&self, raw_tx: Bytes) -> Result<B256, EthApi::Error> {
|
||||
|
||||
Reference in New Issue
Block a user