File tree 1 file changed +6
-3
lines changed
1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -66,10 +66,13 @@ const networks = Object.fromEntries(
66
66
. filter ( ( chainId ) => PUBLIC_NETWORKS [ chainId ] !== undefined )
67
67
. map ( ( chainId ) => {
68
68
const network = PUBLIC_NETWORKS [ chainId ] ;
69
- const name = network . name . replace ( " " , "" ) . toLowerCase ( ) ;
70
69
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 } )` ;
71
74
const chainDef = {
72
- url : network . publicRPC ,
75
+ url,
73
76
accounts : { mnemonic } ,
74
77
saveDeployments : true ,
75
78
chainId : hubChainId ,
@@ -84,7 +87,7 @@ const networks = Object.fromEntries(
84
87
"https://zksync2-mainnet-explorer.zksync.io/contract_verification" ;
85
88
}
86
89
87
- return [ name , chainDef ] ;
90
+ return [ chainId , chainDef ] ;
88
91
} )
89
92
) ;
90
93
You can’t perform that action at this time.
0 commit comments