Skip to main content
Version: 1.15.0

Function: resolveTokenEncoder()

resolveTokenEncoder<F>(encoders: Partial<Record<TokenVersion, F | null>>, version: TokenVersion, operation: string): F

Defined in: cct/evm/token/contracts.ts:99

Floor-matches an encoder table, with v2.0.0 as the first CrossChainToken version. An absent entry inherits the closest lower encoder; null marks a removal ceiling.

Type Parameters​

Type Parameter
F

Parameters​

ParameterType
encodersPartial<Record<TokenVersion, F | null>>
versionTokenVersion
operationstring

Returns​

F

Throws​

CCTOperationUnsupportedError if no encoder exists at or below version, or a null ceiling is encountered first