faster-eth-abi 5.2.5__cp39-cp39-macosx_11_0_arm64.whl → 5.2.6__cp39-cp39-macosx_11_0_arm64.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.cpython-39-darwin.so,sha256=vZGfYUvzIH1h7VADcbMCV6WOcU3TjeFpE5d3F9d_KEI,418240
2
+ faster_eth_abi/_encoding.py,sha256=dViSQVK5XvSuLBZADiXImJqXf4dIHkAHYWFzEiJtq-0,3114
3
+ faster_eth_abi/packed.py,sha256=qDPBjish_0h26O7xGWopnlD4pRkphFuFq4izgIqT600,301
4
+ faster_eth_abi/encoding.py,sha256=yYgXubRd3ZxVP6QPrdHhYnjFGSPtqfyaXh4QBLnURms,18163
5
+ faster_eth_abi/registry.py,sha256=kCcz1mJiENDzl9jKzJ99EiSLSSIFxfi4-96Fe59qrJM,20529
6
+ faster_eth_abi/_codec.cpython-39-darwin.so,sha256=uXTr5mGKC0SuHEevSWMDhV7Z1s8RpV-35ygmNXNSL_4,50632
7
+ faster_eth_abi/constants.py,sha256=uJbuND1rFs_Pexuz58TKd-BJPuoA6hLqFEX6kkDS-dE,107
8
+ faster_eth_abi/io.py,sha256=PjOnBChWh_-6ADkpJQONnxHVwsAfC_4bRiT6YQhlP6c,3728
9
+ faster_eth_abi/__init__.py,sha256=55jGpiVbsTGNu-c_rr-wwyH3eqEv9MELSTWa4AMiKvU,205
10
+ faster_eth_abi/packed.cpython-39-darwin.so,sha256=KNDhTEQYA3I0KDgm98FUlQEbPcC9hw5kNHIAWE0E6NA,50632
11
+ faster_eth_abi/abi.cpython-39-darwin.so,sha256=hBsxY7ju84oofbJwrMMTYG_xG-wGpRrHDNRzvy-r_hY,50632
12
+ faster_eth_abi/from_type_str.cpython-39-darwin.so,sha256=2zCZR1z5rUfgO4kNYTVGyvopWybE9017XjgNvCNiKII,50672
13
+ faster_eth_abi/decoding.py,sha256=xLon-1I5EZCZBgsTZsvl-ienFY2ZUr5D2FqzsiTdQS0,17347
14
+ faster_eth_abi/grammar.py,sha256=unpmDhCsUs1PdLW2XbtKF5ij84nJOqVXhuKI8t_-aXk,13369
15
+ faster_eth_abi/_encoding.cpython-39-darwin.so,sha256=4D-NkKp4ZXVXMgxgFPr78yhAIpPif7nudHHGUuWe-4M,50656
16
+ faster_eth_abi/from_type_str.py,sha256=aAZ58YUBZuMF_DovGkthvnacAD6X6VkYFs0Zbv9JxoM,4311
17
+ faster_eth_abi/constants.cpython-39-darwin.so,sha256=sjFJnm2BhhyHb-xDNkqyTaJ2kUPIy4Wd8L646x_dg7Y,50656
18
+ faster_eth_abi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
+ faster_eth_abi/abi.py,sha256=HzkXy0EjHraNbbC5l-EhVqVcx5vy8tcykiKIO4Fp1xw,366
20
+ faster_eth_abi/exceptions.py,sha256=Q_b62R-E0OtlxQGLQSyx6BXkBbLf259KQ1pT5Eb1oh8,2952
21
+ faster_eth_abi/_codec.py,sha256=xVKz8JQW51sCs2eroQBUXEe_SXduT14wRSObzhZuNjo,2461
22
+ faster_eth_abi/codec.py,sha256=KMIgLUBeutkDTsRts8Y2Ydt3V0n5bMGLd21CZvwR9ds,4437
23
+ faster_eth_abi/base.py,sha256=eMpUM78FhJg5wHPj6glvJRpS1AmvQ_1ks9ENwyu68hc,1188
24
+ faster_eth_abi/tools/_strategies.py,sha256=iLIjqRw7FlEEIXtnhSgtrWwbxO74dslT0EQrgE2o8I8,5960
25
+ faster_eth_abi/tools/__init__.py,sha256=trtATEmgu4ctg04qkejbODDzvDSofgcVJ3rkzMP_hQE,51
26
+ faster_eth_abi/tools/__init__.cpython-39-darwin.so,sha256=sCkpuKXIRugVlmaczvC7J7xv_HMWrtr6a6wp5QSpmuo,50640
27
+ faster_eth_abi/tools/_strategies.cpython-39-darwin.so,sha256=kxYfC18-48ljZx7ogte8iZQCOqjVYundMMt9CLFkLzI,50672
28
+ faster_eth_abi/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
+ faster_eth_abi/utils/validation.cpython-39-darwin.so,sha256=dKOhRg40EypkxfTCEodU1JAA5ys3UUZT5I8ULhwOBcs,50672
30
+ faster_eth_abi/utils/__init__.cpython-39-darwin.so,sha256=2zaeRqJ1MVYrDjTTtbRtK-pTBXXfv88LCu20M1sxKQY,50640
31
+ faster_eth_abi/utils/string.cpython-39-darwin.so,sha256=3yaVaO8OeeJR7AurNjE68P9wA8Fcjm_WTsa2_gQkcX4,50648
32
+ faster_eth_abi/utils/numeric.cpython-39-darwin.so,sha256=G6JtoCPJBfLloRS2YsRAiEfeOfqHCKKOSqFt-cEFveA,50656
33
+ faster_eth_abi/utils/numeric.py,sha256=VU6Z76zvZn7rYaZMyDy1XO9A9ukKTzOrtA80jypp_LQ,2146
34
+ faster_eth_abi/utils/string.py,sha256=fjsAR2C7Xlu5bHomxx5l4rlADFtByzGTQfugMTo8TQk,436
35
+ faster_eth_abi/utils/padding.cpython-39-darwin.so,sha256=oEnecefQN9z8VMt_p4rwINisUtbfWPK6kXhd5tdm91k,50656
36
+ faster_eth_abi/utils/padding.py,sha256=JBuFhdrvKWLrmmJBZ-a6pqbHWydAuiUBt2aBjCwVcVE,493
37
+ faster_eth_abi/utils/validation.py,sha256=NA2wRacYEBdkpQnZfmeDvzF-sHyy6NT2QzCFuBnYJVI,521
38
+ faster_eth_abi-5.2.6.dist-info/RECORD,,
39
+ faster_eth_abi-5.2.6.dist-info/WHEEL,sha256=bDWaFWigpG5bEpqw9IoRiyYs8MvmSFh0OhUAOoi_-KA,134
40
+ faster_eth_abi-5.2.6.dist-info/top_level.txt,sha256=5cP87jVHTOdG5bgQZ3ws5MGsnIwm_yX-WalM08iynHc,51
41
+ faster_eth_abi-5.2.6.dist-info/METADATA,sha256=ASeQJaeQE08DxXJLTBY_zMuODrA67CDt7vUB0wGAM9c,5385
42
+ faster_eth_abi-5.2.6.dist-info/licenses/LICENSE,sha256=P_zrhVa0OXK-_XuA0RF3d3gwMLXRSBkn2fWraC4CFLo,1106
@@ -1,42 +0,0 @@
1
- c42f5c78bc058f310136__mypyc.cpython-39-darwin.so,sha256=c1kCihlw2yHlKmng96BZd1niKSgp2CUPouIG1uleGf8,307120
2
- faster_eth_abi/_encoding.py,sha256=x0em04kj0m7wW4pJdZLUWhPMW8bRh0CIHLM5X9jZb0A,3102
3
- faster_eth_abi/packed.py,sha256=qDPBjish_0h26O7xGWopnlD4pRkphFuFq4izgIqT600,301
4
- faster_eth_abi/encoding.py,sha256=yYgXubRd3ZxVP6QPrdHhYnjFGSPtqfyaXh4QBLnURms,18163
5
- faster_eth_abi/registry.py,sha256=kCcz1mJiENDzl9jKzJ99EiSLSSIFxfi4-96Fe59qrJM,20529
6
- faster_eth_abi/_codec.cpython-39-darwin.so,sha256=L-zU2ZlnKIBzEc-6jnQJiJ-6r8ajURcDnT6sUq4iiQc,50632
7
- faster_eth_abi/constants.py,sha256=uJbuND1rFs_Pexuz58TKd-BJPuoA6hLqFEX6kkDS-dE,107
8
- faster_eth_abi/io.py,sha256=PjOnBChWh_-6ADkpJQONnxHVwsAfC_4bRiT6YQhlP6c,3728
9
- faster_eth_abi/__init__.py,sha256=55jGpiVbsTGNu-c_rr-wwyH3eqEv9MELSTWa4AMiKvU,205
10
- faster_eth_abi/packed.cpython-39-darwin.so,sha256=dPYOwWEDvDTMv2b304dyG2Bttb79IHbzg5dyzoHZKVo,50632
11
- faster_eth_abi/abi.cpython-39-darwin.so,sha256=XqgjizxSsltgeOOBW2q0T9AD1go_E8F07wwArE_m7Og,50632
12
- faster_eth_abi/from_type_str.cpython-39-darwin.so,sha256=TDheH5oSx2czYbmRzYYCni_N7A3UYMoMgctDzd9NKy0,50672
13
- faster_eth_abi/decoding.py,sha256=xLon-1I5EZCZBgsTZsvl-ienFY2ZUr5D2FqzsiTdQS0,17347
14
- faster_eth_abi/grammar.py,sha256=9Q4niyiw8cAKXwVMlpfayPNcWkerZXM6WuWBEjx2TQ8,13335
15
- faster_eth_abi/_encoding.cpython-39-darwin.so,sha256=R5RVLWITiOyJ_IGxVvp8DTPd9RqbYwuH8ylaQRrOBfY,50656
16
- faster_eth_abi/from_type_str.py,sha256=aAZ58YUBZuMF_DovGkthvnacAD6X6VkYFs0Zbv9JxoM,4311
17
- faster_eth_abi/constants.cpython-39-darwin.so,sha256=YxDdntPuu2asCdFNJpI1TGNilwuXfhS5c82mXlV2Q0c,50656
18
- faster_eth_abi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
19
- faster_eth_abi/abi.py,sha256=HzkXy0EjHraNbbC5l-EhVqVcx5vy8tcykiKIO4Fp1xw,366
20
- faster_eth_abi/exceptions.py,sha256=Q_b62R-E0OtlxQGLQSyx6BXkBbLf259KQ1pT5Eb1oh8,2952
21
- faster_eth_abi/_codec.py,sha256=xVKz8JQW51sCs2eroQBUXEe_SXduT14wRSObzhZuNjo,2461
22
- faster_eth_abi/codec.py,sha256=KMIgLUBeutkDTsRts8Y2Ydt3V0n5bMGLd21CZvwR9ds,4437
23
- faster_eth_abi/base.py,sha256=eMpUM78FhJg5wHPj6glvJRpS1AmvQ_1ks9ENwyu68hc,1188
24
- faster_eth_abi/tools/_strategies.py,sha256=iLIjqRw7FlEEIXtnhSgtrWwbxO74dslT0EQrgE2o8I8,5960
25
- faster_eth_abi/tools/__init__.py,sha256=trtATEmgu4ctg04qkejbODDzvDSofgcVJ3rkzMP_hQE,51
26
- faster_eth_abi/tools/__init__.cpython-39-darwin.so,sha256=TYj-LBeKVDafuxasftqshJbjFGC5CZR-MPdOKmclESM,50640
27
- faster_eth_abi/tools/_strategies.cpython-39-darwin.so,sha256=LQy_dfrS89yECRp25dRagEc4NeQlLL5UklkH3pQwZIE,50672
28
- faster_eth_abi/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
29
- faster_eth_abi/utils/validation.cpython-39-darwin.so,sha256=ADtY5fWEJWsDQCpQGrOvgLC7jKygqSlPl6wu7cRJ4uE,50672
30
- faster_eth_abi/utils/__init__.cpython-39-darwin.so,sha256=wjwqd1IYwWK733ntHPBv2RlAryiv5ZgEwBF22rKY3bE,50640
31
- faster_eth_abi/utils/string.cpython-39-darwin.so,sha256=qJmb3OvFr_A3M9oSyg1XpfXGZhmq1GoE1TglTk3fGw8,50648
32
- faster_eth_abi/utils/numeric.cpython-39-darwin.so,sha256=PZeUlqwLvUJPujD6IJiG_JYPgTf6lACkIw81gsNaMfo,50656
33
- faster_eth_abi/utils/numeric.py,sha256=VU6Z76zvZn7rYaZMyDy1XO9A9ukKTzOrtA80jypp_LQ,2146
34
- faster_eth_abi/utils/string.py,sha256=fjsAR2C7Xlu5bHomxx5l4rlADFtByzGTQfugMTo8TQk,436
35
- faster_eth_abi/utils/padding.cpython-39-darwin.so,sha256=ZGNDlVFBvIAjCNmWgVPpzHrSp8nTzFaxFdSt1mCQDP0,50656
36
- faster_eth_abi/utils/padding.py,sha256=JBuFhdrvKWLrmmJBZ-a6pqbHWydAuiUBt2aBjCwVcVE,493
37
- faster_eth_abi/utils/validation.py,sha256=NA2wRacYEBdkpQnZfmeDvzF-sHyy6NT2QzCFuBnYJVI,521
38
- faster_eth_abi-5.2.5.dist-info/RECORD,,
39
- faster_eth_abi-5.2.5.dist-info/WHEEL,sha256=bDWaFWigpG5bEpqw9IoRiyYs8MvmSFh0OhUAOoi_-KA,134
40
- faster_eth_abi-5.2.5.dist-info/top_level.txt,sha256=5cP87jVHTOdG5bgQZ3ws5MGsnIwm_yX-WalM08iynHc,51
41
- faster_eth_abi-5.2.5.dist-info/METADATA,sha256=LgvopGjl6hsDNJIhHr3PW1HW0GGIEX433uumdT6-SSo,4129
42
- faster_eth_abi-5.2.5.dist-info/licenses/LICENSE,sha256=P_zrhVa0OXK-_XuA0RF3d3gwMLXRSBkn2fWraC4CFLo,1106