A Flask-based API service that provides token supply information about CoW Protocol token supply metrics, including:
- Total supply
- Circulating supply
- RESTful API endpoint for supply information
- Support for multiple vesting schedules with different vesting modules
- Supports adding new Treasuries on any chains
- Supports adding new Vesting Models and new Vesting Schedules
Returns the total and circulating supply of CoW Protocol tokens.
Example response: json { "total": "1000000000000000000000000", "circulating": "750000000000000000000000" }
- Python 3.11+
- Docker (optional)
Create a .env file with:
ETH_RPC_URL=<your-ethereum-rpc-url>
- Clone the repository
- Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate # Linux/Mac
# or
.\venv\Scripts\activate # Windows- Install dependencies:
pip install -r requirements.txt- Run the development server:
python src/main.pyBuild and run with Docker:
docker build -t cow-supply-api .
docker run -p 8080:8080 --env-file .env cow-supply-apiThis project includes VS Code devcontainer configuration for a consistent development environment:
- Install VS Code and Docker
- Open the project in VS Code
- Click "Reopen in Container" when prompted
src/main.py- Flask application and API endpointssupply_handlers.py- Supply calculation logicvesting.py- Vesting schedule implementationsrpc.py- Blockchain RPC interactioncfg.py- Configuration and constantsmodels.py- Data models