G-Uniswap V3 ERC20 - Mainnet
G-Uniswap V3 Wrapper to deposit and withdraw. G-Uniswap-v3-ERC20-v1.0 connector on mainnet triggers methods like deposit, withdraw, swapAndDeposit. You can view details like source code, ABIs on Etherscan.
- Use
0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
to indicate ETH. - use -1 or
dsa.maxValue
for the maximum amount in function. - If not sure about the arguments
getId
andsetId
, pass 0.
Deposit
Deposit Liquidity to Gelato Uniswap V3 pool.
spells.add({ connector: "G-UNISWAP-A", method: "deposit", args: [pool, amt0Max, amt1Max, slippage, getIds, setId]});
Parameter | Type | Description |
---|---|---|
pool | address | The address of pool. |
amt0Max | uint256 | Amount0 Max amount |
amt1Max | uint256 | Amount1 Max amount |
slippage | uint | use to calculate minimum deposit. 100% = 1e18 |
getIds | uint256[] | Array of IDs to retrieve amounts. |
setId | uint256 | ID stores the amount of pools tokens received. |
Withdraw
Withdraw Liquidity from Gelato Uniswap V3 pool.
spells.add({ connector: "G-UNISWAP-A", method: "withdraw", args: [pool, liqAmt, minAmtA, minAmtB, getId, setIds]});
Parameter | Type | Description |
---|---|---|
pool | address | The address of pool. |
liqAmt | uint256 | Amount0 Max amount |
minAmtA | uint256 | Min AmountA amount |
minAmtB | uint256 | Min AmountB amount |
getId | uint256 | ID to retrieve liqAmt. |
setIds | uint256[] | Array of IDs tp stores the amounts of pools tokens received. |
SwapAndDeposit
Withdraw Liquidity to Gelato Uniswap V3 pool.
spells.add({ connector: "G-UNISWAP-A", method: "swapAndDeposit", args: [pool, amount0In, amount1In, zeroForOne, swapAmount, swapThreshold, getId, setId]});
Parameter | Type | Description |
---|---|---|
pool | address | The address of pool. |
amount0In | uint256 | amount of token0 to deposit. |
amount1In | uint256 | amount of token1 to deposit. |
zeroForOne | bool | Swap excess of one token to deposit in equal ratio. |
swapAmount | uint256 | Amount of tokens to swap |
swapThreshold | uint160 | Slippage that the swap could take. |
getId | uint256 | Not used anywhere here. |
setId | uint256 | Set the amount of tokens minted. |
If you still can't find something you're looking for or have any questions, ask them at our developers community on Discord or simply send an Email.
Our team is excited about assisting you to build an application using Instadapp Developer Platform. Your questions and feedback help us make a better development environment for future developers.
Table of Contents