mm-eth 0.5.8__py3-none-any.whl → 0.5.10__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
mm_eth/ens.py CHANGED
@@ -20,17 +20,24 @@ def get_name(rpc_url: str, address: str, timeout: float = 5, proxy: str | None =
20
20
  w3 = get_w3(rpc_url, timeout=timeout, proxy=proxy)
21
21
  return Ok(w3.ens.name(w3.to_checksum_address(address))) # type: ignore[union-attr]
22
22
  except Exception as e:
23
- return Err(e)
23
+ error = str(e)
24
+ if not error:
25
+ error = e.__class__.__qualname__
26
+ return Err("exception: " + error)
24
27
 
25
28
 
26
29
  async def async_get_name(rpc_url: str, address: str, timeout: float = 5, proxy: str | None = None) -> Result[str | None]:
30
+ w3 = await get_async_w3(rpc_url, timeout=timeout, proxy=proxy)
27
31
  try:
28
- w3 = await get_async_w3(rpc_url, timeout=timeout, proxy=proxy)
29
32
  res = await w3.ens.name(w3.to_checksum_address(address)) # type: ignore[union-attr]
30
- await w3.provider.disconnect()
31
33
  return Ok(res)
32
34
  except Exception as e:
33
- return Err(e)
35
+ error = str(e)
36
+ if not error:
37
+ error = e.__class__.__qualname__
38
+ return Err("exception: " + error)
39
+ finally:
40
+ await w3.provider.disconnect()
34
41
 
35
42
 
36
43
  async def async_get_name_with_retries(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mm-eth
3
- Version: 0.5.8
3
+ Version: 0.5.10
4
4
  Requires-Python: >=3.12
5
5
  Requires-Dist: aiohttp-socks~=0.10.1
6
6
  Requires-Dist: mm-crypto-utils>=0.2.9
@@ -5,7 +5,7 @@ mm_eth/anvil.py,sha256=98RCfI7dEpxFBTV6UErYvubWVP3n0ctUFn1--4kZ84U,1603
5
5
  mm_eth/async_rpc.py,sha256=8rMtg3Hr6Pn7NaFROxxWsXQSM8wJ92EUYlOOoc6_TOk,2934
6
6
  mm_eth/constants.py,sha256=Cy_G-IleBH4gAZ4ok8AGHHlqmdW0ZM7ZldyVpzAfWLs,54
7
7
  mm_eth/deploy.py,sha256=SB3ruY808_5UnG8kHR34uVP66P3zOWZu0ImKD7UUv2s,691
8
- mm_eth/ens.py,sha256=amMs4xbBia1hVHKglKwqeheL_8NpukKNAZIsg65wpDA,1689
8
+ mm_eth/ens.py,sha256=x36ttvVtpwbi6iZ2AuPiOSRxz2WVoVVGLbMun_AmZgg,1918
9
9
  mm_eth/erc20.py,sha256=LZmTkjmXpN7sUhOtSLiTqb8Ubet9C9q32EQwTS78OqE,7378
10
10
  mm_eth/ethernodes.py,sha256=V4VVbC6Nr9jhwT7blxtLugXC5KfXqE8n-kP0VvGHbqo,3070
11
11
  mm_eth/json_encoder.py,sha256=S4oD-qfTVztMb4sRpY1puhBQwOBofTyQXWszmdXk4og,433
@@ -42,7 +42,7 @@ mm_eth/cli/cmd/wallet/private_key_cmd.py,sha256=Fv_2OLog1h32pIP7PJITwl_pHdy3BXva
42
42
  mm_eth/cli/examples/balances.toml,sha256=i_ALpiEcf8-0TFiUg1cgJhxxfHYeBl9x0b3tnUWjswU,421
43
43
  mm_eth/cli/examples/call_contract.toml,sha256=ZQWK-409V_vLIZ2bsRD5RCWPPzShPz2KJTTRQY4YaGw,248
44
44
  mm_eth/cli/examples/transfer.toml,sha256=8mWuphDquoSDJw-hb9VJqtonjmv3kJ5Ip8jJ4t5YnfM,1810
45
- mm_eth-0.5.8.dist-info/METADATA,sha256=8YvcBQc-8hK5tLsYKGyxmUtfLl9o8WeEXtn4verNNFY,244
46
- mm_eth-0.5.8.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
47
- mm_eth-0.5.8.dist-info/entry_points.txt,sha256=aGhpsozl8NIrkuUcX5fSgURCcDhr3ShUdeTSIrJq4oc,46
48
- mm_eth-0.5.8.dist-info/RECORD,,
45
+ mm_eth-0.5.10.dist-info/METADATA,sha256=nEXmDDRgaktmWuPWKrDuxSaVv0ppfYB6-wyxqApmy6c,245
46
+ mm_eth-0.5.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
47
+ mm_eth-0.5.10.dist-info/entry_points.txt,sha256=aGhpsozl8NIrkuUcX5fSgURCcDhr3ShUdeTSIrJq4oc,46
48
+ mm_eth-0.5.10.dist-info/RECORD,,