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
-**No database** – processing happens in-memory; persistence is left to the host application.
38
36
39
37
---
@@ -45,7 +43,6 @@ The library exposes two primary layers:
45
43
-`EventScannerBuilder` / `EventScanner` – the main module the application will interact with.
46
44
-`BlockRangeScanner` – lower-level component that streams block ranges, handles reorg, batching, and provider subscriptions.
47
45
48
-
Callbacks implement the `EventCallback` trait. They are executed through a `CallbackStrategy` that performs retries when necessary before reporting failures.
49
46
50
47
---
51
48
@@ -57,7 +54,6 @@ Add `event-scanner` to your `Cargo.toml`:
57
54
[dependencies]
58
55
event-scanner = "0.1.0-alpha.1"
59
56
```
60
-
Create a callback implementing `EventCallback` and register it with the builder:
-`with_callback_strategy(strategy)` – override retry behaviour (`StateSyncAwareStrategy` by default).
104
99
-`with_blocks_read_per_epoch` - how many blocks are read at a time in a single batch (taken into consideration when fetching historical blocks)
105
100
-`with_reorg_rewind_depth` - how many blocks to rewind when a reorg is detected
106
101
-`with_block_confirmations` - how many confirmations to wait for before considering a block final
@@ -110,7 +105,7 @@ Once configured, connect using either `connect_ws::<Ethereum>(ws_url)` or `conne
110
105
111
106
### Defining Event Filters
112
107
113
-
Create an `EventFilter` for each contract/event pair you want to track. The filter bundles the contract address, the event signature (from `SolEvent::SIGNATURE`), and an `Arc<dyn EventCallback + Send + Sync>`.
108
+
Create an `EventFilter` for each contract/event pair you want to track. The filter bundles the contract address, the event signature (from `SolEvent::SIGNATURE`).
114
109
115
110
Both `contract_address` and `event` fields are optional, allowing for flexible event tracking.
116
111
@@ -123,16 +118,13 @@ You can construct EventFilters using either the builder pattern (recommended) or
Advanced users can write custom retry behaviour by implementing the `CallbackStrategy` trait. The default `StateSyncAwareStrategy` automatically detects state-sync errors and performs exponential backoff ([smart retry mechanism](https://github.com/taikoxyz/taiko-mono/blob/f4b3a0e830e42e2fee54829326389709dd422098/packages/taiko-client/pkg/chain_iterator/block_batch_iterator.go#L149) from the geth driver) before falling back to a fixed retry policy configured via `FixedRetryConfig`.
0 commit comments