@@ -48,9 +48,8 @@ contract Handler is Test {
48
48
}
49
49
50
50
contract SolaxyInvarantTest is Test {
51
- Handler public handler;
52
- IERC20 public RESERVE;
53
51
Solaxy public SLX;
52
+ IERC20 public RESERVE;
54
53
address public RESERVE_address;
55
54
address public handlerAddress;
56
55
@@ -61,19 +60,19 @@ contract SolaxyInvarantTest is Test {
61
60
SLX = new Solaxy ();
62
61
RESERVE_address = SLX.asset ();
63
62
RESERVE = IERC20 (RESERVE_address);
64
-
65
- handler = new Handler (SLX, RESERVE);
66
- handlerAddress = address (handler);
63
+ handlerAddress = address (new Handler (SLX, RESERVE));
67
64
68
65
deal (RESERVE_address, handlerAddress, reserve_balanceOneBillion, true );
69
66
dealERC721 (address (SLX.M3TER ()), handlerAddress, 0 );
70
67
targetContract (handlerAddress);
71
68
}
72
69
73
70
function invariantValuation () public view {
74
- uint256 reserve_balanceAfterTest = RESERVE.balanceOf (handlerAddress);
75
- uint256 solaxyTVL = reserve_balanceOneBillion - reserve_balanceAfterTest;
76
- assertEq (SLX.totalAssets (), solaxyTVL, "Total value locked should be strictly equal to total reserve assets " );
71
+ assertEq (
72
+ SLX.totalAssets (),
73
+ RESERVE.balanceOf (handlerAddress) - reserve_balanceOneBillion,
74
+ "Total value locked should be strictly equal to total reserve assets "
75
+ );
77
76
78
77
assertEq (
79
78
SLX.totalSupply (),
@@ -88,9 +87,4 @@ contract SolaxyInvarantTest is Test {
88
87
"Total reserve assets must be enough to cover the conversion of all existing tokens to less than a cent rounding error "
89
88
);
90
89
}
91
-
92
- function test_knowHolderBalance () public view {
93
- uint256 knowHolderBalance = RESERVE.balanceOf (0x4e59b44847b379578588920cA78FbF26c0B4956C );
94
- assertEq (knowHolderBalance, 0.000864e18 , "reserve balance should be equal 0.000864 reserve " );
95
- }
96
90
}
0 commit comments