Skip to content

Commit

Permalink
fix: typo and low amount out
Browse files Browse the repository at this point in the history
  • Loading branch information
wei3erHase committed Jul 26, 2024
1 parent e39d8f4 commit bf9bb4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion test/integration/BPool.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ abstract contract BPoolIntegrationTest is Test, GasSnapshot {
(uint256 amountIn,) =
pool.swapExactAmountOut(address(dai), type(uint256).max, address(weth), _DAI_AMOUNT_OUT, type(uint256).max);

// NOTE: fails with BPool_TokenAmountInAboveMaxRatio()
uint256 whitnessBPT = whitnessPool.joinswapExternAmountIn(address(dai), amountIn, 0);
uint256 whitnessAmountOut = whitnessPool.exitswapPoolAmountIn(address(weth), whitnessBPT, 0);

Expand Down
4 changes: 2 additions & 2 deletions test/invariants/fuzz/BMath.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ contract FuzzBMath is EchidnaTest {
totalWeight = tokenWeightIn + tokenWeightOut;
tokenBalanceIn = clamp(tokenBalanceIn, 1e6, type(uint256).max);
tokenBalanceOut = clamp(tokenBalanceOut, 1e6, type(uint256).max);
tokenAmountIn = clamp(tokenAmountIn, 1, type(uint256).max);
tokenAmountIn = clamp(tokenAmountIn, 1e6, type(uint256).max);
poolSupply = clamp(poolSupply, 100 * BONE, type(uint256).max);
swapFee = clamp(swapFee, MIN_FEE, MAX_FEE);

Expand Down Expand Up @@ -213,7 +213,7 @@ contract FuzzBMath is EchidnaTest {
tokenBalanceIn = clamp(tokenBalanceIn, 1e6, type(uint256).max);
tokenBalanceOut = clamp(tokenBalanceOut, 1e6, type(uint256).max);
poolSupply = clamp(poolSupply, 100 * BONE, type(uint256).max);
tokenAmountOut = clamp(tokenAmountOut, 1, type(uint256).max);
tokenAmountOut = clamp(tokenAmountOut, 1e6, type(uint256).max);
swapFee = clamp(swapFee, MIN_FEE, MAX_FEE);

emit Log('tokenWeightIn', tokenWeightIn);
Expand Down

0 comments on commit bf9bb4d

Please sign in to comment.