1

I am trying to send arbitrary data from Avalanche Fuji to Ethereum Sepolia, but it seems like the ccipReceive function is not getting triggered.

Note: I am using chainlink-ccip package having version 1.5.0.

Below are the contracts.

On Avalanche Fuji Chain: https://testnet.snowtrace.io/address/0x05ADfE5fC9D37b6442C29bbd5e73a51078E82C86

On Ethereum Sepolia Chain: https://sepolia.etherscan.io/address/0x274E9b12dcEC416eBC4543B00Dd2C42645c1D4dD

Txn on Avalanche Fuji for bridging arbitrary data: https://testnet.snowtrace.io/tx/0xdbea4c0401c2933081b57f20b38aea281e17c88abb17ac54fcc9b97c36b03ed6

CCIP Explorer Message Id: https://ccip.chain.link/#/side-drawer/msg/0x5bbb89b2c4daa3059e71b82d0f9580d13871fc1185e22ebc2051da93d02a8984

The ccip explorer shows success for the ccip txn, but when getLastReceivedMessageDetails is called on Ethereum Sepolia Chain, it shows no message is received.

1 Answer 1

2

The reason you're not receiving the message on the destination chain (i.e., Ethereum Sepolia) is that the EVM2EVMOffRamp.supportsInterface call returns false. This call essentially checks whether the contract supports the IAny2EVMMessageReceiver interface, as you can verify by inspecting your Destination Transaction Hash (0x14ac5981d316fd50a7a03c69038e0640cde6e3ba6287dd463c697d027eecf8f1) in the CCIP transaction on Tenderly.

Tenderly Trace

The reason it returns false is the incorrect / unexpected calculation of interfaceId. When you override the supportsInterface function from both CCIPReceiver and AccessControl and use super.supportsInterface(interfaceId), which resolves the interfaceId calculation based on the C3 Linearization order of inheritance. This results in an unexpected interfaceId instead of the expected value 0x85572ffb, which is derived from bytes4(keccak256("ccipReceive((bytes32,uint64,bytes,bytes,(address,uint256)[])")). Means, the expected value comes from considering only the ccipReceive function of IAny2EVMMessageReceiver.

So, in your supportsInterface function (i.e., the last function inside your EstateAcrossChain contract), replace the following line:

return super.supportsInterface(interfaceId); 

with:

return CCIPReceiver.supportsInterface(interfaceId); 

P.S. You can refer to this answer to understand how the interfaceId is calculated and how the supportsInterface function works.


I've deployed and tested the contracts after doing the change:

On Avalanche Fuji Chain: https://testnet.snowtrace.io/address/0x5c1d66a0800BCd7c85737Be53be6412c54442856

On Ethereum Sepolia Chain: https://sepolia.etherscan.io/address/0x6834D174427CE0B742d9F88a61372683bD93F9B2

Calling getLastReceivedMessageDetails on the Ethereum Sepolia chain successfully displays the details of the latest received message:

getLastReceivedMessageDetails function call

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.