position.gno

Adds or removes liquidity from pools. Includes minting and burning of positions.

Mint

func Mint(
	token0 string,
	token1 string,
	fee uint32,
	tickLower int32,
	tickUpper int32,
	amount0Desired string,
	amount1Desired string,
	amount0Min string,
	amount1Min string,
	deadline int64,
	mintTo string
) (uint64, string, string, string)

Adds liquidity to a pool. Internally calls the mint function of the pool contract.

Parameters

Return Values

IncreaseLiquidity

func IncreaseLiquidity(
	tokenId uint64,
	_amount0Desired string,
	_amount1Desired string,
	_amount0Min string,
	_amount1Min string,
	deadline int64,
) (uint64, string, string, string, string)

Adds additional liquidity to an existing position. Calling this function on a closed position will reopen it.

Parameters

Return Values

DecreaseLiquidity

func DecreaseLiquidity(
	tokenId uint64,
	liquidityRatio uint64,
	_amount0Min string,
	_amount1Min string,
	deadline int64,
	unwrapResult bool,
) (uint64, string, string, string, string, string, string)

Decreases liquidity of an existing position.

Parameters

Return Values

CollectFee

func CollectFee(
	tokenId uint64,
) (uint64, string, string, string)

Collects fee accrued to a position.

Parameters

Return Values

Reposition

func Reposition(
	tokenId uint64,
	tickLower int32,
	tickUpper int32,
	_amount0Desired string, // uint256
	_amount1Desired string, // uint256
) (uint64, string, int32, int32, string, string)

Modifies the price range of a closed position while maintaining the LpTokenId.

Parameters

Return Values

Last updated