This project provides indexed data of domain name service for blockscout instances.
Here is brief overview of the project structure:
Service is multi-chain, meaning that only one instance of graph-node
, postgres
and bens-server
is required.
Subgraph Name | Network | TLD | Note |
---|---|---|---|
ens-subgraph | Ethereum | .eth | |
rns-subgraph | Rootstock | .rsk | |
genome-subgraph | Gnosis | .gno | SpaceID contracts |
bns-subgraph | Base | .base | |
mode-subgraph | Mode | .mode | SpaceID contracts |
lightlink-subgraph | Lightlink | .ll | SpaceID contracts |
zns-subgraph | Polygon | .poly | |
d3-connect-subgraph | Shibarium | .shib |
Variable | Required | Description | Default value |
---|---|---|---|
BENS__DATABASE__CONNECT__URL |
true | e.g. postgresql://postgres:postgres@localhost:5432/postgres |
|
BENS__DATABASE__CREATE_DATABASE |
false |
||
BENS__DATABASE__RUN_MIGRATIONS |
false |
||
BENS__SERVER__HTTP__ADDR |
0.0.0.0:8050 |
||
BENS__SERVER__HTTP__ENABLED |
true |
||
BENS__SERVER__HTTP__MAX_BODY_SIZE |
2097152 |
||
BENS__SUBGRAPHS_READER__REFRESH_CACHE_SCHEDULE |
0 0 * * * * |
||
BENS__TRACING__ENABLED |
true |
||
BENS__TRACING__FORMAT |
default |
-
Install just, dotenv-cli
-
Run commands:
just graph-node-start just deploy-subgraph ens-sepolia just run-dev
If you want to add your name service procol to blockscout you should:
-
Clone this
blockscout-rs
repo to add new protocol. -
Write subraph code: read subgraph writer guide
-
[OPTIONAL] if your protocol is based on SpaceID, read SpaceID integration section.
-
Add your protocol to deployment config config.json
-
Start graph-node (more in graph-node guide):
just graph-node-start
-
Deploy subgraph to graph-node (read more in how to deploy subgraphs guide)
just deploy-subgraph <protocol_name>
-
Add protocol to dev.json config and start
bens-server
connected to common database (read more in how to start bens guide)just run-dev
-
Check that
bens-server
responses with valid domains. You can find swagger docs at https://blockscout.github.io/swaggers/services/bens/main/index.html -
Add your protocol to list of supported domains
-
Update default config of BENS server for production and staging
-
Finally, create PR with:
- New directory inside
blockscout-ens/graph-node/subgraphs
with your subgraph code - Updated BENS config
- Updated supported domains list
- Result of indexed data: proof that your indexed subgraph contains correct amount of domains, resolved_addresses and so on
- New directory inside