- Deterministic CREATE2 deployments
- Deployment manifest with ABIs and addresses
- Multi-chain support with identical addresses
Building
1
Install dependencies
2
Build the Cannon package
3
Verify build artifacts
Check the
cannon/ directory for generated artifacts.- Recompiles Solidity contracts
- Generates deployment manifests
- Includes ABIs
- Calculates predicted deployment addresses
Configuration
Thecannonfile.toml defines deployment settings:
- Package name and version: Identifies the deployment package
- Dependencies: Pulls from the
cow-settlementpackage (version 2.0.2) - CREATE2 salt: Deterministic salt value for address calculation
- Constructor arguments: Settlement contract address passed automatically from the dependency
Publishing
1
Verify version
Check the version number in the configuration file.
2
Build the package
3
Publish to Cannon registry
Publishing requires an authorized account with 0.0025 ETH + gas fees on Optimism Mainnet.
4
Select network and provide credentials
Provide your private key and select the target network when prompted.
5
Record deployment artifacts
Use Cannon inspection commands to record deployment artifacts.
6
Bump version and commit
Update the version number and commit the changes.
CREATE2 Deterministic Deployment
The CREATE2 deployment method ensures the same contract address across all EVM networks. The address is determined by:- Deployer address
- Salt value
- Contract bytecode
- Constructor arguments
Production Deployment
Actual mainnet deployments are handled through the separate cowprotocol/deployments repository, with staging and production phases.Troubleshooting
Build failures
Build failures
Ensure all dependencies are installed with
pnpm install and that you’re using the correct Solidity version (0.8.20).Recording commands
Recording commands
Some recording commands may require manual execution. Check the Cannon documentation for the latest commands.
Resources
- cowprotocol/deployments — Production deployment addresses
- Cannon Explorer: cow-omnibus — Package on Cannon registry
- Installation Guide — Local setup and Forge deployment