forked from WTFAcademy/WTF-Dapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ISwapRouter.sol
59 lines (51 loc) · 1.45 KB
/
ISwapRouter.sol
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.24;
pragma abicoder v2;
interface ISwapRouter {
struct ExactInputParams {
address tokenIn;
address tokenOut;
uint32[] indexPath;
address recipient;
uint256 deadline;
uint256 amountIn;
uint256 amountOutMinimum;
uint160 sqrtPriceLimitX96;
}
function exactInput(
ExactInputParams calldata params
) external payable returns (uint256 amountOut);
struct ExactOutputParams {
address tokenIn;
address tokenOut;
uint32[] indexPath;
address recipient;
uint256 deadline;
uint256 amountOut;
uint256 amountInMaximum;
uint160 sqrtPriceLimitX96;
}
function exactOutput(
ExactOutputParams calldata params
) external payable returns (uint256 amountIn);
struct QuoteExactInputParams {
address tokenIn;
address tokenOut;
uint32[] indexPath;
uint256 amountIn;
uint160 sqrtPriceLimitX96;
}
function quoteExactInput(
QuoteExactInputParams memory params
) external returns (uint256 amountOut);
struct QuoteExactOutputParams {
address tokenIn;
address tokenOut;
uint32[] indexPath;
uint256 amount;
uint160 sqrtPriceLimitX96;
}
function quoteExactOutput(
QuoteExactOutputParams memory params
) external returns (uint256 amountIn);
}