Documentation Index
Fetch the complete documentation index at: https://cowswap-mintlify-docs-quality-audit-1774862932.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Building
Build command
To construct the project, execute:Build process
The build sequence performs these actions:-
Clean previous builds
Eliminates the output directory and generated types for a fresh build.
-
Generate TypeScript types from ABIs
Leverages TypeChain to produce TypeScript types from contract ABIs located in the
abi/directory. -
Compile TypeScript
Transforms all TypeScript source files into JavaScript within the
dist/directory. -
Copy schema files
Transfers the JSON schema file necessary for runtime configuration validation.
TypeChain configuration
TypeChain produces type-safe contract interfaces using this command:- Target: ethers-v5 (generates types compatible with ethers.js v5)
- Output:
src/types/generated/ - Input: All JSON files in the
abi/directory
Output directory
Build output is organized in thedist/ directory:
Build artifacts
The build process generates these outputs:- Compiled JavaScript: All
.tsfiles transformed to.jsindist/ - Type declarations:
.d.tsfiles for TypeScript consumers - Contract types: Generated TypeScript interfaces for smart contracts
- JSON schemas: Configuration validation schemas
Entry point
The primary entry point is configured inpackage.json:
Prepare hook
A prepare hook executes post-installation:husky install- Configures git hooksyarn typechain- Produces contract typesyarn configschema- Generates configuration schema
Building for production
For production environments:- Execute the complete build:
yarn build - The
dist/directory contains the deployable application - Verify all dependencies in
package.jsonare installed in production