Skip to content

@gala-chain/chaincodeAPI


API > getSlot0

Function: getSlot0()

getSlot0(ctx, dto): Promise\<Slot0ResDto>

Parameters

ctx: GalaChainContext

GalaChainContext – The execution context providing access to the GalaChain environment.

dto: GetPoolDto

GetPoolDto – A data transfer object containing: - Pool identifiers – Class keys or token details needed to fetch the pool data.

Returns

Slot0ResDto

Dev

The slot0 function retrieves essential state variables from a Uniswap V3 pool within the GalaChain ecosystem. It provides core details such as the current square root price, tick, and liquidity.

Source

chaincode/src/dex/getFunctions.ts:64