Skip to content

@gala-chain/chaincodeAPI


API > getTokenDecimalsFromPool

Function: getTokenDecimalsFromPool()

getTokenDecimalsFromPool(ctx, pool): Promise\<[number, number]>

Retrieves the decimals for token0 and token1 from a given pool.

Parameters

ctx: GalaChainContext

GalaChain context object.

pool: Pool

The Pool object containing token class keys.

Returns

A Promise resolving to a tuple of [token0Decimals, token1Decimals].

Source

chaincode/src/dex/dexUtils.ts:154