mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
new updates
This commit is contained in:
parent
8067874d21
commit
1c6c7bc358
|
@ -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 (
|
||||||
|
|
|
@ -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");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user