use cfx_rpc_eth_types::{BlockNumber, LocalizedTrace, TraceFilter};
use cfx_types::H256;
use jsonrpsee::{core::RpcResult, proc_macros::rpc};
#[rpc(server, namespace = "trace")]
pub trait TraceApi {
#[method(name = "block")]
async fn block_traces(
&self, block_number: BlockNumber,
) -> RpcResult<Option<Vec<LocalizedTrace>>>;
#[method(name = "filter")]
async fn filter_traces(
&self, filter: TraceFilter,
) -> RpcResult<Option<Vec<LocalizedTrace>>>;
#[method(name = "transaction")]
async fn transaction_traces(
&self, tx_hash: H256,
) -> RpcResult<Option<Vec<LocalizedTrace>>>;
}