Revert "ENG-3406: Add new bytes parameter to swap"

This commit is contained in:
Pierre
2024-08-08 22:24:35 +02:00
committed by GitHub
parent 9ef9782451
commit b3e3672172
13 changed files with 46 additions and 114 deletions

View File

@@ -10,7 +10,6 @@ import "src/libraries/FractionMath.sol";
contract AdapterTest is Test, ISwapAdapterTypes {
using FractionMath for Fraction;
bytes32 mockData;
uint256 constant pricePrecision = 10e24;
string[] public stringPctgs = ["0%", "0.1%", "50%", "100%"];
@@ -103,7 +102,7 @@ contract AdapterTest is Test, ISwapAdapterTypes {
console2.log("TEST: Swapping %d of %s", amounts[j], tokenIn);
trade = adapter.swap(
poolId, tokenIn, tokenOut, OrderSide.Sell, amounts[j], mockData
poolId, tokenIn, tokenOut, OrderSide.Sell, amounts[j]
);
uint256 executedPrice =
trade.calculatedAmount * pricePrecision / amounts[j];
@@ -192,12 +191,7 @@ contract AdapterTest is Test, ISwapAdapterTypes {
);
}
try adapter.swap(
poolId,
tokenIn,
tokenOut,
OrderSide.Sell,
aboveLimitArray[0],
mockData
poolId, tokenIn, tokenOut, OrderSide.Sell, aboveLimitArray[0]
) {
revert("Pool shouldn't be able to swap above the sell limit");
} catch Error(string memory s) {
@@ -223,12 +217,7 @@ contract AdapterTest is Test, ISwapAdapterTypes {
adapter.price(poolId, tokenIn, tokenOut, aboveLimitArray);
adapter.swap(
poolId,
tokenIn,
tokenOut,
OrderSide.Sell,
aboveLimitArray[0],
mockData
poolId, tokenIn, tokenOut, OrderSide.Sell, aboveLimitArray[0]
);
}