faster-eth-abi 5.2.5__cp310-cp310-win_amd64.whl → 5.2.6__cp310-cp310-win_amd64.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.
Binary file
@@ -72,7 +72,7 @@ def encode_signed(
72
72
  def encode_elements(item_encoder: "BaseEncoder", value: Sequence[Any]) -> bytes:
73
73
  tail_chunks = tuple(item_encoder(i) for i in value)
74
74
 
75
- items_are_dynamic = getattr(item_encoder, "is_dynamic", False)
75
+ items_are_dynamic: bool = getattr(item_encoder, "is_dynamic", False)
76
76
  if not items_are_dynamic or len(value) == 0:
77
77
  return b"".join(tail_chunks)
78
78
 
@@ -91,8 +91,9 @@ def encode_elements_dynamic(item_encoder: "BaseEncoder", value: Sequence[Any]) -
91
91
 
92
92
 
93
93
  def encode_uint_256(i: int) -> bytes:
94
- # An optimized version of the `encode_uint_256` in `encoding.py` which does not perform any validation.
95
- # We should not have any issues here unless you're encoding really really massive iterables.
94
+ # An optimized version of the `encode_uint_256` in `encoding.py` which
95
+ # does not perform any validation. We should not have any issues here
96
+ # unless you're encoding really really massive iterables.
96
97
  big_endian = int_to_big_endian(i)
97
98
  return big_endian.rjust(32, b"\x00")
98
99
 
Binary file
faster_eth_abi/grammar.py CHANGED
@@ -458,10 +458,11 @@ def normalize(type_str: TypeStr) -> TypeStr:
458
458
  :param type_str: The type string to be normalized.
459
459
  :returns: The canonical version of the input type string.
460
460
  """
461
- return TYPE_ALIAS_RE.sub(
462
- lambda match: TYPE_ALIASES[match.group(0)],
463
- type_str,
464
- )
461
+ return TYPE_ALIAS_RE.sub(__normalize, type_str)
462
+
463
+
464
+ def __normalize(match: re.Match[str]) -> str:
465
+ return TYPE_ALIASES[match.group(0)]
465
466
 
466
467
 
467
468
  parse: Final = visitor.parse
Binary file
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: faster_eth_abi
3
- Version: 5.2.5
4
- Summary: A fork of eth_abi: Python utilities for working with Ethereum ABI definitions, especially encoding and decoding, implemented in C.
3
+ Version: 5.2.6
4
+ Summary: A aster fork of eth_abi: Python utilities for working with Ethereum ABI definitions, especially encoding and decoding. Implemented in C.
5
5
  Home-page: https://github.com/BobTheBuidler/faster-eth-abi
6
6
  Author: The Ethereum Foundation
7
7
  Author-email: snakecharmers@ethereum.org
@@ -18,6 +18,7 @@ Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Programming Language :: Python :: 3.14
21
22
  Classifier: Programming Language :: Python :: Implementation :: CPython
22
23
  Requires-Python: >=3.8, <4
23
24
  Description-Content-Type: text/markdown
@@ -36,6 +37,8 @@ Requires-Dist: pre-commit>=3.4.0; extra == "dev"
36
37
  Requires-Dist: tox>=4.0.0; extra == "dev"
37
38
  Requires-Dist: twine; extra == "dev"
38
39
  Requires-Dist: wheel; extra == "dev"
40
+ Requires-Dist: pytest-codspeed; extra == "dev"
41
+ Requires-Dist: pytest-benchmark; extra == "dev"
39
42
  Requires-Dist: sphinx>=6.0.0; extra == "dev"
40
43
  Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "dev"
41
44
  Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "dev"
@@ -74,6 +77,20 @@ Dynamic: requires-dist
74
77
  Dynamic: requires-python
75
78
  Dynamic: summary
76
79
 
80
+ ### I forked eth-abi and compiled it to C. It does the same stuff, now faster
81
+
82
+ [![PyPI](https://img.shields.io/pypi/v/faster-eth-abi.svg?logo=Python&logoColor=white)](https://pypi.org/project/faster-eth-abi/)
83
+ [![Monthly Downloads](https://img.shields.io/pypi/dm/faster-eth-abi)](https://pypistats.org/packages/faster-eth-abi)
84
+ [![Codspeed.io Status](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/BobTheBuidler/faster-eth-abi)
85
+
86
+ ##### This fork will be kept up-to-date with [eth-abi](https://github.com/ethereum/eth-abi). I will pull updates as they are released and push new [faster-eth-abi](https://github.com/BobTheBuidler/faster-eth-abi) releases to [PyPI](https://pypi.org/project/faster-eth-abi/).
87
+
88
+ ##### You can find the compiled C code on faster-eth-abi [master](https://github.com/BobTheBuidler/eth-abi/tree/master) branch.
89
+
90
+ ##### We benchmark `faster-eth-abi` against the original `eth-abi` for your convenience. [See results](https://github.com/BobTheBuidler/faster-eth-abi/tree/master/benchmarks/results).
91
+
92
+ ##### The original eth-abi readme is below:
93
+
77
94
  # Ethereum Contract Interface (ABI) Utility
78
95
 
79
96
  [![Join the conversation on Discord](https://img.shields.io/discord/809793915578089484?color=blue&label=chat&logo=discord&logoColor=white)](https://discord.gg/GHryRvPB84)
@@ -0,0 +1,42 @@
1
+ c42f5c78bc058f310136__mypyc.cp310-win_amd64.pyd,sha256=uup4eMVZocjDyA20d8wGOCXy8B-4qT5Vagr6u6-Hd5A,146432
2
+ faster_eth_abi/__init__.py,sha256=JpTfPTiusUGMmX8sEsGAxvILxFbvhh3MEyfiKOd5o9g,217
3
+ faster_eth_abi/_codec.cp310-win_amd64.pyd,sha256=NUf17SE-4mkrksmmhcjAK8_rShKUejcyN-nci-bagiA,10752
4
+ faster_eth_abi/_codec.py,sha256=mEjPRDPbpT67gc3HlzM8xAQ7uDOLwVRqQq5-dbwXZ1g,2543
5
+ faster_eth_abi/_encoding.cp310-win_amd64.pyd,sha256=D1p8GJA9vwf8MOflPZEfgkAp06HthGtAf168NhmovhE,10752
6
+ faster_eth_abi/_encoding.py,sha256=157A_MltVLCEwBmD7SB8UaKXkAOtIKC5MVupk6dk_yA,3217
7
+ faster_eth_abi/abi.cp310-win_amd64.pyd,sha256=thfKz-7_RSXlrqUGg2JqEv-UQwJZvHDGAw-ylecHKS4,10752
8
+ faster_eth_abi/abi.py,sha256=-t9OVBSCxy6SuWpCu3cxHrCqkx8_svPIRb0MSFXEl5Q,383
9
+ faster_eth_abi/base.py,sha256=y4IXpQJWGfUISl3xjCO420Grxido3tE2ebPV2rK-DvM,1229
10
+ faster_eth_abi/codec.py,sha256=e1uO8BJrXRn0Ih70eUa5qipD2wcg2aZSR4fyVuGpFoY,4580
11
+ faster_eth_abi/constants.cp310-win_amd64.pyd,sha256=h6mXM6A5aUTGr53XTjqgqdOowJR7oV8TtEIChEo8_QA,10752
12
+ faster_eth_abi/constants.py,sha256=q3FGynS-Eb78cnrL6mBoAvTDz16PF3tW2OylTMd6ajs,114
13
+ faster_eth_abi/decoding.py,sha256=w98AsF5cq5DXE9OVflfkVLpMeCRbxzZuIj0hFPJcJNc,17910
14
+ faster_eth_abi/encoding.py,sha256=vlFlvohYCUCGtvxhIih3apDuCA5FPu-D_qH7UiaiFTQ,18805
15
+ faster_eth_abi/exceptions.py,sha256=KzNYRc9t0CvlkveozWvLeo1WC_GarcBkwzV67aY_5yI,3067
16
+ faster_eth_abi/from_type_str.cp310-win_amd64.pyd,sha256=qfMS0VBRFAE1xo9QsmwhdmgYqXppSgjypVhGjxO0RrE,10752
17
+ faster_eth_abi/from_type_str.py,sha256=WLRP3OIyrJORgloX-7V0x2KdrZj0kLay-J9I8f-H36s,4446
18
+ faster_eth_abi/grammar.py,sha256=A3t6TvDzAkIvsZTsHrJVxSjI02gJPP79tXj6GfJQZ50,13837
19
+ faster_eth_abi/io.py,sha256=E_QX7aYAjGYnkNAZmJMmSmx1lqvl_FDNmMFruTi9UX4,3831
20
+ faster_eth_abi/packed.cp310-win_amd64.pyd,sha256=MevEmrE4qbS72MwhK1cZDGwAgzZRKIXAe5ym0LwbEJA,10752
21
+ faster_eth_abi/packed.py,sha256=RZ2chvsx9_AL9OxY1ixHTsaUJHaR_tmrNdViOIp-xSg,316
22
+ faster_eth_abi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
+ faster_eth_abi/registry.py,sha256=gU5-k_1eYUjs7-NAKoH9nncCJ36tZZHM5ZXvwmXt0cw,21192
24
+ faster_eth_abi/tools/__init__.cp310-win_amd64.pyd,sha256=kqITTYOqCiiZf-Zam7-iQFuJVJVhGPq-KeKXeZlQ5rA,10752
25
+ faster_eth_abi/tools/__init__.py,sha256=jxyQnb34ldRjCTYi3Ajb5h5QlFQ6ODfKQNhOCVwR7Ao,54
26
+ faster_eth_abi/tools/_strategies.cp310-win_amd64.pyd,sha256=laQWgwFXRnccBa-qa1PkbmT5vjG7IvfL2lHmIXN1PHc,10752
27
+ faster_eth_abi/tools/_strategies.py,sha256=HCFdQFLa84SMf7Deui2-szTH34hxTfc0Rog_kmpTg_w,6197
28
+ faster_eth_abi/utils/__init__.cp310-win_amd64.pyd,sha256=pV6Cc9zLjd_2NtzeIbf1l3La7Q0c14GmSReGfz9JEXg,10752
29
+ faster_eth_abi/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
+ faster_eth_abi/utils/numeric.cp310-win_amd64.pyd,sha256=fCx3qGk5hYTwRg2i9fqVAQ9BL--pjgHHRsCYzFc8Mgs,10752
31
+ faster_eth_abi/utils/numeric.py,sha256=hNGble1NA99_5hrAOnH0ZakCuHc6PFMC1p0olmpo_vM,2232
32
+ faster_eth_abi/utils/padding.cp310-win_amd64.pyd,sha256=2Nfg501C_PWHakJunlZlR8abJ5g-uhizNgEeaGbNmdM,10752
33
+ faster_eth_abi/utils/padding.py,sha256=k6dkOiQ3k0OhQUZ6blCiL1VOQVYGyynucafbySjcFfY,515
34
+ faster_eth_abi/utils/string.cp310-win_amd64.pyd,sha256=jD5iwHRgBnydm8g48l0V83B9LuRpjHYu54uvgafzLlg,10752
35
+ faster_eth_abi/utils/string.py,sha256=wYcvWof4kuitrGGSe_NOduQaxE4HHYmpraCPXKcZxMs,455
36
+ faster_eth_abi/utils/validation.cp310-win_amd64.pyd,sha256=SZ2YQtNkLLKxSJ4bDLgfaE32MPdqHmtMGSZXKcVoW0I,10752
37
+ faster_eth_abi/utils/validation.py,sha256=9veO7wyQsmcFgeaGrsKdSifjV1gaXfTDDKAt1EbKHYY,539
38
+ faster_eth_abi-5.2.6.dist-info/licenses/LICENSE,sha256=Q1lDDWXR057JL2Y7HTAwclCF32_LCloN4sGUkXO1YeI,1127
39
+ faster_eth_abi-5.2.6.dist-info/METADATA,sha256=W9ZLJ-Wv0sABAA7UMJ0qd6XWro46mMpsG7tlnjTXV4w,5497
40
+ faster_eth_abi-5.2.6.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
41
+ faster_eth_abi-5.2.6.dist-info/top_level.txt,sha256=5cP87jVHTOdG5bgQZ3ws5MGsnIwm_yX-WalM08iynHc,51
42
+ faster_eth_abi-5.2.6.dist-info/RECORD,,
@@ -1,42 +0,0 @@
1
- c42f5c78bc058f310136__mypyc.cp310-win_amd64.pyd,sha256=L2NHIpeyq0IJSjPbYKId8CWevtb8SmaGLK9aKNAp_84,145920
2
- faster_eth_abi/__init__.py,sha256=JpTfPTiusUGMmX8sEsGAxvILxFbvhh3MEyfiKOd5o9g,217
3
- faster_eth_abi/_codec.cp310-win_amd64.pyd,sha256=4raAcFtkfaSyg2thQn5KKg4NasbzbnOK_rNSyeZQnmc,10752
4
- faster_eth_abi/_codec.py,sha256=mEjPRDPbpT67gc3HlzM8xAQ7uDOLwVRqQq5-dbwXZ1g,2543
5
- faster_eth_abi/_encoding.cp310-win_amd64.pyd,sha256=53A6dtMjSm76bxwTxcj8wTbMpxv7LIfht_I0QcQNhw8,10752
6
- faster_eth_abi/_encoding.py,sha256=YwtCHxSIVXHBiqQxz78kPIjCSf352if38mVeFstE-04,3204
7
- faster_eth_abi/abi.cp310-win_amd64.pyd,sha256=i_4tqIEuNLgiBkx8__wETyXzfcWojETK_5tm4PJjS9o,10752
8
- faster_eth_abi/abi.py,sha256=-t9OVBSCxy6SuWpCu3cxHrCqkx8_svPIRb0MSFXEl5Q,383
9
- faster_eth_abi/base.py,sha256=y4IXpQJWGfUISl3xjCO420Grxido3tE2ebPV2rK-DvM,1229
10
- faster_eth_abi/codec.py,sha256=e1uO8BJrXRn0Ih70eUa5qipD2wcg2aZSR4fyVuGpFoY,4580
11
- faster_eth_abi/constants.cp310-win_amd64.pyd,sha256=JxesQlG-DKLHAoJKEOlMV1CjB6uPwJldj72jBJqTwuM,10752
12
- faster_eth_abi/constants.py,sha256=q3FGynS-Eb78cnrL6mBoAvTDz16PF3tW2OylTMd6ajs,114
13
- faster_eth_abi/decoding.py,sha256=w98AsF5cq5DXE9OVflfkVLpMeCRbxzZuIj0hFPJcJNc,17910
14
- faster_eth_abi/encoding.py,sha256=vlFlvohYCUCGtvxhIih3apDuCA5FPu-D_qH7UiaiFTQ,18805
15
- faster_eth_abi/exceptions.py,sha256=KzNYRc9t0CvlkveozWvLeo1WC_GarcBkwzV67aY_5yI,3067
16
- faster_eth_abi/from_type_str.cp310-win_amd64.pyd,sha256=S7jjCQktYytUriNGsJrs-HN03_CUo3_msI1tJL0sQiQ,10752
17
- faster_eth_abi/from_type_str.py,sha256=WLRP3OIyrJORgloX-7V0x2KdrZj0kLay-J9I8f-H36s,4446
18
- faster_eth_abi/grammar.py,sha256=mB68n7WuFvQB8lh5zPZEO36fOXGfj3gEnNP6yWFHvQo,13802
19
- faster_eth_abi/io.py,sha256=E_QX7aYAjGYnkNAZmJMmSmx1lqvl_FDNmMFruTi9UX4,3831
20
- faster_eth_abi/packed.cp310-win_amd64.pyd,sha256=f-4_kwlmgZ480niK_bHG_bzvHCQXmtGEiaYalauyiIs,10752
21
- faster_eth_abi/packed.py,sha256=RZ2chvsx9_AL9OxY1ixHTsaUJHaR_tmrNdViOIp-xSg,316
22
- faster_eth_abi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
- faster_eth_abi/registry.py,sha256=gU5-k_1eYUjs7-NAKoH9nncCJ36tZZHM5ZXvwmXt0cw,21192
24
- faster_eth_abi/tools/__init__.cp310-win_amd64.pyd,sha256=Tyt5KC6j1U4OHQA8P93nYajJ3mMdHbKPBBEuu4GEVQ0,10752
25
- faster_eth_abi/tools/__init__.py,sha256=jxyQnb34ldRjCTYi3Ajb5h5QlFQ6ODfKQNhOCVwR7Ao,54
26
- faster_eth_abi/tools/_strategies.cp310-win_amd64.pyd,sha256=DhL96ybzf5IuXKq_X8dCCp3sHnDtlwfPQ66C5ji3DNE,10752
27
- faster_eth_abi/tools/_strategies.py,sha256=HCFdQFLa84SMf7Deui2-szTH34hxTfc0Rog_kmpTg_w,6197
28
- faster_eth_abi/utils/__init__.cp310-win_amd64.pyd,sha256=FAtFblEAT3loulDtxEor9shO5CxM4KNXplnAytfmFyY,10752
29
- faster_eth_abi/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
- faster_eth_abi/utils/numeric.cp310-win_amd64.pyd,sha256=hgjzvBNu2l4TCpKRCVrpEq6BRgRgfHkIV8jnPe96V_o,10752
31
- faster_eth_abi/utils/numeric.py,sha256=hNGble1NA99_5hrAOnH0ZakCuHc6PFMC1p0olmpo_vM,2232
32
- faster_eth_abi/utils/padding.cp310-win_amd64.pyd,sha256=KrzZIJonkIfAFvBWKS4ycvemjMmFTffCmusQ4ePc7F4,10752
33
- faster_eth_abi/utils/padding.py,sha256=k6dkOiQ3k0OhQUZ6blCiL1VOQVYGyynucafbySjcFfY,515
34
- faster_eth_abi/utils/string.cp310-win_amd64.pyd,sha256=RRCyAofLJLsERdMdYvBtK3sx2lrEjIHjbXTMx2kP-SA,10752
35
- faster_eth_abi/utils/string.py,sha256=wYcvWof4kuitrGGSe_NOduQaxE4HHYmpraCPXKcZxMs,455
36
- faster_eth_abi/utils/validation.cp310-win_amd64.pyd,sha256=4G_mA8U1CSuRdslZ3PTzTYCuD8_I_QCQNAZ88DZWtLA,10752
37
- faster_eth_abi/utils/validation.py,sha256=9veO7wyQsmcFgeaGrsKdSifjV1gaXfTDDKAt1EbKHYY,539
38
- faster_eth_abi-5.2.5.dist-info/licenses/LICENSE,sha256=Q1lDDWXR057JL2Y7HTAwclCF32_LCloN4sGUkXO1YeI,1127
39
- faster_eth_abi-5.2.5.dist-info/METADATA,sha256=BibGaKKtyttJ3DAAaHTi-BSrtUZs1VrWHe1TXtDL79k,4224
40
- faster_eth_abi-5.2.5.dist-info/WHEEL,sha256=KUuBC6lxAbHCKilKua8R9W_TM71_-9Sg5uEP3uDWcoU,101
41
- faster_eth_abi-5.2.5.dist-info/top_level.txt,sha256=5cP87jVHTOdG5bgQZ3ws5MGsnIwm_yX-WalM08iynHc,51
42
- faster_eth_abi-5.2.5.dist-info/RECORD,,