Open wighawag opened 6 years ago
You may be interested in my PR on eth-js https://github.com/ethjs/ethjs/pull/5 and my comment on eth-js query https://github.com/ethjs/ethjs-query/issues/7 that demonstrates how eth_getLogs is kind of broken. I had to use web3 to serialize the event.
@wighawag we can add something for this, however it would just be using as @pointtoken points out, eth_getLogs.
eth_Logs would be good
ethjs-contract
Description
For my use case I like to call eth_getLogs to gather past events that match the filter parameter in one go (basically I expect to get an array of matching logs)
If this could be added to ethjs as a general method as well as contract event specific, this would be cool
web3 1.0 does this via getPastEvent for contract :
https://web3js.readthedocs.io/en/1.0/web3-eth-contract.html#getpastevents
and getPastLogs for the general case
https://web3js.readthedocs.io/en/1.0/web3-eth.html#getpastlogs