CCIP v2.0.0 IAny2EVMMessageReceiverV2 API Reference

IAny2EVMMessageReceiverV2 extends IAny2EVMMessageReceiver with an interface that allows receivers to specify Cross-Chain Verifier (CCV) and finality preferences for incoming messages.

If you implement this interface, you define the verification and finality requirements applied to incoming messages before execution.

This interface is optional and primarily used by advanced integrations that require custom verification or finality constraints. Most applications do not need to implement it.

Usage Boundary

You do not need to implement this interface to receive CCIP messages.

  • Use CCIPReceiver without this interface for standard message handling.
  • Implement this interface only if you need to override default verification or finality behavior.
  • If you do, you define the verification requirements applied during message validation.

Contract

interfaces/IAny2EVMMessageReceiverV2.sol

Import

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

If you have not installed the package:

npm install @chainlink/contracts-ccip@2.0.0

Inheritance

  • IAny2EVMMessageReceiver

External API

getCCVsAndFinalityConfig

function getCCVsAndFinalityConfig(
  uint64 sourceChainSelector,
  bytes calldata sender
) external view returns (
  address[] memory requiredCCVs,
  address[] memory optionalCCVs,
  uint8 optionalThreshold,
  bytes4 allowedFinalityConfig
)

Returns the Cross-Chain Verifier (CCV) set and finality requirements to apply when processing messages from a given source chain and sender.

This function is used during message validation to determine verification and finality requirements on a per-source basis.

ParameterTypeDescription
sourceChainSelectoruint64Identifier of the source chain sending the message.
senderbytes calldataEncoded address of the sender on the source chain.

Returns:

TypeDescription
address[] memoryCCVs that must validate the message.
address[] memoryAdditional CCVs that may contribute to validation.
uint8Minimum number of optional CCVs required.
bytes4Encoded finality configuration accepted by the receiver.

Events

No new events declared.

For a cross-contract event index, see Events.

Errors

No new custom errors declared.

For a cross-contract error index, see Errors.

Notes

  • You do not need to implement this interface to receive CCIP messages.
  • This interface defines verification preferences, not message execution logic.
  • If you implement it, you specify CCV and finality requirements for message validation.
  • These preferences are used during message validation but do not change how messages are delivered by the Router.
  • These preferences are advisory and depend on the CCIP execution flow for enforcement.

Get the latest Chainlink content straight to your inbox.