-
Install dependencies
yarn install -
Build a v3 subgraph
yarn build --network <network> --subgraph-type v3 -
Deploy a v3 subgraph
yarn build --network <network> --subgraph-type v3 --deploy -
Build a v3-tokens subgraph
yarn build --network <network> --subgraph-type v3-tokens -
Deploy a v3-tokens subgraph
yarn build --network <network> --subgraph-type v3-tokens --deploy
Note: Deployments will fail if there are uncommitted changes in the subgraph. Please commit your changes before deploying.
-
Install dependencies
yarn install -
Codegen types
yarn build --network <taiko/taiko-hoodi-testnet> --subgraph-type <v3/v3-tokens> -
Build graph Note that once codgen aka
yarn buildyou can create the build any graph with this command.yarn build:graph:<v3/v3-tokens> -
Deploy to Goldsky
yarn deploy:<v3/v3-tokens>:<taiko/taiko-hoodi-testnet>:goldsky
Each deploy publishes a new version named after the current commit
(git rev-parse --short HEAD), e.g. uniswap-v3-taiko/f4eb0c8. The previously
deployed version keeps serving and is not touched.
Version-specific URLs change on every deploy, which means every consumer has to be updated by hand. A Goldsky tag is a stable alias that points at one version, so consumers pin the tag and a release becomes a pointer move instead of a frontend change.
Each network has its own tag: mainnet for Taiko Alethia, testnet for Taiko
Hoodi. Tagged endpoints replace the version with the tag name:
https://api.goldsky.com/api/public/<project>/subgraphs/uniswap-v3-taiko/mainnet/gn
https://api.goldsky.com/api/public/<project>/subgraphs/uniswap-v3-taiko-hoodi-testnet/testnet/gn
- Tag a deployment
yarn tag:<v3/v3-tokens>:<taiko/taiko-hoodi-testnet>:goldsky
The script picks the right tag for the network, so there is no way to
accidentally alias a Hoodi deployment as mainnet.
The tag scripts resolve the version from the current commit, exactly like the deploy scripts, so check out the commit you deployed before tagging.
Before moving a tag the script queries Goldsky and refuses to continue unless
the deployment exists, reports healthy, and is 100% synced. This matters
because goldsky subgraph list exits 0 even for a version that was never
deployed, so an unguarded tag command fails silently.
Adding or moving a data source start block forces a full reindex, so a fresh deploy can take hours to reach 100% on Taiko Alethia. Deploy first, let it backfill, then move the tag.