Skip to content

Commit ef65f6a

Browse files
committed
hide deprecated networks
1 parent cfef13d commit ef65f6a

3 files changed

Lines changed: 10 additions & 16 deletions

File tree

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,5 +103,6 @@
103103
"got@<11.8.5": ">=11.8.5",
104104
"glob-parent@<5.1.2": ">=5.1.2"
105105
}
106-
}
106+
},
107+
"packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0"
107108
}

packages/network/networkNames.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,14 @@ You can use this file as a reference to look up the correct network name slug a
99
| Network Name | Chain ID | Name Slug |
1010
| --- | --- | --- |
1111
| Ethereum | 1 | mainnet |
12-
| Ropsten | 3 | ropsten |
13-
| Rinkeby | 4 | rinkeby |
14-
| Goerli | 5 | goerli |
1512
| Optimism | 10 | optimism |
1613
| Telos | 40 | telos |
1714
| Telos Testnet | 41 | telos-testnet |
18-
| Kovan | 42 | kovan |
1915
| BNB Smart Chain | 56 | bsc |
20-
| Optimism Kovan | 69 | optimism-kovan |
2116
| BNB Smart Chain Testnet | 97 | bsc-testnet |
2217
| Gnosis Chain | 100 | gnosis |
2318
| Polygon | 137 | polygon |
2419
| XR1 | 273 | xr1 |
25-
| Optimism Goerli | 420 | optimism-goerli |
2620
| Polygon zkEVM | 1101 | polygon-zkevm |
2721
| Moonbeam | 1284 | moonbeam |
2822
| Moonbase Alpha | 1287 | moonbase-alpha |
@@ -51,14 +45,11 @@ You can use this file as a reference to look up the correct network name slug a
5145
| Avalanche | 43114 | avalanche |
5246
| SOMNIA Testnet | 50312 | somnia-testnet |
5347
| LAOS Sigma Testnet | 62850 | laos-sigma-testnet |
54-
| Polygon Mumbai | 80001 | mumbai |
5548
| Polygon Amoy | 80002 | amoy |
5649
| Blast | 81457 | blast |
57-
| Base Goerli | 84531 | base-goerli |
5850
| Base Sepolia | 84532 | base-sepolia |
5951
| Borne Testnet | 94984 | borne-testnet |
6052
| ETHERLINK Testnet | 128123 | etherlink-testnet |
61-
| Arbitrum Goerli | 421613 | arbitrum-goerli |
6253
| Arbitrum Sepolia | 421614 | arbitrum-sepolia |
6354
| Xai | 660279 | xai |
6455
| Sepolia | 11155111 | sepolia |

scripts/update-network-names-doc.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@ const outputPath = path.join(networkPath, 'networkNames.md')
88
const template = fs.readFileSync(templatePath, 'utf8')
99

1010
const networkObjs = Object.values(networks) as Array<{
11-
chainId:number,
12-
name:string,
13-
title?:string
11+
deprecated?: boolean,
12+
chainId: number,
13+
name: string,
14+
title?: string
1415
}>;
1516

16-
networkObjs.sort((a, b) => a.chainId - b.chainId);
17-
const lines:string[] = [];
17+
const activeNetworkObjs = networkObjs.filter(v => !v.deprecated).sort((a, b) => a.chainId - b.chainId)
18+
19+
const lines: string[] = [];
1820
lines.push(`| Network Name | Chain ID | Name Slug |`);
1921
lines.push(`| --- | --- | --- |`);
20-
for (const n of networkObjs) {
22+
for (const n of activeNetworkObjs) {
2123
lines.push(`| ${n.title} | ${n.chainId} | ${n.name} |`);
2224
}
2325

0 commit comments

Comments
 (0)