API Version: v1.5.1

CCIP v1.5.1 CCIPReceiver API Reference

CCIPReceiver

An abstract base contract that provides core functionality for CCIP-enabled applications to receive cross-chain messages.

Git Source

Errors

InvalidRouter

error InvalidRouter(address router);

Parameters

NameTypeDescription
routeraddressThe invalid router address

State Variables

i_ccipRouter

address internal immutable i_ccipRouter;

Modifiers

onlyRouter

modifier onlyRouter();

Functions

ccipReceive

Processes incoming CCIP messages from the router.

function ccipReceive(Client.Any2EVMMessage calldata message) external virtual override onlyRouter;

Parameters

NameTypeDescription
messageClient.Any2EVMMessageThe CCIP message

constructor

constructor(address router);

Parameters

NameTypeDescription
routeraddressThe CCIP router contract address

getRouter

Returns the address of the current CCIP router.

function getRouter() public view virtual returns (address);

Returns

TypeDescription
addressThe current CCIP router address

supportsInterface

Determines whether the contract implements specific interfaces.

function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool);

Parameters

NameTypeDescription
interfaceIdbytes4The interface identifier to check

Returns

TypeDescription
boolTrue if the interface is supported

_ccipReceive

Internal function to be implemented by derived contracts for custom message handling.

function _ccipReceive(Client.Any2EVMMessage memory message) internal virtual;

Parameters

NameTypeDescription
messageClient.Any2EVMMessageThe message to be processed

Get the latest Chainlink content straight to your inbox.