brew install postgresqlyarn run build:dockeryarn run testsrc/utils/chains.ts. This will require adding a new <NETWORK_NAME>_NETWORK_NAME const for the corresponding network.networks.json for the new chain. The network name should be derived from the CLI Name in The Graph's supported networks documenation. The factory address can be derived from Uniswap's deployments documentation (not yet available).yarn run deploy:alchemy --
<SUBGRAPH_NAME>
--version-label <VERSION_LABEL>
--deploy-key <DEPLOYMENT_KEY>
--network <NETWORK_NAME>
The subgraph.yaml file can be automatically generated from the networks.json configuration for a specific network. This ensures that all contract addresses and start blocks are correctly synchronized.
To generate the subgraph.yaml:
networks.json is up to date with the correct contract addresses and start blocksbash
yarn generate-subgraph <network>
For example:
bash
yarn generate-subgraph mainnet
# or
yarn generate-subgraph arbitrum-oneThis will create a new subgraph.yaml file based on the network-specific configuration. The script will:
Available networks can be found in networks.json.
$ claude mcp add v4-subgraph \
-- python -m otcore.mcp_server <graph>