Installation
The CoW Protocol Watch Tower is a standalone application that monitors blockchain events for programmatic orders and submits them to the CoW Protocol OrderBook API.Requirements
Before installing the Watch Tower, ensure you have the following:- Node.js
>= v16.18.0 - yarn package manager
- An RPC node connected to a supported network (Ethereum mainnet, Arbitrum One, Gnosis Chain, Base, Sepolia, etc.)
- Internet access to the CoW Protocol OrderBook API
Installation
Install dependencies
Install the required dependencies using yarn:This will install all dependencies defined in
package.json, including:@cowprotocol/cow-sdk- CoW Protocol SDKethers- Ethereum librarylevel- LevelDB databaseexpress- API server
Configure the watch-tower
Copy the example configuration file and customize it for your needs:Edit
config.json to configure your RPC endpoints and network settings. See the Configuration guide for details.Building from source
If you need to build the Watch Tower from source:Build the project
Compile TypeScript to JavaScript:This command will:
- Remove previous build artifacts
- Generate TypeChain types
- Compile TypeScript files to the
dist/directory - Copy the configuration schema
Docker installation
The Watch Tower is also available as a Docker image, which is the preferred deployment method for production environments.Available tags
latest- The latest stable versionvX.Y.Z- Specific version tags (e.g.,v2.14.0)main- Latest version from the main branchpr-<PR_NUMBER>- Pull request builds for testing
Pull the image
Run with Docker
Make sure your
config.json file is properly configured before running the Docker container.