fuzzland / ityfuzz

Blazing Fast Bytecode-Level Hybrid Fuzzer for Smart Contracts
https://docs.ityfuzz.rs
MIT License
834 stars 134 forks source link

Better foundry test support #407

Closed jacob-chia closed 9 months ago

jacob-chia commented 9 months ago

Current version:

function test() public {
    0x7FdC0D8857c6D90FD79E22511baf059c0c71BF8b.call(
        abi.encodeWithSignature(
            "swap(uint256,uint256,address,bytes)",
            13.763 ether,
            11774,
            0xe1A425f1AC34A8a441566f93c82dD730639c8510,
            0x010000000000000000000000000000100080FF00
        )
    );
}

Next version:

function test() public {
    I(0x7FdC0D8857c6D90FD79E22511baf059c0c71BF8b).swap(
        13.763 ether, 11774, 0xe1A425f1AC34A8a441566f93c82dD730639c8510, 0x010000000000000000000000000000100080FF00
    );
}

interface I {
    function swap(uint256, uint256, address, bytes) external;
}