foundry: vm.rollFork not working
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.2.0 (1c41585 2022-09-04T09:41:42.826574Z)
What command(s) is the bug in?
No response
Operating System
Windows
Describe the bug
I am working in a forked envrionment and as such I am using
mainnetFork = vm.createFork(MAINNET_RPC_URL);
vm.selectFork(mainnetFork);
However there seems to be an error when trying to use vm.rollFork();
I was using it fine for a couple of weeks however today is started to crash with error
The way i was using roll fork was like so:
vm.rollFork(block.number - 15);
which never gave me an issue. Things ive tried all gave me the same error:
vm.rollFork(block.number)
uint blockNumber = block.number; \\ 15471120
vm.rollFork(15471120)
vm.rollFork(15471120 - 15)
vm.rollFork(15471105)
uint moveBlocks = block.number - 15
vm.rollFork(moveBlocks)
I have even changed my RPC provider from alchemy to infurar with no avail. Ive updated rust as well as foundry and still nothing.
Any help would be greatly appreciated! Thank you
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (10 by maintainers)
we’ve seen this before, this is an edge case with the depth counter, looks like we’re missing a reset somewhere
checking