/perp-curie-subgraph

Perpetual Protocol Curie (v2) Subgraph

Primary LanguageTypeScriptBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

image

perp-curie-subgraph

Changelog

Changelog

Subgraphs

The Graph

Satsuma

Development

Checklist

  • scripts/updateABIs.ts
    • when adding new contracts, remember to include the newly added contract names to abiNames so it would be pre-processed

Deployment

Configure

Update scripts/updateConfigs.ts if we're using graft to speed up indexing.

Local Deploy

We will automatically trigger deployments in CI, but we can also deploy from a local machine.

npm i

# deploy to The Graph
npx graph auth --product hosted-service <THE_GRAPH_ACCESS_TOKEN>
# create a subgraph in the graph dashboard first (need GitHub admin permission)
npm run deploy-the-graph:optimism

# deploy to Satsuma
npm run codegen-satsuma:optimism
npx graph deploy perpetual-v2-optimism --version-label $(git rev-parse --short HEAD) --node https://app.satsuma.xyz/api/subgraphs/deploy --ipfs https://api.thegraph.com/ipfs/ --deploy-key <SATSUMA_DEPLOY_KEY>

Post Deploy

Wait until all three subgraphs are synced, then click "Promote to Live" button on the newly deployed version to enable it on Satsuma dashboard. Otherwise, clients might get different results from The Graph and Satsuma.


If any features/functionalities described in the Perpetual Protocol documentation, code comments, marketing, community discussion or announcements, pre-production or testing code, or other non-production-code sources, vary or differ from the code used in production, in case of any dispute, the code used in production shall prevail.