Documentation Index
Fetch the complete documentation index at: https://cowswap-mintlify-audit-seo-quality-1775466652.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Configuration
Configure the Watch Tower to monitor blockchain networks and manage programmatic orders. The Watch Tower uses a JSON configuration file to define network settings, RPC endpoints, and filtering policies.Configuration file
The Watch Tower requires aconfig.json file. You can use the provided example as a starting point:
Configuration schema
The configuration file follows this structure:Network configuration
Each network in thenetworks array supports the following options:
Required fields
name (string, required) Network identifier (e.g.,mainnet, sepolia, arbitrum_one, gnosis_chain, base)
rpc (string, required)
RPC endpoint URL. Supports both HTTP/HTTPS and WebSocket connections.
Examples:
https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEYwss://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEYhttps://sepolia.drpc.org
- Mainnet:
17883049 - Sepolia:
8468184 - Arbitrum One:
343493668 - Gnosis Chain:
40394915 - Base:
31084679 - Avalanche:
63235114 - Polygon:
72315184 - Linea:
25028604 - Plasma:
4810535 - Ink:
37142449
See Deployed Contracts for the complete list.
Optional fields
orderBookApi (string) Custom OrderBook API endpoint URL. If not specified, uses the default CoW Protocol API for the network. pageSize (integer, default: 5000) Number of blocks to fetch per request when querying historical events (eth_getLogs).
- Default:
5000(Infura’s maximum) - Set to
0to fetch all blocks in one request (useful for private RPC nodes)
1- Process every block (default)2- Process every other block10- Process every 10th block
Filter policy
The filter policy controls which programmatic orders are processed by the Watch Tower.Structure
Filter actions
defaultAction (string, required) Default action for items not explicitly listed in filters.ACCEPT- Process the order (recommended)DROP- Ignore the orderSKIP- Skip processing temporarily
Example configurations
Multi-network setup
Development setup (Sepolia)
With custom filtering
Configuration via environment variables
You can override the configuration file path using theCONFIG_PATH environment variable:
Important notes
The
deploymentBlock setting is critical for performance. Setting it too low will cause unnecessary historical event queries, while setting it too high will miss orders.Next steps
After configuring the Watch Tower:- Run the Watch Tower locally
- Learn about deployment options