OpenZeppelin / OpenZeppelin/Event-Scanner
`EventFilter` Should Include `.count()` That Limits the Number of Events Streamed in Any Mode
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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