Trait reth::core::rpc::api::servers::eth::helpers::EthCall

source ·
pub trait EthCall: Call + LoadPendingBlock {
    // Provided methods
    fn estimate_gas_at(
        &self,
        request: TransactionRequest,
        at: BlockId,
        state_override: Option<HashMap<Address, AccountOverride>>,
    ) -> impl Future<Output = Result<Uint<256, 4>, EthApiError>> + Send { ... }
    fn call(
        &self,
        request: TransactionRequest,
        block_number: Option<BlockId>,
        overrides: EvmOverrides,
    ) -> impl Future<Output = Result<Bytes, EthApiError>> + Send { ... }
    fn call_many(
        &self,
        bundle: Bundle,
        state_context: Option<StateContext>,
        state_override: Option<HashMap<Address, AccountOverride>>,
    ) -> impl Future<Output = Result<Vec<EthCallResponse>, EthApiError>> + Send
       where Self: LoadBlock { ... }
    fn create_access_list_at(
        &self,
        request: TransactionRequest,
        block_number: Option<BlockId>,
    ) -> impl Future<Output = Result<AccessListWithGasUsed, EthApiError>> + Send
       where Self: Trace { ... }
    fn create_access_list_with(
        &self,
        cfg: CfgEnvWithHandlerCfg,
        block: BlockEnv,
        at: BlockId,
        request: TransactionRequest,
    ) -> Result<AccessListWithGasUsed, EthApiError>
       where Self: Trace { ... }
}
Expand description

Execution related functions for the EthApiServer trait in the eth_ namespace.

Provided Methods§

source

fn estimate_gas_at( &self, request: TransactionRequest, at: BlockId, state_override: Option<HashMap<Address, AccountOverride>>, ) -> impl Future<Output = Result<Uint<256, 4>, EthApiError>> + Send

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

source

fn call( &self, request: TransactionRequest, block_number: Option<BlockId>, overrides: EvmOverrides, ) -> impl Future<Output = Result<Bytes, EthApiError>> + Send

Executes the call request (eth_call) and returns the output

source

fn call_many( &self, bundle: Bundle, state_context: Option<StateContext>, state_override: Option<HashMap<Address, AccountOverride>>, ) -> impl Future<Output = Result<Vec<EthCallResponse>, EthApiError>> + Send
where Self: LoadBlock,

Simulate arbitrary number of transactions at an arbitrary blockchain index, with the optionality of state overrides

source

fn create_access_list_at( &self, request: TransactionRequest, block_number: Option<BlockId>, ) -> impl Future<Output = Result<AccessListWithGasUsed, EthApiError>> + Send
where Self: Trace,

Creates AccessListWithGasUsed for the TransactionRequest at the given BlockId, or latest block.

source

fn create_access_list_with( &self, cfg: CfgEnvWithHandlerCfg, block: BlockEnv, at: BlockId, request: TransactionRequest, ) -> Result<AccessListWithGasUsed, EthApiError>
where Self: Trace,

Creates AccessListWithGasUsed for the TransactionRequest at the given BlockId.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Provider, Pool, Network, EvmConfig> EthCall for EthApi<Provider, Pool, Network, EvmConfig>
where EthApi<Provider, Pool, Network, EvmConfig>: Call + LoadPendingBlock,