28 lines
721 B
Solidity
28 lines
721 B
Solidity
|
|
// SPDX-License-Identifier: MIT
|
||
|
|
pragma solidity ^0.8.19;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @title IAggregationRouter - 1inch AggregationRouter Interface
|
||
|
|
* @notice Minimal interface for 1inch AggregationRouter
|
||
|
|
* @dev Based on 1inch V5 Router
|
||
|
|
*/
|
||
|
|
interface IAggregationRouter {
|
||
|
|
struct SwapDescription {
|
||
|
|
address srcToken;
|
||
|
|
address dstToken;
|
||
|
|
address srcReceiver;
|
||
|
|
address dstReceiver;
|
||
|
|
uint256 amount;
|
||
|
|
uint256 minReturnAmount;
|
||
|
|
uint256 flags;
|
||
|
|
bytes permit;
|
||
|
|
}
|
||
|
|
|
||
|
|
function swap(
|
||
|
|
address executor,
|
||
|
|
SwapDescription calldata desc,
|
||
|
|
bytes calldata permit,
|
||
|
|
bytes calldata data
|
||
|
|
) external payable returns (uint256 returnAmount, uint256 spentAmount);
|
||
|
|
}
|