Built-in contracts like vm
and the create2 factory should be excluded senders in invariants
#4163
Closed
2 tasks done
Labels
T-bug
Type: bug
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (e7ef3c2 2023-01-24T00:14:27.601697Z)
What command(s) is the bug in?
forge test
Operating System
macOS (Apple Silicon)
Describe the bug
When running invariant tests with
fail_on_revert = true
, one must callexcludeSender
for all addresses with code. Otherwise you get the following nondescript error:Ideally forge would automatically exclude contracts from its randomized sender generation. Barring that, users should be told to exclude the following built-in contracts, since they may be unaware of them:
Arguably this is a feature request, but as far as I'm concerned it's unexpected/unexplained behavior so I'm submitting as a bug.
The text was updated successfully, but these errors were encountered: