Everstrat Docs home
Operations

Subgraph deployment

Build and deploy workflow for the bundled GoldSky/The Graph workspace.

Build workflow

# From the everstrat-xyz/app repository root:
cd subgraph
npm install
npm run codegen
npm run build

Both codegen and build run npm run config:sync first, which regenerates src/config.ts from config/deployments/mainnet.json.

Deploy workflow

goldsky login
goldsky subgraph deploy everything-strategy-mainnet/v0.X.Y --path .

The live prod tag serves the current endpoint; see Subgraph deployments for the current public endpoint URL.

Change rule

When redeploying contracts:

  1. Update everstrat-xyz/app/subgraph/config/deployments/mainnet.json with the new addresses and startBlock.
  2. From everstrat-xyz/app/subgraph, run npm run config:sync (or npm run codegen / npm run build, which invoke it) to regenerate src/config.ts.
  3. Rebuild the app and subgraph with the updated deployment configuration. everstrat-xyz/app/src/config/index.ts imports the same mainnet.json and maps its contracts entries to CONFIG.CONTRACTS; existing address values do not need to be copied into the app configuration by hand.

If a new contract type is added, update the app's CONFIG.CONTRACTS mapping as needed and the subgraph configuration and indexing code that consume it.

Last updated on

On this page