# @astraldao/astral-protocol-subgraph

> Subg

Latest version **0.0.46** (published 2020-12-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install @astraldao/astral-protocol-subgraph
pnpm add @astraldao/astral-protocol-subgraph
yarn add @astraldao/astral-protocol-subgraph
bun add @astraldao/astral-protocol-subgraph
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.46 |
| Published | 2020-12-17 |
| First published | 2020-11-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 60.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 24 |
| Author | AstralDAO |
| Maintainers | astralprotocol |

## Links

- npm: https://www.npmjs.com/package/@astraldao/astral-protocol-subgraph
- Repository: https://github.com/astralDAO/astralprotocol
- Homepage: https://github.com/astralDAO/astralprotocol#readme
- Issues: https://github.com/astralDAO/astralprotocol/issues
- npm.io page: https://npm.io/package/@astraldao/astral-protocol-subgraph

## Dependencies (2)

- [@graphprotocol/graph-ts](https://npm.io/package/@graphprotocol/graph-ts.md) ^0.19.0
- [@graphprotocol/graph-cli](https://npm.io/package/@graphprotocol/graph-cli.md) ^0.19.0

## Recent versions

- 0.0.46 (latest) — 2020-12-17
- 0.0.45 — 2020-12-01
- 0.0.44 — 2020-11-26
- 0.0.43 — 2020-11-26
- 0.0.42 — 2020-11-26
- 0.0.41 — 2020-11-24

## README

# astral-protocol-subgraph

## Running the subgraph locally

For more information see the docs on https://thegraph.com/docs/

### Prerequisites

- Run `sudo apt-get install libsecret-1-dev`
- [Docker Instalation](https://docs.docker.com/install/linux/docker-ce/debian/)
- Run `git clone https://github.com/graphprotocol/graph-node/` (check setup instructions for docker version)

### Deployment

1. Run a blockchain, e.g. ganache, in a separate terminal with the script in package.json (root folder): `yarn ganache`
2. Deploy contracts from `astral-protocol-contracts`with `yarn truffle` in the root folder. Update addresses in the subgraph configuration if needed
3. In a third terminal, on the graph-node folder, run `cd docker && docker-compose up`. If using Docker for WSL, Docker must be running on Windows. If graph-node throws an error try clearing the `data/postgres` folder, within the docker directory of graph-node, with `sudo rm -rf data/postgres`. Restart docker if needed (WSL)
4. Generate subgraph typescript files with `yarn codegen`, then create and deploy the subgraph to the graph-node with `yarn create-local && yarn deploy-local`

---
_Source: https://npm.io/package/@astraldao/astral-protocol-subgraph · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
