echidna
echidna copied to clipboard
feat: more visibility for unsupported cheatcodes (BadCheatCode)
Using unrecognized cheatcodes results in a failure.
import "forge-std/Test.sol";
contract TestContract is Test {
function test123(uint256 x) public {
vm.assume(false);
vm.expectRevert();
}
}
echidna-test . --contract TestContract --test-mode dapptest --format text --test-limit 100
Analyzing contract: /Users/lain/git/eth/template/test/TestContract.sol:TestContract
echidna-test: VM failed for unhandled reason, BadCheatCode (Just 1281615202). This shouldn't happen. Please file a ticket with this error message and steps to reproduce!
It would be great to know what cheatcode was executed (and perhaps where), as these can be difficult to find in larger codebases. Additionally, maybe unsupported cheatcodes could just be ignored (after printing an error message).
Yeah, we should handle it better, thanks for reporting.
Cheatcodes can only be hanlded using hevm because they generate a special type of error.
We should print a trace for any VM error, this will show which cheat code was called.