faster-eth-abi 5.2.16__cp38-cp38-win_amd64.whl → 5.2.17__cp38-cp38-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.
Potentially problematic release.
This version of faster-eth-abi might be problematic. Click here for more details.
- 29859a9e7da9d19bb98c__mypyc.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/_codec.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/_decoding.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/_encoding.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/_grammar.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/_grammar.py +38 -23
- faster_eth_abi/abi.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/base.py +1 -1
- faster_eth_abi/constants.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/decoding.py +5 -6
- faster_eth_abi/encoding.py +9 -9
- faster_eth_abi/from_type_str.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/grammar.py +8 -4
- faster_eth_abi/io.py +1 -1
- faster_eth_abi/packed.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/registry.py +7 -6
- faster_eth_abi/tools/__init__.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/tools/_strategies.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/tools/_strategies.py +3 -1
- faster_eth_abi/utils/__init__.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/utils/numeric.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/utils/padding.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/utils/string.cp38-win_amd64.pyd +0 -0
- faster_eth_abi/utils/validation.cp38-win_amd64.pyd +0 -0
- {faster_eth_abi-5.2.16.dist-info → faster_eth_abi-5.2.17.dist-info}/METADATA +7 -4
- faster_eth_abi-5.2.17.dist-info/RECORD +46 -0
- faster_eth_abi-5.2.16.dist-info/LICENSE +0 -21
- faster_eth_abi-5.2.16.dist-info/RECORD +0 -47
- {faster_eth_abi-5.2.16.dist-info → faster_eth_abi-5.2.17.dist-info}/WHEEL +0 -0
- {faster_eth_abi-5.2.16.dist-info → faster_eth_abi-5.2.17.dist-info}/top_level.txt +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
faster_eth_abi/_grammar.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""
|
|
2
|
+
Private helpers for ABI type string grammar and parsing, intended for C compilation.
|
|
2
3
|
|
|
3
4
|
This file exists because the original grammar.py is not ready to be fully compiled to C.
|
|
4
5
|
This module contains functions and logic that we do wish to compile.
|
|
@@ -12,19 +13,16 @@ from typing import (
|
|
|
12
13
|
NewType,
|
|
13
14
|
NoReturn,
|
|
14
15
|
Optional,
|
|
15
|
-
Sequence,
|
|
16
16
|
Tuple,
|
|
17
17
|
TypeVar,
|
|
18
18
|
Union,
|
|
19
|
+
cast,
|
|
19
20
|
final,
|
|
20
21
|
)
|
|
21
22
|
|
|
22
23
|
from eth_typing.abi import (
|
|
23
24
|
TypeStr,
|
|
24
25
|
)
|
|
25
|
-
from mypy_extensions import (
|
|
26
|
-
mypyc_attr,
|
|
27
|
-
)
|
|
28
26
|
from parsimonious.nodes import (
|
|
29
27
|
Node,
|
|
30
28
|
)
|
|
@@ -50,30 +48,39 @@ TYPE_ALIAS_RE: Final = re.compile(
|
|
|
50
48
|
)
|
|
51
49
|
|
|
52
50
|
|
|
51
|
+
Arrlist = Tuple[Union[int, Tuple[int, ...]], ...]
|
|
53
52
|
IntSubtype = NewType("IntSubtype", int)
|
|
54
53
|
FixedSubtype = NewType("FixedSubtype", Tuple[int, int])
|
|
55
54
|
Subtype = Union[IntSubtype, FixedSubtype]
|
|
56
55
|
TSub = TypeVar("TSub", IntSubtype, FixedSubtype, Literal[None])
|
|
57
56
|
|
|
58
57
|
|
|
59
|
-
@mypyc_attr(allow_interpreted_subclasses=True)
|
|
60
58
|
class ABIType:
|
|
61
59
|
"""
|
|
62
60
|
Base class for results of type string parsing operations.
|
|
61
|
+
|
|
62
|
+
Notes
|
|
63
|
+
-----
|
|
64
|
+
Users are unable to subclass this class. If your use case requires subclassing,
|
|
65
|
+
you will need to stick to the original `eth-abi`.
|
|
66
|
+
|
|
63
67
|
"""
|
|
64
68
|
|
|
69
|
+
arrlist: Final[Optional[Arrlist]]
|
|
70
|
+
node: Final[Optional[Node]]
|
|
71
|
+
|
|
65
72
|
__slots__ = ("arrlist", "node")
|
|
66
73
|
|
|
67
74
|
def __init__(
|
|
68
|
-
self, arrlist: Optional[
|
|
75
|
+
self, arrlist: Optional[Arrlist] = None, node: Optional[Node] = None
|
|
69
76
|
) -> None:
|
|
70
|
-
self.arrlist
|
|
77
|
+
self.arrlist = arrlist
|
|
71
78
|
"""
|
|
72
79
|
The list of array dimensions for a parsed type. Equal to ``None`` if
|
|
73
80
|
type string has no array dimensions.
|
|
74
81
|
"""
|
|
75
82
|
|
|
76
|
-
self.node
|
|
83
|
+
self.node = node
|
|
77
84
|
"""
|
|
78
85
|
The parsimonious ``Node`` instance associated with this parsed type.
|
|
79
86
|
Used to generate error messages for invalid types.
|
|
@@ -149,10 +156,15 @@ class ABIType:
|
|
|
149
156
|
TComp = TypeVar("TComp", bound=ABIType)
|
|
150
157
|
|
|
151
158
|
|
|
152
|
-
@mypyc_attr(allow_interpreted_subclasses=True)
|
|
153
159
|
class TupleType(ABIType):
|
|
154
160
|
"""
|
|
155
161
|
Represents the result of parsing a tuple type string e.g. "(int,bool)".
|
|
162
|
+
|
|
163
|
+
Notes
|
|
164
|
+
-----
|
|
165
|
+
Users are unable to subclass this class. If your use case requires subclassing,
|
|
166
|
+
you will need to stick to the original `eth-abi`.
|
|
167
|
+
|
|
156
168
|
"""
|
|
157
169
|
|
|
158
170
|
__slots__ = ("components",)
|
|
@@ -160,7 +172,7 @@ class TupleType(ABIType):
|
|
|
160
172
|
def __init__(
|
|
161
173
|
self,
|
|
162
174
|
components: Tuple[TComp, ...],
|
|
163
|
-
arrlist: Optional[
|
|
175
|
+
arrlist: Optional[Arrlist] = None,
|
|
164
176
|
*,
|
|
165
177
|
node: Optional[Node] = None,
|
|
166
178
|
) -> None:
|
|
@@ -173,14 +185,12 @@ class TupleType(ABIType):
|
|
|
173
185
|
"""
|
|
174
186
|
|
|
175
187
|
def to_type_str(self) -> TypeStr:
|
|
176
|
-
|
|
188
|
+
components = f"({','.join(c.to_type_str() for c in self.components)})"
|
|
177
189
|
|
|
178
|
-
if isinstance(arrlist, tuple):
|
|
179
|
-
|
|
190
|
+
if isinstance(arrlist := self.arrlist, tuple):
|
|
191
|
+
return components + "".join(map(repr, map(list, arrlist)))
|
|
180
192
|
else:
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
return f"({','.join(c.to_type_str() for c in self.components)}){arrlist}"
|
|
193
|
+
return components
|
|
184
194
|
|
|
185
195
|
@property
|
|
186
196
|
def item_type(self) -> Self:
|
|
@@ -189,10 +199,10 @@ class TupleType(ABIType):
|
|
|
189
199
|
f"Cannot determine item type for non-array type '{self.to_type_str()}'"
|
|
190
200
|
)
|
|
191
201
|
|
|
192
|
-
arrlist = self.arrlist[:-1] or None
|
|
202
|
+
arrlist = cast(Arrlist, self.arrlist)[:-1] or None
|
|
193
203
|
cls = type(self)
|
|
194
204
|
if cls is TupleType:
|
|
195
|
-
return TupleType(self.components, arrlist, node=self.node)
|
|
205
|
+
return cast(Self, TupleType(self.components, arrlist, node=self.node))
|
|
196
206
|
else:
|
|
197
207
|
return cls(self.components, arrlist, node=self.node)
|
|
198
208
|
|
|
@@ -208,11 +218,16 @@ class TupleType(ABIType):
|
|
|
208
218
|
return any(c.is_dynamic for c in self.components)
|
|
209
219
|
|
|
210
220
|
|
|
211
|
-
@mypyc_attr(allow_interpreted_subclasses=True)
|
|
212
221
|
class BasicType(ABIType, Generic[TSub]):
|
|
213
222
|
"""
|
|
214
223
|
Represents the result of parsing a basic type string e.g. "uint", "address",
|
|
215
224
|
"ufixed128x19[][2]".
|
|
225
|
+
|
|
226
|
+
Notes
|
|
227
|
+
-----
|
|
228
|
+
Users are unable to subclass this class. If your use case requires subclassing,
|
|
229
|
+
you will need to stick to the original `eth-abi`.
|
|
230
|
+
|
|
216
231
|
"""
|
|
217
232
|
|
|
218
233
|
__slots__ = ("base", "sub")
|
|
@@ -221,7 +236,7 @@ class BasicType(ABIType, Generic[TSub]):
|
|
|
221
236
|
self,
|
|
222
237
|
base: str,
|
|
223
238
|
sub: Optional[TSub] = None,
|
|
224
|
-
arrlist: Optional[
|
|
239
|
+
arrlist: Optional[Arrlist] = None,
|
|
225
240
|
*,
|
|
226
241
|
node: Optional[Node] = None,
|
|
227
242
|
) -> None:
|
|
@@ -260,9 +275,9 @@ class BasicType(ABIType, Generic[TSub]):
|
|
|
260
275
|
)
|
|
261
276
|
|
|
262
277
|
cls = type(self)
|
|
263
|
-
arrlist = self.arrlist[:-1] or None
|
|
278
|
+
arrlist = cast(Arrlist, self.arrlist)[:-1] or None
|
|
264
279
|
if cls is BasicType:
|
|
265
|
-
return BasicType(self.base, self.sub, arrlist, node=self.node)
|
|
280
|
+
return cast(Self, BasicType(self.base, self.sub, arrlist, node=self.node))
|
|
266
281
|
else:
|
|
267
282
|
return cls(self.base, self.sub, arrlist, node=self.node)
|
|
268
283
|
|
|
Binary file
|
faster_eth_abi/base.py
CHANGED
|
Binary file
|
faster_eth_abi/decoding.py
CHANGED
|
@@ -110,9 +110,8 @@ class HeadTailDecoder(BaseDecoder[T]):
|
|
|
110
110
|
"DynamicArrayDecoder[T]",
|
|
111
111
|
"ByteStringDecoder[T]",
|
|
112
112
|
],
|
|
113
|
-
**kwargs: Any,
|
|
114
113
|
) -> None:
|
|
115
|
-
super().__init__(
|
|
114
|
+
super().__init__()
|
|
116
115
|
|
|
117
116
|
if tail_decoder is None:
|
|
118
117
|
raise ValueError("No `tail_decoder` set")
|
|
@@ -128,8 +127,8 @@ class HeadTailDecoder(BaseDecoder[T]):
|
|
|
128
127
|
class TupleDecoder(BaseDecoder[Tuple[T, ...]]):
|
|
129
128
|
decoders: Tuple[BaseDecoder[T], ...] = ()
|
|
130
129
|
|
|
131
|
-
def __init__(self, decoders: Tuple[BaseDecoder[T], ...]
|
|
132
|
-
super().__init__(
|
|
130
|
+
def __init__(self, decoders: Tuple[BaseDecoder[T], ...]) -> None:
|
|
131
|
+
super().__init__()
|
|
133
132
|
|
|
134
133
|
self.decoders = decoders = tuple(
|
|
135
134
|
HeadTailDecoder(tail_decoder=d) if getattr(d, "is_dynamic", False) else d
|
|
@@ -250,7 +249,7 @@ class BaseArrayDecoder(BaseDecoder[Tuple[T, ...]]):
|
|
|
250
249
|
class SizedArrayDecoder(BaseArrayDecoder[T]):
|
|
251
250
|
array_size: int = None
|
|
252
251
|
|
|
253
|
-
def __init__(self, **kwargs):
|
|
252
|
+
def __init__(self, **kwargs: Any) -> None:
|
|
254
253
|
super().__init__(**kwargs)
|
|
255
254
|
|
|
256
255
|
self.is_dynamic = self.item_decoder.is_dynamic
|
|
@@ -277,7 +276,7 @@ class FixedByteSizeDecoder(SingleDecoder[T]):
|
|
|
277
276
|
data_byte_size: int = None
|
|
278
277
|
is_big_endian: bool = None
|
|
279
278
|
|
|
280
|
-
def __init__(self, **kwargs):
|
|
279
|
+
def __init__(self, **kwargs: Any) -> None:
|
|
281
280
|
super().__init__(**kwargs)
|
|
282
281
|
|
|
283
282
|
self.read_data_from_stream = MethodType(
|
faster_eth_abi/encoding.py
CHANGED
|
@@ -96,7 +96,7 @@ class BaseEncoder(BaseCoder, metaclass=abc.ABCMeta):
|
|
|
96
96
|
"""
|
|
97
97
|
|
|
98
98
|
@abc.abstractmethod
|
|
99
|
-
def validate_value(self, value: Any) -> None:
|
|
99
|
+
def validate_value(self, value: Any) -> None:
|
|
100
100
|
"""
|
|
101
101
|
Checks whether or not the given value can be encoded by this encoder.
|
|
102
102
|
If the given value cannot be encoded, must raise
|
|
@@ -213,7 +213,7 @@ class FixedSizeEncoder(BaseEncoder):
|
|
|
213
213
|
if value_bit_size > data_byte_size * 8:
|
|
214
214
|
raise ValueError("Value byte size exceeds data size")
|
|
215
215
|
|
|
216
|
-
def validate_value(self, value):
|
|
216
|
+
def validate_value(self, value: Any) -> None:
|
|
217
217
|
raise NotImplementedError("Must be implemented by subclasses")
|
|
218
218
|
|
|
219
219
|
def encode(self, value: Any) -> bytes:
|
|
@@ -271,7 +271,7 @@ class NumberEncoder(Fixed32ByteSizeEncoder):
|
|
|
271
271
|
if self.type_check_fn is None:
|
|
272
272
|
raise ValueError("`type_check_fn` cannot be null")
|
|
273
273
|
|
|
274
|
-
def validate_value(self, value):
|
|
274
|
+
def validate_value(self, value: Any) -> None:
|
|
275
275
|
type_check_fn = self.type_check_fn
|
|
276
276
|
if type_check_fn is None:
|
|
277
277
|
raise AssertionError("`type_check_fn` is None")
|
|
@@ -433,7 +433,7 @@ class UnsignedFixedEncoder(BaseFixedEncoder):
|
|
|
433
433
|
def bounds_fn(self, value_bit_size):
|
|
434
434
|
return compute_unsigned_fixed_bounds(self.value_bit_size, self.frac_places)
|
|
435
435
|
|
|
436
|
-
def encode_fn(self, value):
|
|
436
|
+
def encode_fn(self, value: decimal.Decimal) -> bytes:
|
|
437
437
|
with decimal.localcontext(abi_decimal_context):
|
|
438
438
|
scaled_value = value * self.denominator
|
|
439
439
|
integer_value = int(scaled_value)
|
|
@@ -466,7 +466,7 @@ class SignedFixedEncoder(BaseFixedEncoder):
|
|
|
466
466
|
def bounds_fn(self, value_bit_size):
|
|
467
467
|
return compute_signed_fixed_bounds(self.value_bit_size, self.frac_places)
|
|
468
468
|
|
|
469
|
-
def encode_fn(self, value):
|
|
469
|
+
def encode_fn(self, value: decimal.Decimal) -> bytes:
|
|
470
470
|
with decimal.localcontext(abi_decimal_context):
|
|
471
471
|
scaled_value = value * self.denominator
|
|
472
472
|
integer_value = int(scaled_value)
|
|
@@ -475,7 +475,7 @@ class SignedFixedEncoder(BaseFixedEncoder):
|
|
|
475
475
|
|
|
476
476
|
return int_to_big_endian(unsigned_integer_value)
|
|
477
477
|
|
|
478
|
-
def encode(self, value):
|
|
478
|
+
def encode(self, value: decimal.Decimal) -> bytes:
|
|
479
479
|
self.validate_value(value)
|
|
480
480
|
return encode_signed(value, self.encode_fn, self.data_byte_size)
|
|
481
481
|
|
|
@@ -544,7 +544,7 @@ class BytesEncoder(Fixed32ByteSizeEncoder):
|
|
|
544
544
|
)
|
|
545
545
|
|
|
546
546
|
@staticmethod
|
|
547
|
-
def encode_fn(value):
|
|
547
|
+
def encode_fn(value: bytes) -> bytes:
|
|
548
548
|
return value
|
|
549
549
|
|
|
550
550
|
@parse_type_str("bytes")
|
|
@@ -590,7 +590,7 @@ class PackedByteStringEncoder(ByteStringEncoder):
|
|
|
590
590
|
is_dynamic = False
|
|
591
591
|
|
|
592
592
|
@classmethod
|
|
593
|
-
def encode(cls, value):
|
|
593
|
+
def encode(cls, value: bytes) -> bytes:
|
|
594
594
|
cls.validate_value(value)
|
|
595
595
|
return value
|
|
596
596
|
|
|
@@ -711,7 +711,7 @@ class PackedArrayEncoder(BaseArrayEncoder):
|
|
|
711
711
|
class SizedArrayEncoder(BaseArrayEncoder):
|
|
712
712
|
array_size = None
|
|
713
713
|
|
|
714
|
-
def __init__(self, **kwargs):
|
|
714
|
+
def __init__(self, **kwargs: Any) -> None:
|
|
715
715
|
super().__init__(**kwargs)
|
|
716
716
|
|
|
717
717
|
self.is_dynamic = self.item_encoder.is_dynamic
|
|
Binary file
|
faster_eth_abi/grammar.py
CHANGED
|
@@ -4,11 +4,15 @@ Implements grammar, parsing, and type validation for ABI type strings.
|
|
|
4
4
|
"""
|
|
5
5
|
import functools
|
|
6
6
|
from typing import (
|
|
7
|
+
Any,
|
|
7
8
|
Final,
|
|
8
9
|
final,
|
|
9
10
|
)
|
|
10
11
|
|
|
11
12
|
import parsimonious
|
|
13
|
+
from eth_typing import (
|
|
14
|
+
TypeStr,
|
|
15
|
+
)
|
|
12
16
|
from parsimonious import (
|
|
13
17
|
expressions,
|
|
14
18
|
)
|
|
@@ -53,14 +57,14 @@ grammar: Final = parsimonious.Grammar(
|
|
|
53
57
|
|
|
54
58
|
|
|
55
59
|
@final
|
|
56
|
-
class NodeVisitor(parsimonious.NodeVisitor):
|
|
60
|
+
class NodeVisitor(parsimonious.NodeVisitor):
|
|
57
61
|
"""
|
|
58
62
|
Parsimonious node visitor which performs both parsing of type strings and
|
|
59
63
|
post-processing of parse trees. Parsing operations are cached.
|
|
60
64
|
"""
|
|
61
65
|
|
|
62
|
-
def __init__(self):
|
|
63
|
-
self.parse = functools.lru_cache(maxsize=None)(self._parse_uncached)
|
|
66
|
+
def __init__(self) -> None:
|
|
67
|
+
self.parse: Final = functools.lru_cache(maxsize=None)(self._parse_uncached)
|
|
64
68
|
|
|
65
69
|
grammar = grammar
|
|
66
70
|
|
|
@@ -122,7 +126,7 @@ class NodeVisitor(parsimonious.NodeVisitor): # type: ignore [misc]
|
|
|
122
126
|
|
|
123
127
|
return tuple(visited_children)
|
|
124
128
|
|
|
125
|
-
def _parse_uncached(self, type_str, **kwargs):
|
|
129
|
+
def _parse_uncached(self, type_str: TypeStr, **kwargs: Any) -> ABIType:
|
|
126
130
|
"""
|
|
127
131
|
Parses a type string into an appropriate instance of
|
|
128
132
|
:class:`~faster_eth_abi.grammar.ABIType`. If a type string cannot be parsed,
|
faster_eth_abi/io.py
CHANGED
|
Binary file
|
faster_eth_abi/registry.py
CHANGED
|
@@ -18,6 +18,7 @@ from typing import (
|
|
|
18
18
|
Type,
|
|
19
19
|
TypeVar,
|
|
20
20
|
Union,
|
|
21
|
+
cast,
|
|
21
22
|
final,
|
|
22
23
|
)
|
|
23
24
|
|
|
@@ -61,13 +62,13 @@ Decoder = Union[DecoderCallable, Type[decoding.BaseDecoder]]
|
|
|
61
62
|
|
|
62
63
|
class Copyable(abc.ABC):
|
|
63
64
|
@abc.abstractmethod
|
|
64
|
-
def copy(self):
|
|
65
|
+
def copy(self) -> Self:
|
|
65
66
|
pass
|
|
66
67
|
|
|
67
|
-
def __copy__(self):
|
|
68
|
+
def __copy__(self) -> Self:
|
|
68
69
|
return self.copy()
|
|
69
70
|
|
|
70
|
-
def __deepcopy__(self, *args):
|
|
71
|
+
def __deepcopy__(self, *args: Any) -> Self:
|
|
71
72
|
return self.copy()
|
|
72
73
|
|
|
73
74
|
|
|
@@ -402,7 +403,7 @@ class BaseRegistry:
|
|
|
402
403
|
|
|
403
404
|
|
|
404
405
|
class ABIRegistry(Copyable, BaseRegistry):
|
|
405
|
-
def __init__(self):
|
|
406
|
+
def __init__(self) -> None:
|
|
406
407
|
self._encoders: PredicateMapping[Encoder] = PredicateMapping("encoder registry")
|
|
407
408
|
self._decoders: PredicateMapping[Decoder] = PredicateMapping("decoder registry")
|
|
408
409
|
self.get_encoder = functools.lru_cache(maxsize=None)(self._get_encoder_uncached)
|
|
@@ -414,13 +415,13 @@ class ABIRegistry(Copyable, BaseRegistry):
|
|
|
414
415
|
self._get_tuple_decoder_uncached
|
|
415
416
|
)
|
|
416
417
|
|
|
417
|
-
def _get_registration(self, mapping, type_str):
|
|
418
|
+
def _get_registration(self, mapping: PredicateMapping[T], type_str: TypeStr) -> T:
|
|
418
419
|
coder = super()._get_registration(mapping, type_str)
|
|
419
420
|
|
|
420
421
|
if isinstance(coder, type) and issubclass(coder, BaseCoder):
|
|
421
422
|
return coder.from_type_str(type_str, self)
|
|
422
423
|
|
|
423
|
-
return coder
|
|
424
|
+
return cast(T, coder)
|
|
424
425
|
|
|
425
426
|
@_clear_encoder_cache
|
|
426
427
|
def register_encoder(
|
|
Binary file
|
|
Binary file
|
|
@@ -19,6 +19,7 @@ from hypothesis import (
|
|
|
19
19
|
|
|
20
20
|
from faster_eth_abi._grammar import (
|
|
21
21
|
ABIType,
|
|
22
|
+
Arrlist,
|
|
22
23
|
BasicType,
|
|
23
24
|
TupleType,
|
|
24
25
|
normalize,
|
|
@@ -154,7 +155,8 @@ def get_array_strategy(
|
|
|
154
155
|
item_type_str = item_type.to_type_str()
|
|
155
156
|
item_strategy = registry.get_strategy(item_type_str)
|
|
156
157
|
|
|
157
|
-
|
|
158
|
+
arrlist = cast(Arrlist, abi_type.arrlist)
|
|
159
|
+
last_dim = cast(Tuple[int, ...], arrlist[-1])
|
|
158
160
|
if len(last_dim) == 0:
|
|
159
161
|
# Is dynamic list. Don't restrict length.
|
|
160
162
|
return st.lists(item_strategy)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: faster_eth_abi
|
|
3
|
-
Version: 5.2.
|
|
3
|
+
Version: 5.2.17
|
|
4
4
|
Summary: A ~2-6x faster 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
|
|
@@ -30,13 +30,16 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
30
30
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
31
31
|
Requires-Python: >=3.8, <4
|
|
32
32
|
Description-Content-Type: text/markdown
|
|
33
|
-
License-File: LICENSE
|
|
34
33
|
Requires-Dist: cchecksum<0.4,>=0.2.6
|
|
35
34
|
Requires-Dist: faster-eth-utils==5.3.16
|
|
36
35
|
Requires-Dist: eth-abi==5.2.0
|
|
37
36
|
Requires-Dist: eth-typing==5.2.1
|
|
38
37
|
Requires-Dist: mypy-extensions
|
|
39
38
|
Requires-Dist: parsimonious<0.11.0,>=0.10.0
|
|
39
|
+
Provides-Extra: benchmark
|
|
40
|
+
Requires-Dist: pytest>=7.0.0; extra == "benchmark"
|
|
41
|
+
Requires-Dist: pytest-codspeed<4.3,>=4.2; extra == "benchmark"
|
|
42
|
+
Requires-Dist: pytest-test-groups; extra == "benchmark"
|
|
40
43
|
Provides-Extra: codspeed
|
|
41
44
|
Requires-Dist: pytest>=7.0.0; extra == "codspeed"
|
|
42
45
|
Requires-Dist: pytest-codspeed<4.3,>=4.2; extra == "codspeed"
|
|
@@ -57,11 +60,11 @@ Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "dev"
|
|
|
57
60
|
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "dev"
|
|
58
61
|
Requires-Dist: towncrier<26,>=24; extra == "dev"
|
|
59
62
|
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
63
|
+
Requires-Dist: hypothesis<6.108.7,>=6.22.0; extra == "dev"
|
|
60
64
|
Requires-Dist: pytest-timeout>=2.0.0; extra == "dev"
|
|
61
65
|
Requires-Dist: pytest-xdist>=2.4.0; extra == "dev"
|
|
62
66
|
Requires-Dist: pytest-pythonpath>=0.7.1; extra == "dev"
|
|
63
67
|
Requires-Dist: eth-hash[pycryptodome]; extra == "dev"
|
|
64
|
-
Requires-Dist: hypothesis<6.108.7,>=6.22.0; extra == "dev"
|
|
65
68
|
Provides-Extra: docs
|
|
66
69
|
Requires-Dist: sphinx>=6.0.0; extra == "docs"
|
|
67
70
|
Requires-Dist: sphinx-autobuild>=2021.3.14; extra == "docs"
|
|
@@ -72,11 +75,11 @@ Requires-Dist: mypy<1.18.3,>=1.14.1; extra == "mypy"
|
|
|
72
75
|
Requires-Dist: tqdm; extra == "mypy"
|
|
73
76
|
Provides-Extra: test
|
|
74
77
|
Requires-Dist: pytest>=7.0.0; extra == "test"
|
|
78
|
+
Requires-Dist: hypothesis<6.108.7,>=6.22.0; extra == "test"
|
|
75
79
|
Requires-Dist: pytest-timeout>=2.0.0; extra == "test"
|
|
76
80
|
Requires-Dist: pytest-xdist>=2.4.0; extra == "test"
|
|
77
81
|
Requires-Dist: pytest-pythonpath>=0.7.1; extra == "test"
|
|
78
82
|
Requires-Dist: eth-hash[pycryptodome]; extra == "test"
|
|
79
|
-
Requires-Dist: hypothesis<6.108.7,>=6.22.0; extra == "test"
|
|
80
83
|
Provides-Extra: tools
|
|
81
84
|
Requires-Dist: hypothesis<6.108.7,>=6.22.0; extra == "tools"
|
|
82
85
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
29859a9e7da9d19bb98c__mypyc.cp38-win_amd64.pyd,sha256=dVwoqoBb93TgSr7nr33HYDp0Msll6JbH2Ncdy8tXmgY,235520
|
|
2
|
+
faster_eth_abi/__init__.py,sha256=JpTfPTiusUGMmX8sEsGAxvILxFbvhh3MEyfiKOd5o9g,217
|
|
3
|
+
faster_eth_abi/_codec.cp38-win_amd64.pyd,sha256=gUgfrQgb5U0YsjB0oi32bn1eaEHh000qJpusXVsTANI,10752
|
|
4
|
+
faster_eth_abi/_codec.py,sha256=hmNYkM1dRFyF97x6cA0Pg26EndRVX7KdwauK67IcUh8,2597
|
|
5
|
+
faster_eth_abi/_decoding.cp38-win_amd64.pyd,sha256=z4UtUBF4ooOG5Smygr5ihJOC9DVQ5SslAqN799caSbE,10752
|
|
6
|
+
faster_eth_abi/_decoding.py,sha256=zkwnU76AimlbztaJZSewSMJZQld6Si9qAJtssdjYLsM,10244
|
|
7
|
+
faster_eth_abi/_encoding.cp38-win_amd64.pyd,sha256=gDW0iQ9Bh8nG4hJDIDq8dAcLtSqeqSgfOYs7SDd6OUY,10752
|
|
8
|
+
faster_eth_abi/_encoding.py,sha256=hAgf9ZUaD05dKpMbUifjWeaE-EXsbuXWOxdrtyoJgUU,9019
|
|
9
|
+
faster_eth_abi/_grammar.cp38-win_amd64.pyd,sha256=frQf1UiFYoC6D0uoQJdMWFiiQ8wYUCL8FKVCaizTqvw,10752
|
|
10
|
+
faster_eth_abi/_grammar.py,sha256=tYDcVa9tsGzyfETpczvyPbAFZotCj29h_5WFW8sdqjI,11287
|
|
11
|
+
faster_eth_abi/abi.cp38-win_amd64.pyd,sha256=9QjJhoEu6pWBS-biDVEGxSEkzcasvm8ds3mvPcSEtFs,10752
|
|
12
|
+
faster_eth_abi/abi.py,sha256=-t9OVBSCxy6SuWpCu3cxHrCqkx8_svPIRb0MSFXEl5Q,383
|
|
13
|
+
faster_eth_abi/base.py,sha256=F8crTGdxqazfuXbm9KjDzB7mJcb_Nv9Z_fpUZcxYOfQ,1382
|
|
14
|
+
faster_eth_abi/codec.py,sha256=K5PQ1XpSuhT3VzEoEsdHDpsv7NEcY1u_EdT2XFF9EW0,69433
|
|
15
|
+
faster_eth_abi/constants.cp38-win_amd64.pyd,sha256=_bAG6TYhf73DMMIyXh1UAqlWaBYdhuQKedsYp6P7VKg,10752
|
|
16
|
+
faster_eth_abi/constants.py,sha256=q3FGynS-Eb78cnrL6mBoAvTDz16PF3tW2OylTMd6ajs,114
|
|
17
|
+
faster_eth_abi/decoding.py,sha256=3GJiO6Awxrbba32qNE6LNC-rYMHbX581cZYLKpsnL3g,18149
|
|
18
|
+
faster_eth_abi/encoding.py,sha256=Lo5V33aLTTUHoz6kVqc5CSVpLhnBd3ZSwOf7nfmWRAM,22127
|
|
19
|
+
faster_eth_abi/exceptions.py,sha256=wWsJJc_ip62fUVI_7CPlR-o37JWfv__ubYprEW0ZcYI,3773
|
|
20
|
+
faster_eth_abi/from_type_str.cp38-win_amd64.pyd,sha256=RjQ2QsLtDyhgCC9UEzqt5BPyqVFAzHCq6b8Pcb_fVs0,10752
|
|
21
|
+
faster_eth_abi/from_type_str.py,sha256=qHJtLNNHF2BHtRtdemC6hU4eP5jAuorY8qunC7illJI,4631
|
|
22
|
+
faster_eth_abi/grammar.py,sha256=zroPKUmn76fw4CzopBUQqd2q5-aikM0QkGly_8corcU,4693
|
|
23
|
+
faster_eth_abi/io.py,sha256=qF6BPw4hOi_Xu-nyT4XAFhEL-5EQ83fUsQuqqNXqE7w,3992
|
|
24
|
+
faster_eth_abi/packed.cp38-win_amd64.pyd,sha256=qJwEpiggsZ0mTb8Yg6C4HreRppnOOeyLCzHhvniCiy4,10752
|
|
25
|
+
faster_eth_abi/packed.py,sha256=STlAhJQSm04B3keAOFGRh8jzk-aCCYAm61_9O9JUn68,437
|
|
26
|
+
faster_eth_abi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
+
faster_eth_abi/registry.py,sha256=_tu9QG0-LPOs0nTST0FWHloX1kpDyPs9w7EpGz5ZFSU,24621
|
|
28
|
+
faster_eth_abi/typing.py,sha256=8npqU_Nvs-xRTnczC43eJSdaEbrsfERhNJhY9SwNEIg,109647
|
|
29
|
+
faster_eth_abi/tools/__init__.cp38-win_amd64.pyd,sha256=zQhoSzmvMDOqCZpAxCvgiR5_D2nMsdoohzEmEftlGYc,10752
|
|
30
|
+
faster_eth_abi/tools/__init__.py,sha256=jxyQnb34ldRjCTYi3Ajb5h5QlFQ6ODfKQNhOCVwR7Ao,54
|
|
31
|
+
faster_eth_abi/tools/_strategies.cp38-win_amd64.pyd,sha256=3mTrAxVPXlgvpT_xJ_6FHCON7bdWKgJZFUmkAPivw7U,10752
|
|
32
|
+
faster_eth_abi/tools/_strategies.py,sha256=iGCqfmzVPSIsPwCv21KVvUBWppUm0gdFjYN-AbmZnn4,6381
|
|
33
|
+
faster_eth_abi/utils/__init__.cp38-win_amd64.pyd,sha256=cQtMzoI7jSPVymymvblzWns3x-8ze47XI-saRzieTac,10752
|
|
34
|
+
faster_eth_abi/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
+
faster_eth_abi/utils/numeric.cp38-win_amd64.pyd,sha256=ddzYzISVJYizTQRFWzL2urDR9doNr7sZ-5sgnr5ZWzU,10752
|
|
36
|
+
faster_eth_abi/utils/numeric.py,sha256=saAVL12dfDrMXZeao3u2jar-U2y57YKVUqF6VOzoLxs,3395
|
|
37
|
+
faster_eth_abi/utils/padding.cp38-win_amd64.pyd,sha256=VWOw52XZmhldHVp3PSF8PvDaLvteWhPEFkEu08_z8M8,10752
|
|
38
|
+
faster_eth_abi/utils/padding.py,sha256=k6dkOiQ3k0OhQUZ6blCiL1VOQVYGyynucafbySjcFfY,515
|
|
39
|
+
faster_eth_abi/utils/string.cp38-win_amd64.pyd,sha256=Ti-NeqSUwNvskNTwqgGu8W9L9AtWGipa8F6RFjdVyL8,10752
|
|
40
|
+
faster_eth_abi/utils/string.py,sha256=wYcvWof4kuitrGGSe_NOduQaxE4HHYmpraCPXKcZxMs,455
|
|
41
|
+
faster_eth_abi/utils/validation.cp38-win_amd64.pyd,sha256=np5cwtF7UaeYh2pihNH_nMwrGyjtyXLZhZruEFOuCKM,10752
|
|
42
|
+
faster_eth_abi/utils/validation.py,sha256=9veO7wyQsmcFgeaGrsKdSifjV1gaXfTDDKAt1EbKHYY,539
|
|
43
|
+
faster_eth_abi-5.2.17.dist-info/METADATA,sha256=NqlZV_3U2dlAuzRSk7zd8Xi-S1ngWna3LkEOucX8m-k,7190
|
|
44
|
+
faster_eth_abi-5.2.17.dist-info/WHEEL,sha256=2M046GvC9RLU1f1TWyM-2sB7cRKLhAC7ucAFK8l8f24,99
|
|
45
|
+
faster_eth_abi-5.2.17.dist-info/top_level.txt,sha256=VAQVriOsRsqhSQlZZtJw0zN50hc93HkAqPqL70TVuRU,43
|
|
46
|
+
faster_eth_abi-5.2.17.dist-info/RECORD,,
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2016-2020, 2022-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.
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
29859a9e7da9d19bb98c__mypyc.cp38-win_amd64.pyd,sha256=5UDYiea8egYtdi6P0RxruqztOVDpfruyNZRnWJOZiN4,239616
|
|
2
|
-
faster_eth_abi/__init__.py,sha256=JpTfPTiusUGMmX8sEsGAxvILxFbvhh3MEyfiKOd5o9g,217
|
|
3
|
-
faster_eth_abi/_codec.cp38-win_amd64.pyd,sha256=wmCBnG6t9ofPUrDxlSVSq7HuDcSWnsELFOykK8wXHhI,10752
|
|
4
|
-
faster_eth_abi/_codec.py,sha256=hmNYkM1dRFyF97x6cA0Pg26EndRVX7KdwauK67IcUh8,2597
|
|
5
|
-
faster_eth_abi/_decoding.cp38-win_amd64.pyd,sha256=1zik_d3qLgEblUZ2cjIlCQJgQwEvaWD1y0GRc8ZZLlk,10752
|
|
6
|
-
faster_eth_abi/_decoding.py,sha256=zkwnU76AimlbztaJZSewSMJZQld6Si9qAJtssdjYLsM,10244
|
|
7
|
-
faster_eth_abi/_encoding.cp38-win_amd64.pyd,sha256=7FhqBb0Kh_gqST8cEEQKE7V1n394FIWMNc-A4qqC6K8,10752
|
|
8
|
-
faster_eth_abi/_encoding.py,sha256=hAgf9ZUaD05dKpMbUifjWeaE-EXsbuXWOxdrtyoJgUU,9019
|
|
9
|
-
faster_eth_abi/_grammar.cp38-win_amd64.pyd,sha256=P_lB_hlJw9ba4nRQeUIS7Lt-_QdINsDhF5bzxdCbZzw,10752
|
|
10
|
-
faster_eth_abi/_grammar.py,sha256=Gpjf_v5W21JYL0dPfds9XYtzRbftVAkdVeKVV08q2Hs,10926
|
|
11
|
-
faster_eth_abi/abi.cp38-win_amd64.pyd,sha256=Ehid_NQ_F7Uc7v0-xqg-gCe6CDNkaoFLd_3TzJ-5gfU,10752
|
|
12
|
-
faster_eth_abi/abi.py,sha256=-t9OVBSCxy6SuWpCu3cxHrCqkx8_svPIRb0MSFXEl5Q,383
|
|
13
|
-
faster_eth_abi/base.py,sha256=AuuTt9u3OQf8H5_KsCUYIKu5OJyuKw5EbbzxqJ1gyIk,1374
|
|
14
|
-
faster_eth_abi/codec.py,sha256=K5PQ1XpSuhT3VzEoEsdHDpsv7NEcY1u_EdT2XFF9EW0,69433
|
|
15
|
-
faster_eth_abi/constants.cp38-win_amd64.pyd,sha256=0qel9PLERLrYFK0iGxdJh6GGPZc_RxR6ds9jAdkZfEE,10752
|
|
16
|
-
faster_eth_abi/constants.py,sha256=q3FGynS-Eb78cnrL6mBoAvTDz16PF3tW2OylTMd6ajs,114
|
|
17
|
-
faster_eth_abi/decoding.py,sha256=tMqQ-jLrX75Y4CJTqCI5dQ8TFj7JCYOfzFJt3zIsJKo,18178
|
|
18
|
-
faster_eth_abi/encoding.py,sha256=3nLAVBC0MRR0Dmno3CjaygZG-T_ah3-xc0SuJUSNBDc,21998
|
|
19
|
-
faster_eth_abi/exceptions.py,sha256=wWsJJc_ip62fUVI_7CPlR-o37JWfv__ubYprEW0ZcYI,3773
|
|
20
|
-
faster_eth_abi/from_type_str.cp38-win_amd64.pyd,sha256=KzIBz1OqLHlaTSZ4nrC067Ia3tH24cgHg9YD1dFJaUA,10752
|
|
21
|
-
faster_eth_abi/from_type_str.py,sha256=qHJtLNNHF2BHtRtdemC6hU4eP5jAuorY8qunC7illJI,4631
|
|
22
|
-
faster_eth_abi/grammar.py,sha256=Pd4YmZnQ79tOCrhNDr9eqB5wF2hkBnCJ79kiGGpyv-E,4623
|
|
23
|
-
faster_eth_abi/io.py,sha256=2mnBAYXtiCg1eN-mPkw03z_0rJ_EoB9Bl_XssydAZXM,3984
|
|
24
|
-
faster_eth_abi/packed.cp38-win_amd64.pyd,sha256=OD81y9KLgJxi9F5FejBr4Xjoq-csIezLKLbx2CAkqZE,10752
|
|
25
|
-
faster_eth_abi/packed.py,sha256=STlAhJQSm04B3keAOFGRh8jzk-aCCYAm61_9O9JUn68,437
|
|
26
|
-
faster_eth_abi/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
-
faster_eth_abi/registry.py,sha256=PN2lJ4B0DcOZpUsr148mihbXITTTOamOPG1sn2KgjIk,24529
|
|
28
|
-
faster_eth_abi/typing.py,sha256=8npqU_Nvs-xRTnczC43eJSdaEbrsfERhNJhY9SwNEIg,109647
|
|
29
|
-
faster_eth_abi/tools/__init__.cp38-win_amd64.pyd,sha256=232EVv9SP1PSc4h3vKCp5zfXvqqXHk-YzR161GFiOjM,10752
|
|
30
|
-
faster_eth_abi/tools/__init__.py,sha256=jxyQnb34ldRjCTYi3Ajb5h5QlFQ6ODfKQNhOCVwR7Ao,54
|
|
31
|
-
faster_eth_abi/tools/_strategies.cp38-win_amd64.pyd,sha256=1x2LcthuhMHDt8zL0BBHMZdfWFjY9iNbkEi9aOWrQGE,10752
|
|
32
|
-
faster_eth_abi/tools/_strategies.py,sha256=02wmJpj336nOFu7pBVaH4ucj3FORweKkiGqlaRgy-8c,6330
|
|
33
|
-
faster_eth_abi/utils/__init__.cp38-win_amd64.pyd,sha256=QZ2pvb10QiGvQrMOWst0LKvTbM3x8X-FupweFzGUFSM,10752
|
|
34
|
-
faster_eth_abi/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
35
|
-
faster_eth_abi/utils/numeric.cp38-win_amd64.pyd,sha256=iOL1urfFDBlVCnRAH8FS0W-ih7JEsgFwvtDggcDtt4w,10752
|
|
36
|
-
faster_eth_abi/utils/numeric.py,sha256=saAVL12dfDrMXZeao3u2jar-U2y57YKVUqF6VOzoLxs,3395
|
|
37
|
-
faster_eth_abi/utils/padding.cp38-win_amd64.pyd,sha256=EZPMKASmZTG_T7-UF9zTcUWBUXaaELtyG1snD9hr3Ps,10752
|
|
38
|
-
faster_eth_abi/utils/padding.py,sha256=k6dkOiQ3k0OhQUZ6blCiL1VOQVYGyynucafbySjcFfY,515
|
|
39
|
-
faster_eth_abi/utils/string.cp38-win_amd64.pyd,sha256=aThie4SvCbv-jhjkfPRHl-MDlW3SBdrqDDZ-cWZzcmM,10752
|
|
40
|
-
faster_eth_abi/utils/string.py,sha256=wYcvWof4kuitrGGSe_NOduQaxE4HHYmpraCPXKcZxMs,455
|
|
41
|
-
faster_eth_abi/utils/validation.cp38-win_amd64.pyd,sha256=NAj2-IRsMXO1zyY1MtvB-OIYQ8x7Z4kLuQ92WUQiTXo,10752
|
|
42
|
-
faster_eth_abi/utils/validation.py,sha256=9veO7wyQsmcFgeaGrsKdSifjV1gaXfTDDKAt1EbKHYY,539
|
|
43
|
-
faster_eth_abi-5.2.16.dist-info/LICENSE,sha256=Q1lDDWXR057JL2Y7HTAwclCF32_LCloN4sGUkXO1YeI,1127
|
|
44
|
-
faster_eth_abi-5.2.16.dist-info/METADATA,sha256=oJ6wkKW3ybCUzfFGpXNMuThRwtsG9IozjAPNzzaaLz8,7013
|
|
45
|
-
faster_eth_abi-5.2.16.dist-info/WHEEL,sha256=2M046GvC9RLU1f1TWyM-2sB7cRKLhAC7ucAFK8l8f24,99
|
|
46
|
-
faster_eth_abi-5.2.16.dist-info/top_level.txt,sha256=VAQVriOsRsqhSQlZZtJw0zN50hc93HkAqPqL70TVuRU,43
|
|
47
|
-
faster_eth_abi-5.2.16.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|