Skip to content

Commit 61f2d29

Browse files
committed
Update
1 parent 8d562f4 commit 61f2d29

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

hardhat.config.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,13 @@ const networks = Object.fromEntries(
6666
.filter((chainId) => PUBLIC_NETWORKS[chainId] !== undefined)
6767
.map((chainId) => {
6868
const network = PUBLIC_NETWORKS[chainId];
69-
const name = network.name.replace(" ", "").toLowerCase();
7069
const hubChainId = Object.values(MAINNET_CHAIN_IDs).includes(chainId) ? CHAIN_IDs.MAINNET : CHAIN_IDs.SEPOLIA;
70+
const url =
71+
process.env[`NODE_URL_${chainId}`] ??
72+
network.publicRPC ??
73+
`error: no chain ${chainId} provider defined (set NODE_URL_${chainId})`;
7174
const chainDef = {
72-
url: network.publicRPC,
75+
url,
7376
accounts: { mnemonic },
7477
saveDeployments: true,
7578
chainId: hubChainId,
@@ -84,7 +87,7 @@ const networks = Object.fromEntries(
8487
"https://zksync2-mainnet-explorer.zksync.io/contract_verification";
8588
}
8689

87-
return [name, chainDef];
90+
return [chainId, chainDef];
8891
})
8992
);
9093

0 commit comments

Comments
 (0)