Class: GetAvailableTokens
Defined in: cct/evm/token-pool/operations/get-available-tokens.ts:36
Reads what a lane can release: the silo's own balance on a siloed lane, and on any other the
shared unsiloed bucket (the same value as getUnsiloedLiquidity(), which every unsiloed lane
draws on). Informational, for audit and UX; withdrawSiloedLiquidity pre-flights this itself.
Extends
EVMQuery<GetAvailableTokensParams,GetAvailableTokensResult>
Constructors
Constructor
new GetAvailableTokens():
GetAvailableTokens
Returns
GetAvailableTokens
Inherited from
EVMQuery< GetAvailableTokensParams, GetAvailableTokensResult >.constructor
Properties
name
readonlyname:"getAvailableTokens"='getAvailableTokens'
Defined in: cct/evm/token-pool/operations/get-available-tokens.ts:40
camelCase id; matches the token-manager facade method and error context.
Overrides
EVMQuery.name
Methods
prepare()
protectedprepare(params:GetAvailableTokensParams):GetAvailableTokensParams
Defined in: cct/evm/token-pool/operations/get-available-tokens.ts:48
Validates the pool address and lane; nothing to convert for read. Lane 0 is left to the pool, which reports it as unsupported.
Parameters
| Parameter | Type |
|---|---|
params | GetAvailableTokensParams |
Returns
Throws
CCTParamsInvalidError if poolAddress is not a valid address, or
remoteChainSelector is not a uint64
Overrides
EVMQuery.prepare
query()
query(
chain:EVMChain,params:GetAvailableTokensParams):Promise<bigint>
Defined in: cct/query.ts:25
Run prepare and read; no wallet.
Parameters
| Parameter | Type |
|---|---|
chain | EVMChain |
params | GetAvailableTokensParams |
Returns
Promise<bigint>
Inherited from
EVMQuery.query
read()
protectedread(chain:EVMChain,__namedParameters:GetAvailableTokensParams):Promise<bigint>
Defined in: cct/evm/token-pool/operations/get-available-tokens.ts:64
Resolves the pool's type/version before the read, so a pool without the getter reports which of the two reasons applies rather than a bare call failure.
Parameters
| Parameter | Type |
|---|---|
chain | EVMChain |
__namedParameters | GetAvailableTokensParams |
Returns
Promise<bigint>
Throws
CCTContractTypeInvalidError if the pool is not a SiloedLockReleaseTokenPool
Throws
CCTOperationUnsupportedError on a v2.0.0 pool, whose lanes escrow through lockboxes; read a lockbox's token balance instead
Throws
CCTParamsInvalidError if the pool does not support the lane (its
InvalidChainSelector revert)
Throws
CCTContractVersionUnsupportedError if the pool reports an unknown version
Overrides
EVMQuery.read