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:

  1. 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);
  1. Run the script again:
node index.js

On this page