File tree Expand file tree Collapse file tree 3 files changed +13
-19
lines changed Expand file tree Collapse file tree 3 files changed +13
-19
lines changed Original file line number Diff line number Diff line change @@ -47,12 +47,6 @@ contract InvariantTest is BaseTest {
47
47
vm.stopPrank ();
48
48
}
49
49
50
- function _weightSelector (bytes4 selector , uint256 weight ) internal {
51
- for (uint256 i; i < weight; ++ i) {
52
- selectors.push (selector);
53
- }
54
- }
55
-
56
50
/* HANDLERS */
57
51
58
52
function mine (uint256 blocks ) external {
Original file line number Diff line number Diff line change @@ -19,14 +19,14 @@ contract BaseInvariantTest is InvariantTest {
19
19
}
20
20
21
21
function setUp () public virtual override {
22
- _weightSelector (this .supplyAssetsOnBehalfNoRevert.selector , 15 );
23
- _weightSelector (this .supplySharesOnBehalfNoRevert.selector , 5 );
24
- _weightSelector (this .withdrawAssetsOnBehalfNoRevert.selector , 10 );
25
- _weightSelector (this .borrowAssetsOnBehalfNoRevert.selector , 15 );
26
- _weightSelector (this .repayAssetsOnBehalfNoRevert.selector , 10 );
27
- _weightSelector (this .repaySharesOnBehalfNoRevert.selector , 10 );
28
- _weightSelector (this .supplyCollateralOnBehalfNoRevert.selector , 15 );
29
- _weightSelector (this .withdrawCollateralOnBehalfNoRevert.selector , 10 );
22
+ selectors. push (this .supplyAssetsOnBehalfNoRevert.selector );
23
+ selectors. push (this .supplySharesOnBehalfNoRevert.selector );
24
+ selectors. push (this .withdrawAssetsOnBehalfNoRevert.selector );
25
+ selectors. push (this .borrowAssetsOnBehalfNoRevert.selector );
26
+ selectors. push (this .repayAssetsOnBehalfNoRevert.selector );
27
+ selectors. push (this .repaySharesOnBehalfNoRevert.selector );
28
+ selectors. push (this .supplyCollateralOnBehalfNoRevert.selector );
29
+ selectors. push (this .withdrawCollateralOnBehalfNoRevert.selector );
30
30
31
31
super .setUp ();
32
32
Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ contract DynamicInvariantTest is BaseInvariantTest {
11
11
uint256 internal immutable MAX_PRICE = ORACLE_PRICE_SCALE * 10 ;
12
12
13
13
function setUp () public virtual override {
14
- _weightSelector (this .liquidateSeizedAssetsNoRevert.selector , 2 );
15
- _weightSelector (this .liquidateRepaidSharesNoRevert.selector , 2 );
16
- _weightSelector (this .setFeeNoRevert.selector , 1 );
17
- _weightSelector (this .setPrice.selector , 5 );
18
- _weightSelector (this .mine.selector , 100 );
14
+ selectors. push (this .liquidateSeizedAssetsNoRevert.selector );
15
+ selectors. push (this .liquidateRepaidSharesNoRevert.selector );
16
+ selectors. push (this .setFeeNoRevert.selector );
17
+ selectors. push (this .setPrice.selector );
18
+ selectors. push (this .mine.selector );
19
19
20
20
super .setUp ();
21
21
}
You can’t perform that action at this time.
0 commit comments