dsa-connectors/contracts/mainnet/connectors/uniswap/v3_swap/helpers.sol
2022-04-30 16:59:30 +05:30

27 lines
902 B
Solidity

//SPDX-License-Identifier: MIT
pragma solidity ^0.7.6;
pragma abicoder v2;
import {TokenInterface} from "../../../common/interfaces.sol";
import {DSMath} from "../../../common/math.sol";
import {Basic} from "../../../common/basic.sol";
import "./interface.sol";
abstract contract Helpers is DSMath, Basic {
/**
* @dev uniswap v3 Swap Router
*/
ISwapRouter constant swapRouter =
ISwapRouter(0xE592427A0AEce92De3Edee1F18E0157C05861564);
struct BuyInfo {
address buyAddr; //token to be bought
address sellAddr; //token to be sold
uint24 fee; //pool fees for buyAddr-sellAddr token pair
uint256 unitAmt; //The unit amount of sellAMt/buyAmt with slippage
uint256 expectedAmt; //The amount that is expected to be returned after the swap
uint256 buyAmt; //amount of token to be bought
uint256 getId; //Id to get buyAmt
uint256 setId; //Id to store sellAmt
}
}