diff --git a/uniswap/uniswap.py b/uniswap/uniswap.py index 183c349..800dd85 100644 --- a/uniswap/uniswap.py +++ b/uniswap/uniswap.py @@ -132,8 +132,13 @@ def __init__( if enable_caching: self.w3.middleware_onion.inject(_get_eth_simple_cache_middleware(), layer=0) - - self.netid = int(self.w3.net.version) + + try: + self.netid = int(self.w3.net.version) + except ValueError: + # Happens when w3.net.version returns a hex representation of an int + self.netid = int(self.w3.net.version, 16) + if self.netid in _netid_to_name: self.netname = _netid_to_name[self.netid] else: pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy