smartcontractkit / smartcontractkit/documentation

[Bug]: Problem in using the CCIP Local Simulator to fork mainnets - Foundry edition

Open
#2,804 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug triage
Dominant language
MDX
Stars
526
Forks
478
Avg merge
1d 9h
Merged PRs (30d)
75

Description

Describe the bug

In the current docs of the ExampleTest in the Local Simulator to fork mainnets of ccip foundry section, there is some issues related to the complete implementation of the ExampleTest.

Issues:

  • As the feeToken: address(0), so we need to send the fee amount in the ccipSend
  • The polygon chain selector id is not correct to be used for setting the NetworkConfig. it needs to be the real chain id
  • The ccipReceiverAddress needs to be set correctly, which is not implemented to verify if the cross-chain from source to destination chain is working as expected.
To Reproduce
  1. Just copy and paste the complete implementation code in the [Working with Mainnet Forks](https://docs.chain.link/chainlink-local/build/ccip/foundry/forking-mainnets#working-with-mainnet-forks)
URLs
Expected behavior

The expectations are:

  • ccipLocalSimulatorFork.setNetworkDetails works fine and record the data for both Ethereum(source chain) and Polygon(destination chain) correctly
  • The desired data(here: "Hello world" string) get to the destination's ccipReceiverAddress contract
  • Compile and deploy without any issues
Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ExampleTest implementation in the Working with Mainnet Forks section of the linked CCIP Foundry documentation. Check the feeToken handling, Polygon chain selector used by ccipLocalSimulatorFork.setNetworkDetails, and ccipReceiverAddress setup; done means the example compiles and deploys, records both networks correctly, and delivers "Hello world" to the destination receiver.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain, documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.