OpenZeppelin / OpenZeppelin/Event-Scanner

`EventFilter` Should Include `.count()` That Limits the Number of Events Streamed in Any Mode

Open
#183 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: feature
Dominant language
Rust
Stars
19
Forks
7
Avg merge
2h 15m
Merged PRs (30d)
4

Description

let mut scanner = EventScannerBuilder::live()
    .count(50) // stream only 50 events and then stop
    .connect(robust_provider);

// Register an event listener
let filter = EventFilter::new()
    .contract_address(contract)
    .event(MyContract::SomeEvent::SIGNATURE);

let mut stream = scanner.subscribe(filter);

// Start the scanner
scanner.start().await?;

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing EventScannerBuilder::live(), EventFilter::new(), scanner.subscribe(filter), and scanner.start(). Review how the scanner handles its other modes and determine where a count limit belongs. Done means .count(50) stops the event stream after 50 events in every mode.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
stream-processing
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.