Skip to content

Commit

Permalink
add subgraphs
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisCarriere committed Feb 28, 2025
1 parent 26e1208 commit 37d65f0
Show file tree
Hide file tree
Showing 12 changed files with 193 additions and 10 deletions.
8 changes: 4 additions & 4 deletions subgraphs/arbitrum-one/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ build:
.PHONY: deploy
deploy:
graph build
graph create --node=http://localhost:8020 erc20
graph deploy --node=http://localhost:8020 erc20
graph create --node=http://localhost:8020 erc20-arbone
graph deploy --node=http://localhost:8020 erc20-arbone

.PHONY: cache
cache:
substreams-sink-noop arbone.substreams.pinax.network:443 ../../ graph_out 0:
substreams-sink-noop arbone.substreams.pinax.network:443 ../ graph_out 1:

.PHONY: publish
publish:
make build
graph publish --subgraph-id '<INSERT SUBGRAPH ID>''
graph publish --subgraph-id ...
19 changes: 19 additions & 0 deletions subgraphs/arbitrum-one/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
specVersion: 1.2.0
description: Tracks ERC-20 token balances & transfers for EVM blockchains.
repository: https://github.com/pinax-network/substreams-erc20
schema:
file: ../schema.graphql
indexerHints:
prune: auto
dataSources:
- kind: substreams
name: erc20
network: matic
source:
startBlock: 1
package:
moduleName: graph_out
file: ../erc20-subgraph-v1.5.0.spkg
mapping:
kind: substreams/graph-entities
apiVersion: 0.0.7
22 changes: 22 additions & 0 deletions subgraphs/base/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.PHONY: all
all:
make build

.PHONY: build
build:
graph build

.PHONY: deploy
deploy:
graph build
graph create --node=http://localhost:8020 erc20-base
graph deploy --node=http://localhost:8020 erc20-base

.PHONY: cache
cache:
substreams-sink-noop base.substreams.pinax.network:443 ../ graph_out 1:

.PHONY: publish
publish:
make build
graph publish --subgraph-id ...
19 changes: 19 additions & 0 deletions subgraphs/base/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
specVersion: 1.2.0
description: Tracks ERC-20 token balances & transfers for EVM blockchains.
repository: https://github.com/pinax-network/substreams-erc20
schema:
file: ../schema.graphql
indexerHints:
prune: auto
dataSources:
- kind: substreams
name: erc20
network: base
source:
startBlock: 1
package:
moduleName: graph_out
file: ../erc20-subgraph-v1.5.0.spkg
mapping:
kind: substreams/graph-entities
apiVersion: 0.0.7
22 changes: 22 additions & 0 deletions subgraphs/bsc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.PHONY: all
all:
make build

.PHONY: build
build:
graph build

.PHONY: deploy
deploy:
graph build
graph create --node=http://localhost:8020 erc20-bsc
graph deploy --node=http://localhost:8020 erc20-bsc

.PHONY: cache
cache:
substreams-sink-noop bsc.substreams.pinax.network:443 ../ graph_out 1:

.PHONY: publish
publish:
make build
graph publish --subgraph-id ...
19 changes: 19 additions & 0 deletions subgraphs/bsc/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
specVersion: 1.2.0
description: Tracks ERC-20 token balances & transfers for EVM blockchains.
repository: https://github.com/pinax-network/substreams-erc20
schema:
file: ../schema.graphql
indexerHints:
prune: auto
dataSources:
- kind: substreams
name: erc20
network: bsc
source:
startBlock: 1
package:
moduleName: graph_out
file: ../erc20-subgraph-v1.5.0.spkg
mapping:
kind: substreams/graph-entities
apiVersion: 0.0.7
8 changes: 4 additions & 4 deletions subgraphs/mainnet/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ build:
.PHONY: deploy
deploy:
graph build
graph create --node=http://localhost:8020 erc20
graph deploy --node=http://localhost:8020 erc20
graph create --node=http://localhost:8020 erc20-eth
graph deploy --node=http://localhost:8020 erc20-eth

.PHONY: cache
cache:
substreams-sink-noop eth.substreams.pinax.network:443 ../ graph_out 0:
substreams-sink-noop eth.substreams.pinax.network:443 ../ graph_out 1:

.PHONY: publish
publish:
make build
graph publish --subgraph-id '<INSERT SUBGRAPH ID>''
graph publish --subgraph-id 7aw3rrZz7uhLFVQ7LDhM8BYCh59AFKqaiG9rxShwzVB8
4 changes: 2 additions & 2 deletions subgraphs/mainnet/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
specVersion: 1.2.0
description: Ethereum ERC-20
description: Tracks ERC-20 token balances & transfers for EVM blockchains.
repository: https://github.com/pinax-network/substreams-erc20
schema:
file: ../schema.graphql
indexerHints:
prune: never
prune: auto
dataSources:
- kind: substreams
name: erc20
Expand Down
22 changes: 22 additions & 0 deletions subgraphs/optimism/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.PHONY: all
all:
make build

.PHONY: build
build:
graph build

.PHONY: deploy
deploy:
graph build
graph create --node=http://localhost:8020 erc20-optimism
graph deploy --node=http://localhost:8020 erc20-optimism

.PHONY: cache
cache:
substreams-sink-noop optimism.substreams.pinax.network:443 ../ graph_out 1:

.PHONY: publish
publish:
make build
graph publish --subgraph-id ...
19 changes: 19 additions & 0 deletions subgraphs/optimism/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
specVersion: 1.2.0
description: Tracks ERC-20 token balances & transfers for EVM blockchains.
repository: https://github.com/pinax-network/substreams-erc20
schema:
file: ../schema.graphql
indexerHints:
prune: auto
dataSources:
- kind: substreams
name: erc20
network: optimism
source:
startBlock: 1
package:
moduleName: graph_out
file: ../erc20-subgraph-v1.5.0.spkg
mapping:
kind: substreams/graph-entities
apiVersion: 0.0.7
22 changes: 22 additions & 0 deletions subgraphs/polygon/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.PHONY: all
all:
make build

.PHONY: build
build:
graph build

.PHONY: deploy
deploy:
graph build
graph create --node=http://localhost:8020 erc20-matic
graph deploy --node=http://localhost:8020 erc20-matic

.PHONY: cache
cache:
substreams-sink-noop polygon.substreams.pinax.network:443 ../ graph_out 1:

.PHONY: publish
publish:
make build
graph publish --subgraph-id ...
19 changes: 19 additions & 0 deletions subgraphs/polygon/subgraph.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
specVersion: 1.2.0
description: Tracks ERC-20 token balances & transfers for EVM blockchains.
repository: https://github.com/pinax-network/substreams-erc20
schema:
file: ../schema.graphql
indexerHints:
prune: auto
dataSources:
- kind: substreams
name: erc20
network: matic
source:
startBlock: 1
package:
moduleName: graph_out
file: ../erc20-subgraph-v1.5.0.spkg
mapping:
kind: substreams/graph-entities
apiVersion: 0.0.7

0 comments on commit 37d65f0

Please sign in to comment.