diff --git a/evm/lib/forge-std b/evm/lib/forge-std index f73c73d..e4aef94 160000 --- a/evm/lib/forge-std +++ b/evm/lib/forge-std @@ -1 +1 @@ -Subproject commit f73c73d2018eb6a111f35e4dae7b4f27401e9421 +Subproject commit e4aef94c1768803a16fe19f7ce8b65defd027cfd diff --git a/evm/lib/openzeppelin-contracts b/evm/lib/openzeppelin-contracts index 932fddf..11dc5e3 160000 --- a/evm/lib/openzeppelin-contracts +++ b/evm/lib/openzeppelin-contracts @@ -1 +1 @@ -Subproject commit 932fddf69a699a9a80fd2396fd1a2ab91cdda123 +Subproject commit 11dc5e3809ebe07d5405fe524385cbe4f890a08b diff --git a/evm/src/balancer-v2/BalancerV2SwapAdapter.sol b/evm/src/balancer-v2/BalancerV2SwapAdapter.sol index 13b2f2d..2b5f149 100644 --- a/evm/src/balancer-v2/BalancerV2SwapAdapter.sol +++ b/evm/src/balancer-v2/BalancerV2SwapAdapter.sol @@ -100,7 +100,7 @@ contract BalancerV2SwapAdapter is ISwapAdapter { sellAmount = uint256(assetDeltas[0]); } - function priceBatch( + function price( bytes32 poolId, address sellToken, 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( bytes32 poolId, address sellToken, @@ -199,6 +190,7 @@ contract BalancerV2SwapAdapter is ISwapAdapter { capabilities = new Capability[](2); capabilities[0] = Capability.SellOrder; capabilities[1] = Capability.BuyOrder; + capabilities[2] = Capability.PriceFunction; } function getTokens(bytes32 poolId) diff --git a/evm/src/interfaces/ISwapAdapter.sol b/evm/src/interfaces/ISwapAdapter.sol index 50fed77..ab3bacc 100644 --- a/evm/src/interfaces/ISwapAdapter.sol +++ b/evm/src/interfaces/ISwapAdapter.sol @@ -37,7 +37,7 @@ interface ISwapAdapter is ISwapAdapterTypes { address sellToken, address buyToken, uint256[] memory specifiedAmounts - ) external view returns (Fraction[] memory prices); + ) external returns (Fraction[] memory prices); /** * @notice Simulates swapping tokens on a given pool.