Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
pxrl committed Jan 22, 2025
1 parent 8d562f4 commit 61f2d29
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,13 @@ const networks = Object.fromEntries(
.filter((chainId) => PUBLIC_NETWORKS[chainId] !== undefined)
.map((chainId) => {
const network = PUBLIC_NETWORKS[chainId];
const name = network.name.replace(" ", "").toLowerCase();
const hubChainId = Object.values(MAINNET_CHAIN_IDs).includes(chainId) ? CHAIN_IDs.MAINNET : CHAIN_IDs.SEPOLIA;
const url =
process.env[`NODE_URL_${chainId}`] ??
network.publicRPC ??

Check failure on line 72 in hardhat.config.ts

View workflow job for this annotation

GitHub Actions / Lint (20)

Property 'publicRPC' does not exist on type 'PublicNetwork'.

Check failure on line 72 in hardhat.config.ts

View workflow job for this annotation

GitHub Actions / Forge (20)

Property 'publicRPC' does not exist on type 'PublicNetwork'.

Check failure on line 72 in hardhat.config.ts

View workflow job for this annotation

GitHub Actions / Test (20)

Property 'publicRPC' does not exist on type 'PublicNetwork'.

Check failure on line 72 in hardhat.config.ts

View workflow job for this annotation

GitHub Actions / Forge (20)

Property 'publicRPC' does not exist on type 'PublicNetwork'.

Check failure on line 72 in hardhat.config.ts

View workflow job for this annotation

GitHub Actions / Lint (20)

Property 'publicRPC' does not exist on type 'PublicNetwork'.

Check failure on line 72 in hardhat.config.ts

View workflow job for this annotation

GitHub Actions / Test (20)

Property 'publicRPC' does not exist on type 'PublicNetwork'.
`error: no chain ${chainId} provider defined (set NODE_URL_${chainId})`;
const chainDef = {
url: network.publicRPC,
url,
accounts: { mnemonic },
saveDeployments: true,
chainId: hubChainId,
Expand All @@ -84,7 +87,7 @@ const networks = Object.fromEntries(
"https://zksync2-mainnet-explorer.zksync.io/contract_verification";
}

return [name, chainDef];
return [chainId, chainDef];
})
);

Expand Down

0 comments on commit 61f2d29

Please sign in to comment.