faster-eth-utils 5.3.17__cp38-cp38-musllinux_1_2_x86_64.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.
- 99c07adba6ff961eaf3e__mypyc.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/__init__.py +144 -0
- faster_eth_utils/__json/eth_networks.json +1 -0
- faster_eth_utils/__main__.py +5 -0
- faster_eth_utils/abi.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/abi.py +847 -0
- faster_eth_utils/address.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/address.py +145 -0
- faster_eth_utils/applicators.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/applicators.py +209 -0
- faster_eth_utils/conversions.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/conversions.py +191 -0
- faster_eth_utils/crypto.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/crypto.py +21 -0
- faster_eth_utils/currency.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/currency.py +141 -0
- faster_eth_utils/curried/__init__.py +306 -0
- faster_eth_utils/debug.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/debug.py +20 -0
- faster_eth_utils/decorators.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/decorators.py +119 -0
- faster_eth_utils/encoding.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/encoding.py +6 -0
- faster_eth_utils/exceptions.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/exceptions.py +11 -0
- faster_eth_utils/functional.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/functional.py +89 -0
- faster_eth_utils/hexadecimal.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/hexadecimal.py +80 -0
- faster_eth_utils/humanize.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/humanize.py +201 -0
- faster_eth_utils/logging.py +146 -0
- faster_eth_utils/module_loading.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/module_loading.py +31 -0
- faster_eth_utils/network.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/network.py +92 -0
- faster_eth_utils/numeric.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/numeric.py +43 -0
- faster_eth_utils/py.typed +0 -0
- faster_eth_utils/pydantic.py +101 -0
- faster_eth_utils/toolz.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/toolz.py +84 -0
- faster_eth_utils/types.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/types.py +68 -0
- faster_eth_utils/typing/__init__.py +18 -0
- faster_eth_utils/typing/misc.py +14 -0
- faster_eth_utils/units.cpython-38-x86_64-linux-gnu.so +0 -0
- faster_eth_utils/units.py +31 -0
- faster_eth_utils-5.3.17.dist-info/LICENSE +21 -0
- faster_eth_utils-5.3.17.dist-info/METADATA +178 -0
- faster_eth_utils-5.3.17.dist-info/RECORD +53 -0
- faster_eth_utils-5.3.17.dist-info/WHEEL +5 -0
- faster_eth_utils-5.3.17.dist-info/top_level.txt +3 -0
|
Binary file
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
from typing import Final
|
|
2
|
+
|
|
3
|
+
try:
|
|
4
|
+
import cytoolz
|
|
5
|
+
cy = True
|
|
6
|
+
except ImportError:
|
|
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
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import collections.abc
|
|
2
|
+
import numbers
|
|
3
|
+
from typing import (
|
|
4
|
+
Any,
|
|
5
|
+
Final,
|
|
6
|
+
List,
|
|
7
|
+
Literal,
|
|
8
|
+
Tuple,
|
|
9
|
+
Union,
|
|
10
|
+
)
|
|
11
|
+
|
|
12
|
+
from typing_extensions import (
|
|
13
|
+
TypeGuard,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
Mapping: Final = collections.abc.Mapping
|
|
17
|
+
Sequence: Final = collections.abc.Sequence
|
|
18
|
+
|
|
19
|
+
Number: Final = numbers.Number
|
|
20
|
+
|
|
21
|
+
bytes_types: Final = (bytes, bytearray)
|
|
22
|
+
integer_types: Final = (int,)
|
|
23
|
+
text_types: Final = (str,)
|
|
24
|
+
string_types: Final = (bytes, str, bytearray)
|
|
25
|
+
|
|
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]]:
|
|
32
|
+
return isinstance(value, bytes_types)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
def is_text(value: Any) -> TypeGuard[str]:
|
|
36
|
+
return isinstance(value, str)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def is_string(value: Any) -> TypeGuard[Union[bytes, str, bytearray]]:
|
|
40
|
+
return isinstance(value, string_types)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def is_boolean(value: Any) -> TypeGuard[bool]:
|
|
44
|
+
return isinstance(value, bool)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def is_dict(obj: Any) -> TypeGuard[collections.abc.Mapping[Any, Any]]:
|
|
48
|
+
return isinstance(obj, dict) or isinstance(obj, Mapping)
|
|
49
|
+
|
|
50
|
+
|
|
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)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def is_list(obj: Any) -> TypeGuard[List[Any]]:
|
|
56
|
+
return isinstance(obj, list)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def is_tuple(obj: Any) -> TypeGuard[Tuple[Any, ...]]:
|
|
60
|
+
return isinstance(obj, tuple)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
def is_null(obj: Any) -> TypeGuard[Literal[None]]:
|
|
64
|
+
return obj is None
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def is_number(obj: Any) -> TypeGuard[numbers.Number]:
|
|
68
|
+
return isinstance(obj, Number)
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import warnings
|
|
2
|
+
|
|
3
|
+
from .misc import (
|
|
4
|
+
Address,
|
|
5
|
+
AnyAddress,
|
|
6
|
+
ChecksumAddress,
|
|
7
|
+
HexAddress,
|
|
8
|
+
HexStr,
|
|
9
|
+
Primitives,
|
|
10
|
+
T,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
warnings.warn(
|
|
14
|
+
"The eth_utils.typing module will be deprecated in favor "
|
|
15
|
+
"of eth-typing in the next major version bump.",
|
|
16
|
+
category=DeprecationWarning,
|
|
17
|
+
stacklevel=2,
|
|
18
|
+
)
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import decimal
|
|
2
|
+
|
|
3
|
+
# Units are in their own module here, so that they can keep this
|
|
4
|
+
# formatting, as this module is excluded from black in pyproject.toml
|
|
5
|
+
# fmt: off
|
|
6
|
+
units = {
|
|
7
|
+
'wei': decimal.Decimal('1'), # noqa: E241
|
|
8
|
+
'kwei': decimal.Decimal('1000'), # noqa: E241
|
|
9
|
+
'babbage': decimal.Decimal('1000'), # noqa: E241
|
|
10
|
+
'femtoether': decimal.Decimal('1000'), # noqa: E241
|
|
11
|
+
'mwei': decimal.Decimal('1000000'), # noqa: E241
|
|
12
|
+
'lovelace': decimal.Decimal('1000000'), # noqa: E241
|
|
13
|
+
'picoether': decimal.Decimal('1000000'), # noqa: E241
|
|
14
|
+
'gwei': decimal.Decimal('1000000000'), # noqa: E241
|
|
15
|
+
'shannon': decimal.Decimal('1000000000'), # noqa: E241
|
|
16
|
+
'nanoether': decimal.Decimal('1000000000'), # noqa: E241
|
|
17
|
+
'nano': decimal.Decimal('1000000000'), # noqa: E241
|
|
18
|
+
'szabo': decimal.Decimal('1000000000000'), # noqa: E241
|
|
19
|
+
'microether': decimal.Decimal('1000000000000'), # noqa: E241
|
|
20
|
+
'micro': decimal.Decimal('1000000000000'), # noqa: E241
|
|
21
|
+
'finney': decimal.Decimal('1000000000000000'), # noqa: E241
|
|
22
|
+
'milliether': decimal.Decimal('1000000000000000'), # noqa: E241
|
|
23
|
+
'milli': decimal.Decimal('1000000000000000'), # noqa: E241
|
|
24
|
+
'ether': decimal.Decimal('1000000000000000000'), # noqa: E241
|
|
25
|
+
'kether': decimal.Decimal('1000000000000000000000'), # noqa: E241
|
|
26
|
+
'grand': decimal.Decimal('1000000000000000000000'), # noqa: E241
|
|
27
|
+
'mether': decimal.Decimal('1000000000000000000000000'), # noqa: E241
|
|
28
|
+
'gether': decimal.Decimal('1000000000000000000000000000'), # noqa: E241
|
|
29
|
+
'tether': decimal.Decimal('1000000000000000000000000000000'), # noqa: E241
|
|
30
|
+
}
|
|
31
|
+
# fmt: on
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2017-2025 The Ethereum Foundation
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: faster-eth-utils
|
|
3
|
+
Version: 5.3.17
|
|
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.4
|
|
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: pydantic<3,>=2.0.0
|
|
36
|
+
Requires-Dist: cytoolz>=0.10.1; implementation_name == "cpython"
|
|
37
|
+
Requires-Dist: toolz>0.8.2; implementation_name == "pypy"
|
|
38
|
+
Provides-Extra: benchmark
|
|
39
|
+
Requires-Dist: eth-utils==5.3.1; extra == "benchmark"
|
|
40
|
+
Requires-Dist: pytest-benchmark==5.2.2; extra == "benchmark"
|
|
41
|
+
Requires-Dist: pytest-codspeed<4.3,>=4.2; extra == "benchmark"
|
|
42
|
+
Requires-Dist: pytest-test-groups; extra == "benchmark"
|
|
43
|
+
Requires-Dist: pytest>=7.0.0; extra == "benchmark"
|
|
44
|
+
Provides-Extra: codspeed
|
|
45
|
+
Requires-Dist: pytest-codspeed<4.3,>=4.2; extra == "codspeed"
|
|
46
|
+
Requires-Dist: pytest-test-groups; extra == "codspeed"
|
|
47
|
+
Requires-Dist: pytest>=7.0.0; extra == "codspeed"
|
|
48
|
+
Provides-Extra: dev
|
|
49
|
+
Requires-Dist: build>=0.9.0; extra == "dev"
|
|
50
|
+
Requires-Dist: bump-my-version>=0.19.0; extra == "dev"
|
|
51
|
+
Requires-Dist: eth-hash[pycryptodome]; extra == "dev"
|
|
52
|
+
Requires-Dist: ipython; extra == "dev"
|
|
53
|
+
Requires-Dist: mypy<1.18.3,>=1.14.1; extra == "dev"
|
|
54
|
+
Requires-Dist: pre-commit>=3.4.0; extra == "dev"
|
|
55
|
+
Requires-Dist: tox>=4.0.0; extra == "dev"
|
|
56
|
+
Requires-Dist: twine; extra == "dev"
|
|
57
|
+
Requires-Dist: wheel; extra == "dev"
|
|
58
|
+
Requires-Dist: sphinx>=6.0.0; extra == "dev"
|
|
59
|
+
Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "dev"
|
|
60
|
+
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "dev"
|
|
61
|
+
Requires-Dist: towncrier<26,>=24; extra == "dev"
|
|
62
|
+
Requires-Dist: hypothesis>=4.43.0; extra == "dev"
|
|
63
|
+
Requires-Dist: pytest-xdist>=2.4.0; extra == "dev"
|
|
64
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
65
|
+
Provides-Extra: docs
|
|
66
|
+
Requires-Dist: sphinx>=6.0.0; extra == "docs"
|
|
67
|
+
Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
|
|
68
|
+
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
|
|
69
|
+
Requires-Dist: towncrier<26,>=24; extra == "docs"
|
|
70
|
+
Provides-Extra: test
|
|
71
|
+
Requires-Dist: hypothesis>=4.43.0; extra == "test"
|
|
72
|
+
Requires-Dist: mypy<1.18.3,>=1.14.1; extra == "test"
|
|
73
|
+
Requires-Dist: pytest-xdist>=2.4.0; extra == "test"
|
|
74
|
+
Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
75
|
+
|
|
76
|
+
### I forked eth-utils and compiled it to C. It does the same stuff, now faster
|
|
77
|
+
|
|
78
|
+
[](https://pypi.org/project/faster-eth-utils)
|
|
79
|
+
[](https://pypistats.org/packages/faster-eth-utils)
|
|
80
|
+
[](https://codspeed.io/BobTheBuidler/faster-eth-utils)
|
|
81
|
+
|
|
82
|
+
##### 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/).
|
|
83
|
+
|
|
84
|
+
##### 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.
|
|
85
|
+
|
|
86
|
+
##### 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).
|
|
87
|
+
|
|
88
|
+
##### You can find the compiled C code and header files in the [build](https://github.com/BobTheBuidler/eth-utils/tree/master/build) directory.
|
|
89
|
+
|
|
90
|
+
###### 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/)
|
|
91
|
+
|
|
92
|
+
##### The original eth-utils readme is below:
|
|
93
|
+
|
|
94
|
+
# Ethereum Utilities
|
|
95
|
+
|
|
96
|
+
[](https://discord.gg/GHryRvPB84)
|
|
97
|
+
[](https://circleci.com/gh/ethereum/eth-utils)
|
|
98
|
+
[](https://badge.fury.io/py/eth-utils)
|
|
99
|
+
[](https://pypi.python.org/pypi/eth-utils)
|
|
100
|
+
[](https://eth-utils.readthedocs.io/en/latest/?badge=latest)
|
|
101
|
+
|
|
102
|
+
Common utility functions for python code that interacts with Ethereum
|
|
103
|
+
|
|
104
|
+
Read the [documentation](https://eth-utils.readthedocs.io/).
|
|
105
|
+
|
|
106
|
+
View the [change log](https://eth-utils.readthedocs.io/en/latest/release_notes.html).
|
|
107
|
+
|
|
108
|
+
## Installation
|
|
109
|
+
|
|
110
|
+
```sh
|
|
111
|
+
python -m pip install eth-utils
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Developer Setup
|
|
115
|
+
|
|
116
|
+
If you would like to hack on eth-utils, please check out the [Snake Charmers
|
|
117
|
+
Tactical Manual](https://github.com/ethereum/snake-charmers-tactical-manual)
|
|
118
|
+
for information on how we do:
|
|
119
|
+
|
|
120
|
+
- Testing
|
|
121
|
+
- Pull Requests
|
|
122
|
+
- Documentation
|
|
123
|
+
|
|
124
|
+
We use [pre-commit](https://pre-commit.com/) to maintain consistent code style. Once
|
|
125
|
+
installed, it will run automatically with every commit. You can also run it manually
|
|
126
|
+
with `make lint`. If you need to make a commit that skips the `pre-commit` checks, you
|
|
127
|
+
can do so with `git commit --no-verify`.
|
|
128
|
+
|
|
129
|
+
### Development Environment Setup
|
|
130
|
+
|
|
131
|
+
You can set up your dev environment with:
|
|
132
|
+
|
|
133
|
+
```sh
|
|
134
|
+
git clone git@github.com:ethereum/eth-utils.git
|
|
135
|
+
cd eth-utils
|
|
136
|
+
virtualenv -p python3 venv
|
|
137
|
+
. venv/bin/activate
|
|
138
|
+
python -m pip install -e ".[dev]"
|
|
139
|
+
pre-commit install
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Update Networks
|
|
143
|
+
|
|
144
|
+
The list of networks resides in the JSON file under eth_utils/\_\_json/eth_networks.json.
|
|
145
|
+
This file is used to initialize Networks, which can be used to obtain network
|
|
146
|
+
information with a chain ID.
|
|
147
|
+
|
|
148
|
+
Run the script to update the JSON file with the response from the remote list.
|
|
149
|
+
|
|
150
|
+
```sh
|
|
151
|
+
python update_networks.py
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
If there are new networks they will appear in the JSON file. After checking the updates,
|
|
155
|
+
open a PR to make them available in a new release.
|
|
156
|
+
|
|
157
|
+
### Release setup
|
|
158
|
+
|
|
159
|
+
To release a new version:
|
|
160
|
+
|
|
161
|
+
```sh
|
|
162
|
+
make release bump=$$VERSION_PART_TO_BUMP$$
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
#### How to bumpversion
|
|
166
|
+
|
|
167
|
+
The version format for this repo is `{major}.{minor}.{patch}` for stable, and
|
|
168
|
+
`{major}.{minor}.{patch}-{stage}.{devnum}` for unstable (`stage` can be alpha or beta).
|
|
169
|
+
|
|
170
|
+
To issue the next version in line, specify which part to bump,
|
|
171
|
+
like `make release bump=minor` or `make release bump=devnum`. This is typically done from the
|
|
172
|
+
main branch, except when releasing a beta (in which case the beta is released from main,
|
|
173
|
+
and the previous stable branch is released from said branch).
|
|
174
|
+
|
|
175
|
+
If you are in a beta version, `make release bump=stage` will switch to a stable.
|
|
176
|
+
|
|
177
|
+
To issue an unstable version when the current version is stable, specify the
|
|
178
|
+
new version explicitly, like `make release bump="--new-version 4.0.0-alpha.1 devnum"`
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
99c07adba6ff961eaf3e__mypyc.cpython-38-x86_64-linux-gnu.so,sha256=hDBrc9nofZxrIYnoZrd4fsOwXNx66g3JZLyBZIDiYN4,1389920
|
|
2
|
+
faster_eth_utils/__init__.py,sha256=hW-A_fjyQ76crTKwuxxSbvNzvPfW27dSlzhtOkseymg,2762
|
|
3
|
+
faster_eth_utils/__main__.py,sha256=mH37e49q7_A0-q1ymqkq1QyYABbQHVmXeuSKIBSahO8,86
|
|
4
|
+
faster_eth_utils/abi.cpython-38-x86_64-linux-gnu.so,sha256=E4KZxRse-11Jwzsip35CD5dYBuQ2QBXN3qrOQiTSolk,17416
|
|
5
|
+
faster_eth_utils/abi.py,sha256=3pAqpKXMOcOLCD4uUUVfxBcM9H1K311dpd1Zj0Qi21g,26404
|
|
6
|
+
faster_eth_utils/address.cpython-38-x86_64-linux-gnu.so,sha256=iqAxHwMXFnib36FVEf1gcKeOs4HG1IcHMiZZ8DNaZSA,17432
|
|
7
|
+
faster_eth_utils/address.py,sha256=IIHlYuIz-F6-mAnRWdsD4uH5l56yVRFMokFQINao9lE,3680
|
|
8
|
+
faster_eth_utils/applicators.cpython-38-x86_64-linux-gnu.so,sha256=Vj0RmWtWkCRgrxwfkGoPCrRVXkKMZPLpi-K653d_fX4,17448
|
|
9
|
+
faster_eth_utils/applicators.py,sha256=gSKr2HTto1pV8OCidj9gCDi5qGHSCMmQJVAHdSFShfw,6044
|
|
10
|
+
faster_eth_utils/conversions.cpython-38-x86_64-linux-gnu.so,sha256=F3aHZFbWNzdcRlrhW89qR6301xIr0TxuYANcfqytuQc,17448
|
|
11
|
+
faster_eth_utils/conversions.py,sha256=t2TEe0WsffqOFDbyQcERTSbHJYpDBWHKd8XPArhLoEE,5665
|
|
12
|
+
faster_eth_utils/crypto.cpython-38-x86_64-linux-gnu.so,sha256=aH1uwiLRs1vIr4GlbUVDqU7e4P8ftxc6aELnwXvregY,17424
|
|
13
|
+
faster_eth_utils/crypto.py,sha256=EQgupom_TnURbLNXodwbJoKB-mHyxgOTvo8EjnSzdxw,395
|
|
14
|
+
faster_eth_utils/currency.cpython-38-x86_64-linux-gnu.so,sha256=Vn6ZF7GALlY_qdQpBTAT3-NeUMfEZo3DdEr_bnzFzV8,17440
|
|
15
|
+
faster_eth_utils/currency.py,sha256=01YVV2f2GL4830jfSjnC4XhLQjTNQB-5y7vbGzaMWbM,4150
|
|
16
|
+
faster_eth_utils/debug.cpython-38-x86_64-linux-gnu.so,sha256=hbEkhgcmtshDL7JKMDWawLOduwLVZWNffor5fXTjlH8,17424
|
|
17
|
+
faster_eth_utils/debug.py,sha256=0Z-tNOqgQJunS4uHeSCCH1LWLoijlH34MBh6NRrrDrk,499
|
|
18
|
+
faster_eth_utils/decorators.cpython-38-x86_64-linux-gnu.so,sha256=a5DP03t-4yUXdJwDDXKsFj-86nxF5PolUvE2Fpqmgw0,17440
|
|
19
|
+
faster_eth_utils/decorators.py,sha256=yw-QgJG29WvfuObvm6Rz8-SgLls3YW4eflqLkvmItxg,3288
|
|
20
|
+
faster_eth_utils/encoding.cpython-38-x86_64-linux-gnu.so,sha256=iDjtteDybS1bDIZeY5WOJilGgoOxHGkp_dk3X3vgfYs,17440
|
|
21
|
+
faster_eth_utils/encoding.py,sha256=1qfDeuinLZ01XjYgknpm_p9LuWwaYvicYkYI8mS1iMc,199
|
|
22
|
+
faster_eth_utils/exceptions.cpython-38-x86_64-linux-gnu.so,sha256=lzx1SMU2_oa7VsR9O5oos2MM0nalTi_bwJtUA2ZQBm0,17440
|
|
23
|
+
faster_eth_utils/exceptions.py,sha256=7Cjxewj4g95RxNvjNqaB2w3HGk6068V82ppCHS_S-Y0,369
|
|
24
|
+
faster_eth_utils/functional.cpython-38-x86_64-linux-gnu.so,sha256=LSf71b8DVzpqG19wjLxYwpiRA_Jg3biVYYuTsf7VUao,17440
|
|
25
|
+
faster_eth_utils/functional.py,sha256=nJTxE4_HDci0chos5mQdy05pJ8o7n0wx_o7_WCro2gI,2449
|
|
26
|
+
faster_eth_utils/hexadecimal.cpython-38-x86_64-linux-gnu.so,sha256=gEEls8vy7pDvzDvbbW5dNXk70XuH3urjMRJjCWAU2ss,17448
|
|
27
|
+
faster_eth_utils/hexadecimal.py,sha256=bPxUdJse6A3j3vF6KpnvSM2h3eRhgWSWeyicwnLdvHY,2082
|
|
28
|
+
faster_eth_utils/humanize.cpython-38-x86_64-linux-gnu.so,sha256=zBtaD1gc2oZfGdRdHUWl-fif-zdrkA7NDpLPVLKDV9U,17440
|
|
29
|
+
faster_eth_utils/humanize.py,sha256=bCxXyx73NuVIDjRnpPZs7lybfrun-llC3ITy-0zZSns,4682
|
|
30
|
+
faster_eth_utils/logging.py,sha256=jRuZMKo0rxDtlUxkj6MpHQw6WZbRmFjvx5mvBoE0M2w,4650
|
|
31
|
+
faster_eth_utils/module_loading.cpython-38-x86_64-linux-gnu.so,sha256=K0d-fANbbRhUPfH4sqZsZkfOcLGmcNnTdnmBEqaeP34,17456
|
|
32
|
+
faster_eth_utils/module_loading.py,sha256=DCLM4dEh1gqr8Ny-FWwD-_pINqeHzbLSupz4ZIpCCAw,842
|
|
33
|
+
faster_eth_utils/network.cpython-38-x86_64-linux-gnu.so,sha256=e8HqAZC3eSx7Va5-0qreafbrY8zsDyddhLtqun2W8ek,17432
|
|
34
|
+
faster_eth_utils/network.py,sha256=O3yTtA93YyyZ6Obkusr_IbbcZ6upkCewN6EsAcF0Npc,2278
|
|
35
|
+
faster_eth_utils/numeric.cpython-38-x86_64-linux-gnu.so,sha256=BijcEPqZSsn4kJFWnm5T9ov0yJTnBEPADUQJ2k3Tggo,17432
|
|
36
|
+
faster_eth_utils/numeric.py,sha256=RrXdXI-bhhkEsz3aBtxHuGlc_2ZJvUGpvMc47wx408Y,1190
|
|
37
|
+
faster_eth_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
38
|
+
faster_eth_utils/pydantic.py,sha256=za0WJGWkjYQkRnMbEke7ueyhDt-kuqFmCq0Utaji46g,3393
|
|
39
|
+
faster_eth_utils/toolz.cpython-38-x86_64-linux-gnu.so,sha256=yJShDZ9g6GAnySs2-SWhteQyAGVVEH0lVnelpDT_1Vk,17424
|
|
40
|
+
faster_eth_utils/toolz.py,sha256=1QQY-aMbZrEgJsuqR0Ajsa32C_cXrQquzViw7OkxNLU,4410
|
|
41
|
+
faster_eth_utils/types.cpython-38-x86_64-linux-gnu.so,sha256=x6K9HEuVg96ki02NVPV2_ICfVPg-kwbj2LPeRDihyhc,17424
|
|
42
|
+
faster_eth_utils/types.py,sha256=FHguW7kJ-MrfVnziVHQGswvvZd6CgshB90cs0l8OT5I,1578
|
|
43
|
+
faster_eth_utils/units.cpython-38-x86_64-linux-gnu.so,sha256=YbdTMQmRf7xpMbPTu6X1i7vYROBYTwIdbgebfSrvBpQ,17424
|
|
44
|
+
faster_eth_utils/units.py,sha256=jRo8p6trxwuISBnT8kfxTNVyd_TSd5vVY5aiKDefB1U,1757
|
|
45
|
+
faster_eth_utils/__json/eth_networks.json,sha256=0S8HoWD6RTR6Hc0uQdQl2VHtopytIYl5NiDAzpuskBs,414773
|
|
46
|
+
faster_eth_utils/curried/__init__.py,sha256=IXUt8m3gGNeT_MNmW2CBz6PrZK6Pc0096GYnnKW1Yd0,7992
|
|
47
|
+
faster_eth_utils/typing/__init__.py,sha256=84PxIxCvEHtBb-Ik6qnGvXH4alaWbamr_zDbtlbJh3A,325
|
|
48
|
+
faster_eth_utils/typing/misc.py,sha256=4N5raYXFAeRGpmch6qgHrtYNCDxCJM5XtAAsJ1FSzzU,190
|
|
49
|
+
faster_eth_utils-5.3.17.dist-info/LICENSE,sha256=STqznQ6A8OeJylPrTA7dlsMtH0isQQybRlnDZOKGVrM,1095
|
|
50
|
+
faster_eth_utils-5.3.17.dist-info/METADATA,sha256=BBCqs3GqQgQL4eTMDARoTo45ISo-rEVdwVEPbE8dKQ4,8578
|
|
51
|
+
faster_eth_utils-5.3.17.dist-info/WHEEL,sha256=AtKzrIIwO6LyEQPNa-CKogjoLSeXFnST8-hqmpwwZQA,110
|
|
52
|
+
faster_eth_utils-5.3.17.dist-info/top_level.txt,sha256=8eOy3WlvVLCcmwPnl2UMylYQNmrXz76p9L_TH-NYSSM,55
|
|
53
|
+
faster_eth_utils-5.3.17.dist-info/RECORD,,
|