IntegrationsQuick StartV2
Add liquidity with V2
Be sure to respect all the necessary requirements present in .
Be sure to respect all the necessary requirements present in .
Add Liquidity
To provide liquidity to a pool:
- Update the main() function to include the addLiquidityETHWithUSDC function:
const ethAmount = "1"; // Amount of ETH to provide
const usdcMin = ethers.utils.parseUnits("100", 6); // Minimum USDC amount
const ethMin = ethers.utils.parseEther("0.95"); // Minimum ETH amount
await addLiquidityETHWithUSDC(provider, signer, ethAmount, usdcMin, ethMin, to);- Run the script again:
node index.js