I would like to listen to events on a contract, but I'm having trouble figuring out which of the interfaces is the correct one and finding an example on how to use it.
The way I see it:
- Contract.eventFilter is
- Contract.pastEvents is
- LogFilter is
v3only and marked as deprecated, pointing to:
- LogFilter.get_all_entries –
- LogFilter.get is only in
- and there are many many more…
The most promising is combination of Eth.filter with either:
- Eth.getFilterChanges for listening to new events or
- Eth.getFilterLogs for fetching them from history.
Which method should I use so that it will keep working once
v4 comes out?