Contract ID: SaucerSwapV1RouterV3
Increase the client’s max token auto-association by one to receive the incoming LP token.
To add liquidity to an existing pool, see Adding liquidity.
Both methods support HTS tokens with custom fees.
Creating a new HBAR-token liquidity pool
Create a new HBAR/token liquidity pool and provide it with initial liquidity. Function name:addLiquidityETHNewPool
Recommended gas limit: 3,200,000
A spender allowance for the router is required for the HTS token.
The
addLiquidityETHNewPool function operates in HBAR but derives its name from Uniswap on Ethereum. This name was kept to simplify integration for developers versed in Uniswap tools.Code overview
- JavaScript SDK
Creating a new token-token liquidity pool
Create a new token/token liquidity pool and provide it with initial liquidity. Function name:addLiquidityNewPool
Recommended gas limit: 3,200,000
A spender allowance for the router is required for both HTS tokens.
Code overview
- JavaScript SDK
Next steps
Pool creation fee (V1)
Fetch the current fee before creating a pool.
Check if a pool exists (V1)
Verify the pool is not already on-chain.
Adding liquidity (V1)
Add to the pool once it exists.