Skip to content

Commit

Permalink
Merge branch 'test/joinswap-extern-amount-in-happy-path' into test/jo…
Browse files Browse the repository at this point in the history
…inswap-pool-amount-out-happy-path
  • Loading branch information
0xAustrian committed May 16, 2024
2 parents 09dc5cd + 73ac5c7 commit 37fdc76
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/unit/BPool.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -646,8 +646,8 @@ contract BPool_Unit_SwapExactAmountIn is BasePoolTest {

function _assumeHappyPath(SwapExactAmountIn_FuzzScenario memory _fuzz) internal pure {
// safe bound assumptions
_fuzz.tokenInDenorm = bound(_fuzz.tokenInDenorm, MIN_WEIGHT, MAX_WEIGHT);
_fuzz.tokenOutDenorm = bound(_fuzz.tokenOutDenorm, MIN_WEIGHT, MAX_WEIGHT);
_fuzz.tokenInDenorm = bound(_fuzz.tokenInDenorm, MIN_WEIGHT, MAX_WEIGHT / 2);
_fuzz.tokenOutDenorm = bound(_fuzz.tokenOutDenorm, MIN_WEIGHT, MAX_WEIGHT / 2);
_fuzz.swapFee = bound(_fuzz.swapFee, MIN_FEE, MAX_FEE);

// min
Expand Down Expand Up @@ -784,8 +784,8 @@ contract BPool_Unit_SwapExactAmountOut is BasePoolTest {

function _assumeHappyPath(SwapExactAmountOut_FuzzScenario memory _fuzz) internal pure {
// safe bound assumptions
_fuzz.tokenInDenorm = bound(_fuzz.tokenInDenorm, MIN_WEIGHT, MAX_WEIGHT);
_fuzz.tokenOutDenorm = bound(_fuzz.tokenOutDenorm, MIN_WEIGHT, MAX_WEIGHT);
_fuzz.tokenInDenorm = bound(_fuzz.tokenInDenorm, MIN_WEIGHT, MAX_WEIGHT / 2);
_fuzz.tokenOutDenorm = bound(_fuzz.tokenOutDenorm, MIN_WEIGHT, MAX_WEIGHT / 2);
_fuzz.swapFee = bound(_fuzz.swapFee, MIN_FEE, MAX_FEE);

// min
Expand Down Expand Up @@ -934,9 +934,9 @@ contract BPool_Unit_JoinswapExternAmountIn is BasePoolTest {

function _assumeHappyPath(JoinswapExternAmountIn_FuzzScenario memory _fuzz) internal pure {
// safe bound assumptions
_fuzz.tokenInDenorm = bound(_fuzz.tokenInDenorm, MIN_WEIGHT, MAX_WEIGHT);
_fuzz.tokenInDenorm = bound(_fuzz.tokenInDenorm, MIN_WEIGHT, MAX_WEIGHT / 2);
_fuzz.swapFee = bound(_fuzz.swapFee, MIN_FEE, MAX_FEE);
_fuzz.totalWeight = bound(_fuzz.totalWeight, MIN_WEIGHT * MAX_BOUND_TOKENS, MAX_WEIGHT * MAX_BOUND_TOKENS);
_fuzz.totalWeight = bound(_fuzz.totalWeight, MIN_WEIGHT * MAX_BOUND_TOKENS, MAX_TOTAL_WEIGHT);

vm.assume(_fuzz.totalSupply >= INIT_POOL_SUPPLY);

Expand Down

0 comments on commit 37fdc76

Please sign in to comment.