feat: Implemented swap

This commit is contained in:
domenicodev
2024-02-28 16:32:37 +01:00
parent 08917023e0
commit 1064fbf7eb
2 changed files with 46 additions and 2 deletions

View File

@@ -66,6 +66,7 @@ contract EtherfiAdapter is ISwapAdapter {
}
}
/// @inheritdoc ISwapAdapter
function swap(
bytes32,
IERC20 sellToken,
@@ -128,11 +129,17 @@ contract EtherfiAdapter is ISwapAdapter {
limits[1] = limits[0];
}
function getCapabilities(bytes32 poolId, IERC20 sellToken, IERC20 buyToken)
/// @inheritdoc ISwapAdapter
function getCapabilities(bytes32, IERC20, IERC20)
external
pure
override
returns (Capability[] memory capabilities)
{
revert NotImplemented("TemplateSwapAdapter.getCapabilities");
capabilities = new Capability[](3);
capabilities[0] = Capability.SellOrder;
capabilities[1] = Capability.BuyOrder;
capabilities[2] = Capability.PriceFunction;
}
/// @inheritdoc ISwapAdapter