Skip to content

Commit

Permalink
✅ fix WrapperExceedsMaxAmount error
Browse files Browse the repository at this point in the history
  • Loading branch information
Flocqst committed Oct 11, 2024
1 parent 912fe09 commit e8a5948
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/Collateral.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ contract DepositCollateral is CollateralTest {
}

function test_depositCollateral_ETH_Fuzz(uint256 amount) public {
/// @dev amount must be less than max MarketCollateralAmount
vm.assume(amount < 1_000_000_000_000_000_000_000);
/// @dev amount must be less than max MarketCollateralAmount - currentDepositedCollateral
vm.assume(amount < MAX_WRAPPABLE_AMOUNT);
vm.assume(amount > SMALLEST_AMOUNT);
vm.deal(ACTOR, amount);

Expand Down Expand Up @@ -520,7 +520,7 @@ contract WithdrawCollateral is CollateralTest {
uint256 preBalance = ACTOR.balance;

/// @dev amount must be less than max MarketCollateralAmount
vm.assume(amount < 1_000_000_000_000_000_000_000);
vm.assume(amount < MAX_WRAPPABLE_AMOUNT);
vm.assume(amount > SMALLEST_AMOUNT);
vm.deal(ACTOR, amount);

Expand Down
2 changes: 2 additions & 0 deletions test/utils/Constants.sol
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ contract Constants {

uint256 internal constant SMALLEST_AMOUNT = 100 wei;

uint256 internal constant MAX_WRAPPABLE_AMOUNT = 900_000_000_000_000_000_000;

address internal constant MARKET_CONFIGURATION_MODULE = address(0xC0FE);

uint256 internal constant ZERO_CO_FEE = 0;
Expand Down

0 comments on commit e8a5948

Please sign in to comment.