Skip to content

Commit

Permalink
fix: echidna test (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
hexshire authored Oct 4, 2024
1 parent f625b72 commit ad1ab61
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/invariants/fuzz/OpUSDC.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,12 @@ contract FuzzOpUsdc is SetupOpUSDC {
require(l2Adapter.messengerStatus() != IOpUSDCBridgeAdapter.Status.Active);
require(!usdcMainnet.isBlacklisted(_spender)); // Avoid reverting when funds sent back to l1 (as test mock bridge is atomic)

_amount = clamp(_amount, 0, (2 ^ 255 - 1) - usdcBridged.balanceOf(_to) - _amount);
if (l2Adapter.messengerStatus() == IOpUSDCBridgeAdapter.Status.Deprecated) {
// deprecated -> fund sent back to l1
_amount = clamp(_amount, 0, (2 ^ 255 - 1) - usdcMainnet.balanceOf(_spender) - _amount);
} else {
_amount = clamp(_amount, 0, (2 ^ 255 - 1) - usdcBridged.balanceOf(_to) - _amount);
}

// provided enough usdc on l1
hevm.prank(_usdcMinter);
Expand Down

0 comments on commit ad1ab61

Please sign in to comment.