Fix balancer price and capabilities

This commit is contained in:
Louise Poole
2024-04-15 16:18:48 +01:00
parent 8ba2c753d5
commit 98857be305
4 changed files with 5 additions and 13 deletions

View File

@@ -100,7 +100,7 @@ contract BalancerV2SwapAdapter is ISwapAdapter {
sellAmount = uint256(assetDeltas[0]); sellAmount = uint256(assetDeltas[0]);
} }
function priceBatch( function price(
bytes32 poolId, bytes32 poolId,
address sellToken, address sellToken,
address buyToken, address buyToken,
@@ -112,15 +112,6 @@ contract BalancerV2SwapAdapter is ISwapAdapter {
} }
} }
function price(bytes32, address, address, uint256[] memory)
external
pure
override
returns (Fraction[] memory)
{
revert NotImplemented("BalancerV2SwapAdapter.price");
}
function swap( function swap(
bytes32 poolId, bytes32 poolId,
address sellToken, address sellToken,
@@ -199,6 +190,7 @@ contract BalancerV2SwapAdapter is ISwapAdapter {
capabilities = new Capability[](2); capabilities = new Capability[](2);
capabilities[0] = Capability.SellOrder; capabilities[0] = Capability.SellOrder;
capabilities[1] = Capability.BuyOrder; capabilities[1] = Capability.BuyOrder;
capabilities[2] = Capability.PriceFunction;
} }
function getTokens(bytes32 poolId) function getTokens(bytes32 poolId)

View File

@@ -37,7 +37,7 @@ interface ISwapAdapter is ISwapAdapterTypes {
address sellToken, address sellToken,
address buyToken, address buyToken,
uint256[] memory specifiedAmounts uint256[] memory specifiedAmounts
) external view returns (Fraction[] memory prices); ) external returns (Fraction[] memory prices);
/** /**
* @notice Simulates swapping tokens on a given pool. * @notice Simulates swapping tokens on a given pool.