- Ethereum Mainnet
- Optimism
- Base
- Arbitrum
- PGN
- Polygon
- ZKSync Era
- Celo
- All tests must pass.
- Make sure all the ABI files have been updated from the latest deployed contracts on respected network.
- Make sure the
subgraph.template.yaml
has been updated with the latest event signatures from the latest contracts. - Update all configs in
config/
folder with the latest contract addresses and block numbers for respective network.
🚨 The deployment will not work if the above requirements are not met. 🚨
- Remove any old files that may interfere with the generation of the subgraph
rm -rf generated && rm -rf build && rm -rf subgraph.yaml
- Generate the
subgraph.yaml
for the network against which you'd like to deploy the subgraph. If you are deploying to a network that is not on our Supported Networks list, you would have to add the network configuration inconfig/<NETWORK_TO_DEPLOY_SUBGRAPH>.json
. Refer to the existing config files for the structure. Once you have added the config file, add the script to thepackage.json
file like the other networks. Once you have added the script, generate thesubgraph.yaml
using the following command (also see Deploying subgraph to a new network below).
pnpm prepare:<NETWORK_TO_DEPLOY_SUBGRAPH>
- Run codegen
graph codegen
- Authenticate - hosted service
graph auth --product hosted-service <YOUR_API_KEY>
- Deploy Subgraph - hosted service
graph deploy --product hosted-service <GITHUB_USER>/<SUBGRAPH_NAME>
- Local or Custom Node Deployment - 🚨 This will be used for PGN
- Create the subgraph only for the first time
# Local deployment
graph create allo-protocol/allo-v2 --node http://localhost:8020/
# Custom node deployment
graph graph create <GITHUB_USER>/<SUBGRAPH_NAME> --node <NODE_URL>
- Deploy the subgraph
# Local deployment
graph deploy --node http://localhost:8020/ --ipfs http://localhost:5001/ gitcoin/allo ./subgraph.yaml
# Custom node deployment
graph deploy --node <NODE_URL> --ipfs <IPFS_URL> <GITHUB_USER>/<SUBGRAPH_NAME> ./subgraph.yaml