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
- From + Live: `client.stream_from(start, reads_per_epoch: Option<usize>, block_confirmations: Option<u64>)`
102
104
103
-
Once configured, connect using either `connect_ws::<Ethereum>(ws_url)` or `connect_ipc::<Ethereum>(path)`. This will `connect` the `EventScanner` and allow you to create event streams and start scanning in various [modes](#scanning-Modes).
105
+
Pass `None` to use defaults; provide values to override per call.
104
106
105
107
### Defining Event Filters
106
108
@@ -136,13 +138,13 @@ The flexibility provided by `EventFilter` allows you to build sophisticated even
136
138
137
139
### Scanning Modes
138
140
139
-
-**Live mode** – `start_scanner(BlockNumberOrTag::Latest, None)` subscribes to new blocks only.
140
-
-**Historical mode** – `start_scanner(BlockNumberOrTag::Number(start), Some(BlockNumberOrTag::Number(end)))`, scanner fetches events from a historical block range.
141
-
-**Historical → Live** – `start_scanner(BlockNumberOrTag::Number(start), None)` replays from `start` to current head, then streams future blocks.
141
+
-**Live mode** – `client.stream_live(None)` subscribes to new blocks using default confirmations.
142
+
-**Historical mode** – `client.stream_historical(start, end, None)`fetches a historical block range using the default batch size.
143
+
-**Historical → Live** – `client.stream_from(start, None, None)` replays from `start` to the confirmed tip, then streams future blocks with default confirmations.
142
144
143
-
For now modes are deduced from the `start` and `end` parameters. In the future, we might add explicit commands to select the mode.
145
+
Override defaults by passing `Some(...)` for the optional parameters.
144
146
145
-
See the integration tests under `tests/live_mode`, `tests/historic_mode`, and `tests/historic_to_live` for concrete examples.
147
+
See integration tests under `tests/live_mode`, `tests/historic_mode`, and `tests/historic_to_live` for concrete examples.
0 commit comments