Trait Caller

Source
pub trait Caller<N, Resp>: Send + Sync
where N: Network, Resp: RpcRecv,
{ // Required methods fn call( &self, params: EthCallParams<N>, ) -> TransportResult<ProviderCall<EthCallParams<N>, Resp>>; fn estimate_gas( &self, params: EthCallParams<N>, ) -> TransportResult<ProviderCall<EthCallParams<N>, Resp>>; fn call_many( &self, params: EthCallManyParams<'_>, ) -> TransportResult<ProviderCall<EthCallManyParams<'static>, Resp>>; }
Expand description

Trait that helpes convert EthCall into a ProviderCall.

Required Methods§

Source

fn call( &self, params: EthCallParams<N>, ) -> TransportResult<ProviderCall<EthCallParams<N>, Resp>>

Method that needs to be implemented to convert to a ProviderCall.

This method sends the request to relevant data source and returns a ProviderCall.

Source

fn estimate_gas( &self, params: EthCallParams<N>, ) -> TransportResult<ProviderCall<EthCallParams<N>, Resp>>

Method that needs to be implemented for estimating gas using “eth_estimateGas” for the transaction.

Source

fn call_many( &self, params: EthCallManyParams<'_>, ) -> TransportResult<ProviderCall<EthCallManyParams<'static>, Resp>>

Method that needs to be implemented for "eth_callMany" RPC requests.

Implementations on Foreign Types§

Source§

impl<N, Resp> Caller<N, Resp> for WeakClient
where N: Network, Resp: RpcRecv,

Implementors§

Source§

impl<N: Network, Resp: RpcRecv> Caller<N, Resp> for Asserter

Available on non-WebAssembly only.

Caller implementation for the Asserter to eth_call ops in the MockProvider.