Skip to main content

EthApi

Struct EthApi 

Source
pub struct EthApi<N, Rpc>
where N: RpcNodeCore, Rpc: RpcConvert,
{ /* private fields */ }
Available on crate feature rpc only.
Expand description

Eth API implementation.

This type provides the functionality for handling eth_ related requests. These are implemented two-fold: Core functionality is implemented as EthApiSpec trait. Additionally, the required server implementations (e.g. EthApiServer) are implemented separately in submodules. The rpc handler implementation can then delegate to the main impls. This way EthApi is not limited to jsonrpsee and can be used standalone or in other network handlers (for example ipc).

§Trait requirements

While this type requires various unrestricted generic components, trait bounds are enforced when additional traits are implemented for this type.

Implementations§

Source§

impl EthApi<RpcNodeCoreAdapter<NoopProvider, NoopTransactionPool, NoopNetwork, EthEvmConfig>, RpcConverter<Ethereum, EthEvmConfig, EthReceiptConverter<ChainSpec>>>

Source

pub fn builder<Provider, Pool, Network, EvmConfig, ChainSpec>( provider: Provider, pool: Pool, network: Network, evm_config: EvmConfig, ) -> EthApiBuilder<RpcNodeCoreAdapter<Provider, Pool, Network, EvmConfig>, RpcConverter<Ethereum, EvmConfig, EthReceiptConverter<ChainSpec>>>
where RpcNodeCoreAdapter<Provider, Pool, Network, EvmConfig>: RpcNodeCore<Evm = EvmConfig>, <RpcNodeCoreAdapter<Provider, Pool, Network, EvmConfig> as RpcNodeCore>::Provider: ChainSpecProvider<ChainSpec = ChainSpec>,

Convenience fn to obtain a new EthApiBuilder instance with mandatory components.

Creating an EthApi requires a few mandatory components:

  • provider: The type responsible for fetching requested data from disk.
  • transaction pool: To interact with the pool, submitting new transactions (e.g. eth_sendRawTransactions).
  • network: required to handle requests related to network state (e.g. eth_syncing).
  • evm config: Knows how create a new EVM instance to transact,estimate,call,trace.
§Create an instance with noop ethereum implementations
use alloy_network::Ethereum;
use reth_evm_ethereum::EthEvmConfig;
use reth_network_api::noop::NoopNetwork;
use reth_provider::noop::NoopProvider;
use reth_rpc::EthApi;
use reth_transaction_pool::noop::NoopTransactionPool;
let eth_api = EthApi::builder(
    NoopProvider::default(),
    NoopTransactionPool::default(),
    NoopNetwork::default(),
    EthEvmConfig::mainnet(),
)
.build();

Trait Implementations§

Source§

impl<N, Rpc> Call for EthApi<N, Rpc>
where EthApiError: FromEvmError<<N as RpcNodeCore>::Evm>, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError, Evm = <N as RpcNodeCore>::Evm>, N: RpcNodeCore,

Source§

fn call_gas_limit(&self) -> u64

Returns default gas limit to use for eth_call and tracing RPC methods. Read more
Source§

fn max_simulate_blocks(&self) -> u64

Returns the maximum number of blocks accepted for eth_simulateV1.
Source§

fn compute_state_root_for_eth_simulate(&self) -> bool

Returns whether eth_simulateV1 should compute state roots.
Source§

fn evm_memory_limit(&self) -> u64

Returns the maximum memory the EVM can allocate per RPC request.
Source§

fn simulate_call_nonce( &self, _request: &<<Self::RpcConvert as RpcConvert>::Network as RpcTypes>::TransactionRequest, _db: &mut dyn DynDatabase, ) -> Result<Option<u64>, EthApiError>

Returns the nonce for an eth_simulateV1 call that has none. Read more
Source§

fn caller_gas_allowance( &self, db: impl Database>, _evm_env: &<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, tx_env: &Recovered<<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes as EvmTypesHost>::Tx>, ) -> Result<u64, Self::Error>
where <impl Database as Database>::Error: Into<EthApiError>,

Returns the max gas limit that the caller can afford given a transaction environment.
Source§

fn transact<DB>( &self, db: DB, evm_env: <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, tx_env: Recovered<<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes as EvmTypesHost>::Tx>, ) -> Result<TxResultWithState<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes>, Self::Error>
where DB: Database + Debug,

Executes the TxEnv against the given Database without committing state changes.
Source§

fn transact_with_inspector<DB, I>( &self, db: DB, evm_env: <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, tx_env: Recovered<<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes as EvmTypesHost>::Tx>, inspector: I, ) -> Result<(I, TxResultWithState<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes>), Self::Error>
where DB: Database + Debug, I: Inspector<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes> + 'static,

Executes the reth_evm::EvmEnv against the given Database without committing state changes.
Source§

fn transact_call_at( &self, request: <<Self::RpcConvert as RpcConvert>::Network as RpcTypes>::TransactionRequest, at: BlockId, overrides: EvmOverrides, ) -> impl Future<Output = Result<TxResultWithState<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes>, Self::Error>> + Send
where Self: LoadPendingBlock,

Executes the call request at the given BlockId. Read more
Source§

fn spawn_with_state_at_block<F, R>( &self, at: impl Into<BlockId>, f: F, ) -> impl Future<Output = Result<R, Self::Error>> + Send
where F: FnOnce(Self, CacheDB<Db<StateProviderDatabase<EvmStateProviderAdapter<Box<dyn StateProvider + Send>>>>>) -> Result<R, Self::Error> + Send + 'static, R: Send + 'static,

Executes the closure with the state that corresponds to the given BlockId on a new task
Source§

fn spawn_with_call_at<F, R>( &self, request: <<Self::RpcConvert as RpcConvert>::Network as RpcTypes>::TransactionRequest, at: BlockId, overrides: EvmOverrides, f: F, ) -> impl Future<Output = Result<R, Self::Error>> + Send
where Self: LoadPendingBlock, F: FnOnce(&mut CacheDB<Db<StateProviderDatabase<EvmStateProviderAdapter<Box<dyn StateProvider + Send>>>>>, <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, Recovered<<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes as EvmTypesHost>::Tx>) -> Result<R, Self::Error> + Send + 'static, R: Send + 'static,

Prepares the state and env for the given RpcTxReq at the given BlockId and executes the closure on a new task returning the result of the closure. Read more
Source§

fn spawn_replay_transaction<F, R>( &self, hash: FixedBytes<32>, f: F, ) -> impl Future<Output = Result<Option<R>, Self::Error>> + Send
where Self: LoadBlock + LoadTransaction, F: FnOnce(TransactionInfo, TxResultWithState<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes>, CacheDB<Db<StateProviderDatabase<EvmStateProviderAdapter<Box<dyn StateProvider + Send>>>>>) -> Result<R, Self::Error> + Send + 'static, R: Send + 'static,

Retrieves the transaction if it exists and executes it. Read more
Source§

fn replay_transactions_until_with_executor<'a, Txs>( &self, executor: &mut <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::Executor<'_>, transactions: Txs, target_tx_index: usize, ) -> Result<(), Self::Error>
where Txs: IntoIterator<Item = Recovered<&'a <Self::Provider as TransactionsProvider>::Transaction>>,

Replays all transactions before the target transaction index through the given executor. Read more
Source§

fn block_executor<'a>( &'a self, block: &'a RecoveredBlock<<Self::Primitives as NodePrimitives>::Block>, db: &'a mut CacheDB<Db<StateProviderDatabase<EvmStateProviderAdapter<Box<dyn StateProvider + Send>>>>>, evm_env: <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, ) -> Result<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::Executor<'a>, Self::Error>

Creates a block executor for block on db with the given EVM environment. Read more
Source§

fn create_txn_env( &self, evm_env: &<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, request: <<Self::RpcConvert as RpcConvert>::Network as RpcTypes>::TransactionRequest, db: impl Database>, ) -> Result<Recovered<<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes as EvmTypesHost>::Tx>, Self::Error>
where <impl Database as Database>::Error: Into<EthApiError>,

All TxEnv fields are derived from the given RpcTxReq, if fields are None, they fall back to the reth_evm::EvmEnv’s settings.
Source§

fn prepare_call_env<DB>( &self, evm_env: <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, request: <<Self::RpcConvert as RpcConvert>::Network as RpcTypes>::TransactionRequest, db: &mut CacheDB<DB>, overrides: EvmOverrides, ) -> Result<(<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, Recovered<<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes as EvmTypesHost>::Tx>), Self::Error>
where DB: DynDatabase,

Prepares the reth_evm::EvmEnv for execution of calls. Read more
Source§

impl<N, Rpc> Clone for EthApi<N, Rpc>
where N: RpcNodeCore, Rpc: RpcConvert,

Source§

fn clone(&self) -> EthApi<N, Rpc>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<N, Rpc> Debug for EthApi<N, Rpc>
where N: RpcNodeCore, Rpc: RpcConvert,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<N, Rpc> Deref for EthApi<N, Rpc>
where N: RpcNodeCore, Rpc: RpcConvert,

Source§

type Target = Arc<EthApiInner<N, Rpc>>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<EthApi<N, Rpc> as Deref>::Target

Dereferences the value.
Source§

impl<N, Rpc> EstimateCall for EthApi<N, Rpc>
where EthApiError: FromEvmError<<N as RpcNodeCore>::Evm>, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError, Evm = <N as RpcNodeCore>::Evm>, N: RpcNodeCore,

Source§

fn estimate_gas_with<S>( &self, evm_env: <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, request: <<Self::RpcConvert as RpcConvert>::Network as RpcTypes>::TransactionRequest, state: S, overrides: EvmOverrides, ) -> Result<Uint<256, 4>, Self::Error>

Estimates the gas usage of the request with the state. Read more
Source§

fn estimate_gas_at( &self, request: <<Self::RpcConvert as RpcConvert>::Network as RpcTypes>::TransactionRequest, at: BlockId, overrides: EvmOverrides, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
where Self: LoadPendingBlock,

Estimate gas needed for execution of the request at the BlockId.
Source§

impl<N, Rpc> EthApiSpec for EthApi<N, Rpc>
where N: RpcNodeCore, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError>,

Source§

fn starting_block(&self) -> Uint<256, 4>

Returns the block node is started on.
Source§

fn protocol_version( &self, ) -> impl Future<Output = Result<Uint<64, 1>, RethError>> + Send

Returns the current ethereum protocol version.
Source§

fn chain_id(&self) -> Uint<64, 1>

Returns the chain id
Source§

fn chain_info(&self) -> Result<ChainInfo, RethError>

Returns provider chain info
Source§

fn capabilities(&self) -> Result<EthCapabilities, RethError>
where Self: EthState,

Returns effective routing capabilities for this node. Read more
Source§

fn is_syncing(&self) -> bool

Returns true if the network is undergoing sync.
Source§

fn sync_status(&self) -> Result<SyncStatus, RethError>

Returns the SyncStatus of the network
Source§

impl<N, Rpc> EthApiTypes for EthApi<N, Rpc>
where N: RpcNodeCore, Rpc: RpcConvert<Error = EthApiError>,

Source§

type Error = EthApiError

Extension of FromEthApiError, with network specific errors.
Source§

type NetworkTypes = <Rpc as RpcConvert>::Network

Blockchain primitive types, specific to network, e.g. block and transaction.
Source§

type RpcConvert = Rpc

Conversion methods for transaction RPC type.
Source§

fn eth_api_settings(&self) -> &EthApiSettings

Returns the settings shared by the eth RPC helpers.
Source§

fn converter(&self) -> &<EthApi<N, Rpc> as EthApiTypes>::RpcConvert

Returns reference to transaction response builder.
Source§

impl<N, Rpc> EthBlocks for EthApi<N, Rpc>
where N: RpcNodeCore, EthApiError: FromEvmError<<N as RpcNodeCore>::Evm>, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError>,

Source§

fn rpc_block_header( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<<Self::NetworkTypes as RpcTypes>::Header>, Self::Error>> + Send
where Self: FullEthApiTypes,

Returns the block header for the given block id.
Source§

fn rpc_block( &self, block_id: BlockId, full: bool, ) -> impl Future<Output = Result<Option<Block<<Self::NetworkTypes as RpcTypes>::TransactionResponse, <Self::NetworkTypes as RpcTypes>::Header>>, Self::Error>> + Send
where Self: FullEthApiTypes,

Returns the populated rpc block object for the given block id. Read more
Source§

fn block_transaction_count( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<usize>, Self::Error>> + Send

Returns the number transactions in the given block. Read more
Source§

fn block_receipts( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<Vec<<Self::NetworkTypes as RpcTypes>::Receipt>>, Self::Error>> + Send
where Self: LoadReceipt,

Helper function for eth_getBlockReceipts. Read more
Source§

fn load_block_and_receipts( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<(Arc<RecoveredBlock<<Self::Provider as BlockReader>::Block>>, SharedReceipts<<Self::Provider as ReceiptProvider>::Receipt>)>, Self::Error>> + Send

Helper method that loads a block and all its receipts.
Source§

fn ommers( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<Vec<<Self::Provider as HeaderProvider>::Header>>, Self::Error>> + Send

Returns uncle headers of given block. Read more
Source§

fn ommer_by_block_and_index( &self, block_id: BlockId, index: Index, ) -> impl Future<Output = Result<Option<Block<<Self::NetworkTypes as RpcTypes>::TransactionResponse, <Self::NetworkTypes as RpcTypes>::Header>>, Self::Error>> + Send

Returns uncle block at given index in given block. Read more
Source§

impl<N, Rpc> EthCall for EthApi<N, Rpc>
where EthApiError: FromEvmError<<N as RpcNodeCore>::Evm>, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError, Evm = <N as RpcNodeCore>::Evm>, N: RpcNodeCore,

Source§

fn estimate_gas_at( &self, request: <<Self::RpcConvert as RpcConvert>::Network as RpcTypes>::TransactionRequest, at: BlockId, overrides: EvmOverrides, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send

Estimate gas needed for execution of the request at the BlockId.
Source§

fn simulate_v1( &self, payload: SimulatePayload<<<Self::RpcConvert as RpcConvert>::Network as RpcTypes>::TransactionRequest>, block: Option<BlockId>, ) -> impl Future<Output = Result<Vec<SimulatedBlock<Block<<Self::NetworkTypes as RpcTypes>::TransactionResponse, <Self::NetworkTypes as RpcTypes>::Header>>>, Self::Error>> + Send

eth_simulateV1 executes an arbitrary number of transactions on top of the requested state. The transactions are packed into individual blocks. Overrides can be provided. Read more
Source§

fn call( &self, request: <<Self::RpcConvert as RpcConvert>::Network as RpcTypes>::TransactionRequest, block_number: Option<BlockId>, overrides: EvmOverrides, ) -> impl Future<Output = Result<Bytes, Self::Error>> + Send

Executes the call request (eth_call) and returns the output
Source§

fn call_many( &self, bundles: Vec<Bundle<<<Self::RpcConvert as RpcConvert>::Network as RpcTypes>::TransactionRequest>>, state_context: Option<StateContext>, state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, ) -> impl Future<Output = Result<Vec<Vec<EthCallResponse>>, Self::Error>> + Send
where Self: Trace,

Simulate transactions at an arbitrary blockchain index, with the optionality of state overrides. Read more
Source§

fn create_access_list_at( &self, request: <<Self::RpcConvert as RpcConvert>::Network as RpcTypes>::TransactionRequest, block_number: Option<BlockId>, state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, ) -> impl Future<Output = Result<AccessListResult, Self::Error>> + Send
where Self: Trace,

Creates AccessListResult for the RpcTxReq at the given BlockId, or latest block.
Source§

fn create_access_list_with( &self, evm_env: <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, at: BlockId, request: <<Self::RpcConvert as RpcConvert>::Network as RpcTypes>::TransactionRequest, state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, ) -> impl Future<Output = Result<AccessListResult, Self::Error>> + Send
where Self: Trace,

Creates AccessListResult for the RpcTxReq at the given BlockId.
Source§

impl<N, Rpc> EthFees for EthApi<N, Rpc>
where N: RpcNodeCore, EthApiError: FromEvmError<<N as RpcNodeCore>::Evm>, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError>,

Source§

fn gas_price( &self, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
where Self: LoadBlock,

Returns a suggestion for a gas price for legacy transactions. Read more
Source§

fn blob_base_fee( &self, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
where Self: LoadBlock,

Returns a suggestion for a base fee for blob transactions.
Source§

fn base_fee( &self, ) -> impl Future<Output = Result<Option<Uint<256, 4>>, Self::Error>> + Send
where Self: LoadBlock,

Returns the base fee for the next block, or None before London activation.
Source§

fn suggested_priority_fee( &self, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
where Self: 'static,

Returns a suggestion for the priority fee (the tip)
Source§

fn fee_history( &self, block_count: u64, newest_block: BlockNumberOrTag, reward_percentiles: Option<Vec<f64>>, ) -> impl Future<Output = Result<FeeHistory, Self::Error>> + Send

Reports the fee history, for the given amount of blocks, up until the given newest block. Read more
Source§

fn approximate_percentile( &self, entry: &FeeHistoryEntry<<Self::Provider as HeaderProvider>::Header>, requested_percentile: f64, ) -> u128

Approximates reward at a given percentile for a specific block Based on the configured resolution
Source§

impl<N, Rpc> EthState for EthApi<N, Rpc>
where N: RpcNodeCore, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError>, EthApi<N, Rpc>: LoadPendingBlock,

Source§

fn max_proof_window(&self) -> u64

Returns the maximum number of blocks into the past for generating state proofs.
Source§

fn ensure_within_proof_window( &self, block_id: BlockId, ) -> Result<(), Self::Error>
where Self: EthApiSpec,

Validates that the given block is within the configured proof window. Read more
Source§

fn transaction_count( &self, address: Address, block_id: Option<BlockId>, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send

Returns the number of transactions sent from an address at the given block identifier. Read more
Source§

fn get_code( &self, address: Address, block_id: Option<BlockId>, ) -> impl Future<Output = Result<Bytes, Self::Error>> + Send

Returns code of given account, at given blocknumber.
Source§

fn balance( &self, address: Address, block_id: Option<BlockId>, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send

Returns balance of given account, at given blocknumber.
Source§

fn storage_at( &self, address: Address, index: JsonStorageKey, block_id: Option<BlockId>, ) -> impl Future<Output = Result<FixedBytes<32>, Self::Error>> + Send

Returns values stored of given account, at given blocknumber.
Source§

fn storage_values( &self, requests: HashMap<Address, Vec<JsonStorageKey>>, block_id: Option<BlockId>, ) -> impl Future<Output = Result<HashMap<Address, Vec<FixedBytes<32>>>, Self::Error>> + Send

Returns values from multiple storage positions across multiple addresses. Read more
Source§

fn get_proof( &self, address: Address, keys: Vec<JsonStorageKey>, block_id: Option<BlockId>, ) -> Result<impl Future<Output = Result<EIP1186AccountProofResponse, Self::Error>> + Send, Self::Error>
where Self: EthApiSpec,

Returns values stored of given account, with Merkle-proof, at given blocknumber. Read more
Source§

fn get_multi_proof( &self, targets: Vec<(Address, Vec<FixedBytes<32>>)>, block_id: Option<BlockId>, ) -> Result<impl Future<Output = Result<Vec<EIP1186AccountProofResponse>, Self::Error>> + Send, Self::Error>
where Self: EthApiSpec,

Returns account and storage proofs for multiple targets at the given block number. Read more
Source§

fn get_account( &self, address: Address, block_id: BlockId, ) -> impl Future<Output = Result<Option<TrieAccount>, Self::Error>> + Send
where Self: EthApiSpec,

Returns the account at the given address for the provided block identifier.
Source§

fn get_account_info( &self, address: Address, block_id: BlockId, ) -> impl Future<Output = Result<AccountInfo, Self::Error>> + Send

Retrieves the account’s balance, nonce, and code for a given address.
Source§

impl<N, Rpc> EthSubscriptions for EthApi<N, Rpc>
where N: RpcNodeCore, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError>,

Source§

fn log_stream( &self, filter: Filter, ) -> impl Stream<Item = <Self::NetworkTypes as RpcTypes>::Log> + Send + Unpin

Returns a stream that yields matching logs from canonical chain updates.
Source§

fn header_stream( &self, ) -> impl Stream<Item = <Self::NetworkTypes as RpcTypes>::Header> + Send + Unpin

Returns a stream that yields new block headers from canonical chain updates.
Source§

fn transaction_receipts_stream( &self, filter: TransactionReceiptsParams, ) -> impl Stream<Item = Vec<<Self::NetworkTypes as RpcTypes>::Receipt>> + Send + Unpin

Returns a stream that yields matching transaction receipts from canonical chain updates.
Source§

impl<N, Rpc> EthTransactions for EthApi<N, Rpc>
where N: RpcNodeCore, EthApiError: FromEvmError<<N as RpcNodeCore>::Evm>, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError>,

Source§

fn signers( &self, ) -> &RwLock<RawRwLock, Vec<Box<dyn EthSigner<<<EthApi<N, Rpc> as RpcNodeCore>::Provider as TransactionsProvider>::Transaction, <<EthApi<N, Rpc> as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest>>>>

Returns a handle for signing data. Read more
Source§

async fn send_pool_transaction( &self, origin: TransactionOrigin, tx: WithEncoded<<<EthApi<N, Rpc> as RpcNodeCore>::Pool as TransactionPool>::Transaction>, ) -> Result<FixedBytes<32>, <EthApi<N, Rpc> as EthApiTypes>::Error>

Submits the pool transaction to the pool with the given TransactionOrigin.
Source§

fn accounts(&self) -> Vec<Address>

Returns a list of addresses owned by provider.
Source§

fn send_raw_transaction_sync_timeout(&self) -> Duration

Returns the timeout duration for send_raw_transaction_sync RPC method.
Source§

fn send_raw_transaction( &self, tx: Bytes, ) -> impl Future<Output = Result<FixedBytes<32>, Self::Error>> + Send

Decodes and recovers the transaction and submits it to the pool. Read more
Source§

fn recover_raw_pool_transaction( &self, tx: &[u8], ) -> Result<<Self::Pool as TransactionPool>::Transaction, Self::Error>

Decodes and recovers a raw pool transaction, sharing sender recovery when configured.
Source§

fn send_transaction( &self, origin: TransactionOrigin, tx: WithEncoded<Recovered<<<Self::Pool as TransactionPool>::Transaction as PoolTransaction>::Pooled>>, ) -> impl Future<Output = Result<FixedBytes<32>, Self::Error>> + Send

Submits the transaction to the pool with the given TransactionOrigin.
Source§

fn send_raw_transaction_sync( &self, tx: Bytes, timeout_ms: Option<u64>, ) -> impl Future<Output = Result<<Self::NetworkTypes as RpcTypes>::Receipt, Self::Error>> + Send
where Self: LoadReceipt,

Decodes and recovers the transaction and submits it to the pool. Read more
Source§

fn transaction_by_hash( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<TransactionSource<<Self::Provider as TransactionsProvider>::Transaction>>, Self::Error>> + Send

Returns the transaction by hash. Read more
Source§

fn pending_transactions( &self, ) -> Result<Vec<<Self::NetworkTypes as RpcTypes>::TransactionResponse>, Self::Error>

Returns all transactions from the local pending pool.
Source§

fn transactions_by_block( &self, block: FixedBytes<32>, ) -> impl Future<Output = Result<Option<Vec<<Self::Provider as TransactionsProvider>::Transaction>>, Self::Error>> + Send

Get all transactions in the block with the given hash. Read more
Source§

fn raw_transaction_by_hash( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<Bytes>, Self::Error>> + Send

Returns the EIP-2718 encoded transaction by hash. Read more
Source§

fn historical_transaction_by_hash_at( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<(TransactionSource<<Self::Provider as TransactionsProvider>::Transaction>, FixedBytes<32>)>, Self::Error>> + Send

Returns the historical transaction and the block it was mined in
Source§

fn transaction_receipt( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<<Self::NetworkTypes as RpcTypes>::Receipt>, Self::Error>> + Send
where Self: LoadReceipt,

Returns the transaction receipt for the given hash. Read more
Source§

fn load_transaction_and_receipt( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<(Recovered<<Self::Provider as TransactionsProvider>::Transaction>, TransactionMeta, <Self::Provider as ReceiptProvider>::Receipt, Option<Arc<Vec<<Self::Provider as ReceiptProvider>::Receipt>>>, Option<Arc<RecoveredBlock<<Self::Provider as BlockReader>::Block>>>)>, Self::Error>> + Send
where Self: 'static,

Helper method that loads a transaction and its receipt. Read more
Source§

fn transaction_by_block_and_tx_index( &self, block_id: BlockId, index: usize, ) -> impl Future<Output = Result<Option<<Self::NetworkTypes as RpcTypes>::TransactionResponse>, Self::Error>> + Send
where Self: LoadBlock,

Get transaction by BlockId and index of transaction within that block. Read more
Source§

fn get_transaction_by_sender_and_nonce( &self, sender: Address, nonce: u64, include_pending: bool, ) -> impl Future<Output = Result<Option<<Self::NetworkTypes as RpcTypes>::TransactionResponse>, Self::Error>> + Send
where Self: LoadBlock + LoadState,

Find a transaction by sender’s address and nonce.
Source§

fn raw_transaction_by_block_and_tx_index( &self, block_id: BlockId, index: usize, ) -> impl Future<Output = Result<Option<Bytes>, Self::Error>> + Send
where Self: LoadBlock,

Get transaction, as raw bytes, by BlockId and index of transaction within that block. Read more
Source§

fn send_transaction_request( &self, request: <Self::NetworkTypes as RpcTypes>::TransactionRequest, ) -> impl Future<Output = Result<FixedBytes<32>, Self::Error>> + Send

Signs transaction with a matching signer, if any and submits the transaction to the pool. Returns the hash of the signed transaction. Read more
Source§

fn fill_transaction( &self, request: <Self::NetworkTypes as RpcTypes>::TransactionRequest, ) -> impl Future<Output = Result<FillTransaction<<Self::Primitives as NodePrimitives>::SignedTx>, Self::Error>> + Send

Fills the defaults on a given unsigned transaction. Read more
Source§

fn sign_request( &self, from: &Address, txn: <Self::NetworkTypes as RpcTypes>::TransactionRequest, ) -> impl Future<Output = Result<<Self::Provider as TransactionsProvider>::Transaction, Self::Error>> + Send

Signs a transaction, with configured signers.
Source§

fn sign( &self, account: Address, message: Bytes, ) -> impl Future<Output = Result<Bytes, Self::Error>> + Send

Signs given message. Returns the signature.
Source§

fn sign_transaction( &self, request: <Self::NetworkTypes as RpcTypes>::TransactionRequest, ) -> impl Future<Output = Result<Bytes, Self::Error>> + Send

Signs a transaction request using the given account in request Returns the EIP-2718 encoded signed transaction. Read more
Source§

fn sign_typed_data( &self, data: &TypedData, account: Address, ) -> Result<Bytes, Self::Error>

Encodes and signs the typed data according EIP-712. Payload must implement Eip712 trait.
Source§

fn find_signer( &self, account: &Address, ) -> Result<Box<dyn EthSigner<<Self::Provider as TransactionsProvider>::Transaction, <Self::NetworkTypes as RpcTypes>::TransactionRequest>>, Self::Error>

Returns the signer for the given account, if found in configured signers.
Source§

impl<N, Rpc> GetBlockAccessList for EthApi<N, Rpc>
where EthApiError: FromEvmError<<N as RpcNodeCore>::Evm>, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError, Evm = <N as RpcNodeCore>::Evm>, N: RpcNodeCore, EthApi<N, Rpc>: Trace,

Source§

fn get_block_access_list( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<Vec<AccountChanges>>, Self::Error>> + Send

Retrieves the block access list for a block identified by its hash.
Source§

fn get_raw_block_access_list( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<Bytes>, Self::Error>> + Send

Retrieves the raw RLP-encoded block access list for a block.
Source§

impl<N, Rpc> LoadBlock for EthApi<N, Rpc>
where EthApi<N, Rpc>: LoadPendingBlock, N: RpcNodeCore, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError>,

Source§

fn recovered_block( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<Arc<RecoveredBlock<<Self::Provider as BlockReader>::Block>>>, Self::Error>> + Send

Returns the block object for the given block id.
Source§

fn recovered_block_and_maybe_bal( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<(Arc<RecoveredBlock<<Self::Provider as BlockReader>::Block>>, Option<Arc<DecodedBal<Arc<Bal>>>>)>, Self::Error>> + Send

Returns the block for the given block id, together with the block’s cached block access list, if any. Read more
Source§

impl<N, Rpc> LoadFee for EthApi<N, Rpc>
where N: RpcNodeCore, EthApiError: FromEvmError<<N as RpcNodeCore>::Evm>, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError>,

Source§

fn gas_oracle( &self, ) -> &GasPriceOracle<<EthApi<N, Rpc> as RpcNodeCore>::Provider>

Returns a handle for reading gas price. Read more
Source§

fn fee_history_cache( &self, ) -> &FeeHistoryCache<<<N as RpcNodeCore>::Provider as HeaderProvider>::Header>

Returns a handle for reading fee history data from memory. Read more
Source§

fn legacy_gas_price( &self, gas_price: Option<Uint<256, 4>>, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send

Returns the gas price if it is set, otherwise fetches a suggested gas price for legacy transactions.
Source§

fn eip1559_fees( &self, base_fee: Option<Uint<256, 4>>, max_priority_fee_per_gas: Option<Uint<256, 4>>, ) -> impl Future<Output = Result<(Uint<256, 4>, Uint<256, 4>), Self::Error>> + Send

Returns the EIP-1559 fees if they are set, otherwise fetches a suggested gas price for EIP-1559 transactions. Read more
Source§

fn eip4844_blob_fee( &self, blob_fee: Option<Uint<256, 4>>, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send

Returns the EIP-4844 blob fee if it is set, otherwise fetches a blob fee.
Source§

fn gas_price( &self, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send

Returns a suggestion for a gas price for legacy transactions. Read more
Source§

fn blob_base_fee( &self, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send

Returns a suggestion for a base fee for blob transactions.
Source§

fn base_fee( &self, ) -> impl Future<Output = Result<Option<Uint<256, 4>>, Self::Error>> + Send

Returns the base fee for the next block, or None before London activation.
Source§

fn suggested_priority_fee( &self, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
where Self: 'static,

Returns a suggestion for the priority fee (the tip)
Source§

impl<N, Rpc> LoadPendingBlock for EthApi<N, Rpc>
where N: RpcNodeCore, EthApiError: FromEvmError<<N as RpcNodeCore>::Evm>, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError>,

Source§

fn pending_block( &self, ) -> &Mutex<Option<PendingBlock<<EthApi<N, Rpc> as RpcNodeCore>::Primitives>>>

Returns a handle to the pending block. Read more
Source§

fn pending_env_builder( &self, ) -> &(dyn PendingEnvBuilder<<EthApi<N, Rpc> as RpcNodeCore>::Evm> + 'static)

Returns a PendingEnvBuilder for the pending block.
Source§

fn pending_block_kind(&self) -> PendingBlockKind

Returns the pending block kind.
Source§

fn pending_block_env_and_cfg( &self, ) -> Result<PendingBlockEnv<Self::Evm>, Self::Error>

Returns the pending block environment and its origin. Read more
Source§

fn next_env_attributes( &self, parent: &SealedHeader<<Self::Provider as HeaderProvider>::Header>, ) -> Result<<Self::Evm as ConfigureEvm>::NextBlockEnvCtx, Self::Error>

Returns ConfigureEvm::NextBlockEnvCtx for building a local pending block.
Source§

fn local_pending_state( &self, ) -> impl Future<Output = Result<Option<Box<dyn StateProvider + Send>>, Self::Error>> + Send
where Self: SpawnBlocking,

Returns a StateProviderBox on a mem-pool built pending block overlaying latest. Read more
Source§

fn local_pending_block_or_state( &self, ) -> impl Future<Output = Result<Option<PendingStateSource<Self::Primitives>>, Self::Error>> + Send
where Self: SpawnBlocking,

Selects the local pending source for state RPCs. Read more
Source§

fn pool_pending_block( &self, ) -> impl Future<Output = Result<Option<PendingBlock<Self::Primitives>>, Self::Error>> + Send
where Self: SpawnBlocking,

Returns a cached or newly built pending block from the transaction pool. Read more
Source§

fn build_pool_pending_block( &self, parent: SealedHeader<<Self::Provider as HeaderProvider>::Header>, evm_env: <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, ) -> impl Future<Output = Result<Option<PendingBlock<Self::Primitives>>, Self::Error>> + Send
where Self: SpawnBlocking,

Returns a cached or newly built pending block for the given parent and environment. Read more
Source§

fn local_pending_block( &self, ) -> impl Future<Output = Result<Option<BlockAndReceipts<Self::Primitives>>, Self::Error>> + Send

When enabled, returns the provider’s pending block or builds one from the pool.
Source§

fn build_block( &self, parent: &SealedHeader<<Self::Provider as HeaderProvider>::Header>, ) -> Result<ExecutedBlock<Self::Primitives>, Self::Error>

Builds a locally derived pending block using the configured provider and pool. Read more
Source§

impl<N, Rpc> LoadReceipt for EthApi<N, Rpc>
where N: RpcNodeCore, EthApiError: FromEvmError<<N as RpcNodeCore>::Evm>, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError>,

Source§

fn build_transaction_receipt( &self, tx: Recovered<<Self::Provider as TransactionsProvider>::Transaction>, meta: TransactionMeta, receipt: <Self::Provider as ReceiptProvider>::Receipt, all_receipts: Option<Arc<Vec<<Self::Provider as ReceiptProvider>::Receipt>>>, block: Option<Arc<RecoveredBlock<<Self::Provider as BlockReader>::Block>>>, ) -> impl Future<Output = Result<<Self::NetworkTypes as RpcTypes>::Receipt, Self::Error>> + Send

Helper method for eth_getBlockReceipts and eth_getTransactionReceipt. Read more
Source§

impl<N, Rpc> LoadState for EthApi<N, Rpc>
where N: RpcNodeCore, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives>, EthApi<N, Rpc>: LoadPendingBlock,

Source§

fn transaction_count( &self, address: Address, block_id: Option<BlockId>, ) -> impl Future<Output = Result<Uint<256, 4>, <EthApi<N, Rpc> as EthApiTypes>::Error>> + Send
where EthApi<N, Rpc>: SpawnBlocking,

Reads the nonce from the provider’s state instead of a locally built pending block.

A local pending block only applies pool transactions on top of the latest state, and the pool lookup for the pending tag already accounts for the sender’s transactions, so building the block and its state overlay only to read one nonce is redundant.

Source§

fn state_at_hash( &self, block_hash: FixedBytes<32>, ) -> Result<Box<dyn StateProvider + Send>, Self::Error>

Returns the state at the given block number
Source§

fn state_at_block_id( &self, at: BlockId, ) -> impl Future<Output = Result<Box<dyn StateProvider + Send>, Self::Error>> + Send
where Self: SpawnBlocking,

Returns the state at the given BlockId, preferring locally built state for pending. Read more
Source§

fn latest_state(&self) -> Result<Box<dyn StateProvider + Send>, Self::Error>

Returns the latest state
Source§

fn state_at_block_id_or_latest( &self, block_id: Option<BlockId>, ) -> impl Future<Output = Result<Box<dyn StateProvider + Send>, Self::Error>> + Send
where Self: SpawnBlocking,

Returns the state at the given BlockId enum or the latest. Read more
Source§

fn spawn_blocking_io_with_state<F, R>( &self, at: BlockId, f: F, ) -> impl Future<Output = Result<R, Self::Error>> + Send
where Self: SpawnBlocking, F: FnOnce(Self, Box<dyn StateProvider + Send>) -> Result<R, Self::Error> + Send + 'static, R: Send + 'static,

Executes f with the state at the given BlockId on a blocking IO task. Read more
Source§

fn evm_env_for_header( &self, header: &SealedHeader<<Self::Primitives as NodePrimitives>::BlockHeader>, ) -> Result<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, Self::Error>

Returns the EVM environment for the given sealed header.
Source§

fn evm_env_at( &self, at: BlockId, ) -> impl Future<Output = Result<(<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, BlockId), Self::Error>> + Send
where Self: SpawnBlocking,

Returns the EVM environment for the requested BlockId Read more
Source§

fn evm_env_and_recovered_block_at( &self, at: BlockId, ) -> impl Future<Output = Result<(Arc<RecoveredBlock<<Self::Primitives as NodePrimitives>::Block>>, <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, BlockId), Self::Error>> + Send
where Self: LoadBlock,

Returns the recovered block, EVM environment, and state block id for the requested BlockId. Read more
Source§

fn next_available_nonce_for( &self, request: &<Self::NetworkTypes as RpcTypes>::TransactionRequest, ) -> impl Future<Output = Result<u64, Self::Error>> + Send
where Self: SpawnBlocking,

Returns the next available nonce without gaps for the given address Next available nonce is either the on chain nonce of the account or the highest consecutive nonce in the pool + 1 Read more
Source§

fn transaction_count_with_state( &self, address: Address, at: BlockId, state: &Box<dyn StateProvider + Send>, ) -> Result<Uint<256, 4>, Self::Error>

Returns the number of transactions sent from an address, given the state at at. Read more
Source§

fn get_code( &self, address: Address, block_id: Option<BlockId>, ) -> impl Future<Output = Result<Bytes, Self::Error>> + Send
where Self: SpawnBlocking,

Returns code of given account, at the given identifier.
Source§

impl<N, Rpc> LoadTransaction for EthApi<N, Rpc>
where N: RpcNodeCore, EthApiError: FromEvmError<<N as RpcNodeCore>::Evm>, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError>,

Source§

fn recover_raw_transaction<T>( &self, tx: &[u8], ) -> Result<Recovered<T>, EthApiError>

Decodes and recovers a raw transaction, sharing sender recovery when configured.
Source§

fn recover_raw_transactions<T>( &self, txs: impl IntoIterator<Item = impl AsRef<[u8]>>, ) -> Result<Vec<Recovered<T>>, EthApiError>

Decodes and recovers raw transactions in order, stopping at the first error. Read more
Source§

fn recover_mined_transaction<T>( &self, tx: T, ) -> Result<Recovered<T>, EthApiError>

Recovers the sender of a mined transaction, reusing a cached sender when configured. Read more
Source§

fn transaction_by_hash( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<TransactionSource<<Self::Provider as TransactionsProvider>::Transaction>>, Self::Error>> + Send

Returns the transaction by hash. Read more
Source§

fn transaction_by_hash_at( &self, transaction_hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<(TransactionSource<<Self::Provider as TransactionsProvider>::Transaction>, BlockId)>, Self::Error>> + Send

Returns the transaction by including its corresponding BlockId. Read more
Source§

fn transaction_and_block( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<(TransactionSource<<Self::Provider as TransactionsProvider>::Transaction>, Arc<RecoveredBlock<<Self::Provider as BlockReader>::Block>>)>, Self::Error>> + Send

Fetches the transaction and the transaction’s block
Source§

fn transaction_and_block_and_maybe_bal( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<(TransactionSource<<Self::Provider as TransactionsProvider>::Transaction>, Arc<RecoveredBlock<<Self::Provider as BlockReader>::Block>>, Option<Arc<DecodedBal<Arc<Bal>>>>)>, Self::Error>> + Send

Fetches the transaction and the transaction’s block, together with the block’s cached block access list, if any. Read more
Source§

impl<N, Rpc> RpcNodeCore for EthApi<N, Rpc>
where N: RpcNodeCore, Rpc: RpcConvert,

Source§

type Primitives = <N as RpcNodeCore>::Primitives

Blockchain data primitives.
Source§

type Provider = <N as RpcNodeCore>::Provider

The provider type used to interact with the node.
Source§

type Pool = <N as RpcNodeCore>::Pool

The transaction pool of the node.
Source§

type Evm = <N as RpcNodeCore>::Evm

The node’s EVM configuration, defining settings for the Ethereum Virtual Machine.
Source§

type Network = <N as RpcNodeCore>::Network

Network API.
Source§

fn pool(&self) -> &<EthApi<N, Rpc> as RpcNodeCore>::Pool

Returns the transaction pool of the node.
Source§

fn evm_config(&self) -> &<EthApi<N, Rpc> as RpcNodeCore>::Evm

Returns the node’s evm config.
Source§

fn network(&self) -> &<EthApi<N, Rpc> as RpcNodeCore>::Network

Returns the handle to the network
Source§

fn provider(&self) -> &<EthApi<N, Rpc> as RpcNodeCore>::Provider

Returns the provider of the node.
Source§

impl<N, Rpc> RpcNodeCoreExt for EthApi<N, Rpc>
where N: RpcNodeCore, Rpc: RpcConvert,

Source§

fn cache(&self) -> &EthStateCache<<N as RpcNodeCore>::Primitives>

Returns handle to RPC cache service.
Source§

impl<N, Rpc> SpawnBlocking for EthApi<N, Rpc>
where N: RpcNodeCore, Rpc: RpcConvert<Error = EthApiError>,

Source§

fn io_task_spawner(&self) -> &Runtime

Returns a handle for spawning IO heavy blocking tasks. Read more
Source§

fn tracing_task_pool(&self) -> &BlockingTaskPool

Returns a handle for spawning CPU heavy blocking tasks, such as tracing requests. Read more
Source§

fn tracing_task_guard(&self) -> &BlockingTaskGuard

Returns handle to semaphore for pool of CPU heavy blocking tasks.
Source§

fn blocking_io_task_guard(&self) -> &Arc<Semaphore> ⓘ

Returns handle to semaphore for blocking IO tasks. Read more
Source§

fn acquire_owned_tracing( &self, ) -> impl Future<Output = Result<OwnedSemaphorePermit, AcquireError>> + Send

Acquires a permit from the tracing task semaphore. Read more
Source§

fn acquire_many_owned_tracing( &self, n: u32, ) -> impl Future<Output = Result<OwnedSemaphorePermit, AcquireError>> + Send

Acquires multiple permits from the tracing task semaphore. Read more
Source§

fn acquire_owned_blocking_io( &self, ) -> impl Future<Output = Result<OwnedSemaphorePermit, AcquireError>> + Send

Acquires a permit from the blocking IO request semaphore. Read more
Source§

fn acquire_many_owned_blocking_io( &self, n: u32, ) -> impl Future<Output = Result<OwnedSemaphorePermit, AcquireError>> + Send

Acquires multiple permits from the blocking IO request semaphore. Read more
Source§

fn acquire_weighted_blocking_io( &self, weight: u32, ) -> impl Future<Output = Result<OwnedSemaphorePermit, AcquireError>> + Send

Acquires permits from the blocking IO request semaphore based on a calculated weight. Read more
Source§

fn spawn_blocking_io<F, R>( &self, f: F, ) -> impl Future<Output = Result<R, Self::Error>> + Send
where F: FnOnce(Self) -> Result<R, Self::Error> + Send + 'static, R: Send + 'static,

Executes the future on a new blocking task. Read more
Source§

fn spawn_blocking_io_fut<F, R, Fut>( &self, f: F, ) -> impl Future<Output = Result<R, Self::Error>> + Send
where Fut: Future<Output = Result<R, Self::Error>> + Send + 'static, F: FnOnce(Self) -> Fut + Send + 'static, R: Send + 'static,

Executes the future on a new blocking task. Read more
Source§

fn spawn_tracing<F, R>( &self, f: F, ) -> impl Future<Output = Result<R, Self::Error>> + Send
where F: FnOnce(Self) -> Result<R, Self::Error> + Send + 'static, R: Send + 'static,

Executes a blocking task on the tracing pool. Read more
Source§

impl<N, Rpc> Trace for EthApi<N, Rpc>
where EthApiError: FromEvmError<<N as RpcNodeCore>::Evm>, Rpc: RpcConvert<Primitives = <N as RpcNodeCore>::Primitives, Error = EthApiError, Evm = <N as RpcNodeCore>::Evm>, N: RpcNodeCore, EthApi<N, Rpc>: Call,

Source§

fn inspect<DB, I>( &self, db: DB, evm_env: <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, tx_env: &Recovered<<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes as EvmTypesHost>::Tx>, inspector: I, ) -> Result<(I, TxResultWithState<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes>), Self::Error>
where DB: Database, I: Inspector<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes> + 'static,

Executes a transaction with the provided inspector without committing state changes.
Source§

fn spawn_trace_at_with_state<F, R>( &self, evm_env: <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv, tx_env: Recovered<<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes as EvmTypesHost>::Tx>, config: TracingInspectorConfig, at: BlockId, f: F, ) -> impl Future<Output = Result<R, Self::Error>> + Send
where F: FnOnce(TracingInspector, TxResultWithState<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes>, CacheDB<Db<StateProviderDatabase<EvmStateProviderAdapter<Box<dyn StateProvider + Send>>>>>) -> Result<R, Self::Error> + Send + 'static, R: Send + 'static,

Executes the transaction on top of the given BlockId with a tracer configured by the config and provides the used database to the callback.
Source§

fn spawn_trace_transaction_in_block<F, R>( &self, hash: FixedBytes<32>, config: TracingInspectorConfig, f: F, ) -> impl Future<Output = Result<Option<R>, Self::Error>> + Send
where Self: LoadTransaction, F: FnOnce(TransactionInfo, TracingInspector, TxResultWithState<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes>, CacheDB<Db<StateProviderDatabase<EvmStateProviderAdapter<Box<dyn StateProvider + Send>>>>>) -> Result<R, Self::Error> + Send + 'static, R: Send + 'static,

Retrieves the transaction if it exists and returns its trace. Read more
Source§

fn spawn_trace_transaction_in_block_with_inspector<Insp, F, R>( &self, hash: FixedBytes<32>, inspector: Insp, f: F, ) -> impl Future<Output = Result<Option<R>, Self::Error>> + Send
where Self: LoadTransaction, F: FnOnce(TransactionInfo, Insp, TxResultWithState<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes>, CacheDB<Db<StateProviderDatabase<EvmStateProviderAdapter<Box<dyn StateProvider + Send>>>>>) -> Result<R, Self::Error> + Send + 'static, Insp: Inspector<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes> + Send + 'static, R: Send + 'static,

Retrieves the transaction if it exists and returns its trace. Read more
Source§

fn replay_block_until( &self, db: &mut CacheDB<Db<StateProviderDatabase<EvmStateProviderAdapter<Box<dyn StateProvider + Send>>>>>, block: &RecoveredBlock<<Self::Primitives as NodePrimitives>::Block>, target_tx_index: usize, bal: Option<&DecodedBal<Arc<Bal>>>, ) -> Result<(), Self::Error>

Positions the state of db right before the transaction at the target index. Read more
Source§

fn inspect_transaction_in_block<I>( &self, block: &RecoveredBlock<<Self::Primitives as NodePrimitives>::Block>, db: &mut CacheDB<Db<StateProviderDatabase<EvmStateProviderAdapter<Box<dyn StateProvider + Send>>>>>, inspector: I, target_tx_index: usize, bal: Option<&DecodedBal<Arc<Bal>>>, ) -> Result<(I, TxResultWithState<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes>, <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmEnv), Self::Error>
where I: Inspector<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes> + 'static,

Executes the block’s transaction at the target index with the configured inspector on the state right before the transaction. Read more
Source§

fn trace_block_until<F, R>( &self, block_id: BlockId, block: Option<Arc<RecoveredBlock<<Self::Provider as BlockReader>::Block>>>, highest_index: Option<u64>, config: TracingInspectorConfig, f: F, ) -> impl Future<Output = Result<Option<Vec<R>>, Self::Error>> + Send
where Self: LoadBlock, F: Fn(TransactionInfo, TracingCtx<'_, TracingInspector, <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes>) -> Result<R, Self::Error> + Send + 'static, R: Send + 'static,

Executes all transactions of a block up to a given index. Read more
Source§

fn trace_block_until_with_inspector<Setup, Insp, F, R>( &self, block_id: BlockId, block: Option<Arc<RecoveredBlock<<Self::Provider as BlockReader>::Block>>>, highest_index: Option<u64>, inspector_setup: Setup, f: F, ) -> impl Future<Output = Result<Option<Vec<R>>, Self::Error>> + Send
where Self: LoadBlock, F: Fn(TransactionInfo, TracingCtx<'_, Insp, <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes>) -> Result<R, Self::Error> + Send + 'static, Setup: FnMut() -> Insp + Send + 'static, Insp: Inspector<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes> + 'static, R: Send + 'static,

Executes all transactions of a block. Read more
Source§

fn trace_block_with<F, R>( &self, block_id: BlockId, block: Option<Arc<RecoveredBlock<<Self::Provider as BlockReader>::Block>>>, config: TracingInspectorConfig, f: F, ) -> impl Future<Output = Result<Option<Vec<R>>, Self::Error>> + Send
where Self: LoadBlock, F: Fn(TransactionInfo, TracingCtx<'_, TracingInspector, <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes>) -> Result<R, Self::Error> + Send + 'static, R: Send + 'static,

Executes all transactions of a block and returns a list of callback results invoked for each transaction in the block. Read more
Source§

fn trace_block_inspector<Setup, Insp, F, R>( &self, block_id: BlockId, block: Option<Arc<RecoveredBlock<<Self::Provider as BlockReader>::Block>>>, insp_setup: Setup, f: F, ) -> impl Future<Output = Result<Option<Vec<R>>, Self::Error>> + Send
where Self: LoadBlock, F: Fn(TransactionInfo, TracingCtx<'_, Insp, <<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes>) -> Result<R, Self::Error> + Send + 'static, Setup: FnMut() -> Insp + Send + 'static, Insp: Inspector<<<Self::Evm as ConfigureEvm>::BlockExecutorFactory as BlockExecutorFactory>::EvmTypes> + 'static, R: Send + 'static,

Executes all transactions of a block and returns a list of callback results invoked for each transaction in the block. Read more
Source§

fn apply_pre_execution_changes( &self, block: &RecoveredBlock<<Self::Provider as BlockReader>::Block>, db: &mut CacheDB<Db<StateProviderDatabase<EvmStateProviderAdapter<Box<dyn StateProvider + Send>>>>>, ) -> Result<BundleState, Self::Error>

Applies chain-specific state transitions required before executing a block. Read more

Auto Trait Implementations§

§

impl<N, Rpc> !RefUnwindSafe for EthApi<N, Rpc>

§

impl<N, Rpc> !UnwindSafe for EthApi<N, Rpc>

§

impl<N, Rpc> Freeze for EthApi<N, Rpc>
where Arc<EthApiInner<N, Rpc>>: Freeze,

§

impl<N, Rpc> Send for EthApi<N, Rpc>
where Arc<EthApiInner<N, Rpc>>: Send,

§

impl<N, Rpc> Sync for EthApi<N, Rpc>
where Arc<EthApiInner<N, Rpc>>: Sync,

§

impl<N, Rpc> Unpin for EthApi<N, Rpc>
where Arc<EthApiInner<N, Rpc>>: Unpin,

§

impl<N, Rpc> UnsafeUnpin for EthApi<N, Rpc>
where Arc<EthApiInner<N, Rpc>>: UnsafeUnpin,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit #126799)
Performs copy-assignment from self to dest. Read more
§

impl<T> Conv for T

§

fn conv<T>(self) -> T
where Self: Into<T>,

Converts self into T using Into<T>. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> EthApiServer<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse, Block<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Receipt, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header, <<T as RpcNodeCore>::Primitives as NodePrimitives>::SignedTx> for T
where T: FullEthApi, ErrorObject<'static>: From<<T as EthApiTypes>::Error>,

Source§

async fn protocol_version(&self) -> Result<Uint<64, 1>, ErrorObject<'static>>

Handler for: eth_protocolVersion

Source§

fn syncing(&self) -> Result<SyncStatus, ErrorObject<'static>>

Handler for: eth_syncing

Source§

async fn author(&self) -> Result<Address, ErrorObject<'static>>

Handler for: eth_coinbase

Source§

fn accounts(&self) -> Result<Vec<Address>, ErrorObject<'static>>

Handler for: eth_accounts

Source§

fn block_number(&self) -> Result<Uint<256, 4>, ErrorObject<'static>>

Handler for: eth_blockNumber

Source§

async fn chain_id(&self) -> Result<Option<Uint<64, 1>>, ErrorObject<'static>>

Handler for: eth_chainId

Source§

fn capabilities(&self) -> Result<EthCapabilities, ErrorObject<'static>>

Handler for: eth_capabilities

Source§

async fn block_by_hash( &self, hash: FixedBytes<32>, full: bool, ) -> Result<Option<Block<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>>, ErrorObject<'static>>

Handler for: eth_getBlockByHash

Source§

async fn block_by_number( &self, number: BlockNumberOrTag, full: bool, ) -> Result<Option<Block<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>>, ErrorObject<'static>>

Handler for: eth_getBlockByNumber

Source§

async fn block_transaction_count_by_hash( &self, hash: FixedBytes<32>, ) -> Result<Option<Uint<256, 4>>, ErrorObject<'static>>

Handler for: eth_getBlockTransactionCountByHash

Source§

async fn block_transaction_count_by_number( &self, number: BlockNumberOrTag, ) -> Result<Option<Uint<256, 4>>, ErrorObject<'static>>

Handler for: eth_getBlockTransactionCountByNumber

Source§

async fn block_uncles_count_by_hash( &self, hash: FixedBytes<32>, ) -> Result<Option<Uint<256, 4>>, ErrorObject<'static>>

Handler for: eth_getUncleCountByBlockHash

Source§

async fn block_uncles_count_by_number( &self, number: BlockNumberOrTag, ) -> Result<Option<Uint<256, 4>>, ErrorObject<'static>>

Handler for: eth_getUncleCountByBlockNumber

Source§

async fn block_receipts( &self, block_id: BlockId, ) -> Result<Option<Vec<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Receipt>>, ErrorObject<'static>>

Handler for: eth_getBlockReceipts

Source§

async fn uncle_by_block_hash_and_index( &self, hash: FixedBytes<32>, index: Index, ) -> Result<Option<Block<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>>, ErrorObject<'static>>

Handler for: eth_getUncleByBlockHashAndIndex

Source§

async fn uncle_by_block_number_and_index( &self, number: BlockNumberOrTag, index: Index, ) -> Result<Option<Block<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>>, ErrorObject<'static>>

Handler for: eth_getUncleByBlockNumberAndIndex

Source§

async fn raw_transaction_by_hash( &self, hash: FixedBytes<32>, ) -> Result<Option<Bytes>, ErrorObject<'static>>

Handler for: eth_getRawTransactionByHash

Source§

async fn transaction_by_hash( &self, hash: FixedBytes<32>, ) -> Result<Option<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse>, ErrorObject<'static>>

Handler for: eth_getTransactionByHash

Source§

async fn raw_transaction_by_block_hash_and_index( &self, hash: FixedBytes<32>, index: Index, ) -> Result<Option<Bytes>, ErrorObject<'static>>

Handler for: eth_getRawTransactionByBlockHashAndIndex

Source§

async fn transaction_by_block_hash_and_index( &self, hash: FixedBytes<32>, index: Index, ) -> Result<Option<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse>, ErrorObject<'static>>

Handler for: eth_getTransactionByBlockHashAndIndex

Source§

async fn raw_transaction_by_block_number_and_index( &self, number: BlockNumberOrTag, index: Index, ) -> Result<Option<Bytes>, ErrorObject<'static>>

Handler for: eth_getRawTransactionByBlockNumberAndIndex

Source§

async fn transaction_by_block_number_and_index( &self, number: BlockNumberOrTag, index: Index, ) -> Result<Option<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse>, ErrorObject<'static>>

Handler for: eth_getTransactionByBlockNumberAndIndex

Source§

async fn transaction_by_sender_and_nonce( &self, sender: Address, nonce: Uint<64, 1>, ) -> Result<Option<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse>, ErrorObject<'static>>

Handler for: eth_getTransactionBySenderAndNonce

Source§

fn pending_transactions( &self, ) -> Result<Vec<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse>, ErrorObject<'static>>

Handler for: eth_pendingTransactions

Source§

async fn transaction_receipt( &self, hash: FixedBytes<32>, ) -> Result<Option<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Receipt>, ErrorObject<'static>>

Handler for: eth_getTransactionReceipt

Source§

async fn balance( &self, address: Address, block_number: Option<BlockId>, ) -> Result<Uint<256, 4>, ErrorObject<'static>>

Handler for: eth_getBalance

Source§

async fn storage_at( &self, address: Address, index: JsonStorageKey, block_number: Option<BlockId>, ) -> Result<FixedBytes<32>, ErrorObject<'static>>

Handler for: eth_getStorageAt

Source§

async fn storage_values( &self, requests: HashMap<Address, Vec<JsonStorageKey>>, block_number: Option<BlockId>, ) -> Result<HashMap<Address, Vec<FixedBytes<32>>>, ErrorObject<'static>>

Handler for: eth_getStorageValues

Source§

async fn transaction_count( &self, address: Address, block_number: Option<BlockId>, ) -> Result<Uint<256, 4>, ErrorObject<'static>>

Handler for: eth_getTransactionCount

Source§

async fn get_code( &self, address: Address, block_number: Option<BlockId>, ) -> Result<Bytes, ErrorObject<'static>>

Handler for: eth_getCode

Source§

async fn header_by_number( &self, block_number: BlockNumberOrTag, ) -> Result<Option<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>, ErrorObject<'static>>

Handler for: eth_getHeaderByNumber

Source§

async fn header_by_hash( &self, hash: FixedBytes<32>, ) -> Result<Option<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>, ErrorObject<'static>>

Handler for: eth_getHeaderByHash

Source§

async fn simulate_v1( &self, payload: SimulatePayload<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest>, block_number: Option<BlockId>, ) -> Result<Vec<SimulatedBlock<Block<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionResponse, <<T as EthApiTypes>::NetworkTypes as RpcTypes>::Header>>>, ErrorObject<'static>>

Handler for: eth_simulateV1

Source§

async fn call( &self, request: <<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest, block_number: Option<BlockId>, state_overrides: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, block_overrides: Option<Box<BlockOverrides>>, ) -> Result<Bytes, ErrorObject<'static>>

Handler for: eth_call

Source§

async fn fill_transaction( &self, request: <<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest, ) -> Result<FillTransaction<<<T as RpcNodeCore>::Primitives as NodePrimitives>::SignedTx>, ErrorObject<'static>>

Handler for: eth_fillTransaction

Source§

async fn call_many( &self, bundles: Vec<Bundle<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest>>, state_context: Option<StateContext>, state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, ) -> Result<Vec<Vec<EthCallResponse>>, ErrorObject<'static>>

Handler for: eth_callMany

Source§

async fn create_access_list( &self, request: <<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest, block_number: Option<BlockId>, state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, ) -> Result<AccessListResult, ErrorObject<'static>>

Handler for: eth_createAccessList

Source§

async fn estimate_gas( &self, request: <<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest, block_number: Option<BlockId>, state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, block_overrides: Option<Box<BlockOverrides>>, ) -> Result<Uint<256, 4>, ErrorObject<'static>>

Handler for: eth_estimateGas

Source§

async fn gas_price(&self) -> Result<Uint<256, 4>, ErrorObject<'static>>

Handler for: eth_gasPrice

Source§

async fn get_account( &self, address: Address, block: BlockId, ) -> Result<Option<TrieAccount>, ErrorObject<'static>>

Handler for: eth_getAccount

Source§

async fn max_priority_fee_per_gas( &self, ) -> Result<Uint<256, 4>, ErrorObject<'static>>

Handler for: eth_maxPriorityFeePerGas

Source§

async fn blob_base_fee(&self) -> Result<Uint<256, 4>, ErrorObject<'static>>

Handler for: eth_blobBaseFee

Source§

async fn base_fee(&self) -> Result<Option<Uint<256, 4>>, ErrorObject<'static>>

Handler for: eth_baseFee

Source§

async fn fee_history( &self, block_count: Uint<64, 1>, newest_block: BlockNumberOrTag, reward_percentiles: Option<Vec<f64>>, ) -> Result<FeeHistory, ErrorObject<'static>>

Handler for: eth_feeHistory

Source§

async fn is_mining(&self) -> Result<bool, ErrorObject<'static>>

Handler for: eth_mining

Source§

async fn hashrate(&self) -> Result<Uint<256, 4>, ErrorObject<'static>>

Handler for: eth_hashrate

Source§

async fn get_work(&self) -> Result<Work, ErrorObject<'static>>

Handler for: eth_getWork

Source§

async fn submit_hashrate( &self, _hashrate: Uint<256, 4>, _id: FixedBytes<32>, ) -> Result<bool, ErrorObject<'static>>

Handler for: eth_submitHashrate

Source§

async fn submit_work( &self, _nonce: FixedBytes<8>, _pow_hash: FixedBytes<32>, _mix_digest: FixedBytes<32>, ) -> Result<bool, ErrorObject<'static>>

Handler for: eth_submitWork

Source§

async fn send_transaction( &self, request: <<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest, ) -> Result<FixedBytes<32>, ErrorObject<'static>>

Handler for: eth_sendTransaction

Source§

async fn send_raw_transaction( &self, tx: Bytes, ) -> Result<FixedBytes<32>, ErrorObject<'static>>

Handler for: eth_sendRawTransaction

Source§

async fn send_raw_transaction_sync( &self, tx: Bytes, timeout_ms: Option<u64>, ) -> Result<<<T as EthApiTypes>::NetworkTypes as RpcTypes>::Receipt, ErrorObject<'static>>

Handler for: eth_sendRawTransactionSync

Source§

async fn sign( &self, address: Address, message: Bytes, ) -> Result<Bytes, ErrorObject<'static>>

Handler for: eth_sign

Source§

async fn sign_transaction( &self, request: <<T as EthApiTypes>::NetworkTypes as RpcTypes>::TransactionRequest, ) -> Result<Bytes, ErrorObject<'static>>

Handler for: eth_signTransaction

Source§

async fn sign_typed_data( &self, address: Address, data: TypedData, ) -> Result<Bytes, ErrorObject<'static>>

Handler for: eth_signTypedData

Source§

async fn get_proof( &self, address: Address, keys: Vec<JsonStorageKey>, block_number: Option<BlockId>, ) -> Result<EIP1186AccountProofResponse, ErrorObject<'static>>

Handler for: eth_getProof

Source§

async fn get_multi_proof( &self, targets: Vec<(Address, Vec<FixedBytes<32>>)>, block_number: Option<BlockId>, ) -> Result<Vec<EIP1186AccountProofResponse>, ErrorObject<'static>>

Handler for: eth_getMultiProof

Source§

async fn get_account_info( &self, address: Address, block: BlockId, ) -> Result<AccountInfo, ErrorObject<'static>>

Handler for: eth_getAccountInfo

Source§

async fn block_access_list_by_block_hash( &self, block_hash: FixedBytes<32>, ) -> Result<Option<Vec<AccountChanges>>, ErrorObject<'static>>

Handler for: eth_getBlockAccessListByBlockHash

Source§

async fn block_access_list_by_block_number( &self, number: BlockNumberOrTag, ) -> Result<Option<Vec<AccountChanges>>, ErrorObject<'static>>

Handler for: eth_getBlockAccessListByBlockNumber

Source§

async fn block_access_list( &self, block_id: BlockId, ) -> Result<Option<Vec<AccountChanges>>, ErrorObject<'static>>

Handler for: eth_getBlockAccessList

Source§

async fn block_access_list_raw( &self, block: BlockId, ) -> Result<Option<Bytes>, ErrorObject<'static>>

Handler for: eth_getBlockAccessListRaw

Source§

fn into_rpc(self) -> RpcModule<Self>
where TxReq: Send + Sync + 'static + DeserializeOwned, T: Send + Sync + 'static + Clone + Serialize, B: Send + Sync + 'static + Clone + Serialize, R: Send + Sync + 'static + Clone + Serialize, H: Send + Sync + 'static + Clone + Serialize, RawTx: Send + Sync + 'static + Clone + Serialize,

Collects all the methods and subscriptions defined in the trait and adds them into a single RpcModule.
§

impl<T> FmtForward for T

§

fn fmt_binary(self) -> FmtBinary<Self>
where Self: Binary,

Causes self to use its Binary implementation when Debug-formatted.
§

fn fmt_display(self) -> FmtDisplay<Self>
where Self: Display,

Causes self to use its Display implementation when Debug-formatted.
§

fn fmt_lower_exp(self) -> FmtLowerExp<Self>
where Self: LowerExp,

Causes self to use its LowerExp implementation when Debug-formatted.
§

fn fmt_lower_hex(self) -> FmtLowerHex<Self>
where Self: LowerHex,

Causes self to use its LowerHex implementation when Debug-formatted.
§

fn fmt_octal(self) -> FmtOctal<Self>
where Self: Octal,

Causes self to use its Octal implementation when Debug-formatted.
§

fn fmt_pointer(self) -> FmtPointer<Self>
where Self: Pointer,

Causes self to use its Pointer implementation when Debug-formatted.
§

fn fmt_upper_exp(self) -> FmtUpperExp<Self>
where Self: UpperExp,

Causes self to use its UpperExp implementation when Debug-formatted.
§

fn fmt_upper_hex(self) -> FmtUpperHex<Self>
where Self: UpperHex,

Causes self to use its UpperHex implementation when Debug-formatted.
§

fn fmt_list(self) -> FmtList<Self>
where &'a Self: for<'a> IntoIterator,

Formats each item in a sequence. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FullEthApi for T

Source§

impl<T> FullEthApiServer for T

Source§

impl<T> FullEthApiTypes for T

§

impl<T> FutureExt for T

§

fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
§

fn with_current_context(self) -> WithContext<Self> ⓘ

Attaches the current Context to this type, returning a WithContext wrapper. Read more
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
§

impl<T> IntoRequest<T> for T

§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
§

impl<L> LayerExt<L> for L

§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in [Layered].
§

impl<T> MaybeDebug for T
where T: Debug,

§

impl<T> NonStaticAny for T
where T: ?Sized,

§

fn type_id(&self) -> TypeId

Returns the lifetime-erased type ID of self.
§

impl<T> Pipe for T
where T: ?Sized,

§

fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> R
where Self: Sized,

Pipes by value. This is generally the method you want to use. Read more
§

fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> R
where R: 'a,

Borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> R
where R: 'a,

Mutably borrows self and passes that borrow into the pipe function. Read more
§

fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
where Self: Borrow<B>, B: 'a + ?Sized, R: 'a,

Borrows self, then passes self.borrow() into the pipe function. Read more
§

fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
where Self: BorrowMut<B>, B: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
§

fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
where Self: AsRef<U>, U: 'a + ?Sized, R: 'a,

Borrows self, then passes self.as_ref() into the pipe function.
§

fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
where Self: AsMut<U>, U: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.as_mut() into the pipe function.
§

fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
where Self: Deref<Target = T>, T: 'a + ?Sized, R: 'a,

Borrows self, then passes self.deref() into the pipe function.
§

fn pipe_deref_mut<'a, T, R>( &'a mut self, func: impl FnOnce(&'a mut T) -> R, ) -> R
where Self: DerefMut<Target = T> + Deref, T: 'a + ?Sized, R: 'a,

Mutably borrows self, then passes self.deref_mut() into the pipe function.
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types #44874)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<T> Tap for T

§

fn tap(self, func: impl FnOnce(&Self)) -> Self

Immutable access to a value. Read more
§

fn tap_mut(self, func: impl FnOnce(&mut Self)) -> Self

Mutable access to a value. Read more
§

fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Immutable access to the Borrow<B> of a value. Read more
§

fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Mutable access to the BorrowMut<B> of a value. Read more
§

fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Immutable access to the AsRef<R> view of a value. Read more
§

fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Mutable access to the AsMut<R> view of a value. Read more
§

fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Immutable access to the Deref::Target of a value. Read more
§

fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Mutable access to the Deref::Target of a value. Read more
§

fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self

Calls .tap() only in debug builds, and is erased in release builds.
§

fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self

Calls .tap_mut() only in debug builds, and is erased in release builds.
§

fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
where Self: Borrow<B>, B: ?Sized,

Calls .tap_borrow() only in debug builds, and is erased in release builds.
§

fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
where Self: BorrowMut<B>, B: ?Sized,

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
§

fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
where Self: AsRef<R>, R: ?Sized,

Calls .tap_ref() only in debug builds, and is erased in release builds.
§

fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
where Self: AsMut<R>, R: ?Sized,

Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
§

fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
where Self: Deref<Target = T>, T: ?Sized,

Calls .tap_deref() only in debug builds, and is erased in release builds.
§

fn tap_deref_mut_dbg<T>(self, func: impl FnOnce(&mut T)) -> Self
where Self: DerefMut<Target = T> + Deref, T: ?Sized,

Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> TraceExt for T

§

impl<T> TryClone for T
where T: Clone,

§

fn try_clone(&self) -> Result<T, Error>

Clones self, possibly returning an error.
§

impl<T> TryConv for T

§

fn try_conv<T>(self) -> Result<T, Self::Error>
where Self: TryInto<T>,

Attempts to convert self into T using TryInto<T>. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more

Layout§

Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 8 bytes