Skip to main content
Version: 1.16.1

Class: IsSupportedToken

Defined in: cct/evm/token-pool/operations/is-supported-token.ts:28

Reads a token pool's isSupportedToken(token): true only for the one token set in its constructor (the token that getTokenPoolState returns).

Extends​

Constructors​

Constructor​

new IsSupportedToken(): IsSupportedToken

Returns​

IsSupportedToken

Inherited from​

EVMQuery<IsSupportedTokenParams, IsSupportedTokenResult>.constructor

Properties​

name​

readonly name: "isSupportedToken" = 'isSupportedToken'

Defined in: cct/evm/token-pool/operations/is-supported-token.ts:29

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

Overrides​

EVMQuery.name

Methods​

prepare()​

protected prepare(params: IsSupportedTokenParams): IsSupportedTokenParams

Defined in: cct/evm/token-pool/operations/is-supported-token.ts:36

Validates both addresses; nothing to convert for read.

Parameters​

ParameterType
paramsIsSupportedTokenParams

Returns​

IsSupportedTokenParams

Throws​

CCTParamsInvalidError if poolAddress or tokenAddress is not a valid address

Overrides​

EVMQuery.prepare


query()​

query(chain: EVMChain, params: IsSupportedTokenParams): Promise<boolean>

Defined in: cct/query.ts:25

Run prepare and read; no wallet.

Parameters​

ParameterType
chainEVMChain
paramsIsSupportedTokenParams

Returns​

Promise<boolean>

Inherited from​

EVMQuery.query


read()​

protected read(chain: EVMChain, __namedParameters: IsSupportedTokenParams): Promise<boolean>

Defined in: cct/evm/token-pool/operations/is-supported-token.ts:48

Resolves the pool's type/version before the read, so an address that is not a known pool fails typed instead of answering with an unrelated contract's isSupportedToken.

Parameters​

ParameterType
chainEVMChain
__namedParametersIsSupportedTokenParams

Returns​

Promise<boolean>

Throws​

CCTContractTypeInvalidError if the pool's reported type is not supported

Throws​

CCTContractVersionUnsupportedError if the pool reports an unknown version

Overrides​

EVMQuery.read