faster-eth-utils 2.3.1__cp311-cp311-win32.whl → 5.3.19__cp311-cp311-win32.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.

Potentially problematic release.


This version of faster-eth-utils might be problematic. Click here for more details.

Files changed (53) hide show
  1. faster_eth_utils/__init__.py +54 -17
  2. faster_eth_utils/__json/eth_networks.json +1 -0
  3. faster_eth_utils/__main__.py +3 -1
  4. faster_eth_utils/abi.cp311-win32.pyd +0 -0
  5. faster_eth_utils/abi.py +819 -37
  6. faster_eth_utils/address.cp311-win32.pyd +0 -0
  7. faster_eth_utils/address.py +57 -62
  8. faster_eth_utils/applicators.cp311-win32.pyd +0 -0
  9. faster_eth_utils/applicators.py +138 -70
  10. faster_eth_utils/conversions.cp311-win32.pyd +0 -0
  11. faster_eth_utils/conversions.py +54 -25
  12. faster_eth_utils/crypto.cp311-win32.pyd +0 -0
  13. faster_eth_utils/crypto.py +15 -5
  14. faster_eth_utils/currency.cp311-win32.pyd +0 -0
  15. faster_eth_utils/currency.py +70 -32
  16. faster_eth_utils/curried/__init__.py +107 -77
  17. faster_eth_utils/debug.cp311-win32.pyd +0 -0
  18. faster_eth_utils/debug.py +3 -3
  19. faster_eth_utils/decorators.cp311-win32.pyd +0 -0
  20. faster_eth_utils/decorators.py +73 -20
  21. faster_eth_utils/encoding.cp311-win32.pyd +0 -0
  22. faster_eth_utils/exceptions.cp311-win32.pyd +0 -0
  23. faster_eth_utils/exceptions.py +8 -3
  24. faster_eth_utils/functional.cp311-win32.pyd +0 -0
  25. faster_eth_utils/functional.py +41 -25
  26. faster_eth_utils/hexadecimal.cp311-win32.pyd +0 -0
  27. faster_eth_utils/hexadecimal.py +36 -24
  28. faster_eth_utils/humanize.cp311-win32.pyd +0 -0
  29. faster_eth_utils/humanize.py +46 -18
  30. faster_eth_utils/logging.py +43 -48
  31. faster_eth_utils/module_loading.cp311-win32.pyd +0 -0
  32. faster_eth_utils/module_loading.py +8 -7
  33. faster_eth_utils/network.cp311-win32.pyd +0 -0
  34. faster_eth_utils/network.py +25 -13
  35. faster_eth_utils/numeric.cp311-win32.pyd +0 -0
  36. faster_eth_utils/numeric.py +11 -4
  37. faster_eth_utils/pydantic.py +101 -0
  38. faster_eth_utils/toolz.cp311-win32.pyd +0 -0
  39. faster_eth_utils/toolz.py +82 -152
  40. faster_eth_utils/types.cp311-win32.pyd +0 -0
  41. faster_eth_utils/types.py +37 -21
  42. faster_eth_utils/typing/misc.py +3 -1
  43. faster_eth_utils/units.cp311-win32.pyd +0 -0
  44. faster_eth_utils-5.3.19.dist-info/METADATA +193 -0
  45. faster_eth_utils-5.3.19.dist-info/RECORD +53 -0
  46. {faster_eth_utils-2.3.1.dist-info → faster_eth_utils-5.3.19.dist-info}/licenses/LICENSE +1 -1
  47. faster_eth_utils-5.3.19.dist-info/top_level.txt +3 -0
  48. faster_eth_utils__mypyc.cp311-win32.pyd +0 -0
  49. bce0bfc64ce5e845ec4a__mypyc.cp311-win32.pyd +0 -0
  50. faster_eth_utils-2.3.1.dist-info/METADATA +0 -160
  51. faster_eth_utils-2.3.1.dist-info/RECORD +0 -45
  52. faster_eth_utils-2.3.1.dist-info/top_level.txt +0 -3
  53. {faster_eth_utils-2.3.1.dist-info → faster_eth_utils-5.3.19.dist-info}/WHEEL +0 -0
@@ -0,0 +1,101 @@
1
+ from typing import (
2
+ Any,
3
+ Dict,
4
+ Type,
5
+ )
6
+
7
+ from pydantic import (
8
+ BaseModel,
9
+ ConfigDict,
10
+ )
11
+ from pydantic._internal._core_utils import (
12
+ CoreSchemaField,
13
+ )
14
+ from pydantic.alias_generators import (
15
+ to_camel,
16
+ )
17
+ from pydantic.json_schema import (
18
+ DEFAULT_REF_TEMPLATE,
19
+ GenerateJsonSchema,
20
+ JsonSchemaMode,
21
+ )
22
+
23
+
24
+ class OmitJsonSchema(GenerateJsonSchema):
25
+ """
26
+ Custom JSON schema generator that omits the schema generation for fields that are
27
+ invalid. Excluded fields (``Field(exclude=True)``) are generally useful as
28
+ properties of the model but are not meant to be serialized to JSON.
29
+ """
30
+
31
+ def field_is_present(self, field: CoreSchemaField) -> bool:
32
+ # override ``field_is_present`` and omit excluded fields from the schema
33
+ if field.get("serialization_exclude", False):
34
+ return False
35
+ return super().field_is_present(field)
36
+
37
+
38
+ class CamelModel(BaseModel):
39
+ """
40
+ Camel-case pydantic model. This model is used to ensure serialization in a
41
+ consistent manner, aliasing as camelCase serialization. This is useful for models
42
+ that are used in JSON-RPC requests and responses, marking useful fields for the
43
+ model, but that are not part of the JSON-RPC object, with ``Field(exclude=True)``.
44
+ To serialize a model to the expected JSON-RPC format, or camelCase, use
45
+ ``model_dump(by_alias=True)``.
46
+
47
+ .. code-block:: python
48
+
49
+ >>> from eth_utils.pydantic import CamelModel
50
+ >>> from pydantic import Field
51
+
52
+ >>> class SignedSetCodeAuthorization(CamelModel):
53
+ ... chain_id: int
54
+ ... address: bytes
55
+ ... nonce: int
56
+ ...
57
+ ... # useful fields for the object but excluded from serialization
58
+ ... # (not part of the JSON-RPC object)
59
+ ... authorization_hash: bytes = Field(exclude=True)
60
+ ... signature: bytes = Field(exclude=True)
61
+
62
+ >>> auth = SignedSetCodeAuthorization(
63
+ ... chain_id=1,
64
+ ... address=b"0x0000000000000000000000000000000000000000",
65
+ ... nonce=0,
66
+ ... authorization_hash=generated_hash,
67
+ ... signature=generated_signature,
68
+ ... )
69
+ >>> auth.model_dump(by_alias=True)
70
+ {'chainId': 1, 'address': '0x000000000000000000000000000000000000', 'nonce': 0}
71
+ """
72
+
73
+ model_config = ConfigDict(
74
+ arbitrary_types_allowed=True,
75
+ # populate by snake_case (python) args
76
+ populate_by_name=True,
77
+ # serialize by camelCase (json-rpc) keys
78
+ alias_generator=to_camel,
79
+ # validate default values
80
+ validate_default=True,
81
+ )
82
+
83
+ @classmethod
84
+ def model_json_schema( # type: ignore [override]
85
+ cls,
86
+ by_alias: bool = True,
87
+ ref_template: str = DEFAULT_REF_TEMPLATE,
88
+ # default to ``OmitJsonSchema`` to prevent errors from excluded fields
89
+ schema_generator: Type[GenerateJsonSchema] = OmitJsonSchema,
90
+ mode: JsonSchemaMode = "validation",
91
+ ) -> Dict[str, Any]:
92
+ """
93
+ Omits excluded fields from the JSON schema, preventing errors that would
94
+ otherwise be raised by the default schema generator.
95
+ """
96
+ return super().model_json_schema(
97
+ by_alias=by_alias,
98
+ ref_template=ref_template,
99
+ schema_generator=schema_generator,
100
+ mode=mode,
101
+ )
Binary file
faster_eth_utils/toolz.py CHANGED
@@ -1,154 +1,84 @@
1
+ from typing import Final
2
+
1
3
  try:
2
- from cytoolz import (
3
- accumulate,
4
- assoc,
5
- assoc_in,
6
- comp,
7
- complement,
8
- compose,
9
- concat,
10
- concatv,
11
- cons,
12
- count,
13
- countby,
14
- curried,
15
- curry,
16
- dicttoolz,
17
- diff,
18
- dissoc,
19
- do,
20
- drop,
21
- excepts,
22
- filter,
23
- first,
24
- flip,
25
- frequencies,
26
- functoolz,
27
- get,
28
- get_in,
29
- groupby,
30
- identity,
31
- interleave,
32
- interpose,
33
- isdistinct,
34
- isiterable,
35
- itemfilter,
36
- itemmap,
37
- iterate,
38
- itertoolz,
39
- join,
40
- juxt,
41
- keyfilter,
42
- keymap,
43
- last,
44
- map,
45
- mapcat,
46
- memoize,
47
- merge,
48
- merge_sorted,
49
- merge_with,
50
- nth,
51
- partial,
52
- partition,
53
- partition_all,
54
- partitionby,
55
- peek,
56
- pipe,
57
- pluck,
58
- random_sample,
59
- recipes,
60
- reduce,
61
- reduceby,
62
- remove,
63
- second,
64
- sliding_window,
65
- sorted,
66
- tail,
67
- take,
68
- take_nth,
69
- thread_first,
70
- thread_last,
71
- topk,
72
- unique,
73
- update_in,
74
- utils,
75
- valfilter,
76
- valmap,
77
- )
4
+ import cytoolz
5
+ cy = True
78
6
  except ImportError:
79
- from toolz import ( # noqa: F401
80
- accumulate,
81
- assoc,
82
- assoc_in,
83
- comp,
84
- complement,
85
- compose,
86
- concat,
87
- concatv,
88
- cons,
89
- count,
90
- countby,
91
- curried,
92
- curry,
93
- dicttoolz,
94
- diff,
95
- dissoc,
96
- do,
97
- drop,
98
- excepts,
99
- filter,
100
- first,
101
- flip,
102
- frequencies,
103
- functoolz,
104
- get,
105
- get_in,
106
- groupby,
107
- identity,
108
- interleave,
109
- interpose,
110
- isdistinct,
111
- isiterable,
112
- itemfilter,
113
- itemmap,
114
- iterate,
115
- itertoolz,
116
- join,
117
- juxt,
118
- keyfilter,
119
- keymap,
120
- last,
121
- map,
122
- mapcat,
123
- memoize,
124
- merge,
125
- merge_sorted,
126
- merge_with,
127
- nth,
128
- partial,
129
- partition,
130
- partition_all,
131
- partitionby,
132
- peek,
133
- pipe,
134
- pluck,
135
- random_sample,
136
- recipes,
137
- reduce,
138
- reduceby,
139
- remove,
140
- second,
141
- sliding_window,
142
- sorted,
143
- tail,
144
- take,
145
- take_nth,
146
- thread_first,
147
- thread_last,
148
- topk,
149
- unique,
150
- update_in,
151
- utils,
152
- valfilter,
153
- valmap,
154
- )
7
+ import toolz
8
+ cy = False
9
+
10
+
11
+ accumulate: Final = cytoolz.accumulate if cy else toolz.accumulate
12
+ assoc: Final = cytoolz.assoc if cy else toolz.assoc
13
+ assoc_in: Final = cytoolz.assoc_in if cy else toolz.assoc_in
14
+ comp: Final = cytoolz.comp if cy else toolz.comp
15
+ complement: Final = cytoolz.complement if cy else toolz.complement
16
+ compose: Final = cytoolz.compose if cy else toolz.compose
17
+ concat: Final = cytoolz.concat if cy else toolz.concat
18
+ concatv: Final = cytoolz.concatv if cy else toolz.concatv
19
+ cons: Final = cytoolz.cons if cy else toolz.cons
20
+ count: Final = cytoolz.count if cy else toolz.count
21
+ countby: Final = cytoolz.countby if cy else toolz.countby
22
+ curried: Final = cytoolz.curried if cy else toolz.curried
23
+ curry: Final = cytoolz.curry if cy else toolz.curry
24
+ dicttoolz: Final = cytoolz.dicttoolz if cy else toolz.dicttoolz
25
+ diff: Final = cytoolz.diff if cy else toolz.diff
26
+ dissoc: Final = cytoolz.dissoc if cy else toolz.dissoc
27
+ do: Final = cytoolz.do if cy else toolz.do
28
+ drop: Final = cytoolz.drop if cy else toolz.drop
29
+ excepts: Final = cytoolz.excepts if cy else toolz.excepts
30
+ filter: Final = cytoolz.filter if cy else toolz.filter
31
+ first: Final = cytoolz.first if cy else toolz.first
32
+ flip: Final = cytoolz.flip if cy else toolz.flip
33
+ frequencies: Final = cytoolz.frequencies if cy else toolz.frequencies
34
+ functoolz: Final = cytoolz.functoolz if cy else toolz.functoolz
35
+ get: Final = cytoolz.get if cy else toolz.get
36
+ get_in: Final = cytoolz.get_in if cy else toolz.get_in
37
+ groupby: Final = cytoolz.groupby if cy else toolz.groupby
38
+ identity: Final = cytoolz.identity if cy else toolz.identity
39
+ interleave: Final = cytoolz.interleave if cy else toolz.interleave
40
+ interpose: Final = cytoolz.interpose if cy else toolz.interpose
41
+ isdistinct: Final = cytoolz.isdistinct if cy else toolz.isdistinct
42
+ isiterable: Final = cytoolz.isiterable if cy else toolz.isiterable
43
+ itemfilter: Final = cytoolz.itemfilter if cy else toolz.itemfilter
44
+ itemmap: Final = cytoolz.itemmap if cy else toolz.itemmap
45
+ iterate: Final = cytoolz.iterate if cy else toolz.iterate
46
+ itertoolz: Final = cytoolz.itertoolz if cy else toolz.itertoolz
47
+ join: Final = cytoolz.join if cy else toolz.join
48
+ juxt: Final = cytoolz.juxt if cy else toolz.juxt
49
+ keyfilter: Final = cytoolz.keyfilter if cy else toolz.keyfilter
50
+ keymap: Final = cytoolz.keymap if cy else toolz.keymap
51
+ last: Final = cytoolz.last if cy else toolz.last
52
+ map: Final = cytoolz.map if cy else toolz.map
53
+ mapcat: Final = cytoolz.mapcat if cy else toolz.mapcat
54
+ memoize: Final = cytoolz.memoize if cy else toolz.memoize
55
+ merge: Final = cytoolz.merge if cy else toolz.merge
56
+ merge_sorted: Final = cytoolz.merge_sorted if cy else toolz.merge_sorted
57
+ merge_with: Final = cytoolz.merge_with if cy else toolz.merge_with
58
+ nth: Final = cytoolz.nth if cy else toolz.nth
59
+ partial: Final = cytoolz.partial if cy else toolz.partial
60
+ partition: Final = cytoolz.partition if cy else toolz.partition
61
+ partition_all: Final = cytoolz.partition_all if cy else toolz.partition_all
62
+ partitionby: Final = cytoolz.partitionby if cy else toolz.partitionby
63
+ peek: Final = cytoolz.peek if cy else toolz.peek
64
+ pipe: Final = cytoolz.pipe if cy else toolz.pipe
65
+ pluck: Final = cytoolz.pluck if cy else toolz.pluck
66
+ random_sample: Final = cytoolz.random_sample if cy else toolz.random_sample
67
+ recipes: Final = cytoolz.recipes if cy else toolz.recipes
68
+ reduce: Final = cytoolz.reduce if cy else toolz.reduce
69
+ reduceby: Final = cytoolz.reduceby if cy else toolz.reduceby
70
+ remove: Final = cytoolz.remove if cy else toolz.remove
71
+ second: Final = cytoolz.second if cy else toolz.second
72
+ sliding_window: Final = cytoolz.sliding_window if cy else toolz.sliding_window
73
+ sorted: Final = cytoolz.sorted if cy else toolz.sorted
74
+ tail: Final = cytoolz.tail if cy else toolz.tail
75
+ take: Final = cytoolz.take if cy else toolz.take
76
+ take_nth: Final = cytoolz.take_nth if cy else toolz.take_nth
77
+ thread_first: Final = cytoolz.thread_first if cy else toolz.thread_first
78
+ thread_last: Final = cytoolz.thread_last if cy else toolz.thread_last
79
+ topk: Final = cytoolz.topk if cy else toolz.topk
80
+ unique: Final = cytoolz.unique if cy else toolz.unique
81
+ update_in: Final = cytoolz.update_in if cy else toolz.update_in
82
+ utils: Final = cytoolz.utils if cy else toolz.utils
83
+ valfilter: Final = cytoolz.valfilter if cy else toolz.valfilter
84
+ valmap: Final = cytoolz.valmap if cy else toolz.valmap
Binary file
faster_eth_utils/types.py CHANGED
@@ -1,52 +1,68 @@
1
1
  import collections.abc
2
2
  import numbers
3
- from typing import Any
3
+ from typing import (
4
+ Any,
5
+ Final,
6
+ List,
7
+ Literal,
8
+ Tuple,
9
+ Union,
10
+ )
4
11
 
5
- bytes_types = (bytes, bytearray)
6
- integer_types = (int,)
7
- text_types = (str,)
8
- string_types = (bytes, str, bytearray)
12
+ from typing_extensions import (
13
+ TypeGuard,
14
+ )
9
15
 
16
+ Mapping: Final = collections.abc.Mapping
17
+ Sequence: Final = collections.abc.Sequence
10
18
 
11
- def is_integer(value: Any) -> bool:
12
- return isinstance(value, integer_types) and not isinstance(value, bool)
19
+ Number: Final = numbers.Number
13
20
 
21
+ bytes_types: Final = (bytes, bytearray)
22
+ integer_types: Final = (int,)
23
+ text_types: Final = (str,)
24
+ string_types: Final = (bytes, str, bytearray)
14
25
 
15
- def is_bytes(value: Any) -> bool:
26
+
27
+ def is_integer(value: Any) -> TypeGuard[int]:
28
+ return isinstance(value, int) and not isinstance(value, bool)
29
+
30
+
31
+ def is_bytes(value: Any) -> TypeGuard[Union[bytes, bytearray]]:
16
32
  return isinstance(value, bytes_types)
17
33
 
18
34
 
19
- def is_text(value: Any) -> bool:
20
- return isinstance(value, text_types)
35
+ def is_text(value: Any) -> TypeGuard[str]:
36
+ return isinstance(value, str)
21
37
 
22
38
 
23
- def is_string(value: Any) -> bool:
39
+ def is_string(value: Any) -> TypeGuard[Union[bytes, str, bytearray]]:
24
40
  return isinstance(value, string_types)
25
41
 
26
42
 
27
- def is_boolean(value: Any) -> bool:
43
+ def is_boolean(value: Any) -> TypeGuard[bool]:
28
44
  return isinstance(value, bool)
29
45
 
30
46
 
31
- def is_dict(obj: Any) -> bool:
32
- return isinstance(obj, collections.abc.Mapping)
47
+ def is_dict(obj: Any) -> TypeGuard[collections.abc.Mapping[Any, Any]]:
48
+ return isinstance(obj, dict) or isinstance(obj, Mapping)
33
49
 
34
50
 
35
- def is_list_like(obj: Any) -> bool:
36
- return not is_string(obj) and isinstance(obj, collections.abc.Sequence)
51
+ def is_list_like(obj: Any) -> TypeGuard[collections.abc.Sequence[Any]]:
52
+ return isinstance(obj, (list, tuple)) or not is_string(obj) and isinstance(obj, Sequence)
37
53
 
38
54
 
39
- def is_list(obj: Any) -> bool:
55
+ def is_list(obj: Any) -> TypeGuard[List[Any]]:
40
56
  return isinstance(obj, list)
41
57
 
42
58
 
43
- def is_tuple(obj: Any) -> bool:
59
+ def is_tuple(obj: Any) -> TypeGuard[Tuple[Any, ...]]:
44
60
  return isinstance(obj, tuple)
45
61
 
46
62
 
47
- def is_null(obj: Any) -> bool:
63
+ def is_null(obj: Any) -> TypeGuard[Literal[None]]:
48
64
  return obj is None
49
65
 
50
66
 
51
- def is_number(obj: Any) -> bool:
52
- return isinstance(obj, numbers.Number)
67
+ def is_number(obj: Any) -> TypeGuard[numbers.Number]:
68
+ return isinstance(obj, Number)
@@ -1,4 +1,6 @@
1
- from typing import TypeVar
1
+ from typing import (
2
+ TypeVar,
3
+ )
2
4
 
3
5
  from eth_typing import ( # noqa: F401
4
6
  Address,
Binary file
@@ -0,0 +1,193 @@
1
+ Metadata-Version: 2.4
2
+ Name: faster-eth-utils
3
+ Version: 5.3.19
4
+ Summary: A fork of eth-utils: Common utility functions for python code that interacts with Ethereum, implemented in C
5
+ Home-page: https://github.com/BobTheBuidler/faster-eth-utils
6
+ Author: The Ethereum Foundation
7
+ Author-email: snakecharmers@ethereum.org
8
+ License: MIT
9
+ Project-URL: Documentation, https://eth-utils.readthedocs.io/en/stable/
10
+ Project-URL: Release Notes, https://github.com/BobTheBuidler/faster-eth-utils/releases
11
+ Project-URL: Issues, https://github.com/BobTheBuidler/faster-eth-utils/issues
12
+ Project-URL: Source - Precompiled (.py), https://github.com/BobTheBuidler/faster-eth-utils/tree/master/faster_eth_utils
13
+ Project-URL: Source - Compiled (.c), https://github.com/BobTheBuidler/faster-eth-utils/tree/master/build
14
+ Project-URL: Benchmarks, https://github.com/BobTheBuidler/faster-eth-utils/tree/master/benchmarks
15
+ Project-URL: Benchmarks - Results, https://github.com/BobTheBuidler/faster-eth-utils/tree/master/benchmarks/results
16
+ Project-URL: Original, https://github.com/ethereum/eth-utils
17
+ Keywords: ethereum
18
+ Classifier: Intended Audience :: Developers
19
+ Classifier: Natural Language :: English
20
+ Classifier: Programming Language :: Python :: 3
21
+ Classifier: Programming Language :: Python :: 3.8
22
+ Classifier: Programming Language :: Python :: 3.9
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Programming Language :: Python :: 3.12
26
+ Classifier: Programming Language :: Python :: 3.13
27
+ Classifier: Programming Language :: Python :: Implementation :: CPython
28
+ Requires-Python: >=3.8, <4
29
+ Description-Content-Type: text/markdown
30
+ License-File: LICENSE
31
+ Requires-Dist: cchecksum==0.3.7.dev0
32
+ Requires-Dist: eth-hash>=0.3.1
33
+ Requires-Dist: eth-typing==5.2.1
34
+ Requires-Dist: eth-utils==5.3.1
35
+ Requires-Dist: toolz>0.8.2; implementation_name == "pypy"
36
+ Requires-Dist: cytoolz>=0.10.1; implementation_name == "cpython"
37
+ Requires-Dist: pydantic<3,>=2.0.0
38
+ Provides-Extra: dev
39
+ Requires-Dist: build>=0.9.0; extra == "dev"
40
+ Requires-Dist: bump_my_version>=0.19.0; extra == "dev"
41
+ Requires-Dist: eth-hash[pycryptodome]; extra == "dev"
42
+ Requires-Dist: ipython; extra == "dev"
43
+ Requires-Dist: mypy<1.18.3,>=1.14.1; extra == "dev"
44
+ Requires-Dist: pre-commit>=3.4.0; extra == "dev"
45
+ Requires-Dist: tox>=4.0.0; extra == "dev"
46
+ Requires-Dist: twine; extra == "dev"
47
+ Requires-Dist: wheel; extra == "dev"
48
+ Requires-Dist: sphinx>=6.0.0; extra == "dev"
49
+ Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "dev"
50
+ Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "dev"
51
+ Requires-Dist: towncrier<26,>=24; extra == "dev"
52
+ Requires-Dist: hypothesis>=4.43.0; extra == "dev"
53
+ Requires-Dist: mypy<1.18.3,>=1.14.1; extra == "dev"
54
+ Requires-Dist: pytest-xdist>=2.4.0; extra == "dev"
55
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
56
+ Provides-Extra: docs
57
+ Requires-Dist: sphinx>=6.0.0; extra == "docs"
58
+ Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
59
+ Requires-Dist: sphinx_rtd_theme>=1.0.0; extra == "docs"
60
+ Requires-Dist: towncrier<26,>=24; extra == "docs"
61
+ Provides-Extra: test
62
+ Requires-Dist: hypothesis>=4.43.0; extra == "test"
63
+ Requires-Dist: mypy<1.18.3,>=1.14.1; extra == "test"
64
+ Requires-Dist: pytest-xdist>=2.4.0; extra == "test"
65
+ Requires-Dist: pytest>=7.0.0; extra == "test"
66
+ Provides-Extra: codspeed
67
+ Requires-Dist: pytest-codspeed<4.3,>=4.2; extra == "codspeed"
68
+ Requires-Dist: pytest-test-groups; extra == "codspeed"
69
+ Requires-Dist: pytest>=7.0.0; extra == "codspeed"
70
+ Provides-Extra: benchmark
71
+ Requires-Dist: eth-utils==5.3.1; extra == "benchmark"
72
+ Requires-Dist: pytest-benchmark<5.3,>=5.2; extra == "benchmark"
73
+ Requires-Dist: pytest-codspeed<4.3,>=4.2; extra == "benchmark"
74
+ Requires-Dist: pytest-test-groups; extra == "benchmark"
75
+ Requires-Dist: pytest>=7.0.0; extra == "benchmark"
76
+ Dynamic: author
77
+ Dynamic: author-email
78
+ Dynamic: classifier
79
+ Dynamic: description
80
+ Dynamic: description-content-type
81
+ Dynamic: home-page
82
+ Dynamic: keywords
83
+ Dynamic: license
84
+ Dynamic: license-file
85
+ Dynamic: project-url
86
+ Dynamic: provides-extra
87
+ Dynamic: requires-dist
88
+ Dynamic: requires-python
89
+ Dynamic: summary
90
+
91
+ ### I forked eth-utils and compiled it to C. It does the same stuff, now faster
92
+
93
+ [![PyPI](https://img.shields.io/pypi/v/faster-eth-utils.svg?logo=Python&logoColor=white)](https://pypi.org/project/faster-eth-utils)
94
+ [![Monthly Downloads](https://img.shields.io/pypi/dm/faster-eth-utils)](https://pypistats.org/packages/faster-eth-utils)
95
+ [![Codspeed.io Status](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/BobTheBuidler/faster-eth-utils)
96
+
97
+ ##### This fork will be kept up-to-date with [eth-utils](https://github.com/ethereum/eth-utils). I will pull updates as they are released and push new [faster-eth-utils](https://github.com/BobTheBuidler/faster-eth-utils) releases to [PyPI](https://pypi.org/project/faster-eth-utils/).
98
+
99
+ ##### Starting in [v5.3.11](https://github.com/BobTheBuidler/faster-eth-utils/releases/tag/v5.3.11), all `faster-eth-utils` Exception classes inherit from the matching Exception class in `eth-utils`, so porting to `faster-eth-utils` does not require any change to your existing exception handlers. All existing exception handling in your codebase will continue to work as it did when originaly implemented.
100
+
101
+ ##### We benchmark `faster-eth-utils` against the original `eth-utils` for your convenience. [See results](https://github.com/BobTheBuidler/faster-eth-utils/tree/master/benchmarks/results).
102
+
103
+ ##### You can find the compiled C code and header files in the [build](https://github.com/BobTheBuidler/eth-utils/tree/master/build) directory.
104
+
105
+ ###### You may also be interested in: [faster-web3.py](https://github.com/BobTheBuidler/faster-web3.py/), [faster-eth-abi](https://github.com/BobTheBuidler/faster-eth-abi/), and [faster-hexbytes](https://github.com/BobTheBuidler/faster-hexbytes/)
106
+
107
+ ##### The original eth-utils readme is below:
108
+
109
+ # Ethereum Utilities
110
+
111
+ [![Join the conversation on Discord](https://img.shields.io/discord/809793915578089484?color=blue&label=chat&logo=discord&logoColor=white)](https://discord.gg/GHryRvPB84)
112
+ [![Build Status](https://circleci.com/gh/ethereum/eth-utils.svg?style=shield)](https://circleci.com/gh/ethereum/eth-utils)
113
+ [![PyPI version](https://badge.fury.io/py/eth-utils.svg)](https://badge.fury.io/py/eth-utils)
114
+ [![Python versions](https://img.shields.io/pypi/pyversions/eth-utils.svg)](https://pypi.python.org/pypi/eth-utils)
115
+ [![Docs build](https://readthedocs.org/projects/eth-utils/badge/?version=latest)](https://eth-utils.readthedocs.io/en/latest/?badge=latest)
116
+
117
+ Common utility functions for python code that interacts with Ethereum
118
+
119
+ Read the [documentation](https://eth-utils.readthedocs.io/).
120
+
121
+ View the [change log](https://eth-utils.readthedocs.io/en/latest/release_notes.html).
122
+
123
+ ## Installation
124
+
125
+ ```sh
126
+ python -m pip install eth-utils
127
+ ```
128
+
129
+ ## Developer Setup
130
+
131
+ If you would like to hack on eth-utils, please check out the [Snake Charmers
132
+ Tactical Manual](https://github.com/ethereum/snake-charmers-tactical-manual)
133
+ for information on how we do:
134
+
135
+ - Testing
136
+ - Pull Requests
137
+ - Documentation
138
+
139
+ We use [pre-commit](https://pre-commit.com/) to maintain consistent code style. Once
140
+ installed, it will run automatically with every commit. You can also run it manually
141
+ with `make lint`. If you need to make a commit that skips the `pre-commit` checks, you
142
+ can do so with `git commit --no-verify`.
143
+
144
+ ### Development Environment Setup
145
+
146
+ You can set up your dev environment with:
147
+
148
+ ```sh
149
+ git clone git@github.com:ethereum/eth-utils.git
150
+ cd eth-utils
151
+ virtualenv -p python3 venv
152
+ . venv/bin/activate
153
+ python -m pip install -e ".[dev]"
154
+ pre-commit install
155
+ ```
156
+
157
+ ### Update Networks
158
+
159
+ The list of networks resides in the JSON file under eth_utils/\_\_json/eth_networks.json.
160
+ This file is used to initialize Networks, which can be used to obtain network
161
+ information with a chain ID.
162
+
163
+ Run the script to update the JSON file with the response from the remote list.
164
+
165
+ ```sh
166
+ python update_networks.py
167
+ ```
168
+
169
+ If there are new networks they will appear in the JSON file. After checking the updates,
170
+ open a PR to make them available in a new release.
171
+
172
+ ### Release setup
173
+
174
+ To release a new version:
175
+
176
+ ```sh
177
+ make release bump=$$VERSION_PART_TO_BUMP$$
178
+ ```
179
+
180
+ #### How to bumpversion
181
+
182
+ The version format for this repo is `{major}.{minor}.{patch}` for stable, and
183
+ `{major}.{minor}.{patch}-{stage}.{devnum}` for unstable (`stage` can be alpha or beta).
184
+
185
+ To issue the next version in line, specify which part to bump,
186
+ like `make release bump=minor` or `make release bump=devnum`. This is typically done from the
187
+ main branch, except when releasing a beta (in which case the beta is released from main,
188
+ and the previous stable branch is released from said branch).
189
+
190
+ If you are in a beta version, `make release bump=stage` will switch to a stable.
191
+
192
+ To issue an unstable version when the current version is stable, specify the
193
+ new version explicitly, like `make release bump="--new-version 4.0.0-alpha.1 devnum"`