CCIP v2.0.0 ICrossChainVerifierV1 API Reference

ICrossChainVerifierV1 defines the lifecycle interface for Cross-Chain Verifier (CCV) implementations.

It standardizes:

  • source-side verifier data generation (forwardToVerifier)
  • destination-side message validation (verifyMessage)
  • verification fee calculation (getFee)

All CCV implementations must follow this interface to ensure consistent cross-chain validation behavior.

This interface defines functions implemented by protocol contracts and is not typically used directly by applications.

Usage Boundary

You do not call this interface directly.

  • OnRamp components call forwardToVerifier during message submission.
  • OffRamp components call verifyMessage during message validation.
  • Routing components call getFee to calculate verification cost.
  • You implement this interface when building custom verifier logic.

Contract

interfaces/ICrossChainVerifierV1.sol

Import

import {ICrossChainVerifierV1} from "chainlink-ccip/interfaces/ICrossChainVerifierV1.sol";

If you have not installed the package:

npm install @chainlink/contracts-ccip@2.0.0

Inheritance

  • IERC165

External API

verifyMessage

function verifyMessage(
  MessageV1Codec.MessageV1 memory message,
  bytes32 messageId,
  bytes memory verifierResults
) external

Validates a message on the destination chain using verifier-specific data.

  • Reverts if validation fails.
ParameterTypeDescription
messageMessageV1Codec.MessageV1 memoryMessage being validated.
messageIdbytes32Canonical identifier for the message.
verifierResultsbytes memoryVerifier-specific data produced on the source chain.

getFee

function getFee(
  uint64 destChainSelector,
  Client.EVM2AnyMessage memory message,
  bytes memory extraArgs,
  bytes4 requestedFinalityConfig
) external view returns (
  uint16 feeUSDCents,
  uint32 gasForVerification,
  uint32 payloadSizeBytes
)

Returns the verification fee and resource requirements for processing a message.

ParameterTypeDescription
destChainSelectoruint64Destination chain identifier.
messageClient.EVM2AnyMessage memoryMessage being evaluated.
extraArgsbytes memoryAdditional verifier-specific arguments.
requestedFinalityConfigbytes4Desired finality configuration for verification.

Returns:

TypeDescription
uint16Verification fee in USD cents.
uint32Gas required for verification.
uint32Payload size used in verification.

forwardToVerifier

function forwardToVerifier(
  MessageV1Codec.MessageV1 calldata message,
  bytes32 messageId,
  address feeToken,
  uint256 feeTokenAmount,
  bytes calldata verifierArgs
) external returns (bytes memory verifierData)

Produces verifier-specific data on the source chain for later destination-side validation.

  • Output is passed to the destination chain and consumed by verifyMessage.
ParameterTypeDescription
messageMessageV1Codec.MessageV1 calldataMessage being processed.
messageIdbytes32Canonical identifier for the message.
feeTokenaddressToken used for fees.
feeTokenAmountuint256Fee amount.
verifierArgsbytes calldataVerifier-specific arguments.

Returns:

TypeDescription
bytes memoryEncoded verifier data used for validation.

getStorageLocations

function getStorageLocations() external view returns (string[] memory)

Returns off-chain storage locations used by the verifier implementation.

Returns:

TypeDescription
string[] memoryStorage location identifiers.

Notes

  • verifyMessage must be called with verifier data produced by forwardToVerifier.
  • Message data and verifier results must match exactly between source and destination chains.
  • messageId is the canonical identifier passed through the verifier interface. Implementations may also derive or validate a message hash internally.
  • For a given message and verifier configuration, forwardToVerifier should produce deterministic verifier data.
  • getFee should be called with the same message parameters that will be used for verifier execution.
  • Verification will revert if verifier data is invalid, mismatched, or incomplete.
  • Verifiers act as execution gates: messages are processed only if validation succeeds.

Get the latest Chainlink content straight to your inbox.