alloy_provider

Trait Caller

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

Trait that helpes convert EthCall into a ProviderCall.

Required Methods§

Source

fn call( &self, params: EthCallParams<'_, N>, ) -> TransportResult<ProviderCall<T, EthCallParams<'static, 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<T, EthCallParams<'static, N>, Resp>>

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

Implementations on Foreign Types§

Source§

impl<T, N, Resp> Caller<T, N, Resp> for WeakClient<T>
where T: Transport + Clone, N: Network, Resp: RpcReturn,

Source§

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

Source§

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

Implementors§