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-ethers getBlockNumber is wrong after a call to hardhat_reset. #1015

Closed
alcuadrado opened this issue Nov 12, 2020 · 0 comments · Fixed by #1024
Closed

hardhat-ethers getBlockNumber is wrong after a call to hardhat_reset. #1015

alcuadrado opened this issue Nov 12, 2020 · 0 comments · Fixed by #1024
Assignees
Labels
type:bug Something isn't working

Comments

@alcuadrado
Copy link
Member

This bug was reported on discord.

If you use hardhat-ethers, for example, the sample project, and run:

await ethers.provider.send("evm_mine");
await ethers.provider.send("evm_mine");
await ethers.provider.getBlockNumber(); // 2

await ethers.provider.send("hardhat_reset");
await ethers.provider.getBlockNumber(); // 2 -- should be 0
await network.provider.send("eth_blockNumber") // '0x0'
@fvictorio fvictorio added the type:bug Something isn't working label Nov 12, 2020
@fvictorio fvictorio self-assigned this Nov 13, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type:bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants