CCIP v2.0.0 BaseVerifier API Reference

BaseVerifier defines the policy and validation layer for CCIP Cross-Chain Verifier (CCV) contracts.

It provides shared logic for:

  • validating message origin and sender
  • enforcing chain-specific configuration
  • applying finality and allowlist rules
  • blocking execution under unsafe conditions

All CCV implementations inherit from this contract to ensure consistent validation behavior.

Applications do not call this contract directly.

Usage Boundary

You do not call this contract directly.

  • OffRamp components invoke verifier logic during message validation.
  • Verifier implementations inherit this contract to define validation rules.
  • You interact with this contract when configuring verification behavior for specific chains.
  • You are responsible for ensuring configuration accurately reflects trusted senders and chains.

Contract

ccvs/components/BaseVerifier.sol

Import

import {BaseVerifier} from "chainlink-ccip/ccvs/components/BaseVerifier.sol";

Inheritance

  • ICrossChainVerifierV1
  • ITypeAndVersion

Constructor

constructor(string[] memory storageLocations, address rmnAddress, bytes4 _versionTag)
ParameterTypeDescription
storageLocationsstring[] memoryOff-chain storage locations used for verifier data.
rmnAddressaddressRMN contract used to enforce network-wide safety conditions.
_versionTagbytes4Identifier for the verifier implementation version.

External API

getStorageLocations

function getStorageLocations() public view override returns (string[] memory)

Returns configured storage locations.

getAllowedFinalityConfig

function getAllowedFinalityConfig() public view returns (bytes4 allowedFinality)

Returns the allowed finality configuration.

getRemoteChainConfig

function getRemoteChainConfig(uint64 remoteChainSelector)
  external
  view
  returns (RemoteChainConfigArgs memory remoteChainConfig, address[] memory allowedSendersList)

Returns configuration and allowed senders for a remote chain.

getFee

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

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

versionTag

function versionTag() public view returns (bytes4 tag)

Returns the verifier version identifier.

  • Used to distinguish verifier implementations across deployments.

supportsInterface

function supportsInterface(bytes4 interfaceId) external pure override returns (bool)

ERC-165 interface support check.

Events

  • event RemoteChainConfigSet(uint64 indexed remoteChainSelector, address router, bool allowlistEnabled)
  • event AllowListSendersAdded(uint64 indexed destChainSelector, address senders)
  • event AllowListSendersRemoved(uint64 indexed destChainSelector, address senders)
  • event AllowListStateChanged(uint64 indexed destChainSelector, bool allowlistEnabled)
  • event StorageLocationsUpdated(string[] oldLocations, string[] newLocations)
  • event FinalityConfigSet(bytes4 allowedFinality)

For a cross-contract event index, see Events.

Errors

  • error CursedByRMN(uint64 destChainSelector)
  • error InvalidRemoteChainConfig(uint64 remoteChainSelector)
  • error DestGasCannotBeZero(uint64 destChainSelector)
  • error InvalidAllowListRequest(uint64 destChainSelector)
  • error SenderNotAllowed(address sender)
  • error CallerIsNotARampOnRouter(address caller)
  • error RemoteChainNotSupported(uint64 remoteChainSelector)
  • error ZeroAddressNotAllowed()
  • error VersionTagCannotBeZero()

For a cross-contract error index, see Errors.

Notes

  • Verifiers act as execution gates: messages are only processed if validation conditions are satisfied.
  • Verification succeeds only if both router and sender validation checks pass.
  • Verification requires that the caller matches the router’s configured OnRamp and that the sender is permitted.
  • When allowlisting is enabled, only explicitly configured senders are permitted.
  • A configured router is required for validation; without it, verification for a chain is disabled.
  • Messages will revert if validation fails due to sender mismatch, unsupported chain, or RMN restrictions.
  • Setting a chain’s router to the zero address disables verification for that chain.
  • Chain configuration and allowlists must be set before messages from that chain can be validated.

Internal Functions

_setStorageLocations

Sets storage locations used by off-chain components.

_getRemoteChainConfig

Returns stored configuration for a remote chain.

_applyRemoteChainConfigUpdates

Applies updates to remote chain configuration.

  • Reverts if chain selector is invalid.
  • Reverts if verification gas is zero.
  • A zero router disables support for the chain.

_assertSenderIsAllowed

Validates:

  • router exists
  • caller is current OnRamp
  • sender is allowlisted if required

_onlyOffRamp

Validates that the caller is an authorized OffRamp.

_applyAllowlistUpdates

Applies allowlist updates.

  • Reverts on invalid configuration or zero addresses.

_assertNotCursedByRMN

Reverts if RMN marks the destination chain as unsafe.

Security model

  • Relies on configured routers for ramp validation.
  • Sender validation is enforced via router and optional allowlists.
  • RMN integration blocks execution under unsafe conditions.
  • Misconfiguration may cause verification failures or unintended message rejection.

Get the latest Chainlink content straight to your inbox.