1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use jsonrpc_core::{BoxFuture, Result};
use jsonrpc_derive::rpc;
use zksync_types::{
    api::{BlockId, BlockNumber, DebugCall, ResultDebugCall, TracerConfig},
    transaction_request::CallRequest,
    H256,
};

#[rpc]
pub trait DebugNamespaceT {
    #[rpc(name = "debug_traceBlockByNumber")]
    fn trace_block_by_number(
        &self,
        block: BlockNumber,
        options: Option<TracerConfig>,
    ) -> BoxFuture<Result<Vec<ResultDebugCall>>>;

    #[rpc(name = "debug_traceBlockByHash")]
    fn trace_block_by_hash(
        &self,
        hash: H256,
        options: Option<TracerConfig>,
    ) -> BoxFuture<Result<Vec<ResultDebugCall>>>;

    #[rpc(name = "debug_traceCall")]
    fn trace_call(
        &self,
        request: CallRequest,
        block: Option<BlockId>,
        options: Option<TracerConfig>,
    ) -> BoxFuture<Result<DebugCall>>;

    #[rpc(name = "debug_traceTransaction")]
    fn trace_transaction(
        &self,
        tx_hash: H256,
        options: Option<TracerConfig>,
    ) -> BoxFuture<Result<Option<DebugCall>>>;
}