foundry-rs / foundry

Foundry is a blazing fast, portable and modular toolkit for Ethereum application development written in Rust.
https://getfoundry.sh
Apache License 2.0
8.29k stars 1.75k forks source link

Change made by `vm.deal(address,uint256)` at the end of `setUp()` is no longer present at the beginning of a test #2898

Closed benesjan closed 2 years ago

benesjan commented 2 years ago

Component

Forge

Have you ensured that all of these are up to date?

What version of Foundry are you on?

forge 0.2.0 (b1f6a6c 2022-08-23T00:07:04.829899Z)

What command(s) is the bug in?

forge test

Operating System

macOS (Apple Silicon)

Describe the bug

After updating forge my tests started failing. I realized that it is because of issue I described in the headline. When I print the balance at the end of setUp it's 0. At the beginning of a test it's non-zero.

The bug was introduced in the latest release. Release nightly-7e9e6a5d6b30ad3f543857198234edcdbceb724a is working as expected.

I am working on an open source project so the bug can be reproduced by running forge test --match-contract Subsidy on master branch in this repo.

image
mattsse commented 2 years ago

this could be a regression from revm bump yesterday, investigating

mattsse commented 2 years ago

@benesjan thanks for flagging, this was indeed a smol regression introduced yesterday.

should be resolved by #2901