Skip to content

Commit

Permalink
Relax flow rate parameter range check
Browse files Browse the repository at this point in the history
  • Loading branch information
ermyas committed Feb 2, 2024
1 parent b381ee9 commit 7234cdd
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/fork/root/RootERC20BridgeFlowRate.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -206,19 +206,18 @@ contract RootERC20BridgeFlowRateForkTest is Test, Utils {
function _exceedFlowRateParameters(RootERC20BridgeFlowRate bridge, address token, address withdrawer) private {
(uint256 capacity, uint256 depth,, uint256 refillRate) = bridge.flowRateBuckets(token);

uint256 oneUnit = token == ETH ? 1 ether : 1 ^ IERC20Metadata(token).decimals();
// Check if the thresholds are within reasonable range
assertGt(
bridge.largeTransferThresholds(token),
oneUnit,
"Precondition: Large transfer threshold should be greater than 1 unit of token"
0,
"Precondition: Large transfer threshold should be greater than zero"
);
assertLt(
bridge.largeTransferThresholds(token),
capacity,
"Precondition: Large transfer threshold should be less than capacity"
);
assertGt(capacity, oneUnit);
assertGt(capacity, 0);
assertGt(refillRate, 0);
assertEq(bridge.getPendingWithdrawalsLength(withdrawer), 0);

Expand Down

0 comments on commit 7234cdd

Please sign in to comment.