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
| Parameter | Type | Description |
|---|---|---|
operation | string | Operation name, for the error's operation field. |
chain | EVMChain | Chain to read from. |
poolAddress | string | v1.6.x SiloedLockReleaseTokenPool being withdrawn from. |
remoteChainSelector | bigint | The siloed lane. |
amount | bigint | Withdrawal 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