Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an example how to use EthFilter with just the database #12508

Open
mattsse opened this issue Nov 13, 2024 · 2 comments
Open

Add an example how to use EthFilter with just the database #12508

mattsse opened this issue Nov 13, 2024 · 2 comments
Assignees
Labels
C-enhancement New feature or request D-complex Quite challenging from either a design or technical perspective Ask for help! D-good-first-issue Nice and easy! A great choice to get started

Comments

@mattsse
Copy link
Collaborator

mattsse commented Nov 13, 2024

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

async fn main() -> eyre::Result<()> {

but use the EthFilter::new directly with all the necessary components and setup, like spawn the cache. the ideal example should consist of

  1. open db
  2. create provider
  3. create necessary setup (EthStateCache)
  4. get filter EthFilter::new

pub fn new(
provider: Provider,
pool: Pool,
eth_cache: EthStateCache,
config: EthFilterConfig,
task_spawner: Box<dyn TaskSpawner>,
tx_resp_builder: Eth::TransactionCompat,
) -> Self {

Additional context

No response

@mattsse mattsse added C-enhancement New feature or request S-needs-triage This issue needs to be labelled labels Nov 13, 2024
@mattsse mattsse added D-good-first-issue Nice and easy! A great choice to get started D-complex Quite challenging from either a design or technical perspective Ask for help! and removed S-needs-triage This issue needs to be labelled labels Nov 13, 2024
@htiennv
Copy link
Contributor

htiennv commented Nov 13, 2024

Hi @mattsse, can i pick this? Thanks.

@mattsse
Copy link
Collaborator Author

mattsse commented Nov 13, 2024

assigned, lmk if you need pointers by opening a draft pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement New feature or request D-complex Quite challenging from either a design or technical perspective Ask for help! D-good-first-issue Nice and easy! A great choice to get started
Projects
Status: Todo
Development

No branches or pull requests

2 participants