contracts-wizard
contracts-wizard copied to clipboard
Add Superchain interop message passing
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:
callMyFunctionwhich takes a chain ID argument, and sends a message tomyFunctionat a contract at the same address on the given chain IDmyFunctionwhich 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