Building the Project
The CoW Protocol contracts project uses a hybrid build system compiling both Solidity smart contracts and TypeScript bindings.Prerequisites
- Node.js v16 or higher
- Yarn package manager
- Git
Installation
Build Commands
Full Build
Compiles Solidity contracts and generates TypeScript bindings:Solidity Only
Runs Hardhat compiler with force flag:TypeScript Only
Compiles in ESM, CommonJS, and default formats:Compiler Settings
The project is configured for gas-efficient contract execution:
This prioritizes minimal execution costs over deployment expenses.
Output Structure
Successful builds generate:Linting and Formatting
Solidity
TypeScript
Troubleshooting
If you encounter build issues:-
Clear build artifacts:
-
Reinstall dependencies:
-
Force rebuild: