docs: book pass + rpc chapter (#3070)

This commit is contained in:
Bjerg
2023-06-12 06:30:52 +02:00
committed by GitHub
parent b19e12341d
commit d65032ee82
23 changed files with 1092 additions and 159 deletions

View File

@ -65,7 +65,7 @@ pub trait DebugApi {
opts: Option<GethDebugTracingOptions>,
) -> RpcResult<Vec<TraceResult>>;
/// Similar to `debug_traceBlockByNumber`, `debug_traceBlockByHash` accepts a block number
/// Similar to `debug_traceBlockByHash`, `debug_traceBlockByNumber` accepts a block number
/// [BlockNumberOrTag] and will replay the block that is already present in the database.
/// For the second parameter see [GethDebugTracingOptions].
#[method(name = "traceBlockByNumber")]
@ -86,11 +86,11 @@ pub trait DebugApi {
opts: Option<GethDebugTracingOptions>,
) -> RpcResult<GethTraceFrame>;
/// The debug_traceCall method lets you run an `eth_call` within the context of the given block
/// execution using the final state of parent block as the base.
/// The `debug_traceCall` method lets you run an `eth_call` within the context of the given
/// block execution using the final state of parent block as the base.
///
/// The first argument (just as in`eth_call`) is a transaction request.
/// The block can be specified either by hash or by number as
/// The first argument (just as in `eth_call`) is a transaction request.
/// The block can optionally be specified either by hash or by number as
/// the second argument.
/// The trace can be configured similar to `debug_traceTransaction`,
/// see [GethDebugTracingOptions]. The method returns the same output as

View File

@ -5,7 +5,7 @@ use reth_rpc_types::PeerCount;
#[cfg_attr(not(feature = "client"), rpc(server, namespace = "net"))]
#[cfg_attr(feature = "client", rpc(server, client, namespace = "net"))]
pub trait NetApi {
/// Returns protocol version.
/// Returns the network ID.
#[method(name = "version")]
fn version(&self) -> RpcResult<String>;

View File

@ -9,7 +9,8 @@ use reth_rpc_types::txpool::{TxpoolContent, TxpoolContentFrom, TxpoolInspect, Tx
pub trait TxPoolApi {
/// Returns the number of transactions currently pending for inclusion in the next block(s), as
/// well as the ones that are being scheduled for future execution only.
/// Ref: [Here](https://geth.ethereum.org/docs/rpc/ns-txpool#txpool_status)
///
/// See [here](https://geth.ethereum.org/docs/rpc/ns-txpool#txpool_status) for more details
#[method(name = "status")]
async fn txpool_status(&self) -> RpcResult<TxpoolStatus>;