contracts-wizard icon indicating copy to clipboard operation
contracts-wizard copied to clipboard

Add Superchain interop message passing

Open ericglau opened this issue 6 months ago • 6 comments

In Solidity's Custom tab, this PR adds a Cross-Chain Messaging option that adds an example of Superchain interop message passing when enabled. This includes a function that can be called from a different network on the Superchain.

For example, when enabled, this adds the following functions by default:

  • callMyFunction which takes a chain ID argument, and sends a message to myFunction at a contract at the same address on the given chain ID
  • myFunction which receives messages from other chains. The name of this function is customizable (which affects the name of the above function as well).

Implementation checklist:

  • [x] Add UI elements to emphasize that this is only compatible with chains on the Superchain and requires deterministic deployments
  • [x] Add unit tests
  • [x] Add snapshot tests
  • [x] Update AI assistant definitions and MCP schemas
  • [x] Test/fix usage with AI assistant
  • [x] Add Optimism contracts for compilation tests
  • [x] Add Optimism contracts to Download Hardhat and Foundry packages
  • [x] Test an example contract locally using supersim, non-upgradeable (see comments below for test steps)
  • [x] Test an example contract locally using supersim, upgradeable (see comments below for test steps)
  • [x] Add changesets
  • [x] Add soldeer.lock

ericglau avatar Jul 04 '25 21:07 ericglau