mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: Integrate new EvmEnvProvider in RPC (#1550)
This commit is contained in:
committed by
GitHub
parent
305e992eed
commit
41748e818f
@ -4,7 +4,7 @@ use crate::dirs::{JwtSecretPath, PlatformPath};
|
|||||||
use clap::Args;
|
use clap::Args;
|
||||||
use jsonrpsee::{core::Error as RpcError, server::ServerHandle};
|
use jsonrpsee::{core::Error as RpcError, server::ServerHandle};
|
||||||
use reth_network_api::{NetworkInfo, Peers};
|
use reth_network_api::{NetworkInfo, Peers};
|
||||||
use reth_provider::{BlockProvider, HeaderProvider, StateProviderFactory};
|
use reth_provider::{BlockProvider, EvmEnvProvider, HeaderProvider, StateProviderFactory};
|
||||||
use reth_rpc::{JwtError, JwtSecret};
|
use reth_rpc::{JwtError, JwtSecret};
|
||||||
use reth_rpc_builder::{
|
use reth_rpc_builder::{
|
||||||
constants, IpcServerBuilder, RethRpcModule, RpcModuleSelection, RpcServerConfig,
|
constants, IpcServerBuilder, RethRpcModule, RpcModuleSelection, RpcServerConfig,
|
||||||
@ -110,7 +110,12 @@ impl RpcServerArgs {
|
|||||||
network: Network,
|
network: Network,
|
||||||
) -> Result<RpcServerHandle, RpcError>
|
) -> Result<RpcServerHandle, RpcError>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + HeaderProvider + StateProviderFactory + Clone + 'static,
|
Client: BlockProvider
|
||||||
|
+ HeaderProvider
|
||||||
|
+ StateProviderFactory
|
||||||
|
+ EvmEnvProvider
|
||||||
|
+ Clone
|
||||||
|
+ 'static,
|
||||||
Pool: TransactionPool + Clone + 'static,
|
Pool: TransactionPool + Clone + 'static,
|
||||||
Network: NetworkInfo + Peers + Clone + 'static,
|
Network: NetworkInfo + Peers + Clone + 'static,
|
||||||
{
|
{
|
||||||
@ -133,7 +138,12 @@ impl RpcServerArgs {
|
|||||||
handle: EngineApiHandle,
|
handle: EngineApiHandle,
|
||||||
) -> Result<ServerHandle, RpcError>
|
) -> Result<ServerHandle, RpcError>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + HeaderProvider + StateProviderFactory + Clone + 'static,
|
Client: BlockProvider
|
||||||
|
+ HeaderProvider
|
||||||
|
+ StateProviderFactory
|
||||||
|
+ EvmEnvProvider
|
||||||
|
+ Clone
|
||||||
|
+ 'static,
|
||||||
Pool: TransactionPool + Clone + 'static,
|
Pool: TransactionPool + Clone + 'static,
|
||||||
Network: NetworkInfo + Peers + Clone + 'static,
|
Network: NetworkInfo + Peers + Clone + 'static,
|
||||||
{
|
{
|
||||||
|
|||||||
@ -12,7 +12,7 @@ use jsonrpsee::{
|
|||||||
use reth_ipc::server::IpcServer;
|
use reth_ipc::server::IpcServer;
|
||||||
pub use reth_ipc::server::{Builder as IpcServerBuilder, Endpoint};
|
pub use reth_ipc::server::{Builder as IpcServerBuilder, Endpoint};
|
||||||
use reth_network_api::{NetworkInfo, Peers};
|
use reth_network_api::{NetworkInfo, Peers};
|
||||||
use reth_provider::{BlockProvider, HeaderProvider, StateProviderFactory};
|
use reth_provider::{BlockProvider, EvmEnvProvider, HeaderProvider, StateProviderFactory};
|
||||||
use reth_rpc::{
|
use reth_rpc::{
|
||||||
AdminApi, AuthLayer, DebugApi, EngineApi, EthApi, JwtAuthValidator, JwtSecret, NetApi,
|
AdminApi, AuthLayer, DebugApi, EngineApi, EthApi, JwtAuthValidator, JwtSecret, NetApi,
|
||||||
TraceApi, Web3Api,
|
TraceApi, Web3Api,
|
||||||
@ -41,7 +41,8 @@ pub async fn launch<Client, Pool, Network>(
|
|||||||
secret: JwtSecret,
|
secret: JwtSecret,
|
||||||
) -> Result<ServerHandle, RpcError>
|
) -> Result<ServerHandle, RpcError>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + HeaderProvider + StateProviderFactory + Clone + 'static,
|
Client:
|
||||||
|
BlockProvider + HeaderProvider + StateProviderFactory + EvmEnvProvider + Clone + 'static,
|
||||||
Pool: TransactionPool + Clone + 'static,
|
Pool: TransactionPool + Clone + 'static,
|
||||||
Network: NetworkInfo + Peers + Clone + 'static,
|
Network: NetworkInfo + Peers + Clone + 'static,
|
||||||
{
|
{
|
||||||
@ -56,7 +57,8 @@ pub async fn launch_with_eth_api<Client, Pool, Network>(
|
|||||||
secret: JwtSecret,
|
secret: JwtSecret,
|
||||||
) -> Result<ServerHandle, RpcError>
|
) -> Result<ServerHandle, RpcError>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + HeaderProvider + StateProviderFactory + Clone + 'static,
|
Client:
|
||||||
|
BlockProvider + HeaderProvider + StateProviderFactory + EvmEnvProvider + Clone + 'static,
|
||||||
Pool: TransactionPool + Clone + 'static,
|
Pool: TransactionPool + Clone + 'static,
|
||||||
Network: NetworkInfo + Peers + Clone + 'static,
|
Network: NetworkInfo + Peers + Clone + 'static,
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,12 +26,12 @@
|
|||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
//! use reth_network_api::{NetworkInfo, Peers};
|
//! use reth_network_api::{NetworkInfo, Peers};
|
||||||
//! use reth_provider::{BlockProvider, HeaderProvider, StateProviderFactory};
|
//! use reth_provider::{BlockProvider, HeaderProvider, StateProviderFactory, EvmEnvProvider};
|
||||||
//! use reth_rpc_builder::{RethRpcModule, RpcModuleBuilder, RpcServerConfig, ServerBuilder, TransportRpcModuleConfig};
|
//! use reth_rpc_builder::{RethRpcModule, RpcModuleBuilder, RpcServerConfig, ServerBuilder, TransportRpcModuleConfig};
|
||||||
//! use reth_transaction_pool::TransactionPool;
|
//! use reth_transaction_pool::TransactionPool;
|
||||||
//! pub async fn launch<Client, Pool, Network>(client: Client, pool: Pool, network: Network)
|
//! pub async fn launch<Client, Pool, Network>(client: Client, pool: Pool, network: Network)
|
||||||
//! where
|
//! where
|
||||||
//! Client: BlockProvider + HeaderProvider + StateProviderFactory + Clone + 'static,
|
//! Client: BlockProvider + HeaderProvider + StateProviderFactory + EvmEnvProvider + Clone + 'static,
|
||||||
//! Pool: TransactionPool + Clone + 'static,
|
//! Pool: TransactionPool + Clone + 'static,
|
||||||
//! Network: NetworkInfo + Peers + Clone + 'static,
|
//! Network: NetworkInfo + Peers + Clone + 'static,
|
||||||
//! {
|
//! {
|
||||||
@ -62,7 +62,7 @@ use jsonrpsee::{
|
|||||||
};
|
};
|
||||||
use reth_ipc::server::IpcServer;
|
use reth_ipc::server::IpcServer;
|
||||||
use reth_network_api::{NetworkInfo, Peers};
|
use reth_network_api::{NetworkInfo, Peers};
|
||||||
use reth_provider::{BlockProvider, HeaderProvider, StateProviderFactory};
|
use reth_provider::{BlockProvider, EvmEnvProvider, HeaderProvider, StateProviderFactory};
|
||||||
use reth_rpc::{AdminApi, DebugApi, EthApi, NetApi, TraceApi, Web3Api};
|
use reth_rpc::{AdminApi, DebugApi, EthApi, NetApi, TraceApi, Web3Api};
|
||||||
use reth_rpc_api::servers::*;
|
use reth_rpc_api::servers::*;
|
||||||
use reth_transaction_pool::TransactionPool;
|
use reth_transaction_pool::TransactionPool;
|
||||||
@ -99,7 +99,8 @@ pub async fn launch<Client, Pool, Network>(
|
|||||||
server_config: impl Into<RpcServerConfig>,
|
server_config: impl Into<RpcServerConfig>,
|
||||||
) -> Result<RpcServerHandle, RpcError>
|
) -> Result<RpcServerHandle, RpcError>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + HeaderProvider + StateProviderFactory + Clone + 'static,
|
Client:
|
||||||
|
BlockProvider + HeaderProvider + StateProviderFactory + EvmEnvProvider + Clone + 'static,
|
||||||
Pool: TransactionPool + Clone + 'static,
|
Pool: TransactionPool + Clone + 'static,
|
||||||
Network: NetworkInfo + Peers + Clone + 'static,
|
Network: NetworkInfo + Peers + Clone + 'static,
|
||||||
{
|
{
|
||||||
@ -135,7 +136,7 @@ impl<Client, Pool, Network> RpcModuleBuilder<Client, Pool, Network> {
|
|||||||
/// Configure the client instance.
|
/// Configure the client instance.
|
||||||
pub fn with_client<C>(self, client: C) -> RpcModuleBuilder<C, Pool, Network>
|
pub fn with_client<C>(self, client: C) -> RpcModuleBuilder<C, Pool, Network>
|
||||||
where
|
where
|
||||||
C: BlockProvider + StateProviderFactory + 'static,
|
C: BlockProvider + StateProviderFactory + EvmEnvProvider + 'static,
|
||||||
{
|
{
|
||||||
let Self { pool, network, .. } = self;
|
let Self { pool, network, .. } = self;
|
||||||
RpcModuleBuilder { client, network, pool }
|
RpcModuleBuilder { client, network, pool }
|
||||||
@ -162,7 +163,8 @@ impl<Client, Pool, Network> RpcModuleBuilder<Client, Pool, Network> {
|
|||||||
|
|
||||||
impl<Client, Pool, Network> RpcModuleBuilder<Client, Pool, Network>
|
impl<Client, Pool, Network> RpcModuleBuilder<Client, Pool, Network>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + HeaderProvider + StateProviderFactory + Clone + 'static,
|
Client:
|
||||||
|
BlockProvider + HeaderProvider + StateProviderFactory + EvmEnvProvider + Clone + 'static,
|
||||||
Pool: TransactionPool + Clone + 'static,
|
Pool: TransactionPool + Clone + 'static,
|
||||||
Network: NetworkInfo + Peers + Clone + 'static,
|
Network: NetworkInfo + Peers + Clone + 'static,
|
||||||
{
|
{
|
||||||
@ -263,7 +265,12 @@ impl RpcModuleSelection {
|
|||||||
network: Network,
|
network: Network,
|
||||||
) -> RpcModule<()>
|
) -> RpcModule<()>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + HeaderProvider + StateProviderFactory + Clone + 'static,
|
Client: BlockProvider
|
||||||
|
+ HeaderProvider
|
||||||
|
+ StateProviderFactory
|
||||||
|
+ EvmEnvProvider
|
||||||
|
+ Clone
|
||||||
|
+ 'static,
|
||||||
Pool: TransactionPool + Clone + 'static,
|
Pool: TransactionPool + Clone + 'static,
|
||||||
Network: NetworkInfo + Peers + Clone + 'static,
|
Network: NetworkInfo + Peers + Clone + 'static,
|
||||||
{
|
{
|
||||||
@ -402,7 +409,8 @@ where
|
|||||||
|
|
||||||
impl<Client, Pool, Network> RethModuleRegistry<Client, Pool, Network>
|
impl<Client, Pool, Network> RethModuleRegistry<Client, Pool, Network>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + HeaderProvider + StateProviderFactory + Clone + 'static,
|
Client:
|
||||||
|
BlockProvider + HeaderProvider + StateProviderFactory + EvmEnvProvider + Clone + 'static,
|
||||||
Pool: TransactionPool + Clone + 'static,
|
Pool: TransactionPool + Clone + 'static,
|
||||||
Network: NetworkInfo + Peers + Clone + 'static,
|
Network: NetworkInfo + Peers + Clone + 'static,
|
||||||
{
|
{
|
||||||
|
|||||||
@ -7,7 +7,7 @@ use reth_primitives::{
|
|||||||
BlockHash, BlockId, BlockNumber, ChainSpec, Hardfork, Header, SealedBlock, TransactionSigned,
|
BlockHash, BlockId, BlockNumber, ChainSpec, Hardfork, Header, SealedBlock, TransactionSigned,
|
||||||
H64, U256,
|
H64, U256,
|
||||||
};
|
};
|
||||||
use reth_provider::{BlockProvider, HeaderProvider, StateProviderFactory};
|
use reth_provider::{BlockProvider, EvmEnvProvider, HeaderProvider, StateProviderFactory};
|
||||||
use reth_revm::database::{State, SubState};
|
use reth_revm::database::{State, SubState};
|
||||||
use reth_rlp::Decodable;
|
use reth_rlp::Decodable;
|
||||||
use reth_rpc_types::engine::{
|
use reth_rpc_types::engine::{
|
||||||
@ -45,7 +45,9 @@ pub struct EngineApi<Client> {
|
|||||||
// remote_store: HashMap<H64, ExecutionPayload>,
|
// remote_store: HashMap<H64, ExecutionPayload>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<Client: HeaderProvider + BlockProvider + StateProviderFactory> EngineApi<Client> {
|
impl<Client: HeaderProvider + BlockProvider + StateProviderFactory + EvmEnvProvider>
|
||||||
|
EngineApi<Client>
|
||||||
|
{
|
||||||
/// Create new instance of [EngineApi].
|
/// Create new instance of [EngineApi].
|
||||||
pub fn new(
|
pub fn new(
|
||||||
client: Client,
|
client: Client,
|
||||||
@ -409,7 +411,7 @@ impl<Client: HeaderProvider + BlockProvider + StateProviderFactory> EngineApi<Cl
|
|||||||
|
|
||||||
impl<Client> Future for EngineApi<Client>
|
impl<Client> Future for EngineApi<Client>
|
||||||
where
|
where
|
||||||
Client: HeaderProvider + BlockProvider + StateProviderFactory + Unpin,
|
Client: HeaderProvider + BlockProvider + StateProviderFactory + EvmEnvProvider + Unpin,
|
||||||
{
|
{
|
||||||
type Output = ();
|
type Output = ();
|
||||||
|
|
||||||
|
|||||||
@ -5,12 +5,12 @@ use crate::{
|
|||||||
EthApi,
|
EthApi,
|
||||||
};
|
};
|
||||||
use reth_primitives::BlockId;
|
use reth_primitives::BlockId;
|
||||||
use reth_provider::{BlockProvider, StateProviderFactory};
|
use reth_provider::{BlockProvider, EvmEnvProvider, StateProviderFactory};
|
||||||
use reth_rpc_types::{Block, RichBlock};
|
use reth_rpc_types::{Block, RichBlock};
|
||||||
|
|
||||||
impl<Client, Pool, Network> EthApi<Client, Pool, Network>
|
impl<Client, Pool, Network> EthApi<Client, Pool, Network>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + StateProviderFactory + 'static,
|
Client: BlockProvider + StateProviderFactory + EvmEnvProvider + 'static,
|
||||||
{
|
{
|
||||||
/// Returns the uncle headers of the given block
|
/// Returns the uncle headers of the given block
|
||||||
///
|
///
|
||||||
|
|||||||
@ -7,7 +7,7 @@ use crate::{
|
|||||||
EthApi,
|
EthApi,
|
||||||
};
|
};
|
||||||
use reth_primitives::{AccessList, Address, BlockId, Bytes, TransactionKind, U128, U256};
|
use reth_primitives::{AccessList, Address, BlockId, Bytes, TransactionKind, U128, U256};
|
||||||
use reth_provider::{BlockProvider, StateProvider, StateProviderFactory};
|
use reth_provider::{BlockProvider, EvmEnvProvider, StateProvider, StateProviderFactory};
|
||||||
use reth_revm::database::{State, SubState};
|
use reth_revm::database::{State, SubState};
|
||||||
use reth_rpc_types::CallRequest;
|
use reth_rpc_types::CallRequest;
|
||||||
use revm::{
|
use revm::{
|
||||||
@ -20,7 +20,7 @@ pub(crate) const MIN_TRANSACTION_GAS: U256 = Uint::from_limbs([21_000, 0, 0, 0])
|
|||||||
|
|
||||||
impl<Client, Pool, Network> EthApi<Client, Pool, Network>
|
impl<Client, Pool, Network> EthApi<Client, Pool, Network>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + StateProviderFactory + 'static,
|
Client: BlockProvider + StateProviderFactory + EvmEnvProvider + 'static,
|
||||||
{
|
{
|
||||||
/// Executes the call request at the given [BlockId]
|
/// Executes the call request at the given [BlockId]
|
||||||
pub(crate) fn call_at(
|
pub(crate) fn call_at(
|
||||||
|
|||||||
@ -10,7 +10,7 @@ use reth_network_api::NetworkInfo;
|
|||||||
use reth_primitives::{
|
use reth_primitives::{
|
||||||
Address, BlockId, BlockNumberOrTag, ChainInfo, TransactionSigned, H256, U64,
|
Address, BlockId, BlockNumberOrTag, ChainInfo, TransactionSigned, H256, U64,
|
||||||
};
|
};
|
||||||
use reth_provider::{BlockProvider, StateProviderFactory};
|
use reth_provider::{BlockProvider, EvmEnvProvider, StateProviderFactory};
|
||||||
use std::num::NonZeroUsize;
|
use std::num::NonZeroUsize;
|
||||||
|
|
||||||
use crate::eth::error::EthResult;
|
use crate::eth::error::EthResult;
|
||||||
@ -97,7 +97,7 @@ impl<Client, Pool, Network> EthApi<Client, Pool, Network> {
|
|||||||
|
|
||||||
impl<Client, Pool, Network> EthApi<Client, Pool, Network>
|
impl<Client, Pool, Network> EthApi<Client, Pool, Network>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + StateProviderFactory + 'static,
|
Client: BlockProvider + StateProviderFactory + EvmEnvProvider + 'static,
|
||||||
{
|
{
|
||||||
fn convert_block_number(&self, num: BlockNumberOrTag) -> Result<Option<u64>> {
|
fn convert_block_number(&self, num: BlockNumberOrTag) -> Result<Option<u64>> {
|
||||||
self.client().convert_block_number(num)
|
self.client().convert_block_number(num)
|
||||||
@ -176,7 +176,7 @@ where
|
|||||||
impl<Client, Pool, Network> EthApiSpec for EthApi<Client, Pool, Network>
|
impl<Client, Pool, Network> EthApiSpec for EthApi<Client, Pool, Network>
|
||||||
where
|
where
|
||||||
Pool: TransactionPool + Clone + 'static,
|
Pool: TransactionPool + Clone + 'static,
|
||||||
Client: BlockProvider + StateProviderFactory + 'static,
|
Client: BlockProvider + StateProviderFactory + EvmEnvProvider + 'static,
|
||||||
Network: NetworkInfo + 'static,
|
Network: NetworkInfo + 'static,
|
||||||
{
|
{
|
||||||
/// Returns the current ethereum protocol version.
|
/// Returns the current ethereum protocol version.
|
||||||
|
|||||||
@ -11,7 +11,7 @@ use reth_primitives::{
|
|||||||
rpc::transaction::eip2930::AccessListWithGasUsed, Address, BlockId, BlockNumberOrTag, Bytes,
|
rpc::transaction::eip2930::AccessListWithGasUsed, Address, BlockId, BlockNumberOrTag, Bytes,
|
||||||
Header, H256, H64, U256, U64,
|
Header, H256, H64, U256, U64,
|
||||||
};
|
};
|
||||||
use reth_provider::{BlockProvider, HeaderProvider, StateProviderFactory};
|
use reth_provider::{BlockProvider, EvmEnvProvider, HeaderProvider, StateProviderFactory};
|
||||||
use reth_rpc_api::EthApiServer;
|
use reth_rpc_api::EthApiServer;
|
||||||
use reth_rpc_types::{
|
use reth_rpc_types::{
|
||||||
CallRequest, EIP1186AccountProofResponse, FeeHistory, FeeHistoryCacheItem, Index, RichBlock,
|
CallRequest, EIP1186AccountProofResponse, FeeHistory, FeeHistoryCacheItem, Index, RichBlock,
|
||||||
@ -26,7 +26,7 @@ impl<Client, Pool, Network> EthApiServer for EthApi<Client, Pool, Network>
|
|||||||
where
|
where
|
||||||
Self: EthApiSpec,
|
Self: EthApiSpec,
|
||||||
Pool: TransactionPool + 'static,
|
Pool: TransactionPool + 'static,
|
||||||
Client: BlockProvider + HeaderProvider + StateProviderFactory + 'static,
|
Client: BlockProvider + HeaderProvider + StateProviderFactory + EvmEnvProvider + 'static,
|
||||||
Network: 'static,
|
Network: 'static,
|
||||||
{
|
{
|
||||||
/// Handler for: `eth_protocolVersion`
|
/// Handler for: `eth_protocolVersion`
|
||||||
|
|||||||
@ -5,11 +5,11 @@ use crate::{
|
|||||||
EthApi,
|
EthApi,
|
||||||
};
|
};
|
||||||
use reth_primitives::{Address, BlockId, Bytes, H256, U256};
|
use reth_primitives::{Address, BlockId, Bytes, H256, U256};
|
||||||
use reth_provider::{BlockProvider, StateProvider, StateProviderFactory};
|
use reth_provider::{BlockProvider, EvmEnvProvider, StateProvider, StateProviderFactory};
|
||||||
|
|
||||||
impl<Client, Pool, Network> EthApi<Client, Pool, Network>
|
impl<Client, Pool, Network> EthApi<Client, Pool, Network>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + StateProviderFactory + 'static,
|
Client: BlockProvider + StateProviderFactory + EvmEnvProvider + 'static,
|
||||||
{
|
{
|
||||||
pub(crate) fn get_code(&self, address: Address, block_id: Option<BlockId>) -> EthResult<Bytes> {
|
pub(crate) fn get_code(&self, address: Address, block_id: Option<BlockId>) -> EthResult<Bytes> {
|
||||||
let state =
|
let state =
|
||||||
|
|||||||
@ -5,7 +5,7 @@ use crate::{
|
|||||||
EthApi,
|
EthApi,
|
||||||
};
|
};
|
||||||
use reth_primitives::{Bytes, FromRecoveredTransaction, TransactionSigned, H256};
|
use reth_primitives::{Bytes, FromRecoveredTransaction, TransactionSigned, H256};
|
||||||
use reth_provider::{BlockProvider, StateProviderFactory};
|
use reth_provider::{BlockProvider, EvmEnvProvider, StateProviderFactory};
|
||||||
use reth_rlp::Decodable;
|
use reth_rlp::Decodable;
|
||||||
use reth_rpc_types::TransactionRequest;
|
use reth_rpc_types::TransactionRequest;
|
||||||
use reth_transaction_pool::{TransactionOrigin, TransactionPool};
|
use reth_transaction_pool::{TransactionOrigin, TransactionPool};
|
||||||
@ -13,7 +13,7 @@ use reth_transaction_pool::{TransactionOrigin, TransactionPool};
|
|||||||
impl<Client, Pool, Network> EthApi<Client, Pool, Network>
|
impl<Client, Pool, Network> EthApi<Client, Pool, Network>
|
||||||
where
|
where
|
||||||
Pool: TransactionPool + 'static,
|
Pool: TransactionPool + 'static,
|
||||||
Client: BlockProvider + StateProviderFactory + 'static,
|
Client: BlockProvider + StateProviderFactory + EvmEnvProvider + 'static,
|
||||||
Network: 'static,
|
Network: 'static,
|
||||||
{
|
{
|
||||||
pub(crate) async fn send_transaction(&self, _request: TransactionRequest) -> EthResult<H256> {
|
pub(crate) async fn send_transaction(&self, _request: TransactionRequest) -> EthResult<H256> {
|
||||||
|
|||||||
@ -11,7 +11,7 @@ use reth_primitives::{
|
|||||||
filter::{Filter, FilterBlockOption, FilteredParams},
|
filter::{Filter, FilterBlockOption, FilteredParams},
|
||||||
Block, U256,
|
Block, U256,
|
||||||
};
|
};
|
||||||
use reth_provider::BlockProvider;
|
use reth_provider::{BlockProvider, EvmEnvProvider};
|
||||||
use reth_rpc_api::EthFilterApiServer;
|
use reth_rpc_api::EthFilterApiServer;
|
||||||
use reth_rpc_types::{FilterChanges, FilterId, Log};
|
use reth_rpc_types::{FilterChanges, FilterId, Log};
|
||||||
use reth_transaction_pool::TransactionPool;
|
use reth_transaction_pool::TransactionPool;
|
||||||
@ -51,7 +51,7 @@ impl<Client, Pool> EthFilter<Client, Pool> {
|
|||||||
#[async_trait]
|
#[async_trait]
|
||||||
impl<Client, Pool> EthFilterApiServer for EthFilter<Client, Pool>
|
impl<Client, Pool> EthFilterApiServer for EthFilter<Client, Pool>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + 'static,
|
Client: BlockProvider + EvmEnvProvider + 'static,
|
||||||
Pool: TransactionPool + 'static,
|
Pool: TransactionPool + 'static,
|
||||||
{
|
{
|
||||||
async fn new_filter(&self, filter: Filter) -> RpcResult<FilterId> {
|
async fn new_filter(&self, filter: Filter) -> RpcResult<FilterId> {
|
||||||
@ -172,7 +172,7 @@ struct EthFilterInner<Client, Pool> {
|
|||||||
|
|
||||||
impl<Client, Pool> EthFilterInner<Client, Pool>
|
impl<Client, Pool> EthFilterInner<Client, Pool>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + 'static,
|
Client: BlockProvider + EvmEnvProvider + 'static,
|
||||||
Pool: TransactionPool + 'static,
|
Pool: TransactionPool + 'static,
|
||||||
{
|
{
|
||||||
/// Installs a new filter and returns the new identifier.
|
/// Installs a new filter and returns the new identifier.
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
use jsonrpsee::{types::SubscriptionResult, SubscriptionSink};
|
use jsonrpsee::{types::SubscriptionResult, SubscriptionSink};
|
||||||
use reth_interfaces::events::ChainEventSubscriptions;
|
use reth_interfaces::events::ChainEventSubscriptions;
|
||||||
use reth_primitives::{rpc::FilteredParams, TxHash};
|
use reth_primitives::{rpc::FilteredParams, TxHash};
|
||||||
use reth_provider::BlockProvider;
|
use reth_provider::{BlockProvider, EvmEnvProvider};
|
||||||
use reth_rpc_api::EthPubSubApiServer;
|
use reth_rpc_api::EthPubSubApiServer;
|
||||||
use reth_rpc_types::{
|
use reth_rpc_types::{
|
||||||
pubsub::{Params, SubscriptionKind, SubscriptionResult as EthSubscriptionResult},
|
pubsub::{Params, SubscriptionKind, SubscriptionResult as EthSubscriptionResult},
|
||||||
@ -50,7 +50,7 @@ impl<Client, Pool, Events> EthPubSub<Client, Pool, Events> {
|
|||||||
|
|
||||||
impl<Client, Pool, Events> EthPubSubApiServer for EthPubSub<Client, Pool, Events>
|
impl<Client, Pool, Events> EthPubSubApiServer for EthPubSub<Client, Pool, Events>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + Clone + 'static,
|
Client: BlockProvider + EvmEnvProvider + Clone + 'static,
|
||||||
Pool: TransactionPool + 'static,
|
Pool: TransactionPool + 'static,
|
||||||
Events: ChainEventSubscriptions + Clone + 'static,
|
Events: ChainEventSubscriptions + Clone + 'static,
|
||||||
{
|
{
|
||||||
@ -78,7 +78,7 @@ async fn handle_accepted<Client, Pool, Events>(
|
|||||||
kind: SubscriptionKind,
|
kind: SubscriptionKind,
|
||||||
params: Option<Params>,
|
params: Option<Params>,
|
||||||
) where
|
) where
|
||||||
Client: BlockProvider + 'static,
|
Client: BlockProvider + EvmEnvProvider + 'static,
|
||||||
Pool: TransactionPool + 'static,
|
Pool: TransactionPool + 'static,
|
||||||
Events: ChainEventSubscriptions + 'static,
|
Events: ChainEventSubscriptions + 'static,
|
||||||
{
|
{
|
||||||
@ -141,7 +141,7 @@ where
|
|||||||
|
|
||||||
impl<Client, Pool, Events> EthPubSubInner<Client, Pool, Events>
|
impl<Client, Pool, Events> EthPubSubInner<Client, Pool, Events>
|
||||||
where
|
where
|
||||||
Client: BlockProvider + 'static,
|
Client: BlockProvider + EvmEnvProvider + 'static,
|
||||||
Events: ChainEventSubscriptions + 'static,
|
Events: ChainEventSubscriptions + 'static,
|
||||||
{
|
{
|
||||||
/// Returns a stream that yields all new RPC blocks.
|
/// Returns a stream that yields all new RPC blocks.
|
||||||
|
|||||||
Reference in New Issue
Block a user