-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathISwapper.sol
More file actions
27 lines (24 loc) · 948 Bytes
/
ISwapper.sol
File metadata and controls
27 lines (24 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// SPDX-License-Identifier: MIT
pragma solidity >=0.7.6 <0.9.0;
interface ISwapper {
/// @dev swaps `_amountIn` of `_tokenIn` for `_tokenOut`. It might require approvals.
/// @return amountOut amount of _tokenOut received
function swapAmountIn(
address _tokenIn,
address _tokenOut,
uint256 _amountIn,
address _priceProvider,
address _siloAsset
) external returns (uint256 amountOut);
/// @dev swaps `_tokenIn` for `_amountOut` of `_tokenOut`. It might require approvals
/// @return amountIn amount of _tokenIn spend
function swapAmountOut(
address _tokenIn,
address _tokenOut,
uint256 _amountOut,
address _priceProvider,
address _siloAsset
) external returns (uint256 amountIn);
/// @return address that needs to have approval to spend tokens to execute a swap
function spenderToApprove() external view returns (address);
}