Skip to main content
Version: 1.15.0

Function: readTokenPoolLiquidity()

readTokenPoolLiquidity(chain: EVMChain, poolAddress: string, type: "BurnMintTokenPool" | "BurnFromMintTokenPool" | "BurnWithFromMintTokenPool" | "BurnToAddressTokenPool" | "BurnMintWithLockReleaseFlagTokenPool" | "LockReleaseTokenPool" | "SiloedLockReleaseTokenPool"): Promise<{ liquidity: bigint; token: string; }>

Defined in: cct/evm/token-pool/contracts.ts:822

A pool's withdrawable liquidity and the token it is denominated in.

Parameters​

ParameterTypeDescription
chainEVMChainChain to read from.
poolAddressstringLockRelease pool to read.
type"BurnMintTokenPool" | "BurnFromMintTokenPool" | "BurnWithFromMintTokenPool" | "BurnToAddressTokenPool" | "BurnMintWithLockReleaseFlagTokenPool" | "LockReleaseTokenPool" | "SiloedLockReleaseTokenPool"Pool type, as resolved by resolveTokenPool.

Returns​

Promise<{ liquidity: bigint; token: string; }>

The escrowed token, checksummed, and the liquidity withdrawLiquidity can pay out.

Remarks​

Returns the token as well so transferLiquidity, which checks both pools escrow the same one, needs no second read.