web3.js icon indicating copy to clipboard operation
web3.js copied to clipboard

Support BatchRequest for getPastEvents

Open ghost opened this issue 2 years ago • 2 comments

Is there an existing issue for this? No.

  • [X] I have searched the existing issues

Feature Request

It would be great if BatchRequest supports getPastEvents ( eth_getLogs ), so that it would reduce calls for fetching events which would fulfill getting event logs from public nodes with rate limits.

Use Cases

Many public nodes have rate limits as well as limits for block length for a single eth_getLogs call ( 5K block for BSC https://docs.bnbchain.org/docs/rpc ). Without batch requests, it would take a lot of time to fetch historic contract logs due to those limits applied ).

Implementation Ideas

Support web3.eth.Contract().getPastEvents to call for eth_getLogs, I don't think 4.x branch doesn't support this feature as well ( Although it is technically possible & already available for ethers.js )

Feature Examples/References

No response

Are you willing to implement this feature? No. ( This would create incompatibility for type definitions for either BatchRequest or getPastEvents )

  • [ ] Yes

ghost avatar Jul 08 '22 00:07 ghost

@ayanamidev Thanks for this issue, Currently we are focused on 4.x alpha release and our team can look this for beta.

jdevcs avatar Jul 11 '22 14:07 jdevcs

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

github-actions[bot] avatar Sep 10 '22 00:09 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

github-actions[bot] avatar Dec 07 '22 01:12 github-actions[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

github-actions[bot] avatar Feb 11 '23 00:02 github-actions[bot]