mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
feat: Include missing block id in error responses (#7416)
Co-authored-by: Emilia Hane <elsaemiliaevahane@gmail.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@ -106,7 +106,7 @@ pub trait DebugApi {
|
||||
async fn debug_trace_call(
|
||||
&self,
|
||||
request: TransactionRequest,
|
||||
block_number: Option<BlockId>,
|
||||
block_id: Option<BlockId>,
|
||||
opts: Option<GethDebugTracingCallOptions>,
|
||||
) -> RpcResult<GethTrace>;
|
||||
|
||||
|
||||
@ -238,14 +238,14 @@ pub trait EngineEthApi<B: RpcObject> {
|
||||
async fn call(
|
||||
&self,
|
||||
request: TransactionRequest,
|
||||
block_number: Option<BlockId>,
|
||||
block_id: Option<BlockId>,
|
||||
state_overrides: Option<StateOverride>,
|
||||
block_overrides: Option<Box<BlockOverrides>>,
|
||||
) -> RpcResult<Bytes>;
|
||||
|
||||
/// Returns code at a given address at given block number.
|
||||
#[method(name = "getCode")]
|
||||
async fn get_code(&self, address: Address, block_number: Option<BlockId>) -> RpcResult<Bytes>;
|
||||
async fn get_code(&self, address: Address, block_id: Option<BlockId>) -> RpcResult<Bytes>;
|
||||
|
||||
/// Returns information about a block by hash.
|
||||
#[method(name = "getBlockByHash")]
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
|
||||
use reth_primitives::{Address, Bytes, TxHash, B256};
|
||||
use reth_primitives::{Address, BlockId, Bytes, TxHash, B256};
|
||||
use reth_rpc_types::{
|
||||
trace::otterscan::{
|
||||
BlockDetails, ContractCreator, InternalOperation, OtsBlockTransactions, TraceEntry,
|
||||
@ -24,7 +24,7 @@ pub trait Otterscan {
|
||||
|
||||
/// Check if a certain address contains a deployed code.
|
||||
#[method(name = "hasCode")]
|
||||
async fn has_code(&self, address: Address, block_number: Option<u64>) -> RpcResult<bool>;
|
||||
async fn has_code(&self, address: Address, block_id: Option<BlockId>) -> RpcResult<bool>;
|
||||
|
||||
/// Very simple API versioning scheme. Every time we add a new capability, the number is
|
||||
/// incremented. This allows for Otterscan to check if the node contains all API it
|
||||
|
||||
Reference in New Issue
Block a user