Trait EthCall
pub trait EthCall:
EstimateCall
+ Call
+ LoadPendingBlock {
// Provided methods
fn estimate_gas_at(
&self,
request: TransactionRequest,
at: BlockId,
state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send { ... }
fn simulate_v1(
&self,
payload: SimulatePayload,
block: Option<BlockId>,
) -> impl Future<Output = Result<Vec<SimulatedBlock<Block<<Self::NetworkTypes as Network>::TransactionResponse, <Self::NetworkTypes as Network>::HeaderResponse>>>, Self::Error>> + Send
where Self: LoadBlock + FullEthApiTypes { ... }
fn call(
&self,
request: TransactionRequest,
block_number: Option<BlockId>,
overrides: EvmOverrides,
) -> impl Future<Output = Result<Bytes, Self::Error>> + Send { ... }
fn call_many(
&self,
bundle: Bundle,
state_context: Option<StateContext>,
state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
) -> impl Future<Output = Result<Vec<EthCallResponse>, Self::Error>> + Send
where Self: LoadBlock { ... }
fn create_access_list_at(
&self,
request: TransactionRequest,
block_number: Option<BlockId>,
) -> impl Future<Output = Result<AccessListResult, Self::Error>> + Send
where Self: Trace { ... }
fn create_access_list_with(
&self,
cfg: CfgEnvWithHandlerCfg,
block: BlockEnv,
at: BlockId,
request: TransactionRequest,
) -> Result<AccessListResult, Self::Error>
where Self: Trace { ... }
}
Expand description
Execution related functions for the EthApiServer
trait in
the eth_
namespace.
Provided Methods§
fn estimate_gas_at(
&self,
request: TransactionRequest,
at: BlockId,
state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
fn estimate_gas_at( &self, request: TransactionRequest, at: BlockId, state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
Estimate gas needed for execution of the request
at the BlockId
.
fn simulate_v1(
&self,
payload: SimulatePayload,
block: Option<BlockId>,
) -> impl Future<Output = Result<Vec<SimulatedBlock<Block<<Self::NetworkTypes as Network>::TransactionResponse, <Self::NetworkTypes as Network>::HeaderResponse>>>, Self::Error>> + Sendwhere
Self: LoadBlock + FullEthApiTypes,
fn simulate_v1(
&self,
payload: SimulatePayload,
block: Option<BlockId>,
) -> impl Future<Output = Result<Vec<SimulatedBlock<Block<<Self::NetworkTypes as Network>::TransactionResponse, <Self::NetworkTypes as Network>::HeaderResponse>>>, Self::Error>> + Sendwhere
Self: LoadBlock + FullEthApiTypes,
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.
See also: https://github.com/ethereum/go-ethereum/pull/27720
fn call(
&self,
request: TransactionRequest,
block_number: Option<BlockId>,
overrides: EvmOverrides,
) -> impl Future<Output = Result<Bytes, Self::Error>> + Send
fn call( &self, request: 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
fn call_many(
&self,
bundle: Bundle,
state_context: Option<StateContext>,
state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
) -> impl Future<Output = Result<Vec<EthCallResponse>, Self::Error>> + Sendwhere
Self: LoadBlock,
fn call_many(
&self,
bundle: Bundle,
state_context: Option<StateContext>,
state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
) -> impl Future<Output = Result<Vec<EthCallResponse>, Self::Error>> + Sendwhere
Self: LoadBlock,
Simulate arbitrary number of transactions at an arbitrary blockchain index, with the optionality of state overrides
fn create_access_list_at(
&self,
request: TransactionRequest,
block_number: Option<BlockId>,
) -> impl Future<Output = Result<AccessListResult, Self::Error>> + Sendwhere
Self: Trace,
fn create_access_list_at(
&self,
request: TransactionRequest,
block_number: Option<BlockId>,
) -> impl Future<Output = Result<AccessListResult, Self::Error>> + Sendwhere
Self: Trace,
Creates AccessListResult
for the TransactionRequest
at the given
BlockId
, or latest block.
fn create_access_list_with(
&self,
cfg: CfgEnvWithHandlerCfg,
block: BlockEnv,
at: BlockId,
request: TransactionRequest,
) -> Result<AccessListResult, Self::Error>where
Self: Trace,
fn create_access_list_with(
&self,
cfg: CfgEnvWithHandlerCfg,
block: BlockEnv,
at: BlockId,
request: TransactionRequest,
) -> Result<AccessListResult, Self::Error>where
Self: Trace,
Creates AccessListResult
for the TransactionRequest
at the given
BlockId
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.