@gala-chain/api ∙ API
API > updateTick
Function: updateTick()
updateTick(
tickData
,tick
,tickCurrent
,liquidityDelta
,upper
,feeGrowthGlobal0
,feeGrowthGlobal1
,maxLiquidity
):boolean
Parameters
▪ tickData: TickDataObj
The mapping containing all tick information for initialized ticks
▪ tick: number
The tick that will be updated
▪ tickCurrent: number
The current tick
▪ liquidityDelta: BigNumber
A new amount of liquidity to be added (subtracted) when tick is crossed from left to right (right to left)
▪ upper: boolean
true for updating a position's upper tick, or false for updating a position's lower tick
▪ feeGrowthGlobal0: BigNumber
The all-time global fee growth, per unit of liquidity, in token0
▪ feeGrowthGlobal1: BigNumber
The all-time global fee growth, per unit of liquidity, in token1
▪ maxLiquidity: BigNumber
The maximum liquidity allocation for a single tick
Returns
flipped Whether the tick was flipped from initialized to uninitialized, or vice versa
Notice
Updates a tick and returns true if the tick was flipped from initialized to uninitialized, or vice versa