Skip to main content
Version: 1.16.0

Class: GetTokenPoolState

Defined in: cct/evm/token-pool/operations/get-token-pool-state.ts:245

Reads a token pool's admin state — owner, the rate-limit role, token/router/lanes, plus v2.0.0's feeAdmin, finality window and lockBox — through the vendored ABI of the pool's own version.

Extends​

Constructors​

Constructor​

new GetTokenPoolState(): GetTokenPoolState

Returns​

GetTokenPoolState

Inherited from​

EVMQuery<GetTokenPoolStateParams, GetTokenPoolStateResult>.constructor

Properties​

name​

readonly name: "getTokenPoolState" = 'getTokenPoolState'

Defined in: cct/evm/token-pool/operations/get-token-pool-state.ts:246

camelCase id; matches the token-manager facade method and error context.

Overrides​

EVMQuery.name

Methods​

prepare()​

protected prepare(params: GetTokenPoolStateParams): GetTokenPoolStateParams

Defined in: cct/evm/token-pool/operations/get-token-pool-state.ts:249

Validates the pool address; nothing to convert for read.

Parameters​

ParameterType
paramsGetTokenPoolStateParams

Returns​

GetTokenPoolStateParams

Overrides​

EVMQuery.prepare


query()​

query(chain: EVMChain, params: GetTokenPoolStateParams): Promise<GetTokenPoolStateResult>

Defined in: cct/query.ts:25

Run prepare and read; no wallet.

Parameters​

ParameterType
chainEVMChain
paramsGetTokenPoolStateParams

Returns​

Promise<GetTokenPoolStateResult>

Inherited from​

EVMQuery.query


read()​

protected read(chain: EVMChain, __namedParameters: GetTokenPoolStateParams): Promise<GetTokenPoolStateResult>

Defined in: cct/evm/token-pool/operations/get-token-pool-state.ts:266

Resolves the pool's type + version, then reads it through the getters that version has.

Parameters​

ParameterType
chainEVMChain
__namedParametersGetTokenPoolStateParams

Returns​

Promise<GetTokenPoolStateResult>

Remarks​

Dispatch is an exhaustive switch, not floor-matched like the write ops' encoders: a read's shape is bound to the ABI it decodes through, and the v2.0.0 reader reports its version as the literal that discriminates GetTokenPoolStateResult. Floor-matching would make a newer pool misreport itself and silently drop any admin field its version added, so a new TokenPoolVersion fails to compile here until it is pointed at a reader.

Throws​

CCTContractTypeInvalidError if the pool's reported type is not a supported one

Throws​

CCTContractVersionUnsupportedError if the reported version is not a known one

Overrides​

EVMQuery.read