Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Contract past events could not be fetched from zero block #5717

Closed
1 task done
nazarhussain opened this issue Jan 2, 2023 · 1 comment
Closed
1 task done

Contract past events could not be fetched from zero block #5717

nazarhussain opened this issue Jan 2, 2023 · 1 comment
Assignees
Labels
4.x 4.0 related Bug Addressing a bug

Comments

@nazarhussain
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

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" })
@nazarhussain nazarhussain added Bug Addressing a bug 4.x 4.0 related labels Jan 2, 2023
@nazarhussain nazarhussain changed the title contract past events could not be fetched from zero block Contract past events could not be fetched from zero block Jan 2, 2023
@nikoulai nikoulai self-assigned this Feb 9, 2023
@nikoulai
Copy link
Contributor

fixed in #5819

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x 4.0 related Bug Addressing a bug
Projects
None yet
Development

No branches or pull requests

2 participants