@gala-chain/chaincode ∙ API
API > fetchOrCreateTickDataPair
Function: fetchOrCreateTickDataPair()
fetchOrCreateTickDataPair(
ctx,poolHash,tickLower,tickUpper):Promise\<object>
Fetches TickData objects for the given tickLower and tickUpper values. If the data does not exist on-chain, new default TickData instances are created instead.
Parameters
▪ ctx: GalaChainContext
The GalaChain context used to access the ledger
▪ poolHash: string
Unique identifier for the liquidity pool
▪ tickLower: number
Lower tick boundary
▪ tickUpper: number
Upper tick boundary
Returns
An object containing tickLowerData and tickUpperData