Echidna 2.0.5
This release migrates Echidna to the new hevm implementation. Echidna can now use the prank cheat code that we recently added to hevm. It lets you override the msg.sender value for the next external call:
interface Hevm {
...
function prank(address) external;
}
contract Test {
Hevm hevm = Hevm(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D);
function echidna_test() {
hevm.prank(0x123..);
contract.f(); // msg.sender will be 0x123..
contract.g(); // msg.sender will be address(this)
..
}
}
Prank should be used carefully since it can introduce false positives if used to simulate calls from contracts. Please refer to this documentation for the complete list of cheat codes.
The release also refactors several parts of the code to facilitate further Echidna development.
Added
- Added saving and loading of reproducers for every test (#858)
- Added events and revert reasons for any failure in the constructor (#871)
Fixed
- Optimized constant generation (#898, #900)
- Fixed how address are displayed in events (#891)
- Update hevm to 0.50 (#884, #894, #896, #897, #901)
- Fixed uninitialized sender addresses from etheno transactions (#823)
- Fixed crash when minimizing inputs during optimization tests (#837)
- Refactored code and removed useless dependencies (#856, #857, #874, #878, #895, #903)