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

Hardhat forking doesn't fork latest block by default #6029

Open
old-mikser opened this issue Dec 9, 2024 · 0 comments
Open

Hardhat forking doesn't fork latest block by default #6029

old-mikser opened this issue Dec 9, 2024 · 0 comments
Assignees

Comments

@old-mikser
Copy link

old-mikser commented Dec 9, 2024

My hardhat version is 2.22.17

I'm trying to run forked state of the blockchain with my local node (I also tried with remote nodes and got same results).
I have very simple setup:

networks: { hardhat: { forking: { url: "http://127.0.0.1:8545", } } }

It forks network around 80-120 blocks behind, which is strange for me. When I'm using block number explicitly (current or 1-2 behind) it works as it should.

I thought that expected behavior of getting fork based on the latest block is just to set URL without blockNumber. Since there is now option like blockNumber: "latest what is the most clean way to achieve it? Or am I doing something wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

No branches or pull requests

2 participants