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
7.86k stars 1.56k forks source link

Undeclared identifier for "deal" cheatcode #8248

Closed Blngogo closed 6 days ago

Blngogo commented 6 days 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 (ba9fa20 2024-06-24T00:20:52.822818467Z)

What command(s) is the bug in?

forge test

Operating System

Windows

Describe the bug

Had a EVM revert errors when testing with "deal" cheat code, decided to debug, now im trying with simple test case and it says: "Undeclared identifier"

tester tester 2

DaniPopes commented 6 days ago

You're either looking for vm.deal, or the deal utility in forge-std. In either case, you need to inherit Test: contract VaultConfig is Test.

Blngogo commented 6 days ago

YEP! Done this million times, but still miss it! I guess it's time for a rest. Thank you very much sir! @DaniPopes