Skip to main content
Version: 1.15.0

Function: readTokenPoolAvailableTokens()

readTokenPoolAvailableTokens(chain: EVMChain, poolAddress: string, remoteChainSelector: bigint): Promise<bigint>

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

Reads a v1.6.x siloed pool's getAvailableTokens(remoteChainSelector) in one eth_call: the silo's balance on a siloed lane, the shared unsiloed bucket on any other.

Parameters​

ParameterTypeDescription
chainEVMChainChain to read from.
poolAddressstringv1.6.x SiloedLockReleaseTokenPool to read.
remoteChainSelectorbigintLane to ask about.

Returns​

Promise<bigint>

The liquidity available to that lane, in the token's smallest unit.

Remarks​

Same gating as readTokenPoolIsSiloed. The raw call: it reverts InvalidChainSelector for a lane the pool does not support; test for that with isTokenPoolRevert.