@@ -131,12 +131,12 @@ contract SystemInvariantTest is Test {
131131 );
132132 }
133133
134- /// @notice Discovery contract should never hold ETH
135- function invariant_DiscoveryHoldsNoETH () public view {
134+ /// @notice Discovery contract should never hold RBTC
135+ function invariant_DiscoveryHoldsNoRBTC () public view {
136136 assertEq (
137137 address (discovery).balance,
138138 0 ,
139- "INVARIANT VIOLATED: Discovery holds ETH "
139+ "INVARIANT VIOLATED: Discovery holds RBTC "
140140 );
141141 }
142142
@@ -200,54 +200,54 @@ contract SystemInvariantTest is Test {
200200 }
201201 }
202202
203- /// @notice No individual value should exceed the total ETH injected into the system
203+ /// @notice No individual value should exceed the total RBTC injected into the system
204204 function invariant_NoUnderflowAnywhere () public view {
205- uint256 totalETHIn = handler.ghost_totalETHIn ();
205+ uint256 totalRBTCIn = handler.ghost_totalRBTCIn ();
206206 uint256 count = handler.getProviderCount ();
207207 for (uint256 i = 0 ; i < count; i++ ) {
208208 address addr = handler.getProviderAddr (i);
209209 assertLe (
210210 collateralManagement.getPegInCollateral (addr),
211- totalETHIn ,
212- "PegIn collateral exceeds total ETH in "
211+ totalRBTCIn ,
212+ "PegIn collateral exceeds total RBTC in "
213213 );
214214 assertLe (
215215 collateralManagement.getPegOutCollateral (addr),
216- totalETHIn ,
217- "PegOut collateral exceeds total ETH in "
216+ totalRBTCIn ,
217+ "PegOut collateral exceeds total RBTC in "
218218 );
219219 assertLe (
220220 pegInContract.getBalance (addr),
221- totalETHIn ,
222- "PegIn balance exceeds total ETH in "
221+ totalRBTCIn ,
222+ "PegIn balance exceeds total RBTC in "
223223 );
224224 assertLe (
225225 pegOutContract.getBalance (addr),
226- totalETHIn ,
227- "PegOut balance exceeds total ETH in "
226+ totalRBTCIn ,
227+ "PegOut balance exceeds total RBTC in "
228228 );
229229 }
230230 assertLe (
231231 address (collateralManagement).balance,
232- totalETHIn ,
233- "CM balance exceeds total ETH in "
232+ totalRBTCIn ,
233+ "CM balance exceeds total RBTC in "
234234 );
235235 assertLe (
236236 address (pegInContract).balance,
237- totalETHIn ,
238- "PegIn contract balance exceeds total ETH in "
237+ totalRBTCIn ,
238+ "PegIn contract balance exceeds total RBTC in "
239239 );
240240 assertLe (
241241 address (pegOutContract).balance,
242- totalETHIn ,
243- "PegOut contract balance exceeds total ETH in "
242+ totalRBTCIn ,
243+ "PegOut contract balance exceeds total RBTC in "
244244 );
245245 }
246246
247- /// @notice Total ETH across all contracts should not exceed total ETH injected
247+ /// @notice Total RBTC across all contracts should not exceed total RBTC injected
248248 function invariant_GlobalConservation () public view {
249- uint256 totalETHIn = handler.ghost_totalETHIn ();
250- if (totalETHIn == 0 ) return ;
249+ uint256 totalRBTCIn = handler.ghost_totalRBTCIn ();
250+ if (totalRBTCIn == 0 ) return ;
251251
252252 uint256 systemBalance = address (collateralManagement).balance +
253253 address (pegInContract).balance +
@@ -256,8 +256,8 @@ contract SystemInvariantTest is Test {
256256
257257 assertLe (
258258 systemBalance,
259- totalETHIn ,
260- "INVARIANT VIOLATED: System has more ETH than was injected "
259+ totalRBTCIn ,
260+ "INVARIANT VIOLATED: System has more RBTC than was injected "
261261 );
262262 }
263263
@@ -295,7 +295,7 @@ contract SystemInvariantTest is Test {
295295 "Collateral withdrawn: " ,
296296 handler.ghost_totalCollateralWithdrawn ()
297297 );
298- console.log ("Total ETH in: " , handler.ghost_totalETHIn ());
298+ console.log ("Total RBTC in: " , handler.ghost_totalRBTCIn ());
299299 console.log ("CM balance: " , address (collateralManagement).balance);
300300 console.log ("PegIn balance: " , address (pegInContract).balance);
301301 console.log ("PegOut balance: " , address (pegOutContract).balance);
0 commit comments