Skip to main content
Version: 1.15.0

Class: CCIPDestSimulationUnavailableError

Defined in: errors/specialized.ts:4147

Thrown when the destination pool's releaseOrMint simulation could not be performed at all, so executability is undetermined (neither proven nor disproven). It is distinct from CCIPDestExecutionRevertError, which means the call did revert and the message would not execute. The reason (also in context.reason) tells why the check could not run:

  • 'transport': the eth_call failed with an RPC/transport error rather than a contract revert. Transient (isTransient === true) — retry, optionally against a different destination RPC.
  • 'attestation-required': the destination pool consumes offchain token data (a CCTP attestation or bridge proof — e.g. USDC/CCTP v1, Lombard v1 pools) that only exists after the message is sent, so the check is fundamentally unavailable pre-send. Not transient — retrying pre-send can never succeed; the check becomes possible post-send (e.g. manual-exec --estimate-gas-limit, where the real attestation is supplied).

Example​

TypeScript
try {
await estimateReceiveExecution({ source, dest, routerOrRamp, message })
} catch (error) {
if (error instanceof CCIPDestSimulationUnavailableError && error.isTransient) {
// retry, optionally with a different dest RPC
}
}

Extends​

Constructors​

Constructor​

new CCIPDestSimulationUnavailableError(reason: "transport" | "attestation-required", options?: CCIPErrorOptions): CCIPDestSimulationUnavailableError

Defined in: errors/specialized.ts:4158

Creates a destination-simulation-unavailable error.

Parameters​

ParameterTypeDescription
reason"transport" | "attestation-required"'transport' for RPC/transport failures (transient), 'attestation-required' for pools whose releaseOrMint needs offchain token data that doesn't exist pre-send (not transient).
options?CCIPErrorOptionsOptional error options; pass the underlying RPC error as cause.

Returns​

CCIPDestSimulationUnavailableError

Overrides​

CCIPError.constructor

Properties​

_isCCIPError​

readonly _isCCIPError: true

Defined in: errors/CCIPError.ts:30

Brand for cross-module identification (dual package hazard).

Inherited from​

CCIPError._isCCIPError


code​

readonly code: CCIPErrorCode

Defined in: errors/CCIPError.ts:32

Machine-readable error code.

Inherited from​

CCIPError.code


context​

readonly context: Record<string, unknown>

Defined in: errors/CCIPError.ts:34

Structured context (IDs, addresses).

Inherited from​

CCIPError.context


isTransient​

readonly isTransient: boolean

Defined in: errors/CCIPError.ts:36

True if retry may succeed.

Inherited from​

CCIPError.isTransient


name​

readonly name: "CCIPDestSimulationUnavailableError" = 'CCIPDestSimulationUnavailableError'

Defined in: errors/specialized.ts:4148

Overrides​

CCIPError.name


reason​

readonly reason: "transport" | "attestation-required"

Defined in: errors/specialized.ts:4150

Why the simulation could not be performed.


recovery?​

readonly optional recovery?: string

Defined in: errors/CCIPError.ts:40

Recovery suggestion.

Inherited from​

CCIPError.recovery


retryAfterMs?​

readonly optional retryAfterMs?: number

Defined in: errors/CCIPError.ts:38

Retry delay in ms.

Inherited from​

CCIPError.retryAfterMs

Methods​

toJSON()​

toJSON(): Record<string, unknown>

Defined in: errors/CCIPError.ts:105

Serializes the error for logging.

Use this instead of JSON.stringify(error) directly, as Error properties are non-enumerable and would be lost.

Returns​

Record<string, unknown>

An object containing all error properties

Inherited from​

CCIPError.toJSON


from()​

static from(error: unknown, code?: CCIPErrorCode): CCIPError

Defined in: errors/CCIPError.ts:89

Wraps an unknown caught value in a CCIPError.

Useful for normalizing errors in catch blocks.

Parameters​

ParameterTypeDescription
errorunknownThe error to wrap
code?CCIPErrorCodeOptional error code (defaults to 'UNKNOWN')

Returns​

CCIPError

A CCIPError wrapping the original error

Inherited from​

CCIPError.from


isCCIPError()​

static isCCIPError(error: unknown): error is CCIPError

Defined in: errors/CCIPError.ts:73

Type guard for CCIPError.

Prefer this over instanceof to handle the dual package hazard when multiple versions of the SDK may be present.

Parameters​

ParameterTypeDescription
errorunknownThe error to check

Returns​

error is CCIPError

True if the error is a CCIPError instance

Inherited from​

CCIPError.isCCIPError