Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add chains, update some endpoints #3

Merged
merged 9 commits into from
Nov 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/adding-a-chain.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Each chain should be defined as a JSON file in the `registry` directory with the

- `fullName` - Full display name (e.g., "Ethereum Mainnet", "BNB Smart Chain")

- `aliases` [optional] - Alternative names for the chain (e.g., ["ethereum", "eth", "eth-mainnet"])
- `aliases` [optional] - Alternative names for the chain (e.g., ["ethereum", "eth", "eth-mainnet"]). Aliases need to be unique

- `caip2Id` - [CAIP-2](https://chainagnostic.org/CAIPs/caip-2) chain identifier (e.g., "eip155:1", "near:mainnet")

Expand Down Expand Up @@ -102,7 +102,7 @@ Each chain should be defined as a JSON file in the `registry` directory with the

## Choosing a Chain ID

The chain ID should be unique and descriptive. Avoid using `mainnet` or `testnet` in the chain ID. Instead of `mychain-testnet` use `mychain-sepolia`.
The chain ID should be unique and descriptive. Avoid using `mainnet` or `testnet` in the chain ID where possible. Instead of `mychain-testnet` use `mychain-sepolia`. Instead of `mychain-mainnet` use `mychain`. More rules to come.

## Validation

Expand Down
7 changes: 4 additions & 3 deletions docs/using-the-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ More details on versioning can be found in the [README](https://github.com/graph
## Best Practices

- Use type generation from the JSON Schema for better development experience
- Avoid loading the registry on the client side - it can be quite large
- Cache the registry appropriately - it doesn't change frequently
- Avoid loading the registry on the client side more than once- it can be quite large
- Cache the registry appropriately for your use case - it doesn't change often

## Integration

To generate types from the corresponding JSON Schema, use the one of the many available tools:

- [quicktype](https://github.com/quicktype/quicktype) for many languages

```
> npx quicktype --lang go \
--visibility public \
Expand All @@ -41,11 +42,11 @@ To generate types from the corresponding JSON Schema, use the one of the many av
```

- [json-schema-to-typescript](https://github.com/bcherny/json-schema-to-typescript) for typescript

```
> npx json-schema-to-typescript \
--input TheGraphNetworksRegistrySchema_v1_0.json \
--output types/registry.d.ts
```

- [typify](https://github.com/oxidecomputer/typify) for Rust

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.4.0",
"version": "0.4.1",
"private": true,
"type": "module",
"scripts": {
Expand Down
14 changes: 12 additions & 2 deletions registry/eip155/arbitrum-nova.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,25 @@
"explorerUrls": ["https://nova-explorer.arbitrum.io"],
"rpcUrls": [
"https://nova.arbitrum.io/rpc",
"https://arbitrum-nova.publicnode.com"
"https://arbitrum-nova.publicnode.com",
"https://arbnova.rpc.pinax.network/v1/{PINAX_API_KEY}"
],
"apiUrls": [
{
"url": "https://arbitrum-nova.abi.pinax.network/api",
"kind": "etherscan"
}
],
"services": { "subgraphs": [{ "provider": "e&n" }] },
"services": {
"subgraphs": [{ "provider": "e&n" }],
"sps": [{ "provider": "e&n" }],
"firehose": [
{ "provider": "pinax", "url": "arbnova.firehose.pinax.network:443" }
],
"substreams": [
{ "provider": "pinax", "url": "arbnova.substreams.pinax.network:443" }
]
},
"networkType": "mainnet",
"relations": [{ "kind": "l2Of", "network": "mainnet" }],
"issuanceRewards": false,
Expand Down
16 changes: 14 additions & 2 deletions registry/eip155/astar-zkevm-mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,26 @@
"caip2Id": "eip155:3776",
"graphNode": { "protocol": "ethereum" },
"explorerUrls": ["https://astar-zkevm.explorer.startale.com"],
"rpcUrls": ["https://rpc.startale.com/astar-zkevm"],
"rpcUrls": [
"https://rpc.startale.com/astar-zkevm",
"https://zkastar.rpc.pinax.network/v1/{PINAX_API_KEY}"
],
"apiUrls": [
{
"url": "https://astar-zkevm.explorer.startale.com/api",
"kind": "etherscan"
}
],
"services": { "subgraphs": [{ "provider": "e&n" }] },
"services": {
"subgraphs": [{ "provider": "e&n" }],
"sps": [{ "provider": "e&n" }],
"firehose": [
{ "provider": "pinax", "url": "zkastar.firehose.pinax.network:443" }
],
"substreams": [
{ "provider": "pinax", "url": "zkastar.substreams.pinax.network:443" }
]
},
"networkType": "mainnet",
"relations": [{ "kind": "l2Of", "network": "mainnet" }],
"issuanceRewards": false,
Expand Down
2 changes: 1 addition & 1 deletion registry/eip155/aurora.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"nativeToken": "ETH",
"docsUrl": "https://doc.aurora.dev",
"genesis": {
"hash": "0x8058d7fe544fdcac6836faa5f84c68291da1773594216957374708a7109a6336",
"hash": "0x0475c3f1fb767b161d8691d243a8daa3ff1621c181d21ca215b327d72df7fd11",
"height": 0
},
"firehose": {
Expand Down
2 changes: 1 addition & 1 deletion registry/eip155/avalanche.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}
],
"genesis": {
"hash": "0xb77a5f60d341511367c4295fba0b59a3e0062b075ef1fc795066636604484fdc",
"hash": "0x31ced5b9beb7f8782b014660da0cb18cc409f121f408186886e1ca3e8eeca96b",
"height": 0
},
"firehose": {
Expand Down
1 change: 1 addition & 0 deletions registry/eip155/blast-mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
],
"services": {
"subgraphs": [{ "provider": "e&n" }],
"sps": [{ "provider": "e&n" }],
"firehose": [
{ "provider": "pinax", "url": "blast.firehose.pinax.network:443" }
],
Expand Down
2 changes: 1 addition & 1 deletion registry/eip155/boba-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"nativeToken": "ETH",
"docsUrl": "https://docs.boba.network",
"genesis": {
"hash": "0x4d26ddc947c7cea924d5ef272c1a5ef40a1dce5ca2cbbaccad59d33f2505a30d",
"hash": "0xc6171953a6a376ece6e33149686044f24f58a387ce2636a54e391d330b2326b5",
"height": 0
},
"firehose": {
Expand Down
35 changes: 35 additions & 0 deletions registry/eip155/celo-alfajores.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"id": "celo-alfajores",
"shortName": "Celo Alfajores",
"fullName": "Celo Alfajores Testnet",
"aliases": ["evm-44787", "celo-testnet"],
"caip2Id": "eip155:44787",
"networkType": "testnet",
"relations": [{ "kind": "testnetOf", "network": "celo" }],
"graphNode": { "protocol": "ethereum" },
"explorerUrls": ["https://alfajores.celoscan.io"],
"rpcUrls": [
"https://alfajores-forno.celo-testnet.org",
"https://alfajores.rpc.pinax.network/v1/{PINAX_API_KEY}"
],
"apiUrls": [
{
"url": "https://celo-alfajores.abi.pinax.network/api",
"kind": "etherscan"
}
],
"services": { "subgraphs": [{ "provider": "e&n" }] },
"issuanceRewards": false,
"nativeToken": "CELO",
"docsUrl": "https://docs.celo.org",
"genesis": {
"hash": "0xe423b034e7f0282c1b621f7bbc1cea4316a2a80b1600490769eae77777e4b67e",
"height": 0
},
"firehose": {
"blockType": "sf.ethereum.type.v2.Block",
"evmExtendedModel": false,
"bufUrl": "https://buf.build/streamingfast/firehose-ethereum",
"bytesEncoding": "hex"
}
}
2 changes: 1 addition & 1 deletion registry/eip155/eos-evm.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"relations": [{ "kind": "evmOf", "network": "eos" }],
"explorerUrls": ["https://explorer.evm.eosnetwork.com"],
"rpcUrls": [
"https://explorer.evm.eosnetwork.com/api/eth-rpc",
"https://api.evm.eosnetwork.com",
"https://eosevm.rpc.pinax.network/v1/{PINAX_API_KEY}"
],
"apiUrls": [
Expand Down
4 changes: 2 additions & 2 deletions registry/eip155/fantom-testnet.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "fantom-testnet",
"shortName": "Fantom",
"fullName": "Fantom Testnet",
"fullName": "Fantom Opera Testnet",
"aliases": ["evm-4002"],
"caip2Id": "eip155:4002",
"graphNode": { "protocol": "ethereum" },
Expand All @@ -20,7 +20,7 @@
"nativeToken": "FTM",
"docsUrl": "https://docs.fantom.foundation",
"genesis": {
"hash": "0x00000000000003e8c717f00dc4306a6ff72eabc9a6ec6e4a46bf6ba044ca88d2",
"hash": "0x00000000000000009a0c7349d44dc4d0f602a54e0a8543360c2fee4c3937b49e",
"height": 0
},
"firehose": {
Expand Down
9 changes: 4 additions & 5 deletions registry/eip155/fantom.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
{
"id": "fantom",
"shortName": "Fantom",
"fullName": "Fantom Mainnet",
"aliases": ["evm-250", "fantom-mainnet"],
"fullName": "Fantom Opera Mainnet",
"aliases": ["evm-250", "fantom-mainnet", "fantom-opera"],
"caip2Id": "eip155:250",
"graphNode": { "protocol": "ethereum" },
"explorerUrls": ["https://ftmscan.com"],
"rpcUrls": [
"https://rpc.ftm.tools",
"https://fantom.rpc.pinax.network/v1/{PINAX_API_KEY}",
"https://fantom.drpc.org"
"https://fantom.rpc.pinax.network/v1/{PINAX_API_KEY}"
],
"apiUrls": [
{ "url": "https://fantom.abi.pinax.network/api", "kind": "etherscan" }
Expand All @@ -26,7 +25,7 @@
}
],
"genesis": {
"hash": "0x00000000000003e83fddf1e9330f0a8691d9f0b2af57b38c3bb85488488a40df",
"hash": "0x0000000000000000c20dbfb2ec18ae20037c716f3ba2d9e1da768a9deca17cb4",
"height": 0
},
"firehose": {
Expand Down
4 changes: 2 additions & 2 deletions registry/eip155/fuse.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"explorerUrls": ["https://explorer.fuse.io"],
"rpcUrls": [
"https://rpc.fuse.io",
"https://fuse.rpc.pinax.network/v1/{PINAX_API_KEY}",
"https://fuse.drpc.org"
"https://fuse.rpc.pinax.network/v1/{PINAX_API_KEY}"
],
"apiUrls": [{ "url": "https://explorer.fuse.io/api", "kind": "blockscout" }],
"services": {
"subgraphs": [{ "provider": "e&n" }],
"sps": [{ "provider": "e&n" }],
"firehose": [
{ "provider": "pinax", "url": "fuse.firehose.pinax.network:443" }
],
Expand Down
3 changes: 2 additions & 1 deletion registry/eip155/holesky.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"https://holesky.otterscan.io"
],
"rpcUrls": [
"https://holesky.drpc.org",
"https://ethereum-holesky-rpc.publicnode.com",
"https://rpc.holesky.ethpandaops.io",
"https://holesky.rpc.pinax.network/v1/{PINAX_API_KEY}"
],
"apiUrls": [],
Expand Down
2 changes: 1 addition & 1 deletion registry/eip155/jungle4-evm.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"explorerUrls": ["https://explorer.testnet.evm.eosnetwork.com"],
"rpcUrls": [
"https://explorer.testnet.evm.eosnetwork.com/api/eth-rpc",
"https://api.testnet.evm.eosnetwork.com",
"https://jungle4evm.rpc.pinax.network/v1/{PINAX_API_KEY}"
],
"apiUrls": [
Expand Down
2 changes: 1 addition & 1 deletion registry/eip155/kaia-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"caip2Id": "eip155:1001",
"graphNode": { "protocol": "ethereum" },
"explorerUrls": ["https://kairos.kaiascan.io"],
"rpcUrls": ["https://public-en.kairos.node.kaia.io"],
"rpcUrls": ["https://public-en-kairos.node.kaia.io"],
"apiUrls": [],
"services": { "subgraphs": [{ "provider": "e&n" }] },
"networkType": "testnet",
Expand Down
2 changes: 1 addition & 1 deletion registry/eip155/mbase.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"caip2Id": "eip155:1287",
"graphNode": { "protocol": "ethereum" },
"explorerUrls": ["https://moonbase.moonscan.io"],
"rpcUrls": ["https://rpc.moonbase.moonbeam.network"],
"rpcUrls": ["https://rpc.api.moonbase.moonbeam.network"],
"apiUrls": [
{ "url": "https://moonbase.abi.pinax.network/api", "kind": "etherscan" }
],
Expand Down
3 changes: 1 addition & 2 deletions registry/eip155/mode-mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"explorerUrls": ["https://explorer.mode.network"],
"rpcUrls": [
"https://mainnet.mode.network",
"https://mode.rpc.pinax.network/v1/{PINAX_API_KEY}",
"https://mode.drpc.org"
"https://mode.rpc.pinax.network/v1/{PINAX_API_KEY}"
],
"apiUrls": [
{ "url": "https://explorer.mode.network/api", "kind": "etherscan" }
Expand Down
3 changes: 1 addition & 2 deletions registry/eip155/moonbeam.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"explorerUrls": ["https://moonbeam.moonscan.io"],
"rpcUrls": [
"https://rpc.api.moonbeam.network",
"https://moonbeam.rpc.pinax.network/v1/{PINAX_API_KEY}",
"https://moonbeam.drpc.org"
"https://moonbeam.rpc.pinax.network/v1/{PINAX_API_KEY}"
],
"apiUrls": [
{ "url": "https://moonbeam.abi.pinax.network/api", "kind": "etherscan" }
Expand Down
3 changes: 2 additions & 1 deletion registry/eip155/moonriver.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"explorerUrls": ["https://moonriver.moonscan.io"],
"rpcUrls": [
"https://rpc.api.moonriver.moonbeam.network",
"https://moonriver.drpc.org"
"https://moonriver.rpc.pinax.network/v1/{PINAX_API_KEY}",
"https://moonriver.public.blastapi.io"
],
"apiUrls": [
{ "url": "https://api-moonriver.moonscan.io/api", "kind": "etherscan" }
Expand Down
3 changes: 2 additions & 1 deletion registry/eip155/neox-testnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@
"evmExtendedModel": false,
"bufUrl": "https://buf.build/streamingfast/firehose-ethereum",
"bytesEncoding": "hex"
}
},
"icon": { "web3Icons": { "name": "neo-x" } }
}
3 changes: 2 additions & 1 deletion registry/eip155/neox.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
"evmExtendedModel": false,
"bufUrl": "https://buf.build/streamingfast/firehose-ethereum",
"bytesEncoding": "hex"
}
},
"icon": { "web3Icons": { "name": "neo-x" } }
}
5 changes: 4 additions & 1 deletion registry/eip155/optimism.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
"graphNode": { "protocol": "ethereum" },
"relations": [{ "kind": "l2Of", "network": "mainnet" }],
"explorerUrls": ["https://optimistic.etherscan.io"],
"rpcUrls": ["https://mainnet.optimism.io", "https://optimism.drpc.org"],
"rpcUrls": [
"https://mainnet.optimism.io",
"https://optimism-rpc.publicnode.com"
],
"apiUrls": [
{ "url": "https://optimism.abi.pinax.network/api", "kind": "etherscan" }
],
Expand Down
16 changes: 14 additions & 2 deletions registry/eip155/polygon-zkevm.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,27 @@
"graphNode": { "protocol": "ethereum" },
"relations": [{ "kind": "l2Of", "network": "mainnet" }],
"explorerUrls": ["https://zkevm.polygonscan.com"],
"rpcUrls": ["https://zkevm-rpc.com", "https://polygon-zkevm.drpc.org"],
"rpcUrls": [
"https://zkevm-rpc.com",
"https://polygonzk.rpc.pinax.network/v1/{PINAX_API_KEY}"
],
"apiUrls": [
{
"url": "https://polygon-zkevm.abi.pinax.network/api",
"kind": "etherscan"
}
],
"networkType": "mainnet",
"services": { "subgraphs": [{ "provider": "e&n" }] },
"services": {
"subgraphs": [{ "provider": "e&n" }],
"sps": [{ "provider": "e&n" }],
"firehose": [
{ "provider": "pinax", "url": "polygonzk.firehose.pinax.network:443" }
],
"substreams": [
{ "provider": "pinax", "url": "polygonzk.substreams.pinax.network:443" }
]
},
"issuanceRewards": false,
"nativeToken": "ETH",
"docsUrl": "https://polygon.technology/polygon-zkevm",
Expand Down
1 change: 1 addition & 0 deletions registry/eip155/scroll.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"apiUrls": [{ "url": "https://api.scrollscan.com/api", "kind": "etherscan" }],
"services": {
"subgraphs": [{ "provider": "e&n" }],
"sps": [{ "provider": "e&n" }],
"firehose": [
{ "provider": "pinax", "url": "scroll.firehose.pinax.network:443" }
],
Expand Down
2 changes: 1 addition & 1 deletion registry/eip155/sei-mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"caip2Id": "eip155:1329",
"graphNode": { "protocol": "ethereum" },
"explorerUrls": ["https://seitrace.com"],
"rpcUrls": ["https://evm-rpc.sei-apis.com"],
"rpcUrls": ["https://sei-evm-rpc.publicnode.com"],
"apiUrls": [
{ "url": "https://seitrace.com/pacific-1/api", "kind": "etherscan" }
],
Expand Down
Loading