Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomafrench/subgraph-template
https://github.com/tomafrench/subgraph-template
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/tomafrench/subgraph-template
- Owner: TomAFrench
- Created: 2021-02-08T22:42:05.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-04T14:22:50.000Z (almost 3 years ago)
- Last Synced: 2024-10-08T00:42:23.448Z (about 1 month ago)
- Language: TypeScript
- Size: 177 KB
- Stars: 1
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Subgraph Template
This template includes a general setup for getting started with subgraph development with template support for handling subgraphs which need to be deployed to a number of different networks.
## Automatic deploys
Through Github actions new versions of the subgraph can be automatically deployed once they are merged into the `master` and `staging` branches.
### Setup
In the settings page for your repository, open the secrets tab and create a secret with the name `GRAPH_ACCESS_TOKEN`. Paste in the access token from https://thegraph.com/explorer/dashboard as it's value
In `.github/graph.yaml` and `.github/graph-staging.yaml` update the value of the `GRAPH_SUBGRAPH_NAME` environment variable with the name of your subgraphs. It's recommended to add a `-staging` suffix to the name in `graph-staging.yaml`. Both these subgraphs must already exist, if not you can create them on your [Graph Dashboard](https://thegraph.com/explorer/dashboard)
### Security
Note that anyone with write access to this repository will be able to push new versions of subgraphs to any subgraph owned by the repository owner. Do not give write access to untrusted people if using automatic deploys.
To avoid this security issue you can set up an environment within the repositories settings page which will hold the value of `GRAPH_ACCESS_TOKEN`. This will allow you to review and approve any action runs which will have access to this.