diff --git a/spot-subgraph/README.md b/spot-subgraph/README.md index 12d43781..ec39daeb 100644 --- a/spot-subgraph/README.md +++ b/spot-subgraph/README.md @@ -4,7 +4,7 @@ The Graph is a tool for for indexing events emitted on the Ethereum blockchain. ``` Public graphql endpoint: -https://api.thegraph.com/subgraphs/name/ampleforth/spot +https://api.goldsky.com/api/public/project_cmgzjl03n004g5np20v5j3qpx/subgraphs/ampleforth-spot/prod/gn ``` ## Getting started @@ -26,13 +26,24 @@ Setup project: yarn ``` -To build and deploy the subgraph to the graph hosted service: +To build and deploy the subgraph to the goldsky's hosted service: ``` # local deployment ./scripts/deploy-local.sh sepolia ampleforth-spot-sepolia # prod deployment -./scripts/deploy.sh sepolia ampleforth-spot-sepolia -./scripts/deploy.sh mainnet ampleforth-spot -``` \ No newline at end of file + +You should have your own Goldsky API key to use with the Goldsky CLI. +Note you must set the (new) version to deploy to, and then update the tag separately. + +``` +./scripts/deploy.sh sepolia ampleforth-spot-sepolia +./scripts/deploy.sh mainnet ampleforth-spot +``` + +Once deployed, update the tag that frg-web-api looks for. + +``` +goldsky subgraph tag create / --tag prod +``` diff --git a/spot-subgraph/scripts/deploy.sh b/spot-subgraph/scripts/deploy.sh index 0c8bcfb8..519cd0c9 100755 --- a/spot-subgraph/scripts/deploy.sh +++ b/spot-subgraph/scripts/deploy.sh @@ -3,14 +3,4 @@ set -e yarn mustache ../spot-contracts/deployments/$1.json subgraph.template.yaml > ./subgraph.yaml -yarn codegen - -yarn build - -echo "NOTE: graph deploy to Alchemy fails when you redeploy with the same IPFS hash" - -# yarn graph auth $THE_GRAPH_API_KEY -# yarn graph deploy $2 -yarn graph deploy $2 \ - --node https://subgraphs.alchemy.com/api/subgraphs/deploy \ - --deploy-key $GRAPH_AUTH +goldsky subgraph deploy $2/$3 --path .