There are three steps in adding liquidity: 1) prepare input, 2) approve tokens, 3) conduct add liquidity. You need to install PiperX sdk and import it to proceed.
You need the following inputs before you can create a pool
token1_address: address,// if it is $IP native token, use WIP_ADDRESStoken2_address: address,// if it is $IP native token, use WIP_ADDRESSamount1: bigint,// amount of token 1 you want to deposit to the poolamount2: bigint,// amount of token 2 you want to deposit to the poolamount1Min: bigint,// minimal amount of token 1 you want to deposit to the poolamount2Min: bigint,// minmial amount of token 2 you want to deposit to the pooltickLower: number,// define the lower range of your liquidity provision priceLower = 1.0001^tickLowertickUpper: number,// define the upper range of your liquidity provision priceUpper = 1.0001^tickUpperexpire_time: bigint// expiration timestamp for creating the poolsigner:ethers.Signer
Note that, if you are add liquidity for $IP token, you should pass in the PiperX wrapped $IP token address, because the $IP token is not a ERC-20 token. For example, if you are add to $IP to $USDC pool, please use wrapped $IP address WIP_ADDRESS
Approve tokens
You need to approve the router contract to both your tokens to create this pool