foundry
foundry copied to clipboard
feat(forge): filter through artifacts on invariant testing
Motivation
The ability to filter addresses/functions through their artifacts, instead of just their addresses.
Solution
function targetArtifacts() returns (string[] memory) // ["Contract1","src/Contract2.sol:Contract2"]
function excludeArtifacts() returns (string[] memory) // ["Contract1","src/Contract2.sol:Contract2"]
function targetArtifactSelectors() returns (string, bytes4[])[] memory) // [("Contract1", [Contract1.hello.selector])]
This touches both the addresses coming from the setUp(), as well as any contract generated through a run (testdata/fuzz/invariant/targetAbi/TargetArtifactSelectors2.t.sol).
Priorities when clashing:
targetSelectors | targetArtifactSelectors > excludeContracts | excludeArtifacts > targetContracts | targetArtifacts
lgtm, merge wen ready
great, just need to fix some issue introduced on 13813f4