-
Notifications
You must be signed in to change notification settings - Fork 287
Closed
Description
I reckon we could improve/simplify the EventSubscription struct. Some thoughts:
- Impl
Stream(and so theStreamExtmethods), so that the filtering logic can be (mostly?) moved out of this struct. - Remove filtering on events from a specific block (if needed, add a separate method to obtain events from a single block which potentially returns the same event stream as we'd get here; this method could be reused in the
transaction.rsstuff too if it existed). - Remove filtering of events from a specific extrinsic (we get this now via the API in
transaction.rs, and ideally it would be easy to manually filter the Stream for such events). - Remove filtering of events by pallet/event index; make it easy to do so via the Stream.
- Update
transfer_subscribeexample to subscribe to events separately from making any transaction, and show off filtering and such. If needed, make transactions etc in a separate thread just to produce the desired events. (why? we shouldn't use this to get events for the current transaction as we have a proper API for that; but that's what the example seems to do). - Possibly add other examples.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels