Skip to main content

Prerequisites

  • Foundry installed
  • A CoW Protocol settlement contract address for deployment

Installation

1

Clone the repository

2

Install dependencies

3

Compile contracts

Compilation uses Solidity 0.8.20, EVM Shanghai, with optimizer enabled at 1,000,000 runs.
4

Run tests

Deployment

Forge Script

The constructor accepts one parameter: the settlement contract address.
To verify on Etherscan, add --etherscan-api-key and --verify flags.

Cannon

Cannon provides predictable addresses and multi-chain support through configuration files. The system automatically retrieves settlement addresses from the cow-settlement package, reducing manual configuration.
Publishing requires 0.0025 ETH + gas fees on Optimism Mainnet.

Verification

After deployment, verify the contract using cast to check the settlement address:
Or verify on Etherscan with constructor argument encoding.

Resources

Last modified on March 4, 2026