Skip to content

Commit

Permalink
feat: add invariant excludeSelector helper (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
grandizzy authored Jun 18, 2024
1 parent f4a0353 commit 19891e6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/StdInvariant.sol
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ abstract contract StdInvariant {

FuzzArtifactSelector[] private _targetedArtifactSelectors;

FuzzSelector[] private _excludedSelectors;
FuzzSelector[] private _targetedSelectors;

FuzzInterface[] private _targetedInterfaces;
Expand All @@ -40,6 +41,10 @@ abstract contract StdInvariant {
_excludedContracts.push(newExcludedContract_);
}

function excludeSelector(FuzzSelector memory newExcludedSelector_) internal {
_excludedSelectors.push(newExcludedSelector_);
}

function excludeSender(address newExcludedSender_) internal {
_excludedSenders.push(newExcludedSender_);
}
Expand Down Expand Up @@ -83,6 +88,10 @@ abstract contract StdInvariant {
excludedContracts_ = _excludedContracts;
}

function excludeSelectors() public view returns (FuzzSelector[] memory excludedSelectors_) {
excludedSelectors_ = _excludedSelectors;
}

function excludeSenders() public view returns (address[] memory excludedSenders_) {
excludedSenders_ = _excludedSenders;
}
Expand Down

0 comments on commit 19891e6

Please sign in to comment.