You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+58-4Lines changed: 58 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@
11
11
Event Scanner is a Rust library for streaming EVM-based smart contract events. It is built on top of the [`alloy`](https://github.com/alloy-rs/alloy) ecosystem and focuses on in-memory scanning without a backing database. Applications provide event filters; the scanner takes care of fetching historical ranges, bridging into live streaming mode, all whilst delivering the events as streams of data.
12
12
13
13
---
14
+
14
15
15
16
## Table of Contents
16
17
@@ -21,7 +22,7 @@ Event Scanner is a Rust library for streaming EVM-based smart contract events. I
The scanner periodically checks the tip to detect reorgs. On reorg, the scanner emits `ScannerStatus::ReorgDetected`, resets to the updated tip, and restarts the scan. Final delivery to log listeners is in chronological order.
230
+
231
+
Notes:
232
+
233
+
- Ensure you create streams via `create_event_stream()` before calling `scan_latest*` so listeners are registered.
234
+
<!-- TODO: uncomment once implemented - The function returns after delivering the messages; to continuously stream new blocks, use `scan_latest_then_live`. -->
235
+
184
236
---
185
237
186
238
## Examples
187
239
188
240
-`examples/simple_counter` – minimal live-mode scanner using `EventScanner::live()`
189
241
-`examples/historical_scanning` – demonstrates replaying historical data using `EventScanner::historic()`
242
+
-`examples/latest_events_scanning` – demonstrates scanning the latest events using `EventScanner::latest()`
190
243
191
244
Run an example with:
192
245
@@ -202,10 +255,11 @@ Both examples spin up a local `anvil` instance, deploy a demo counter contract,
202
255
203
256
## Testing
204
257
205
-
Integration tests cover live, historical, and hybrid flows:
206
258
(We recommend using [nextest](https://crates.io/crates/cargo-nextest) to run the tests)
0 commit comments