File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,11 @@ abstract contract StdInvariant {
9
9
bytes4 [] selectors;
10
10
}
11
11
12
+ struct FuzzInterface {
13
+ address addr;
14
+ string [] artifacts;
15
+ }
16
+
12
17
address [] private _excludedContracts;
13
18
address [] private _excludedSenders;
14
19
address [] private _targetedContracts;
@@ -20,6 +25,8 @@ abstract contract StdInvariant {
20
25
FuzzSelector[] private _targetedArtifactSelectors;
21
26
FuzzSelector[] private _targetedSelectors;
22
27
28
+ FuzzInterface[] private _targetedInterfaces;
29
+
23
30
// Functions for users:
24
31
// These are intended to be called in tests.
25
32
@@ -55,6 +62,10 @@ abstract contract StdInvariant {
55
62
_targetedSenders.push (newTargetedSender_);
56
63
}
57
64
65
+ function targetInterface (FuzzInterface memory newTargetedInterface_ ) internal {
66
+ _targetedInterfaces.push (newTargetedInterface_);
67
+ }
68
+
58
69
// Functions for forge:
59
70
// These are called by forge to run invariant tests and don't need to be called in tests.
60
71
@@ -89,4 +100,8 @@ abstract contract StdInvariant {
89
100
function targetSenders () public view returns (address [] memory targetedSenders_ ) {
90
101
targetedSenders_ = _targetedSenders;
91
102
}
103
+
104
+ function targetInterfaces () public view returns (FuzzInterface[] memory targetedInterfaces_ ) {
105
+ targetedInterfaces_ = _targetedInterfaces;
106
+ }
92
107
}
You can’t perform that action at this time.
0 commit comments