File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -281,12 +281,13 @@ def setup_web3(_logger=None):
281281
282282 web3 .middleware_onion .inject (geth_poa_middleware , layer = 0 )
283283
284- config_chain_id = get_config_chain_id ()
284+ if "PUBLIC_RPC" in os .environ :
285+ config_chain_id = get_config_chain_id ()
285286
286- if config_chain_id != web3 .eth .chain_id :
287- raise Exception (
288- f"Mismatch of chain IDs between configuration and events RPC! Config chain ID: { config_chain_id } and events chain ID: { web3 .eth .chain_id } "
289- )
287+ if config_chain_id != web3 .eth .chain_id :
288+ raise Exception (
289+ f"Mismatch of chain IDs between configuration and events RPC! Config chain ID: { config_chain_id } and events chain ID: { web3 .eth .chain_id } "
290+ )
290291
291292 return web3
292293
You can’t perform that action at this time.
0 commit comments