Skip to content

0.2.0

Latest
Compare
Choose a tag to compare
@tuturu-tech tuturu-tech released this 02 Apr 13:23
· 8 commits to main since this release
ba33ab9

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 tests
  • template - used to generate fuzzing harnesses
  • init - 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

Bug Fixes

Enhancements

Examples

New Contributors

Full Changelog: 0.1.0...0.2.0