Skip to content

Errors on the ccipRecieve side are ambiguous #15

@Andriy-Kulak

Description

@Andriy-Kulak

First off, thanks for the hard work on this repo!

I got the local testing to work, but it took a little bit of effort (& a ton of console.logging 😅 ) to get it to work.

The main reason is that once the receiving contract was able to get the message, there were a few bugs on my code (i.e I wasn't decoding properly, set gas limit too small, etc.) For any error on Receiver contract, no matter, what it was, I got the same exact error below.

Not sure the best way to have the error pinpoint exact culprit, but in the meantime maybe the error can at least be more descriptive. I.e. Something along the lines. There is likely a code error somewhere on receiver side, also check the gasLimit, etc. this would save people a little bit of time in future.

     Error: VM Exception while processing transaction: reverted with custom error 'ReceiverError("0x")'
    at MockCCIPRouter.ccipSend (@chainlink/contracts-ccip/src/v0.8/ccip/test/mocks/MockRouter.sol:75)
    at MyContractStorage._sendMessagePayNative (contracts/MyContractStorage.sol:420)
    at MyContractStorage.createCampaign (contracts/MyContractStorage.sol:227)
    at EdrProviderWrapper.request (node_modules/hardhat/src/internal/hardhat-network/provider/provider.ts:429:41)
    at async HardhatEthersSigner.sendTransaction (node_modules/@nomicfoundation/hardhat-ethers/src/signers.ts:125:18)
    at async send (node_modules/ethers/src.ts/contract/contract.ts:313:20)
    at async Proxy.createCampaign (node_modules/ethers/src.ts/contract/contract.ts:352:16)
    at async Context.<anonymous> (test/dummy.test.ts:51:17) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions