The implementation of vm.snapshot uses go-ethereum's revertToSnapshot which will delete "future" states after reverting e.g. a history of [1,2,3] will become [1] if revertToSnapshot(1) is called so it's not possible to call revertToSnapshot(3) following. This deviates from how Foundry's implementation works (see https://github.com/foundry-rs/foundry/pull/5487).
The implementation of
vm.snapshot
uses go-ethereum'srevertToSnapshot
which will delete "future" states after reverting e.g. a history of [1,2,3] will become [1] ifrevertToSnapshot(1)
is called so it's not possible to callrevertToSnapshot(3)
following. This deviates from how Foundry's implementation works (see https://github.com/foundry-rs/foundry/pull/5487).