Standard Pool
Steps to Integration
import { v2AddLiquidity, v2RouterTokenApproval, } from '@piperx/sdk/src/core'
import { WIP_ADDRESS } from '@piperx/sdk/src/constant'Prepare Input
token1_address: address, // if it is $IP native token, use WIP_ADDRESS
token2_address: address, // if it is $IP native token, use WIP_ADDRESS
amount1: bigint, // amount of token 1 you want to deposit to the pool
amount2: bigint, // amount of token 2 you want to deposit to the pool
amount1Min: bigint, // minimal amount of token 1 you want to deposit to the pool
amount2Min: bigint, // minmial amount of token 2 you want to deposit to the pool
expire_time: bigint// expiration timestamp for a swap
signer: ethers.SignerApprove tokens
await v2RouterTokenApproval(token1_address, amount1, signer)
await v2RouterTokenApproval(token2_address, amount2, signer)Creating the pool
Last updated