0.2.0 - 2024-04-02
This release adds support for automatic fuzzing harness generation, refactors a large part of the codebase, and introduces non-backwards compatible changes to the CLI. Each utility now has a separate command:
generate
- used for generating Foundry unit teststemplate
- used to generate fuzzing harnessesinit
- used to initialize a configuration file
A new CLI flag --config
was added so that a configuration file can be used with the generate
and template
commands.
Three generation modes were added to the template
command:
-
simple
- The fuzzing harness will be generated with all of the state-changing functions from the target contracts. All function calls are performed directly, with the harness contract as the msg.sender. -
prank
- Similar to simple mode, with the difference that function calls are made from different users by using hevm.prank(). The users can be defined in the configuration file as "actors": ["0xb4b3", "0xb0b", ...] -
actor
- Actor contracts will be generated and all harness function calls will be proxied through these contracts. The Actor contracts can be considered as users of the target contracts and the functions included in these actors can be filtered by modifier, external calls, or by payable. This allows for granular control over user capabilities.
What's Changed
New features
- Add automatic fuzzing harness generation @tuturu-tech in #27
- Add option to use verbose input names for function calls by @tuturu-tech in #26
- Add flag to generate tests from the entire corpus by @tuturu-tech in #31
- Add the three modes to the template command by @tuturu-tech in #40
Bug Fixes
- Fix: readme link and makefile by @tuturu-tech in #21
- Fix: tool name in files and links by @tuturu-tech in #23
- Fix: parsing issue when using Medusa 0.1.3 by @tuturu-tech in #29
- Fix: Echidna
bytes
/string
parsing and decoding by @tuturu-tech in #34 - Fix: same variable being defined multiple times by @glarregay-tob in #32
- FIX: remapping detection by @tuturu-tech in #36
Enhancements
- Refactor decoding/parsing of Medusa call sequences by @tuturu-tech in #30
- Refactor tests by @tuturu-tech in #34
- Refactor CLI arguments for the
generate
command by @tuturu-tech in #43
Examples
- Added ERC20 example for harness generation by @tuturu-tech in #38
New Contributors
- @glarregay-tob made their first contribution in #32
Full Changelog: 0.1.0...0.2.0