This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Description
Is there an existing issue for this?
Current Behavior
Contract past events when fetched with options fromBlock: 0 does not fetch all events.
Expected Behavior
It should return all the events starting from zero block.
Steps to Reproduce
This works for any contract.
await example.getPastEvents("ExampleEvent", { fromBlock: 0, toBlock: "latest" })
Web3.js Version
4.0.1-alpha.2
Environment
- Operating System: Mac
- Browser: Brave
- Node.js Version: 16x
- NPM Version: 8x
Anything Else?
Interesting the following code works fine, but does not if we specify fromBlock: 0
await example.getPastEvents("ExampleEvent", { fromBlock: "earliest", toBlock: "latest" })