feat(rpc): support eth_call state overrides (#1634)

This commit is contained in:
Matthias Seitz
2023-03-04 21:44:33 +01:00
committed by GitHub
parent 91652a0b0c
commit 0e9d18d4e9
6 changed files with 109 additions and 13 deletions

View File

@ -4,8 +4,8 @@ use reth_primitives::{
H256, H64, U256, U64,
};
use reth_rpc_types::{
CallRequest, EIP1186AccountProofResponse, FeeHistory, Index, RichBlock, SyncStatus,
Transaction, TransactionReceipt, TransactionRequest, Work,
state::StateOverride, CallRequest, EIP1186AccountProofResponse, FeeHistory, Index, RichBlock,
SyncStatus, Transaction, TransactionReceipt, TransactionRequest, Work,
};
/// Eth rpc interface: <https://ethereum.github.io/execution-apis/api-documentation/>
@ -135,7 +135,12 @@ pub trait EthApi {
/// Executes a new message call immediately without creating a transaction on the block chain.
#[method(name = "eth_call")]
async fn call(&self, request: CallRequest, block_number: Option<BlockId>) -> Result<Bytes>;
async fn call(
&self,
request: CallRequest,
block_number: Option<BlockId>,
state_overrides: Option<StateOverride>,
) -> Result<Bytes>;
/// Generates an access list for a transaction.
///