Revert "ENG-3406: Add new bytes parameter to swap"
This commit is contained in:
@@ -12,7 +12,6 @@ import {FractionMath} from "src/libraries/FractionMath.sol";
|
||||
contract BalancerV2SwapAdapterTest is AdapterTest {
|
||||
using FractionMath for Fraction;
|
||||
|
||||
bytes32 mockBoolData = bytes32(abi.encode(false));
|
||||
IVault constant balancerV2Vault =
|
||||
IVault(payable(0xBA12222222228d8Ba445958a75a0704d566BF2C8));
|
||||
BalancerV2SwapAdapter adapter;
|
||||
@@ -112,12 +111,7 @@ contract BalancerV2SwapAdapterTest is AdapterTest {
|
||||
uint256 weth_balance = IERC20(WETH).balanceOf(address(this));
|
||||
|
||||
Trade memory trade = adapter.swap(
|
||||
B_80BAL_20WETH_POOL_ID,
|
||||
BAL,
|
||||
WETH,
|
||||
side,
|
||||
specifiedAmount,
|
||||
mockBoolData
|
||||
B_80BAL_20WETH_POOL_ID, BAL, WETH, side, specifiedAmount
|
||||
);
|
||||
|
||||
if (trade.calculatedAmount > 0) {
|
||||
@@ -155,12 +149,7 @@ contract BalancerV2SwapAdapterTest is AdapterTest {
|
||||
deal(BAL, address(this), amounts[i]);
|
||||
IERC20(BAL).approve(address(adapter), amounts[i]);
|
||||
trades[i] = adapter.swap(
|
||||
B_80BAL_20WETH_POOL_ID,
|
||||
BAL,
|
||||
WETH,
|
||||
OrderSide.Sell,
|
||||
amounts[i],
|
||||
mockBoolData
|
||||
B_80BAL_20WETH_POOL_ID, BAL, WETH, OrderSide.Sell, amounts[i]
|
||||
);
|
||||
|
||||
vm.revertTo(beforeSwap);
|
||||
@@ -191,12 +180,7 @@ contract BalancerV2SwapAdapterTest is AdapterTest {
|
||||
deal(BAL, address(this), amountIn);
|
||||
IERC20(BAL).approve(address(adapter), amountIn);
|
||||
trades[i] = adapter.swap(
|
||||
B_80BAL_20WETH_POOL_ID,
|
||||
BAL,
|
||||
WETH,
|
||||
OrderSide.Buy,
|
||||
amounts[i],
|
||||
mockBoolData
|
||||
B_80BAL_20WETH_POOL_ID, BAL, WETH, OrderSide.Buy, amounts[i]
|
||||
);
|
||||
|
||||
vm.revertTo(beforeSwap);
|
||||
@@ -220,7 +204,6 @@ contract BalancerV2SwapAdapterTest is AdapterTest {
|
||||
|
||||
function testGetCapabilitiesFuzz(bytes32 pool, address t0, address t1)
|
||||
public
|
||||
view
|
||||
{
|
||||
Capability[] memory res = adapter.getCapabilities(pool, t0, t1);
|
||||
|
||||
@@ -228,10 +211,9 @@ contract BalancerV2SwapAdapterTest is AdapterTest {
|
||||
assertEq(uint256(res[0]), uint256(Capability.SellOrder));
|
||||
assertEq(uint256(res[1]), uint256(Capability.BuyOrder));
|
||||
assertEq(uint256(res[2]), uint256(Capability.PriceFunction));
|
||||
assertEq(uint256(res[3]), uint256(Capability.HardLimits));
|
||||
}
|
||||
|
||||
function testGetTokens() public view {
|
||||
function testGetTokens() public {
|
||||
address[] memory tokens = adapter.getTokens(B_80BAL_20WETH_POOL_ID);
|
||||
|
||||
assertEq(tokens[0], BAL);
|
||||
|
||||
Reference in New Issue
Block a user