-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into lok52/lookup-methods-verify
- Loading branch information
Showing
79 changed files
with
16,932 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
data | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
data | ||
node_modules | ||
*.ipynb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Graph-node | ||
|
||
`graph-node` indexes events in ethereum blockchain | ||
|
||
One can submit subgraph to `graph-node` -- actual code how to handle new events of contracts | ||
|
||
## Start locally | ||
|
||
+ Edit `docker-compose.yml` and change `ethereum` ENV variable of `graph-node` services to add your own network and RPC url. | ||
|
||
+ Start your own graph-node with docker-compose: | ||
|
||
```bash | ||
docker-compose up -d | ||
``` | ||
|
||
+ Load small version of ens-rainbow | ||
|
||
```bash | ||
./rainbow.small.sh | ||
``` | ||
|
||
+ Or use [full ens-rainbow](https://github.com/graphprotocol/ens-rainbow/) dump | ||
|
||
+ Read [subgraphs/README.md](./subgraphs/README.md) to build and deploy subgraph to graph-node |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
version: '3' | ||
services: | ||
graph-node: | ||
container_name: graph-node-dev | ||
image: graphprotocol/graph-node | ||
ports: | ||
- '8000:8000' | ||
- '8001:8001' | ||
- '8020:8020' | ||
- '8030:8030' | ||
- '8040:8040' | ||
depends_on: | ||
- ipfs | ||
- postgres | ||
extra_hosts: | ||
- host.docker.internal:host-gateway | ||
environment: | ||
postgres_host: postgres | ||
postgres_user: graph-node | ||
postgres_pass: let-me-in | ||
postgres_db: graph-node | ||
ipfs: 'ipfs:5001' | ||
ethereum: 'mainnet:https://api.zmok.io/mainnet/oaen6dy8ff6hju9k' | ||
GRAPH_LOG: info | ||
volumes: | ||
- ./gn-config.toml:/root/gn-config.toml | ||
ipfs: | ||
container_name: gn-ipfs-dev | ||
image: ipfs/kubo:v0.14.0 | ||
ports: | ||
- '5001:5001' | ||
volumes: | ||
- ./data/ipfs:/data/ipfs | ||
postgres: | ||
container_name: gn-postgres-dev | ||
image: postgres:14 | ||
ports: | ||
- '5432:5432' | ||
command: | ||
[ | ||
"postgres", | ||
"-cshared_preload_libraries=pg_stat_statements", | ||
"-cmax_connections=200" | ||
] | ||
environment: | ||
POSTGRES_USER: graph-node | ||
POSTGRES_PASSWORD: let-me-in | ||
POSTGRES_DB: graph-node | ||
# FIXME: remove this env. var. which we shouldn't need. Introduced by | ||
# <https://github.com/graphprotocol/graph-node/pull/3511>, maybe as a | ||
# workaround for https://github.com/docker/for-mac/issues/6270? | ||
PGDATA: "/var/lib/postgresql/data" | ||
POSTGRES_INITDB_ARGS: "-E UTF8 --locale=C" | ||
volumes: | ||
- ./data/postgres:/var/lib/postgresql/data | ||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[general] | ||
|
||
[store] | ||
[store.primary] | ||
connection = "postgresql://graph-node:let-me-in@postgres:5432/graph-node" | ||
weight = 1 | ||
pool_size = 10 | ||
|
||
[chains] | ||
ingestor = "block_ingestor_node" | ||
|
||
[deployment] | ||
[[deployment.rule]] | ||
shard = "primary" | ||
indexers = [ "default" ] |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Domains subgraph | ||
|
||
## Current supported domains | ||
|
||
+ `ens-subgraph`: Ethereum (.eth) | ||
+ `rns-subgraph`: Rootstock (.rsk) | ||
|
||
## To start | ||
|
||
> For every directory, it's posibble to deploy subgraph to blockscout graph-node | ||
|
||
1. Initially: | ||
|
||
```bash | ||
cd <subgraph_directory> | ||
just init | ||
just codegen | ||
just build | ||
``` | ||
|
||
2. Deploy to blockscout: | ||
|
||
+ Make sure you have access to graph, for example using port forwarding to staging graph-node: | ||
|
||
```bash | ||
kubectl port-forward -n graph-node svc/graph-node 8020:8020 | ||
``` | ||
|
||
+ Create subgraph | ||
|
||
```bash | ||
just create | ||
``` | ||
|
||
+ Push it to graph-node | ||
|
||
```bash | ||
just deploy-remote | ||
``` |
76 changes: 76 additions & 0 deletions
76
blockscout-ens/graph-node/subgraphs/ens-subgraph/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
# Graph cli generated | ||
src/types | ||
build/ | ||
.DS_STORE | ||
data | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
# Built output | ||
dist | ||
|
||
# Runtime data | ||
pids | ||
*.pid | ||
*.seed | ||
*.pid.lock | ||
|
||
# Directory for instrumented libs generated by jscoverage/JSCover | ||
lib-cov | ||
|
||
# Coverage directory used by tools like istanbul | ||
coverage | ||
|
||
# nyc test coverage | ||
.nyc_output | ||
|
||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) | ||
.grunt | ||
|
||
# Bower dependency directory (https://bower.io/) | ||
bower_components | ||
|
||
# node-waf configuration | ||
.lock-wscript | ||
|
||
# Compiled binary addons (https://nodejs.org/api/addons.html) | ||
build/Release | ||
|
||
# Dependency directories | ||
node_modules/ | ||
jspm_packages/ | ||
dist/ | ||
|
||
|
||
# TypeScript v1 declaration files | ||
typings/ | ||
|
||
# Optional npm cache directory | ||
.npm | ||
|
||
# Optional eslint cache | ||
.eslintcache | ||
|
||
# Optional REPL history | ||
.node_repl_history | ||
|
||
# Output of 'npm pack' | ||
*.tgz | ||
|
||
# Yarn Integrity file | ||
.yarn-integrity | ||
|
||
# dotenv environment variables file | ||
.env | ||
|
||
# next.js build output | ||
.next | ||
|
||
# intellij | ||
.idea | ||
|
||
/tests/.bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# ENS Subgraph | ||
|
||
> forked from [https://github.com/ensdomains/ens-subgraph](https://github.com/ensdomains/ens-subgraph) |
Oops, something went wrong.