reth
reth copied to clipboard
Add an example how to use `EthFilter` with just the database
Describe the feature
the endpoint impls can be useful on its own, for example user opens database and wants to fetch logs directly.
however this requires a bit more setup due to some API constraints, so we should add a new example for this that
the setup would be similar to this
https://github.com/paradigmxyz/reth/blob/bf44c9724f68d4aabc9ff1e27d278f36328b8d8f/examples/rpc-db/src/main.rs#L44-L44
but use the EthFilter::new directly with all the necessary components and setup, like spawn the cache. the ideal example should consist of
- open db
- create provider
- create necessary setup (EthStateCache)
- get filter
EthFilter::new
https://github.com/paradigmxyz/reth/blob/bf44c9724f68d4aabc9ff1e27d278f36328b8d8f/crates/rpc/rpc/src/eth/filter.rs#L73-L80
Additional context
No response