new updates

This commit is contained in:
Samyak Jain 2021-06-08 02:04:38 +05:30
parent 8067874d21
commit 1c6c7bc358
2 changed files with 3 additions and 4 deletions

View File

@ -10,8 +10,7 @@ interface ERC20WrapperInterface {
function token1() external view returns (IERC20); function token1() external view returns (IERC20);
function mint( function mint(
uint256 amount0Max, uint256 mintAmount,
uint256 amount1Max,
address receiver address receiver
) external ) external
returns ( returns (

View File

@ -38,7 +38,7 @@ abstract contract UniswapV3Resolver is Events, Helpers {
ERC20WrapperInterface poolContract = ERC20WrapperInterface(pool); ERC20WrapperInterface poolContract = ERC20WrapperInterface(pool);
(uint256 amount0In, uint256 amount1In, ) = poolContract.getMintAmounts(amt0Max, amt1Max); (uint256 amount0In, uint256 amount1In, uint256 mintAmount) = poolContract.getMintAmounts(amt0Max, amt1Max);
require( require(
amount0In >= amt0Min && amount1In >= amt1Min, amount0In >= amt0Min && amount1In >= amt1Min,
@ -56,7 +56,7 @@ abstract contract UniswapV3Resolver is Events, Helpers {
_token1.safeApprove(address(pool), amount1In); _token1.safeApprove(address(pool), amount1In);
} }
(uint amount0, uint amount1, uint mintAmount) = poolContract.mint(amount0In, amount1In, address(this)); (uint amount0, uint amount1,) = poolContract.mint(mintAmount, address(this));
require(amount0 == amount0In && amount1 == amount1In, "unexpected amounts deposited"); require(amount0 == amount0In && amount1 == amount1In, "unexpected amounts deposited");