Skip to content

@gala-chain/apiAPI


API > TickData

Class: TickData

Contents

Extends

Constructors

new TickData(poolHash, tick)

new TickData(poolHash, tick): TickData

Parameters

poolHash: string

tick: number

Overrides

ChainObject.constructor

Source

chain-api/src/types/TickData.ts:67

Properties

feeGrowthOutside0

feeGrowthOutside0: BigNumber

Source

chain-api/src/types/TickData.ts:61


feeGrowthOutside1

feeGrowthOutside1: BigNumber

Source

chain-api/src/types/TickData.ts:65


initialised

initialised: boolean

Source

chain-api/src/types/TickData.ts:53


liquidityGross

liquidityGross: BigNumber

Source

chain-api/src/types/TickData.ts:50


liquidityNet

liquidityNet: BigNumber

Source

chain-api/src/types/TickData.ts:57


poolHash

readonly poolHash: string

Source

chain-api/src/types/TickData.ts:40


tick

readonly tick: number

Source

chain-api/src/types/TickData.ts:46


COMPOSITEKEY_NS

static COMPOSITEKEY_NS: string = "\x00"

Inherited from

ChainObject.COMPOSITEKEY_NS

Source

chain-api/src/types/ChainObject.ts:46


ID_SPLIT_CHAR

static ID_SPLIT_CHAR: string = "$"

Inherited from

ChainObject.ID_SPLIT_CHAR

Source

chain-api/src/types/ChainObject.ts:49


ID_SUB_SPLIT_CHAR

static ID_SUB_SPLIT_CHAR: string = "|"

Inherited from

ChainObject.ID_SUB_SPLIT_CHAR

Source

chain-api/src/types/ChainObject.ts:51


INDEX_KEY

static INDEX_KEY: string = "GCDXCHLTDA"

Source

chain-api/src/types/TickData.ts:26


MAX_TICK

static MAX_TICK: number = 887272

Source

chain-api/src/types/TickData.ts:36


MIN_TICK

static MIN_TICK: number = -887272

Source

chain-api/src/types/TickData.ts:31


MIN_UNICODE_RUNE_VALUE

static MIN_UNICODE_RUNE_VALUE: string = "\u0000"

Inherited from

ChainObject.MIN_UNICODE_RUNE_VALUE

Source

chain-api/src/types/ChainObject.ts:44

Methods

clear()

clear(): void

Reset TickData to Default

Source

chain-api/src/types/TickData.ts:146


getCompositeKey()

getCompositeKey(): string

Inherited from

ChainObject.getCompositeKey

Source

chain-api/src/types/ChainObject.ts:80


serialize()

serialize(): string

Inherited from

ChainObject.serialize

Source

chain-api/src/types/ChainObject.ts:53


tickCross()

tickCross(feeGrowthGlobal0, feeGrowthGlobal1): BigNumber

Updates the fee growth outside values based on current global fee growth and returns the net liquidity.

Parameters

feeGrowthGlobal0: BigNumber

The global fee growth for token0.

feeGrowthGlobal1: BigNumber

The global fee growth for token1.

Returns

The net liquidity after updating fee growth values.

Source

chain-api/src/types/TickData.ts:137


toPlainObject()

toPlainObject(): Record\<string, unknown>

Inherited from

ChainObject.toPlainObject

Source

chain-api/src/types/ChainObject.ts:69


updateTick()

updateTick(tickCurrent, liquidityDelta, upper, feeGrowthGlobal0, feeGrowthGlobal1, maxLiquidity): boolean

Updates the tick's liquidity and initialization state.

  • Adjusts liquidity gross and net based on the delta and direction (upper/lower).
  • Initializes the tick if it's being used for the first time.
  • If initializing and tick is below or at the current price, sets fee growth outside.
  • Returns true if the tick was just initialized or its state flipped on/off.

Parameters

tickCurrent: number

The current active tick index in the pool.

liquidityDelta: BigNumber

The amount of liquidity to add or remove.

upper: boolean

Whether this tick is the upper tick of a position.

feeGrowthGlobal0: BigNumber

Global fee growth for token0.

feeGrowthGlobal1: BigNumber

Global fee growth for token1.

maxLiquidity: BigNumber

The maximum allowed liquidity for a tick.

Returns

true if the tick was initialized or flipped, else false.

Source

chain-api/src/types/TickData.ts:94


validate()

validate(): Promise\<ValidationError[]>

Inherited from

ChainObject.validate

Source

chain-api/src/types/ChainObject.ts:57


validateOrReject()

validateOrReject(): Promise\<void>

Inherited from

ChainObject.validateOrReject

Source

chain-api/src/types/ChainObject.ts:61


decodeFromBase58()

static decodeFromBase58(base58String): string

Parameters

base58String: string

Inherited from

ChainObject.decodeFromBase58

Source

chain-api/src/types/ChainObject.ts:142


deserialize()

static deserialize\<T>(constructor, object): T

Type parameters

T

Parameters

constructor: ClassConstructor\<Inferred\<T, ChainObject>>

object: string | Record\<string, unknown> | Record\<string, unknown>[]

Inherited from

ChainObject.deserialize

Source

chain-api/src/types/ChainObject.ts:73


encodeToBase58()

static encodeToBase58(stringKey): string

Parameters

stringKey: string

Inherited from

ChainObject.encodeToBase58

Source

chain-api/src/types/ChainObject.ts:137


getCompositeKeyFromParts()

static getCompositeKeyFromParts(indexKey, parts): string

Parameters

indexKey: string

parts: unknown[]

Inherited from

ChainObject.getCompositeKeyFromParts

Source

chain-api/src/types/ChainObject.ts:105


getEncodableStringKeyFromParts()

static getEncodableStringKeyFromParts(parts): string

Parameters

parts: string[]

Inherited from

ChainObject.getEncodableStringKeyFromParts

Source

chain-api/src/types/ChainObject.ts:129


getPartsFromEncodableStringKey()

static getPartsFromEncodableStringKey(stringKey): string[]

Parameters

stringKey: string

Inherited from

ChainObject.getPartsFromEncodableStringKey

Source

chain-api/src/types/ChainObject.ts:133


getStringKeyFromParts()

static getStringKeyFromParts(parts): string

Parameters

parts: string[]

Inherited from

ChainObject.getStringKeyFromParts

Source

chain-api/src/types/ChainObject.ts:125