2021-11-19 12:59:55 +00:00
|
|
|
pragma solidity ^0.7.6;
|
|
|
|
pragma abicoder v2;
|
|
|
|
|
|
|
|
import "./helpers.sol";
|
|
|
|
|
|
|
|
abstract contract uniswapSellBeta is Helpers {
|
|
|
|
function sell(
|
|
|
|
address tokenIn,
|
|
|
|
address tokenOut,
|
|
|
|
uint24 fee,
|
|
|
|
uint256 amountOutMinimum,
|
|
|
|
bool zeroForOne
|
2021-11-19 14:22:34 +00:00
|
|
|
) public payable returns (uint256 amountOut) {
|
|
|
|
approveTransfer(tokenIn, msg.sender, address(this), msg.value);
|
|
|
|
amountOut = swapSingleInput(
|
2021-11-19 12:59:55 +00:00
|
|
|
getParams(
|
|
|
|
tokenIn,
|
|
|
|
tokenOut,
|
|
|
|
msg.sender,
|
|
|
|
fee,
|
2021-11-19 14:22:34 +00:00
|
|
|
msg.value,
|
2021-11-19 12:59:55 +00:00
|
|
|
amountOutMinimum,
|
|
|
|
zeroForOne
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-11-19 14:22:34 +00:00
|
|
|
contract UniswapSellBetaArbitrum is uniswapSellBeta {
|
|
|
|
string public constant name = "UniswapSellBeta";
|
2021-11-19 12:59:55 +00:00
|
|
|
}
|