API Version: v1.6.0

CCIP v1.6.0 TON Errors API Reference

Errors

CCIP contracts on TON use the TVM exit code system. Each contract has a facility ID that namespaces its errors. Contract-level errors are computed as FACILITY_ID × 100 + offset.


Native TVM Exit Codes

TVM itself defines a set of standard exit codes that can occur before your contract code even runs (e.g., insufficient gas, cell deserialization failure). These are not CCIP-specific. See the TON documentation for the complete list.

Common native exit codes you may encounter:

Exit CodeNameDescription
0SuccessTransaction executed successfully.
2Stack underflowNot enough values on the stack.
3Stack overflowToo many values pushed onto the stack.
4Integer overflowInteger value out of range.
5Integer out of expected rangeInteger out of expected range.
6Invalid opcodeUndefined or invalid TVM instruction.
7Type check errorPrimitive type mismatch.
8Cell overflowCell builder: writing too many bits or references.
9Cell underflowCell slice: reading more bits or refs than available.
10Dictionary errorInvalid dictionary operation.
13Out of gasExecution ran out of gas (TON).
32Action list is invalidInvalid action list after execution.
34Action is invalid or not supportedSpecific action unsupported.
37Not enough TONInsufficient balance to send the required amount.
38Not enough extra-currenciesInsufficient extra-currency balance.
65535Unknown opcodeUnhandled message opcode in the contract.

Router Errors

Facility ID: 571 — errors start at 57100

These errors occur when sending a Router_CCIPSend or Router_GetValidatedFee message.

enum Router_Error {
    DestChainNotEnabled = 57100
    SourceChainNotEnabled   // 57101
    SenderIsNotOffRamp      // 57102
    OffRampNotSetForSelector // 57103
    OffRampAddressMismatch  // 57104
    SubjectCursed           // 57105
    NotOnRamp               // 57106
    MissingTokenAmounts     // 57107
    NoMultiTokenTransfers   // 57108
    InsufficientFee         // 57109
}
Exit CodeSymbolDescription
57100DestChainNotEnabledThe destChainSelector is not configured on this Router. Check that you are using the correct chain selector.
57101SourceChainNotEnabledThe source chain is not enabled on the OffRamp.
57102SenderIsNotOffRampA Router_RouteMessage was sent by an address that is not the expected OffRamp.
57105SubjectCursedThe transfer is blocked because the source or destination chain has been cursed by the Risk Management Network (RMN).
57108NoMultiTokenTransfersToken transfers are not yet supported on TON. Pass an empty tokenAmounts cell.
57109InsufficientFeeThe TON value attached to the message is below the required minimum. Increase the attached value.

OnRamp Errors

Facility ID: 134 — errors start at 13400

These errors occur during OnRamp processing of a CCIP send.

enum Error {
    UnknownDestChainSelector = 13400
    Unauthorized            // 13401
    SenderNotAllowed        // 13402
    InvalidConfig           // 13403
    UnknownToken            // 13404
    InsufficientValue       // 13405
}
Exit CodeSymbolDescription
13400UnknownDestChainSelectorThe destination chain selector is not registered on the OnRamp.
13401UnauthorizedThe caller is not authorized to perform this operation.
13402SenderNotAllowedThe sender allowlist is enabled for this destination chain and the sender is not on it.
13405InsufficientValueThe message value is below what the OnRamp requires for processing.

FeeQuoter Errors

Facility ID: 344 — errors start at 34400

These errors occur during fee validation. They surface when the Router forwards your Router_CCIPSend to the FeeQuoter, or when you call validatedFeeCell directly.

enum FeeQuoter_Error {
    UnsupportedChainFamilySelector = 34400
    GasLimitTooHigh                 // 34401
    ExtraArgOutOfOrderExecutionMustBeTrue // 34402
    InvalidExtraArgsData            // 34403
    UnsupportedNumberOfTokens       // 34404
    InvalidEVMReceiverAddress       // 34405
    Invalid32ByteReceiverAddress    // 34406
    MsgDataTooLarge                 // 34411
    StaleGasPrice                   // 34412
    DestChainNotEnabled             // 34413
    FeeTokenNotSupported            // 34414
    TokenTransfersNotSupported      // 34419
    MessageFeeTooHigh               // 34427
}
Exit CodeSymbolDescription
34400UnsupportedChainFamilySelectorThe destination chain family (e.g., EVM, SVM) is not recognized. Check extraArgs encoding.
34401GasLimitTooHighThe gasLimit in extraArgs exceeds the maximum configured for the destination chain.
34402ExtraArgOutOfOrderExecutionMustBeTrueallowOutOfOrderExecution must be true for this destination chain.
34403InvalidExtraArgsDataThe extraArgs cell could not be decoded. Check encoding with buildExtraArgsForEVM.
34405InvalidEVMReceiverAddressThe EVM receiver address is invalid (e.g., zero address).
34406Invalid32ByteReceiverAddressThe receiver address must be exactly 32 bytes.
34411MsgDataTooLargeThe data payload exceeds the maximum allowed size for the destination chain.
34412StaleGasPriceThe gas price data on the FeeQuoter is stale and cannot be used for fee calculation.
34413DestChainNotEnabledThe destination chain is not enabled on this FeeQuoter.
34414FeeTokenNotSupportedThe specified fee token is not supported. Use native TON.
34419TokenTransfersNotSupportedToken transfers are not yet supported on TON. Pass an empty tokenAmounts cell.
34427MessageFeeTooHighThe calculated fee exceeds the maximum fee per message allowed by the FeeQuoter.

Receiver Errors

Facility ID: 54 — hardcoded error values

These errors are thrown by the validateAndConfirm helper and the minimal_receiver example when validating incoming Receiver_CCIPReceive messages.

enum Receiver_Error {
    Unauthorized = 5400
    LowValue     // 5401
}
Exit CodeSymbolDescription
5400UnauthorizedThe sender of the Receiver_CCIPReceive message is not the authorized CCIP Router. Ensure your receiver stores the correct Router address.
5401LowValueThe TON value attached to the Receiver_CCIPReceive message is below MIN_VALUE. The EVM sender must set a higher gasLimit in GenericExtraArgsV2 (minimum 0.1 TON = 100_000_000n nanoTON).

Get the latest Chainlink content straight to your inbox.