Skip to content

Commit

Permalink
examples: add package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
azf20 committed Jun 13, 2023
1 parent bbaa4a0 commit 90e5d03
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 29 deletions.
4 changes: 3 additions & 1 deletion examples/substreams-powered-subgraph/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*.spkg
target/
.idea
src/pb/
src/pb/
node_modules/
yarn.lock
17 changes: 0 additions & 17 deletions examples/substreams-powered-subgraph/Makefile

This file was deleted.

16 changes: 5 additions & 11 deletions examples/substreams-powered-subgraph/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,13 @@ demonstration of the Graph Node integration, using `substreams_entity_change` ty
## Prerequisites

This
[requires the dependencies necessary for local Substreams development](https://substreams.streamingfast.io/developers-guide/installation-requirements),
as well as Graph CLI >=0.51.1:

```
npm install -g @graphprotocol/graph-cli
```
[requires the dependencies necessary for local Substreams development](https://substreams.streamingfast.io/developers-guide/installation-requirements).

## Quickstart

```
make protogen # create protobufs in /src/pb
make build # build substream
make package # pack substream
graph build # build subgraph
graph deploy # deploy subgraph
yarn install # install graph-cli
yarn substreams:prepare # build and package the substreams module
yarn subgraph:build # build the subgraph
yarn subgraph:deploy # deploy the subgraph
```
23 changes: 23 additions & 0 deletions examples/substreams-powered-subgraph/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "example-substreams-powered-subgraph",
"version": "0.1.0",
"repository": {
"type": "git",
"url": "https://github.com/graphprotocol/graph-tooling",
"directory": "examples/substreams-powered-subgraph"
},
"private": true,
"scripts": {
"subgraph:build": "graph build",
"subgraph:deploy": "graph deploy",
"substreams:build": "cargo build --target wasm32-unknown-unknown --release",
"substreams:clean": "rm -rf ./target && rm -rf ./src/pb",
"substreams:package": "substreams pack ./substreams.yaml",
"substreams:prepare": "yarn substreams:protogen && yarn substreams:build && yarn substreams:package",
"substreams:protogen": "substreams protogen ./substreams.yaml --exclude-paths='sf/substreams,google'",
"substreams:stream": "substreams run -e mainnet.eth.streamingfast.io:443 substreams.yaml graph_out -s 12292922 -t +10"
},
"devDependencies": {
"@graphprotocol/graph-cli": "0.51.1"
}
}

0 comments on commit 90e5d03

Please sign in to comment.