See: https://thegraph.com/docs/en/deploying/subgraph-studio/#publish-your-subgraphs
npm install -g @graphprotocol/graph-cliTo deploy any changes to a subgraph you must be authed with the specific deploy_key for that subgraph, ask a code owner for these keys before attempting to deploy.
graph auth --studio DEPLOY_KEYRequires Node 16 !
nvm useInstall
npm installPrepare subgraph.yaml for selected chain
npm run prep:mainnet || npm run prep:goerliCodegen
npm run codegenBuild Subgraph
npm run buildDeploy the Subgraph
npm run deploy:mainnet || npm run deploy:goerliGoerli Faucet for test GRT tokens
Must belong to the knownorigin github:
https://thegraph.com/hosted-service/subgraph/knownorigin/known-origin
https://thegraph.com/hosted-service/subgraph/knownorigin/known-origin-goerli
https://thegraph.com/hosted-service/subgraph/knownorigin/knownoriginrinkeby Deprecated
| Purpose | URL |
|---|---|
| Production (mainnet) | https://thegraph.com/explorer/subgraph/knownorigin/known-origin |
| Staging (mainnet) | https://thegraph.com/explorer/subgraph/knownorigin/known-origin-staging |
| Development (goerli) | https://thegraph.com/hosted-service/subgraph/knownorigin/known-origin-goerli |
| Alpha Studio (mainnet) | https://thegraph.com/studio/subgraph/known-origin |
graph init --from-contract <address> knownorigin/known-origin graph-known-originnpm install -g @graphprotocol/graph-cli
graph auth https://api.thegraph.com/deploy/ <auth-token>
graph auth https://api.thegraph.com/deploy/ <ACCESS_TOKEN>
Requires Node 16 !
Install
yarn installIf schema changes
yarn codegenCompile mappings
yarn buildPush that puppy!
yarn deploySee: https://thegraph.com/docs/en/developing/unit-testing-framework/
brew install postgresql
yarn test