Skip to content

@gala-chain/chaincodeAPI


API > addLiquidity

Function: addLiquidity()

addLiquidity(ctx, dto, launchpadAddress?): Promise\<AddLiquidityResDto>

Parameters

ctx: GalaChainContext

GalaChainContext – The execution context that provides access to the GalaChain environment.

dto: AddLiquidityDTO

AddLiquidityDTO – A data transfer object containing liquidity details such as token amounts, pool parameters, and fee tiers.

launchpadAddress?: string

string – (Optional) The address of a launchpad contract if liquidity is being added via a specific launchpad mechanism.

Returns

AddLiquidityResDto

Dev

Function to add Liqudity to v3 pool. The addLiquidity function facilitates the addition of liquidity to a Uniswap V3 pool within the GalaChain ecosystem. It takes in the blockchain context, liquidity parameters, and an optional launchpad address, then executes the necessary operations to deposit assets into the specified liquidity pool.

Source

chaincode/src/dex/addLiquidity.ts:47