Skip to content

@gala-chain/apiAPI


API > nextInitialisedTickWithInSameWord

Function: nextInitialisedTickWithInSameWord()

nextInitialisedTickWithInSameWord(bitmap, tick, tickSpacing, lte): [number, boolean]

Parameters

bitmap: Bitmap

The mapping in which to compute the next initialized tick

tick: number

The starting tick

tickSpacing: number

lte: boolean

Whether to search for the next initialized tick to the left (less than or equal to the starting tick)

Returns

next The next initialized or uninitialized tick up to 256 ticks away from the current tick

initialized Whether the next tick is initialized, as the function only searches within up to 256 ticks

Notice

Returns the next initialized tick contained in the same word (or adjacent word) as the tick that is either to the left (less than or equal to) or right (greater than) of the given tick

Source

chain-api/src/utils/dex/tick.helper.ts:145