-
Notifications
You must be signed in to change notification settings - Fork 135
Expand file tree
/
Copy pathISwapRouter.sol
More file actions
69 lines (59 loc) · 1.66 KB
/
ISwapRouter.sol
File metadata and controls
69 lines (59 loc) · 1.66 KB
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
60
61
62
63
64
65
66
67
68
69
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.24;
pragma abicoder v2;
import "./IPool.sol";
interface ISwapRouter is ISwapCallback {
event Swap(
address indexed sender,
bool zeroForOne,
uint256 amountIn,
uint256 amountInRemaining,
uint256 amountOut
);
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 calldata params
) external returns (uint256 amountOut);
struct QuoteExactOutputParams {
address tokenIn;
address tokenOut;
uint32[] indexPath;
uint256 amountOut;
uint160 sqrtPriceLimitX96;
}
function quoteExactOutput(
QuoteExactOutputParams calldata params
) external returns (uint256 amountIn);
}