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
+14-13Lines changed: 14 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -104,17 +104,25 @@ Once configured, connect using either `connect_ws::<Ethereum>(ws_url)` or `conne
104
104
105
105
### Defining Event Filters
106
106
107
-
Create an `EventFilter` for each contract/event pair you want to track. The filter specifies the contract address where events originated, and the event signature (from `SolEvent::SIGNATURE`).
108
-
109
-
Both `contract_address` and `event` fields are optional, allowing for flexible event tracking.
107
+
Create an `EventFilter` for each event stream you wish to process. The filter specifies the contract address where events originated, and event signatures (tip: you can use the value stored in `SolEvent::SIGNATURE`).
110
108
111
109
```rust
112
-
// Track a specific event from a specific contract
110
+
// Track a SPECIFIC event from a SPECIFIC contract
@@ -124,14 +132,7 @@ let all_events_filter = EventFilter::new();
124
132
125
133
Register multiple filters by invoking `create_event_stream` repeatedly.
126
134
127
-
Event filters enable several powerful use cases:
128
-
129
-
-**Track all events from a specific contract**: Set `contract_address` but leave `event` as `None`
130
-
-**Track all events across all contracts**: Set both `contract_address` and `event` as `None`
131
-
-**Track specific events from specific contracts**: Set both fields (traditional usage)
132
-
-**Mixed filtering**: Use multiple filters with different optional field combinations
133
-
134
-
This flexibility allows you to build sophisticated event monitoring systems that can track events at different granularities depending on your application's needs.
135
+
The flexibility provided by `EventFilter` allows you to build sophisticated event monitoring systems that can track events at different granularities depending on your application's needs.
0 commit comments