Skip to main content
Version: 1.16.1

Class: GetCurrentRateLimiterState

Defined in: cct/evm/token-pool/operations/get-current-rate-limiter-state.ts:61

Reads the raw inbound and outbound token buckets of one lane of a token pool.

Extends​

Constructors​

Constructor​

new GetCurrentRateLimiterState(): GetCurrentRateLimiterState

Returns​

GetCurrentRateLimiterState

Inherited from​

EVMQuery<GetCurrentRateLimiterStateParams, GetCurrentRateLimiterStateResult>.constructor

Properties​

name​

readonly name: "getCurrentRateLimiterState" = 'getCurrentRateLimiterState'

Defined in: cct/evm/token-pool/operations/get-current-rate-limiter-state.ts:65

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

Overrides​

EVMQuery.name

Methods​

prepare()​

protected prepare(params: GetCurrentRateLimiterStateParams): GetCurrentRateLimiterStateParams

Defined in: cct/evm/token-pool/operations/get-current-rate-limiter-state.ts:88

Validates every param; whether fastFinality is allowed is only known once the pool version is resolved, so read rejects it there.

Parameters​

ParameterType
paramsGetCurrentRateLimiterStateParams

Returns​

GetCurrentRateLimiterStateParams

Throws​

CCTParamsInvalidError if poolAddress is not a valid address, remoteChainSelector is not a uint64, or fastFinality is set and not a boolean

Overrides​

EVMQuery.prepare


query()​

query(chain: EVMChain, params: GetCurrentRateLimiterStateParams): Promise<TokenPoolRateLimiterState>

Defined in: cct/query.ts:25

Run prepare and read; no wallet.

Parameters​

ParameterType
chainEVMChain
paramsGetCurrentRateLimiterStateParams

Returns​

Promise<TokenPoolRateLimiterState>

Inherited from​

EVMQuery.query


read()​

protected read(chain: EVMChain, __namedParameters: GetCurrentRateLimiterStateParams): Promise<TokenPoolRateLimiterState>

Defined in: cct/evm/token-pool/operations/get-current-rate-limiter-state.ts:107

Resolves the pool's version to pick the getter, then checks the lane: the getters do not check it, so an unsupported lane would read as a zeroed, disabled bucket instead of failing.

Parameters​

ParameterType
chainEVMChain
__namedParametersGetCurrentRateLimiterStateParams

Returns​

Promise<TokenPoolRateLimiterState>

Remarks​

The fastFinality check runs before any getter, so a bad flag costs only the typeAndVersion probe. isSupportedChain runs in parallel with the bucket read, which cannot revert on an unknown lane, so the check costs no extra round trip.

Throws​

CCTContractTypeInvalidError if the pool's reported type is not supported

Throws​

CCTContractVersionUnsupportedError if the pool reports an unknown version

Throws​

CCTParamsInvalidError if fastFinality is set on a pre-v2.0.0 pool, or the pool does not support remoteChainSelector

Overrides​

EVMQuery.read