Skip to main content
Version: 1.15.0

Function: isTokenPoolRevert()

isTokenPoolRevert(err: unknown, errorName: string): boolean

Defined in: cct/evm/token-pool/contracts.ts:1005

True when err is a pool call that reverted with the custom error errorName, as decoded by the typed contract's ABI.

Parameters​

ParameterTypeDescription
errunknownThe caught error.
errorNamestringThe custom error's name, e.g. 'LockBoxNotConfigured'.

Returns​

boolean

Remarks​

For reads whose revert is the answer (getAvailableTokens on an unsupported lane, getLockBox(uint64) on an unbound one), so the caller can turn that one case into a typed error while a transport failure, rate limit or any other revert propagates untouched. Narrower than isMissingFunction, which matches every revert.