Fix balancer price and capabilities
This commit is contained in:
Submodule evm/lib/forge-std updated: f73c73d201...e4aef94c17
Submodule evm/lib/openzeppelin-contracts updated: 932fddf69a...11dc5e3809
@@ -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)
|
||||||
|
|||||||
@@ -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.
|
||||||
|
|||||||
Reference in New Issue
Block a user