diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8a7bc0e..b26b326 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -50,6 +50,9 @@ jobs: - name: Generate registry run: bun generate:public + - name: Generate table + run: bun generate:table + - name: Format run: bun format diff --git a/README.md b/README.md index dd5b630..6e06af3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,15 @@ # The Graph networks registry -This repository manages a registry of networks in The Graph ecosystem. See [Releases](https://github.com/pinax-network/supported-networks/releases) page for the latest version of the registry. +[![GitHub Release](https://img.shields.io/github/v/release/graphprotocol/networks-registry)](https://github.com/graphprotocol/networks-registry/releases/latest) + +This repository manages a registry of networks in The Graph ecosystem. + +See [Releases](https://github.com/graphprotocol/networks-registry/releases) page for the latest version of the registry. +See [Networks Table](./docs/networks-table.md) for an up-to-date auto-generated networks list. + +[Libraries](https://github.com/pinax-network/graph-networks-libs) for Typescript, Go and Rust. + +[Demo app](https://graph-networks-app.vercel.app/) for the registry. ## Adding/updating a chain @@ -14,6 +23,7 @@ This repository manages a registry of networks in The Graph ecosystem. See [Rele - `schemas/`: Contains the schema for the registry - `registry/`: Contains the networks JSONs (edit these) +- `docs/`: Contains docs and auto-generated networks table - `public`: Contains all generated registry versions (don't edit those) - `src/`: Contains scripts to validate networks JSONs and generate the resulting registry JSON @@ -71,9 +81,9 @@ In addition to the above, the JSON Schema is available at TheGraphNetworksRegist ## Registry Usage -In your application you can pull one of the registry JSONs above depending on your use case - whether it's pinned to a specific registry version, whether you allow backwards compatible schema changes or you just need the latest one. +In your application you can use one of the generated registry JSONs above depending on your use case. -Refer to [Using The Graph Networks Registry](./docs/using-the-registry.md) for more information and best practices. +Libraries for Typescript, Go and Rust [exist](https://github.com/pinax-network/graph-networks-libs) to make it easier to work with the registry. Typical use cases: @@ -84,6 +94,7 @@ Typical use cases: ## References +- [The Graph Networks Registry libraries](https://github.com/pinax-network/graph-networks-libs) - [Ethereum chains list](https://github.com/ethereum-lists/chains) - [CAIP-2 chain ids](https://chainagnostic.org/CAIPs/caip-2) - [Web3Icons](https://github.com/0xa3k5/web3icons/tree/main/raw-svgs/networks/branded) diff --git a/docs/networks-table.md b/docs/networks-table.md new file mode 100644 index 0000000..2cdb899 --- /dev/null +++ b/docs/networks-table.md @@ -0,0 +1,102 @@ +# Networks Registry v0.6.1 + +Auto-generated from the networks registry on every release. + +| ID | Network | Type | Indexing Rewards | Graph Node Protocol | Subgraphs | SpS | Firehose | Substreams | Explorer | Docs | +| :---------------------: | :---------------------: | :-------: | :--------------: | :-----------------: | :-------: | :-: | :------: | :--------: | :--------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------: | +| **mainnet** | Ethereum | _mainnet_ | ✅ | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://etherscan.io](https://etherscan.io) | [https://ethereum.org/en/developers/docs](https://ethereum.org/en/developers/docs) | +| **avalanche** | Avalanche C-Chain | _mainnet_ | ✅ | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://snowtrace.io](https://snowtrace.io) | [https://docs.avax.network](https://docs.avax.network) | +| **arbitrum-one** | Arbitrum One | _mainnet_ | ✅ | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://arbiscan.io](https://arbiscan.io) | [https://docs.arbitrum.io](https://docs.arbitrum.io) | +| **bsc** | BNB | _mainnet_ | ✅ | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://bscscan.com](https://bscscan.com) | [https://docs.bnbchain.org](https://docs.bnbchain.org) | +| **base** | Base | _mainnet_ | ✅ | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://base.blockscout.com](https://base.blockscout.com) | [https://docs.base.org](https://docs.base.org) | +| **optimism** | Optimism | _mainnet_ | ✅ | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://optimistic.etherscan.io](https://optimistic.etherscan.io) | [https://docs.optimism.io](https://docs.optimism.io) | +| **matic** | Polygon | _mainnet_ | ✅ | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://polygonscan.com](https://polygonscan.com) | [https://docs.polygon.technology](https://docs.polygon.technology) | +| **fuse** | Fuse | _mainnet_ | ✅ | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://explorer.fuse.io](https://explorer.fuse.io) | [https://docs.fuse.io](https://docs.fuse.io) | +| **scroll** | Scroll | _mainnet_ | ✅ | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://scrollscan.com](https://scrollscan.com) | [https://docs.scroll.io](https://docs.scroll.io) | +| **blast-mainnet** | Blast | _mainnet_ | ✅ | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://blastscan.io](https://blastscan.io) | [https://docs.blast.io](https://docs.blast.io) | +| **fantom** | Fantom Opera | _mainnet_ | ✅ | _ethereum_ | ✅ | | ✅ | ✅ | [https://ftmscan.com](https://ftmscan.com) | [https://docs.fantom.foundation](https://docs.fantom.foundation) | +| **boba-bnb** | Boba BNB | _mainnet_ | ✅ | _ethereum_ | ✅ | | ✅ | ✅ | [https://bnb.bobascan.com](https://bnb.bobascan.com) | [https://docs.boba.network](https://docs.boba.network) | +| **boba** | Boba | _mainnet_ | ✅ | _ethereum_ | ✅ | | ✅ | ✅ | [https://bobascan.com](https://bobascan.com) | [https://docs.boba.network](https://docs.boba.network) | +| **linea** | Linea | _mainnet_ | ✅ | _ethereum_ | ✅ | | ✅ | ✅ | [https://lineascan.build](https://lineascan.build) | [https://docs.linea.build](https://docs.linea.build) | +| **gnosis** | Gnosis | _mainnet_ | ✅ | _ethereum_ | ✅ | | | | [https://gnosisscan.io](https://gnosisscan.io) | [https://docs.gnosischain.com](https://docs.gnosischain.com) | +| **celo** | Celo | _mainnet_ | ✅ | _ethereum_ | ✅ | | | | [https://celoscan.io](https://celoscan.io) | [https://docs.celo.org](https://docs.celo.org) | +| **btc** | Bitcoin | _mainnet_ | | _substreams_ | ✅ | ✅ | ✅ | ✅ | [https://btcscan.org](https://btcscan.org) | [https://developer.bitcoin.org](https://developer.bitcoin.org) | +| **sepolia** | Ethereum Sepolia | _testnet_ | | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://sepolia.etherscan.io](https://sepolia.etherscan.io) | [https://sepolia.dev](https://sepolia.dev) | +| **holesky** | Ethereum Holesky | _testnet_ | | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://holesky.etherscan.io](https://holesky.etherscan.io) | [https://holesky.dev](https://holesky.dev) | +| **near-testnet** | Near | _testnet_ | | _near_ | ✅ | ✅ | ✅ | ✅ | [https://testnet.nearblocks.io](https://testnet.nearblocks.io) | [https://docs.near.org](https://docs.near.org) | +| **near-mainnet** | Near | _mainnet_ | | _near_ | ✅ | ✅ | ✅ | ✅ | [https://nearblocks.io](https://nearblocks.io) | [https://docs.near.org](https://docs.near.org) | +| **starknet-mainnet** | Starknet | _mainnet_ | | _starknet_ | ✅ | ✅ | ✅ | ✅ | [https://starkscan.co](https://starkscan.co) | [https://docs.starknet.io](https://docs.starknet.io) | +| **arweave-mainnet** | Arweave | _mainnet_ | | _arweave_ | ✅ | ✅ | ✅ | ✅ | [https://arscan.io](https://arscan.io) | [https://docs.arweave.org/developers](https://docs.arweave.org/developers) | +| **arbitrum-sepolia** | Arbitrum Sepolia | _testnet_ | | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://sepolia.arbiscan.io](https://sepolia.arbiscan.io) | [https://docs.arbitrum.io](https://docs.arbitrum.io) | +| **unichain-testnet** | Unichain Sepolia | _testnet_ | | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://unichain-sepolia.blockscout.com](https://unichain-sepolia.blockscout.com) | [https://docs.unichain.org](https://docs.unichain.org) | +| **mode-mainnet** | Mode | _mainnet_ | | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://explorer.mode.network](https://explorer.mode.network) | [https://docs.mode.network](https://docs.mode.network) | +| **arbitrum-nova** | Arbitrum Nova | _mainnet_ | | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://nova-explorer.arbitrum.io](https://nova-explorer.arbitrum.io) | [https://docs.arbitrum.io](https://docs.arbitrum.io) | +| **soneium-minato** | Soneium Minato | _testnet_ | | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://soneium-minato.blockscout.com](https://soneium-minato.blockscout.com) | [https://soneium.org/en/docs](https://soneium.org/en/docs) | +| **astar-zkevm-mainnet** | Astar zkEVM | _mainnet_ | | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://astar-zkevm.explorer.startale.com](https://astar-zkevm.explorer.startale.com) | [https://docs.astar.network/docs/getting-started](https://docs.astar.network/docs/getting-started) | +| **polygon-zkevm** | Polygon zkEVM | _mainnet_ | | _ethereum_ | ✅ | ✅ | ✅ | ✅ | [https://zkevm.polygonscan.com](https://zkevm.polygonscan.com) | [https://polygon.technology/polygon-zkevm](https://polygon.technology/polygon-zkevm) | +| **solana-mainnet-beta** | Solana | _mainnet_ | | _substreams_ | ✅ | ✅ | ✅ | ✅ | [http://explorer.solana.com](http://explorer.solana.com) | [https://solana.com/docs](https://solana.com/docs) | +| **solana-devnet** | Solana | _devnet_ | | _substreams_ | ✅ | ✅ | ✅ | ✅ | [https://explorer.solana.com/?cluster=devnet](https://explorer.solana.com/?cluster=devnet) | [https://solana.com/docs](https://solana.com/docs) | +| **moonbeam** | Moonbeam | _mainnet_ | | _ethereum_ | ✅ | | ✅ | ✅ | [https://moonbeam.moonscan.io](https://moonbeam.moonscan.io) | [https://docs.moonbeam.network](https://docs.moonbeam.network) | +| **chapel** | BNB Chapel | _testnet_ | | _ethereum_ | ✅ | | ✅ | ✅ | [https://testnet.bscscan.com](https://testnet.bscscan.com) | [https://docs.bnbchain.org](https://docs.bnbchain.org) | +| **moonriver** | Moonriver | _mainnet_ | | _ethereum_ | ✅ | | ✅ | ✅ | [https://moonriver.moonscan.io](https://moonriver.moonscan.io) | [https://docs.moonbeam.network](https://docs.moonbeam.network) | +| **polygon-amoy** | Polygon Amoy | _testnet_ | | _ethereum_ | ✅ | | ✅ | ✅ | [https://www.oklink.com/amoy](https://www.oklink.com/amoy) | [https://docs.polygon.technology](https://docs.polygon.technology) | +| **gravity-mainnet** | Gravity Alpha | _mainnet_ | | _ethereum_ | ✅ | | ✅ | ✅ | [https://explorer.gravity.xyz](https://explorer.gravity.xyz) | [https://docs.gravity.xyz](https://docs.gravity.xyz) | +| **xlayer-mainnet** | X Layer | _mainnet_ | | _ethereum_ | ✅ | | ✅ | ✅ | [https://www.oklink.com/xlayer](https://www.oklink.com/xlayer) | [https://www.okx.com/xlayer](https://www.okx.com/xlayer) | +| **sei-mainnet** | Sei | _mainnet_ | | _ethereum_ | ✅ | | ✅ | ✅ | [https://seitrace.com](https://seitrace.com) | [https://docs.seitrace.com](https://docs.seitrace.com) | +| **base-sepolia** | Base Sepolia | _testnet_ | | _ethereum_ | ✅ | | ✅ | ✅ | [https://sepolia.basescan.org](https://sepolia.basescan.org) | [https://docs.base.org](https://docs.base.org) | +| **scroll-sepolia** | Scroll Sepolia | _testnet_ | | _ethereum_ | ✅ | | ✅ | ✅ | [https://sepolia.scrollscan.com](https://sepolia.scrollscan.com) | [https://docs.scroll.io](https://docs.scroll.io) | +| **optimism-sepolia** | Optimism Sepolia | _testnet_ | | _ethereum_ | ✅ | | ✅ | ✅ | [https://optimism-sepolia.blockscout.com](https://optimism-sepolia.blockscout.com) | [https://docs.optimism.io](https://docs.optimism.io) | +| **blast-testnet** | Blast Sepolia | _testnet_ | | _ethereum_ | ✅ | | ✅ | ✅ | [https://sepolia.blastscan.io](https://sepolia.blastscan.io) | [https://docs.blast.io](https://docs.blast.io) | +| **boba-testnet** | Boba Sepolia | _testnet_ | | _ethereum_ | ✅ | | ✅ | ✅ | [https://testnet.bobascan.com](https://testnet.bobascan.com) | [https://docs.boba.network](https://docs.boba.network) | +| **jungle4** | EOS Jungle4 | _testnet_ | | _substreams_ | | | ✅ | ✅ | [https://jungle.bloks.io](https://jungle.bloks.io) | [https://jungletestnet.io](https://jungletestnet.io) | +| **telos-testnet** | Telos | _testnet_ | | _substreams_ | | | ✅ | ✅ | [https://explorer-test.telos.net](https://explorer-test.telos.net) | [https://docs.telos.net](https://docs.telos.net) | +| **wax** | WAX | _mainnet_ | | _substreams_ | | | ✅ | ✅ | [https://wax.bloks.io](https://wax.bloks.io) | [https://developer.wax.io](https://developer.wax.io) | +| **kylin** | EOS Kylin | _testnet_ | | _substreams_ | | | ✅ | ✅ | [https://kylin.bloks.io](https://kylin.bloks.io) | [https://docs.eosnetwork.com/docs/latest/quick-start/introduction](https://docs.eosnetwork.com/docs/latest/quick-start/introduction) | +| **eos** | EOS | _mainnet_ | | _substreams_ | | | ✅ | ✅ | [https://bloks.io](https://bloks.io) | [https://docs.eosnetwork.com/docs/latest/quick-start/introduction](https://docs.eosnetwork.com/docs/latest/quick-start/introduction) | +| **wax-testnet** | WAX | _testnet_ | | _substreams_ | | | ✅ | ✅ | [https://wax-test.bloks.io](https://wax-test.bloks.io) | [https://developer.wax.io](https://developer.wax.io) | +| **telos** | Telos | _mainnet_ | | _substreams_ | | | ✅ | ✅ | [https://explorer.telos.net](https://explorer.telos.net) | [https://docs.telos.net](https://docs.telos.net) | +| **eos-evm** | EOS EVM | _mainnet_ | | _ethereum_ | | | ✅ | ✅ | [https://explorer.evm.eosnetwork.com](https://explorer.evm.eosnetwork.com) | [https://eosnetwork.com/eos-evm](https://eosnetwork.com/eos-evm) | +| **xai** | Xai | _mainnet_ | | _ethereum_ | | | ✅ | ✅ | [https://explorer.xai-chain.net](https://explorer.xai-chain.net) | [https://docs.x.ai/docs](https://docs.x.ai/docs) | +| **jungle4-evm** | EOS EVM Jungle4 | _testnet_ | | _ethereum_ | | | ✅ | ✅ | [https://explorer.testnet.evm.eosnetwork.com](https://explorer.testnet.evm.eosnetwork.com) | [https://eosnetwork.com/eos-evm](https://eosnetwork.com/eos-evm) | +| **bnb-op** | opBNB | _mainnet_ | | _ethereum_ | | | ✅ | ✅ | [https://opbnbscan.com](https://opbnbscan.com) | [https://docs.bnbchain.org/bnb-opbnb](https://docs.bnbchain.org/bnb-opbnb) | +| **zora** | Zora | _mainnet_ | | _ethereum_ | | | ✅ | ✅ | [https://explorer.zora.energy](https://explorer.zora.energy) | [https://docs.zora.co](https://docs.zora.co) | +| **injective-mainnet** | Injective | _mainnet_ | | _cosmos_ | | | ✅ | ✅ | [https://explorer.injective.network](https://explorer.injective.network) | [https://docs.injective.network](https://docs.injective.network) | +| **mantra-mainnet** | Mantra | _mainnet_ | | _cosmos_ | | | ✅ | ✅ | [https://explorer.mantrachain.io/MANTRA-1](https://explorer.mantrachain.io/MANTRA-1) | [https://docs.mantrachain.io](https://docs.mantrachain.io) | +| **injective-testnet** | Injective | _testnet_ | | _cosmos_ | | | ✅ | ✅ | [https://testnet.explorer.injective.network](https://testnet.explorer.injective.network) | [https://docs.injective.network](https://docs.injective.network) | +| **mantra-testnet** | Mantra Dukong | _testnet_ | | _cosmos_ | | | ✅ | ✅ | [https://explorer.mantrachain.io/MANTRA-Dukong](https://explorer.mantrachain.io/MANTRA-Dukong) | [https://docs.mantrachain.io](https://docs.mantrachain.io) | +| **vara-testnet** | Vara | _testnet_ | | _substreams_ | | | ✅ | ✅ | | [https://wiki.vara.network](https://wiki.vara.network) | +| **vara-mainnet** | Vara | _mainnet_ | | _substreams_ | | | ✅ | ✅ | [https://vara.subscan.io](https://vara.subscan.io) | [https://wiki.vara.network](https://wiki.vara.network) | +| **starknet-testnet** | Starknet Sepolia | _testnet_ | | _starknet_ | | | ✅ | ✅ | [https://sepolia.starkscan.co](https://sepolia.starkscan.co) | [https://docs.starknet.io](https://docs.starknet.io) | +| **mainnet-cl** | Ethereum Beacon | _mainnet_ | | _substreams_ | | | ✅ | ✅ | | [https://ethereum.org/en/developers/docs/consensus-mechanisms](https://ethereum.org/en/developers/docs/consensus-mechanisms) | +| **sepolia-cl** | Ethereum Beacon Sepolia | _mainnet_ | | _substreams_ | | | ✅ | ✅ | | [https://ethereum.org/en/developers/docs/consensus-mechanisms](https://ethereum.org/en/developers/docs/consensus-mechanisms) | +| **holesky-cl** | Ethereum Beacon Holesky | _mainnet_ | | _substreams_ | | | ✅ | ✅ | | [https://ethereum.org/en/developers/docs/consensus-mechanisms](https://ethereum.org/en/developers/docs/consensus-mechanisms) | +| **etherlink-mainnet** | Etherlink | _mainnet_ | | _ethereum_ | ✅ | | | | [https://explorer.etherlink.com](https://explorer.etherlink.com) | [https://docs.etherlink.com](https://docs.etherlink.com) | +| **gravity-testnet** | Gravity Sepolia | _testnet_ | | _ethereum_ | ✅ | | | | [https://explorer-sepolia.gravity.xyz](https://explorer-sepolia.gravity.xyz) | [https://docs.gravity.xyz](https://docs.gravity.xyz) | +| **harmony** | Harmony | _mainnet_ | | _ethereum_ | ✅ | | | | [https://explorer.harmony.one/?shard=0](https://explorer.harmony.one/?shard=0) | [https://docs.harmony.one](https://docs.harmony.one) | +| **fuji** | Avalanche Fuji | _testnet_ | | _ethereum_ | ✅ | | | | [https://testnet.snowscan.xyz](https://testnet.snowscan.xyz) | [https://docs.avax.network](https://docs.avax.network) | +| **kaia-testnet** | Kaia Kairos | _testnet_ | | _ethereum_ | ✅ | | | | [https://kairos.kaiascan.io](https://kairos.kaiascan.io) | [https://docs.kaia.io](https://docs.kaia.io) | +| **zksync-era-sepolia** | zkSync Sepolia | _testnet_ | | _ethereum_ | ✅ | | | | [https://sepolia.explorer.zksync.io](https://sepolia.explorer.zksync.io) | [https://docs.zksync.io](https://docs.zksync.io) | +| **kaia** | Kaia | _mainnet_ | | _ethereum_ | ✅ | | | | [https://kaiascan.io](https://kaiascan.io) | [https://docs.kaia.io](https://docs.kaia.io) | +| **gnosis-chiado** | Gnosis Chiado | _testnet_ | | _ethereum_ | ✅ | | | | [https://blockscout.chiadochain.net](https://blockscout.chiadochain.net) | [https://docs.gnosischain.com](https://docs.gnosischain.com) | +| **mbase** | Moonbase Alpha | _testnet_ | | _ethereum_ | ✅ | | | | [https://moonbase.moonscan.io](https://moonbase.moonscan.io) | [https://docs.moonbeam.network/learn/platform/networks/moonbase](https://docs.moonbeam.network/learn/platform/networks/moonbase) | +| **rootstock** | Rootstock | _mainnet_ | | _ethereum_ | ✅ | | | | [https://rootstock.blockscout.com](https://rootstock.blockscout.com) | [https://dev.rootstock.io](https://dev.rootstock.io) | +| **boba-bnb-testnet** | Boba BNB | _testnet_ | | _ethereum_ | ✅ | | | | [https://bnb.testnet.bobascan.com](https://bnb.testnet.bobascan.com) | [https://docs.boba.network](https://docs.boba.network) | +| **neox-testnet** | Neo X | _testnet_ | | _ethereum_ | ✅ | | | | [https://xt4scan.ngd.network](https://xt4scan.ngd.network) | [https://xdocs.ngd.network](https://xdocs.ngd.network) | +| **clover** | CLV | _mainnet_ | | _ethereum_ | ✅ | | | | [https://clvscan.com](https://clvscan.com) | [https://docs.clv.org](https://docs.clv.org) | +| **mode-sepolia** | Mode Sepolia | _testnet_ | | _ethereum_ | ✅ | | | | [https://sepolia.explorer.mode.network](https://sepolia.explorer.mode.network) | [https://docs.mode.network](https://docs.mode.network) | +| **chiliz** | Chiliz | _mainnet_ | | _ethereum_ | ✅ | | | | [https://chiliscan.com](https://chiliscan.com) | [https://docs.chiliz.com](https://docs.chiliz.com) | +| **fuse-testnet** | Fuse | _testnet_ | | _ethereum_ | ✅ | | | | [https://explorer.fusespark.io](https://explorer.fusespark.io) | [https://docs.fuse.io](https://docs.fuse.io) | +| **etherlink-testnet** | Etherlink | _testnet_ | | _ethereum_ | ✅ | | | | [https://testnet.explorer.etherlink.com](https://testnet.explorer.etherlink.com) | [https://docs.etherlink.com](https://docs.etherlink.com) | +| **iotex** | IoTeX | _mainnet_ | | _ethereum_ | ✅ | | | | [https://iotexscan.io](https://iotexscan.io) | [https://docs.iotex.io](https://docs.iotex.io) | +| **zksync-era** | zkSync Era | _mainnet_ | | _ethereum_ | ✅ | | | | [https://explorer.zksync.io](https://explorer.zksync.io) | [https://docs.zksync.io](https://docs.zksync.io) | +| **xlayer-sepolia** | X Layer Sepolia | _testnet_ | | _ethereum_ | ✅ | | | | [https://www.oklink.com/xlayer-test](https://www.oklink.com/xlayer-test) | [https://www.okx.com/xlayer](https://www.okx.com/xlayer) | +| **aurora** | Aurora | _mainnet_ | | _ethereum_ | ✅ | | | | [https://explorer.aurora.dev](https://explorer.aurora.dev) | [https://doc.aurora.dev](https://doc.aurora.dev) | +| **sei-atlantic** | Sei Atlantic | _testnet_ | | _ethereum_ | ✅ | | | | [https://seitrace.com/?chain=atlantic-2](https://seitrace.com/?chain=atlantic-2) | [https://docs.seitrace.com](https://docs.seitrace.com) | +| **aurora-testnet** | Aurora | _testnet_ | | _ethereum_ | ✅ | | | | [https://explorer.testnet.aurora.dev](https://explorer.testnet.aurora.dev) | [https://doc.aurora.dev](https://doc.aurora.dev) | +| **fantom-testnet** | Fantom | _testnet_ | | _ethereum_ | ✅ | | | | [https://testnet.ftmscan.com](https://testnet.ftmscan.com) | [https://docs.fantom.foundation](https://docs.fantom.foundation) | +| **neox** | Neo X | _mainnet_ | | _ethereum_ | ✅ | | | | [https://xexplorer.neo.org](https://xexplorer.neo.org) | [https://xdocs.ngd.network](https://xdocs.ngd.network) | +| **chiliz-testnet** | Chiliz Spicy | _testnet_ | | _ethereum_ | ✅ | | | | [https://testnet.chiliscan.com](https://testnet.chiliscan.com) | [https://docs.chiliz.com](https://docs.chiliz.com) | +| **celo-alfajores** | Celo Alfajores | _testnet_ | | _ethereum_ | ✅ | | | | [https://alfajores.celoscan.io](https://alfajores.celoscan.io) | [https://docs.celo.org](https://docs.celo.org) | +| **linea-sepolia** | Linea Sepolia | _testnet_ | | _ethereum_ | ✅ | | | | [https://sepolia.lineascan.build](https://sepolia.lineascan.build) | [https://docs.linea.build](https://docs.linea.build) | +| **rootstock-testnet** | Rootstock | _testnet_ | | _ethereum_ | ✅ | | | | [https://rootstock-testnet.blockscout.com](https://rootstock-testnet.blockscout.com) | [https://dev.rootstock.io](https://dev.rootstock.io) | +| **cronos** | Cronos | _mainnet_ | | _ethereum_ | | | | | [https://explorer.cronos.org](https://explorer.cronos.org) | [https://docs.cronos.org](https://docs.cronos.org) | diff --git a/docs/using-the-registry.md b/docs/using-the-registry.md deleted file mode 100644 index 21330ee..0000000 --- a/docs/using-the-registry.md +++ /dev/null @@ -1,52 +0,0 @@ -# Using The Graph Networks Registry - -This guide explains how to integrate and use The Graph Networks Registry in your application. - -## Getting Started - -The links to both the latest Registry JSON and JSON Schema can be found on the [GitHub Releases](https://github.com/graphprotocol/networks-registry/releases) page. - -## Versioning - -- MAJOR version changes indicate breaking schema changes -- MINOR version changes add new optional fields or enum values -- PATCH version changes add or update network information - -The registry is available at several URLs depending on your versioning needs. - -- Use the latest version if you want the most up-to-date data and can handle breaking schema changes: `TheGraphNetworksRegistry.json` -- Use the latest major version to avoid breaking schema changes: `TheGraphNetworksRegistry_v1_x_x.json` -- Use the latest minor version if you want to stay on the same schema: `TheGraphNetworksRegistry_v1_2_x.json` -- Use a specific version if you want to pin to a specific registry version: `TheGraphNetworksRegistry_v1_2_3.json` - -More details on versioning can be found in the [README](https://github.com/graphprotocol/networks-registry#versioning). - -## Best Practices - -- Use type generation from the JSON Schema for better development experience -- 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 \ - TheGraphNetworksRegistrySchema_v1_0.json \ - -o registry.rs - -``` - -- [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 diff --git a/package.json b/package.json index 70a1cab..fcde26b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "0.6.0", + "version": "0.6.1", "private": true, "type": "module", "scripts": { @@ -13,6 +13,7 @@ "generate:types": "json2ts --input schemas/registry.schema.json --output src/types/registry.d.ts --cwd=schemas", "generate:registry": "bun run ./src/generate.ts", "generate:public": "bun run ./src/generate.ts registry public", + "generate:table": "bun run ./src/generate_table.ts", "all": "bun generate:types && bun validate && bun generate:registry && bun format && bun format:check" }, "devDependencies": { diff --git a/registry/eip155/arbitrum-one.json b/registry/eip155/arbitrum-one.json index c6324ec..ea555a2 100644 --- a/registry/eip155/arbitrum-one.json +++ b/registry/eip155/arbitrum-one.json @@ -37,7 +37,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/arbitrum", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/avalanche.json b/registry/eip155/avalanche.json index 4c37810..9b0ac37 100644 --- a/registry/eip155/avalanche.json +++ b/registry/eip155/avalanche.json @@ -32,7 +32,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/avalanche", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/base.json b/registry/eip155/base.json index b2956b4..4225fb1 100644 --- a/registry/eip155/base.json +++ b/registry/eip155/base.json @@ -34,7 +34,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/base", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/blast-mainnet.json b/registry/eip155/blast-mainnet.json index db93dfb..fd17db6 100644 --- a/registry/eip155/blast-mainnet.json +++ b/registry/eip155/blast-mainnet.json @@ -28,7 +28,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/blast", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/boba-bnb.json b/registry/eip155/boba-bnb.json index c0185e6..b47f16a 100644 --- a/registry/eip155/boba-bnb.json +++ b/registry/eip155/boba-bnb.json @@ -31,7 +31,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/bobabnb", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/boba.json b/registry/eip155/boba.json index 52dfb21..2983269 100644 --- a/registry/eip155/boba.json +++ b/registry/eip155/boba.json @@ -29,7 +29,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/boba", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/bsc.json b/registry/eip155/bsc.json index 0be5f8a..e58dd67 100644 --- a/registry/eip155/bsc.json +++ b/registry/eip155/bsc.json @@ -28,7 +28,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/binance", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/celo.json b/registry/eip155/celo.json index 11dfdbe..f9a8b2f 100644 --- a/registry/eip155/celo.json +++ b/registry/eip155/celo.json @@ -18,7 +18,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/celo", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/fantom.json b/registry/eip155/fantom.json index 3942d23..6159259 100644 --- a/registry/eip155/fantom.json +++ b/registry/eip155/fantom.json @@ -26,7 +26,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/fantom", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/fuse.json b/registry/eip155/fuse.json index b3c7460..d9d6f54 100644 --- a/registry/eip155/fuse.json +++ b/registry/eip155/fuse.json @@ -24,7 +24,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/fuse", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/gnosis.json b/registry/eip155/gnosis.json index c8bbba5..de659e2 100644 --- a/registry/eip155/gnosis.json +++ b/registry/eip155/gnosis.json @@ -23,7 +23,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/gnosis", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/linea.json b/registry/eip155/linea.json index d124d0a..6e9c740 100644 --- a/registry/eip155/linea.json +++ b/registry/eip155/linea.json @@ -27,7 +27,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/linea", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/mainnet.json b/registry/eip155/mainnet.json index 2ef3607..d3af161 100644 --- a/registry/eip155/mainnet.json +++ b/registry/eip155/mainnet.json @@ -35,7 +35,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/ethereum", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/matic.json b/registry/eip155/matic.json index 21a0f48..0b29a5f 100644 --- a/registry/eip155/matic.json +++ b/registry/eip155/matic.json @@ -31,7 +31,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/polygon", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "issuanceRewards": true, diff --git a/registry/eip155/mode-mainnet.json b/registry/eip155/mode-mainnet.json index 7787cde..99b1820 100644 --- a/registry/eip155/mode-mainnet.json +++ b/registry/eip155/mode-mainnet.json @@ -27,7 +27,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/mode", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/moonbeam.json b/registry/eip155/moonbeam.json index fd258a6..e3f82f6 100644 --- a/registry/eip155/moonbeam.json +++ b/registry/eip155/moonbeam.json @@ -25,7 +25,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/moonbeam", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/optimism.json b/registry/eip155/optimism.json index c268bea..0c74dc2 100644 --- a/registry/eip155/optimism.json +++ b/registry/eip155/optimism.json @@ -34,7 +34,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/optimism", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/rootstock.json b/registry/eip155/rootstock.json index 5aec3af..914f19c 100644 --- a/registry/eip155/rootstock.json +++ b/registry/eip155/rootstock.json @@ -18,7 +18,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/rootstock", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/scroll.json b/registry/eip155/scroll.json index 19001a7..aca8d41 100644 --- a/registry/eip155/scroll.json +++ b/registry/eip155/scroll.json @@ -26,7 +26,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/scroll", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/eip155/zora.json b/registry/eip155/zora.json index 38afe78..f8ac7c7 100644 --- a/registry/eip155/zora.json +++ b/registry/eip155/zora.json @@ -25,7 +25,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/zora", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/registry/starknet/starknet-mainnet.json b/registry/starknet/starknet-mainnet.json index 499b67d..c7f7ec7 100644 --- a/registry/starknet/starknet-mainnet.json +++ b/registry/starknet/starknet-mainnet.json @@ -31,7 +31,7 @@ "indexerDocsUrls": [ { "url": "https://docs.infradao.com/archive-nodes-101/starknet", - "description": "Arhchive Nodes 101" + "description": "Archive Nodes 101" } ], "genesis": { diff --git a/src/generate_table.ts b/src/generate_table.ts new file mode 100644 index 0000000..dfa90af --- /dev/null +++ b/src/generate_table.ts @@ -0,0 +1,101 @@ +import fs from "fs"; +import path from "path"; +import { loadNetworks } from "./utils/fs"; +import { Network } from "./types/registry"; +import { version } from "../package.json"; + +function generateMarkdownTable(networks: Network[]): string { + const headers = [ + "ID", + "Network", + "Type", + "Indexing Rewards", + "Graph Node Protocol", + "Subgraphs", + "SpS", + "Firehose", + "Substreams", + "Explorer", + "Docs", + ]; + + // header row with alignment + const headerRow = `| ${headers.join(" | ")} |`; + // center-align all columns using :---: + const alignmentRow = `| ${headers.map(() => ":---:").join(" | ")} |`; + + // Generate rows for each network + const rows = networks.map((network) => { + const services = network.services || {}; + return [ + `**${network.id}**`, + `${network.shortName} ${network.secondName ?? ""}`, + `*${network.networkType}*`, + network.issuanceRewards ? "✅" : "", + `*${ + network.graphNode?.protocol + ? network.graphNode.protocol + : network.services?.substreams?.length + ? "substreams" + : "" + }*`, + services.subgraphs?.length ? "✅" : "", + services.sps?.length ? "✅" : "", + services.firehose?.length ? "✅" : "", + services.substreams?.length ? "✅" : "", + network.explorerUrls?.[0] + ? `[${network.explorerUrls[0]}](${network.explorerUrls[0]})` + : "", + network.docsUrl ? `[${network.docsUrl}](${network.docsUrl})` : "", + ].join(" | "); + }); + + // Combine all parts + const tableContent = [ + headerRow, + alignmentRow, + ...rows.map((row) => `| ${row} |`), + ].join("\n"); + + // Create complete markdown content + return `# Networks Registry v${version}\n\nAuto-generated from the networks registry on every release.\n\n${tableContent}\n`; +} + +function main() { + const [, , networksDir = "registry", outputPath = "docs/networks-table.md"] = + process.argv; + + // Load networks + const networks = loadNetworks(networksDir); + console.log(`Loaded ${networks.length} networks`); + + networks.sort((a, b) => { + if (a.id == "mainnet") return -1; + if (b.id == "mainnet") return 1; + if (a.issuanceRewards !== b.issuanceRewards) { + return b.issuanceRewards ? 1 : -1; + } + const countServices = (network: Network) => { + return ["subgraphs", "sps", "firehose", "substreams"].reduce( + (count, service) => { + return count + (network.services?.[service]?.length ?? 0); + }, + 0, + ); + }; + return countServices(b) - countServices(a); + }); + + // Generate markdown content + const content = generateMarkdownTable(networks); + + // Ensure docs directory exists + const docsDir = path.dirname(outputPath); + fs.mkdirSync(docsDir, { recursive: true }); + + // Write the file + fs.writeFileSync(outputPath, content); + console.log(`Generated ${outputPath}`); +} + +main();