Skip to main content
Version: 1.15.0

Function: assertSiloLiquidity()

assertSiloLiquidity(operation: string, chain: EVMChain, poolAddress: string, remoteChainSelector: bigint, amount: bigint): Promise<void>

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

Pre-flights a withdrawSiloedLiquidity against the silo's own balance (getAvailableTokens(remoteChainSelector)), which is all it can pay out of.

Parameters​

ParameterTypeDescription
operationstringOperation name, for the error's operation field.
chainEVMChainChain to read from.
poolAddressstringv1.6.x SiloedLockReleaseTokenPool being withdrawn from.
remoteChainSelectorbigintThe siloed lane.
amountbigintWithdrawal amount, in the token's smallest unit.

Returns​

Promise<void>

Remarks​

Advisory, like assertPoolLiquidity: every CCIP transfer on the lane moves the balance, so this catches "withdraw more than the silo was ever given" rather than proving the amount will still fit when the tx mines.

Throws​

CCTTxFailedError if the silo holds less than amount