2021-11-19 12:59:55 +00:00
|
|
|
pragma solidity ^0.7.6;
|
|
|
|
pragma abicoder v2;
|
|
|
|
|
|
|
|
import "./helpers.sol";
|
|
|
|
|
2021-11-19 14:40:44 +00:00
|
|
|
contract uniswapSellBeta is Helpers {
|
2021-11-19 12:59:55 +00:00
|
|
|
function sell(
|
|
|
|
address tokenIn,
|
|
|
|
address tokenOut,
|
|
|
|
uint24 fee,
|
2021-11-19 14:28:35 +00:00
|
|
|
uint256 amountIn,
|
2021-11-19 12:59:55 +00:00
|
|
|
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:28:35 +00:00
|
|
|
amountIn,
|
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
|
|
|
}
|