Implement adapter integration test and use it on uniswap and balancer

This commit is contained in:
czanella
2024-07-17 15:02:22 +01:00
parent 6b80e87544
commit 5831aecc96
5 changed files with 257 additions and 7 deletions

View File

@@ -188,10 +188,11 @@ contract BalancerV2SwapAdapter is ISwapAdapter {
override
returns (Capability[] memory capabilities)
{
capabilities = new Capability[](3);
capabilities = new Capability[](4);
capabilities[0] = Capability.SellOrder;
capabilities[1] = Capability.BuyOrder;
capabilities[2] = Capability.PriceFunction;
capabilities[3] = Capability.HardLimits;
}
function getTokens(bytes32 poolId)

View File

@@ -30,7 +30,10 @@ interface ISwapAdapterTypes {
TokenBalanceIndependent,
// Indicates that prices are returned scaled, else it is assumed prices
// still require scaling by token decimals. (required)
ScaledPrices
ScaledPrices,
// Indicates that if we try to go over the sell limits, the pool will
// revert (optional)
HardLimits
}
/// @dev Representation used for rational numbers such as prices.