faster-eth-abi 5.2.14__cp39-cp39-win_amd64.whl → 5.2.15__cp39-cp39-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.
- faster_eth_abi/_codec.cp39-win_amd64.pyd +0 -0
- faster_eth_abi/_decoding.cp39-win_amd64.pyd +0 -0
- faster_eth_abi/_encoding.cp39-win_amd64.pyd +0 -0
- faster_eth_abi/_grammar.cp39-win_amd64.pyd +0 -0
- faster_eth_abi/_grammar.py +9 -3
- faster_eth_abi/abi.cp39-win_amd64.pyd +0 -0
- faster_eth_abi/codec.py +1550 -0
- faster_eth_abi/constants.cp39-win_amd64.pyd +0 -0
- faster_eth_abi/from_type_str.cp39-win_amd64.pyd +0 -0
- faster_eth_abi/packed.cp39-win_amd64.pyd +0 -0
- faster_eth_abi/tools/__init__.cp39-win_amd64.pyd +0 -0
- faster_eth_abi/tools/_strategies.cp39-win_amd64.pyd +0 -0
- faster_eth_abi/typing.py +4543 -0
- faster_eth_abi/utils/__init__.cp39-win_amd64.pyd +0 -0
- faster_eth_abi/utils/numeric.cp39-win_amd64.pyd +0 -0
- faster_eth_abi/utils/padding.cp39-win_amd64.pyd +0 -0
- faster_eth_abi/utils/string.cp39-win_amd64.pyd +0 -0
- faster_eth_abi/utils/validation.cp39-win_amd64.pyd +0 -0
- {faster_eth_abi-5.2.14.dist-info → faster_eth_abi-5.2.15.dist-info}/METADATA +4 -4
- {faster_eth_abi-5.2.14.dist-info → faster_eth_abi-5.2.15.dist-info}/RECORD +24 -23
- faster_eth_abi__mypyc.cp39-win_amd64.pyd +0 -0
- {faster_eth_abi-5.2.14.dist-info → faster_eth_abi-5.2.15.dist-info}/WHEEL +0 -0
- {faster_eth_abi-5.2.14.dist-info → faster_eth_abi-5.2.15.dist-info}/licenses/LICENSE +0 -0
- {faster_eth_abi-5.2.14.dist-info → faster_eth_abi-5.2.15.dist-info}/top_level.txt +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
faster_eth_abi/_grammar.py
CHANGED
|
@@ -2,6 +2,8 @@ import re
|
|
|
2
2
|
from typing import (
|
|
3
3
|
Any,
|
|
4
4
|
Final,
|
|
5
|
+
Generic,
|
|
6
|
+
Literal,
|
|
5
7
|
NewType,
|
|
6
8
|
NoReturn,
|
|
7
9
|
Optional,
|
|
@@ -29,7 +31,6 @@ from faster_eth_abi.exceptions import (
|
|
|
29
31
|
ABITypeError,
|
|
30
32
|
)
|
|
31
33
|
|
|
32
|
-
|
|
33
34
|
TYPE_ALIASES: Final = {
|
|
34
35
|
"int": "int256",
|
|
35
36
|
"uint": "uint256",
|
|
@@ -47,6 +48,7 @@ TYPE_ALIAS_RE: Final = re.compile(
|
|
|
47
48
|
IntSubtype = NewType("IntSubtype", int)
|
|
48
49
|
FixedSubtype = NewType("FixedSubtype", Tuple[int, int])
|
|
49
50
|
Subtype = Union[IntSubtype, FixedSubtype]
|
|
51
|
+
TSub = TypeVar("TSub", IntSubtype, FixedSubtype, Literal[None])
|
|
50
52
|
|
|
51
53
|
|
|
52
54
|
@mypyc_attr(allow_interpreted_subclasses=True)
|
|
@@ -202,7 +204,7 @@ class TupleType(ABIType):
|
|
|
202
204
|
|
|
203
205
|
|
|
204
206
|
@mypyc_attr(allow_interpreted_subclasses=True)
|
|
205
|
-
class BasicType(ABIType):
|
|
207
|
+
class BasicType(ABIType, Generic[TSub]):
|
|
206
208
|
"""
|
|
207
209
|
Represents the result of parsing a basic type string e.g. "uint", "address",
|
|
208
210
|
"ufixed128x19[][2]".
|
|
@@ -213,7 +215,7 @@ class BasicType(ABIType):
|
|
|
213
215
|
def __init__(
|
|
214
216
|
self,
|
|
215
217
|
base: str,
|
|
216
|
-
sub: Optional[
|
|
218
|
+
sub: Optional[TSub] = None,
|
|
217
219
|
arrlist: Optional[Sequence] = None,
|
|
218
220
|
*,
|
|
219
221
|
node: Optional[Node] = None,
|
|
@@ -334,6 +336,10 @@ class BasicType(ABIType):
|
|
|
334
336
|
self.invalidate("address cannot have suffix")
|
|
335
337
|
|
|
336
338
|
|
|
339
|
+
BytesType = BasicType[IntSubtype]
|
|
340
|
+
FixedType = BasicType[FixedSubtype]
|
|
341
|
+
|
|
342
|
+
|
|
337
343
|
def normalize(type_str: TypeStr) -> TypeStr:
|
|
338
344
|
"""
|
|
339
345
|
Normalizes a type string into its canonical version e.g. the type string
|
|
Binary file
|