We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d75a4ff commit 7d5e5adCopy full SHA for 7d5e5ad
eth/utils/numeric.py
@@ -7,6 +7,9 @@
7
from cytoolz import (
8
curry,
9
)
10
+from eth_typing import (
11
+ Hash32,
12
+)
13
14
from eth.constants import (
15
UINT_255_MAX,
@@ -15,7 +18,7 @@
18
16
19
17
20
-def int_to_bytes32(value: Union[int, bool]) -> bytes:
21
+def int_to_bytes32(value: Union[int, bool]) -> Hash32:
22
if not isinstance(value, int) or isinstance(value, bool):
23
raise ValueError(
24
"Value must be an integer: Got: {0}".format(
@@ -35,7 +38,7 @@ def int_to_bytes32(value: Union[int, bool]) -> bytes:
35
38
36
39
37
40
value_bytes = value.to_bytes(32, 'big')
- return value_bytes
41
+ return Hash32(value_bytes)
42
43
44
def ceilXX(value: int, ceiling: int) -> int:
0 commit comments