docs: add api handler docs (#1727)

This commit is contained in:
Matthias Seitz
2023-03-13 12:13:56 +01:00
committed by GitHub
parent 3ba2398f95
commit a98dc43cb0

View File

@ -35,6 +35,7 @@ impl<Client> TraceApiServer for TraceApi<Client>
where where
Client: BlockProvider + StateProviderFactory + EvmEnvProvider + 'static, Client: BlockProvider + StateProviderFactory + EvmEnvProvider + 'static,
{ {
/// Handler for `trace_call`
async fn call( async fn call(
&self, &self,
_call: CallRequest, _call: CallRequest,
@ -44,6 +45,7 @@ where
Err(internal_rpc_err("unimplemented")) Err(internal_rpc_err("unimplemented"))
} }
/// Handler for `trace_callMany`
async fn call_many( async fn call_many(
&self, &self,
_calls: Vec<(CallRequest, HashSet<TraceType>)>, _calls: Vec<(CallRequest, HashSet<TraceType>)>,
@ -52,6 +54,7 @@ where
Err(internal_rpc_err("unimplemented")) Err(internal_rpc_err("unimplemented"))
} }
/// Handler for `trace_rawTransaction`
async fn raw_transaction( async fn raw_transaction(
&self, &self,
_data: Bytes, _data: Bytes,
@ -61,6 +64,7 @@ where
Err(internal_rpc_err("unimplemented")) Err(internal_rpc_err("unimplemented"))
} }
/// Handler for `trace_replayBlockTransactions`
async fn replay_block_transactions( async fn replay_block_transactions(
&self, &self,
_block_id: BlockId, _block_id: BlockId,
@ -69,6 +73,7 @@ where
Err(internal_rpc_err("unimplemented")) Err(internal_rpc_err("unimplemented"))
} }
/// Handler for `trace_replayTransaction`
async fn replay_transaction( async fn replay_transaction(
&self, &self,
_transaction: H256, _transaction: H256,
@ -77,14 +82,17 @@ where
Err(internal_rpc_err("unimplemented")) Err(internal_rpc_err("unimplemented"))
} }
/// Handler for `trace_block`
async fn block(&self, _block_id: BlockId) -> Result<Option<Vec<LocalizedTransactionTrace>>> { async fn block(&self, _block_id: BlockId) -> Result<Option<Vec<LocalizedTransactionTrace>>> {
Err(internal_rpc_err("unimplemented")) Err(internal_rpc_err("unimplemented"))
} }
/// Handler for `trace_filter`
async fn filter(&self, _filter: TraceFilter) -> Result<Vec<LocalizedTransactionTrace>> { async fn filter(&self, _filter: TraceFilter) -> Result<Vec<LocalizedTransactionTrace>> {
Err(internal_rpc_err("unimplemented")) Err(internal_rpc_err("unimplemented"))
} }
/// Handler for `trace_get`
fn trace( fn trace(
&self, &self,
_hash: H256, _hash: H256,
@ -93,6 +101,7 @@ where
Err(internal_rpc_err("unimplemented")) Err(internal_rpc_err("unimplemented"))
} }
/// Handler for `trace_transaction`
fn transaction_traces(&self, _hash: H256) -> Result<Option<Vec<LocalizedTransactionTrace>>> { fn transaction_traces(&self, _hash: H256) -> Result<Option<Vec<LocalizedTransactionTrace>>> {
Err(internal_rpc_err("unimplemented")) Err(internal_rpc_err("unimplemented"))
} }