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..32380dd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # 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. +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. See [docs/networks-table.md](./docs/networks-table.md) for the up-to-date auto-generated networks table. ## Adding/updating a chain @@ -12,6 +12,7 @@ This repository manages a registry of networks in The Graph ecosystem. See [Rele ## Structure of the repository +- `docs/`: Contains docs and auto-generated networks table - `schemas/`: Contains the schema for the registry - `registry/`: Contains the networks JSONs (edit these) - `public`: Contains all generated registry versions (don't edit those) diff --git a/docs/networks-table.md b/docs/networks-table.md new file mode 100644 index 0000000..bad7b70 --- /dev/null +++ b/docs/networks-table.md @@ -0,0 +1,102 @@ +# The Graph Registry Networks + +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/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/src/generate_table.ts b/src/generate_table.ts new file mode 100644 index 0000000..880ddd9 --- /dev/null +++ b/src/generate_table.ts @@ -0,0 +1,100 @@ +import fs from "fs"; +import path from "path"; +import { loadNetworks } from "./utils/fs"; +import { Network } from "./types/registry"; + +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 `# The Graph Registry Networks\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();