Overview
The CoW Protocol Python SDK provides access to multiple blockchain networks through aChain enum that configures chain IDs, network identifiers, and block explorer URLs.
Accessing Chain Information
Import theChain enum to retrieve network properties:
Supported Networks
The SDK supports nine blockchain networks:| Network | Chain ID | Name | Explorer |
|---|---|---|---|
| Ethereum Mainnet | 1 | ethereum | etherscan.io |
| Sepolia Testnet | 11155111 | sepolia | sepolia.etherscan.io |
| Gnosis Chain | 100 | gnosis | gnosisscan.io |
| Arbitrum One | 42161 | arbitrum_one | arbiscan.io |
| Base | 8453 | base | basescan.org |
| Polygon | 137 | polygon | polygonscan.com |
| Avalanche | 43114 | avalanche | snowtrace.io |
| BNB Chain | 56 | bnb | bscscan.com |
| Lens Network | 232 | lens | explorer.lens.xyz |
Chain Properties
EachChain enum provides three properties:
- chain_id — Returns the
SupportedChainIdenum value representing the numeric identifier. - name — Returns the network name as a string for display and configuration.
- explorer — Returns the block explorer URL for transaction and address verification.
Usage Example
Complete example demonstrating chain specification in a token swap:Retrieving All Supported Chains
Access the complete list using theSUPPORTED_CHAINS constant:
The SDK uses chain configuration internally to determine API endpoints, contract addresses, and network-specific parameters.