AggregationRouterV5
Derives
- ClipperRouter
- LimitOrderProtocolRFQ
- UnoswapV3Router
- IUniswapV3SwapCallback
- UnoswapRouter
- Permitable
- EIP712
- EthReceiver
- Ownable
- Context
Functions
constructor
function constructor(
address weth,
contract IClipperExchangeInterface _clipperExchange
) public
Parameters:
Name | Type | Description |
---|---|---|
weth | address | |
_clipperExchange | contract IClipperExchangeInterface |
swap
function swap(
contract IAggregationExecutor caller,
struct AggregationRouterV4.SwapDescription desc,
bytes data
) external returns (uint256 returnAmount, uint256 gasLeft)
Performs a swap, delegating all calls encoded in data
to caller
. See tests for usage examples
Parameters:
Name | Type | Description |
---|---|---|
caller | contract IAggregationExecutor | Aggregation executor that executes calls described in data |
desc | struct AggregationRouterV4.SwapDescription | Swap description |
data | bytes | Encoded calls that caller should execute in between of swaps |
Return Values:
Name | Type | Description |
---|---|---|
returnAmount | uint256 | Resulting token amount |
gasLeft | uint256 | Gas left |
rescueFunds
function rescueFunds(
contract IERC20 token,
uint256 amount
) external
Parameters:
Name | Type | Description |
---|---|---|
token | contract IERC20 | |
amount | uint256 |
destroy
function destroy(
) external
Events
Swapped
event Swapped(
address sender,
contract IERC20 srcToken,
contract IERC20 dstToken,
address dstReceiver,
uint256 spentAmount,
uint256 returnAmount
)
Parameters:
Name | Type | Description |
---|---|---|
sender | address | |
srcToken | contract IERC20 | |
dstToken | contract IERC20 | |
dstReceiver | address | |
spentAmount | uint256 | |
returnAmount | uint256 |