crytic / medusa

Parallelized, coverage-guided, mutational Solidity smart contract fuzzing, powered by go-ethereum
https://secure-contracts.com/program-analysis/medusa/docs/src/
GNU Affero General Public License v3.0
306 stars 41 forks source link

add support for the `label` cheat #481

Open bohendo opened 2 months ago

bohendo commented 2 months ago

Commonly used in foundry unit tests, adding support for this cheatcode will get us closer to being able to re-use existing setUp functions out-of-the-box, eg:

import { ExistingUnitTestBase } from "./ExistingUnitTestBase.sol";

contract MedusaHarness is ExistingUnitTestBase {
    function setUp() public virtual override {
        ExistingUnitTestBase.setUp();
    }

    // now fuzz fns & invariant checks have access to eg an example system deployment, helpful addresses/tokens, etc
}