paradigmxyz / reth

Modular, contributor-friendly and blazing-fast implementation of the Ethereum protocol, in Rust
https://reth.rs/
Apache License 2.0
3.84k stars 1.09k forks source link

Add an example of using an RPC with an ExEx #8008

Open onbjerg opened 5 months ago

onbjerg commented 5 months ago

Describe the feature

Add an example of how to start a custom RPC method alongside an ExEx, and feed the data from the RPC method into the ExEx, and from the ExEx into the RPC response.

The ExEx does not need to do anything super special; it could e.g. something like the optimism deposit decoder example we have that just also exposes # deposits over RPC or similar. The goal is to demonstrate:

  1. How to add a custom RPC method for an ExEx
  2. Feed data from that RPC method to an ExEx
  3. Feed data from an ExEx to an RPC response

Additional context

No response

supernovahs commented 5 months ago

I would like to try this