Skip to content

Commit 6637827

Browse files
souradeep-dasSamWilsn
authored andcommitted
fix tx parsing on sync
1 parent 1626a8c commit 6637827

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/ethereum_spec_tools/sync.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -320,8 +320,8 @@ def load_transaction(self, t: Any) -> Any:
320320
self.module("transactions").AccessListTransaction(
321321
hex_to_u64(t["chainId"]),
322322
hex_to_u256(t["nonce"]),
323-
hex_to_u256(t["gasPrice"]),
324-
hex_to_u256(t["gas"]),
323+
hex_to_uint(t["gasPrice"]),
324+
hex_to_uint(t["gas"]),
325325
self.module("utils.hexadecimal").hex_to_address(
326326
t["to"]
327327
)
@@ -340,9 +340,9 @@ def load_transaction(self, t: Any) -> Any:
340340
self.module("transactions").FeeMarketTransaction(
341341
hex_to_u64(t["chainId"]),
342342
hex_to_u256(t["nonce"]),
343-
hex_to_u256(t["maxPriorityFeePerGas"]),
344-
hex_to_u256(t["maxFeePerGas"]),
345-
hex_to_u256(t["gas"]),
343+
hex_to_uint(t["maxPriorityFeePerGas"]),
344+
hex_to_uint(t["maxFeePerGas"]),
345+
hex_to_uint(t["gas"]),
346346
self.module("utils.hexadecimal").hex_to_address(
347347
t["to"]
348348
)
@@ -359,8 +359,8 @@ def load_transaction(self, t: Any) -> Any:
359359
else:
360360
return self.module("transactions").LegacyTransaction(
361361
hex_to_u256(t["nonce"]),
362-
hex_to_u256(t["gasPrice"]),
363-
hex_to_u256(t["gas"]),
362+
hex_to_uint(t["gasPrice"]),
363+
hex_to_uint(t["gas"]),
364364
self.module("utils.hexadecimal").hex_to_address(t["to"])
365365
if t["to"]
366366
else Bytes0(b""),
@@ -373,8 +373,8 @@ def load_transaction(self, t: Any) -> Any:
373373
else:
374374
return self.module("transactions").Transaction(
375375
hex_to_u256(t["nonce"]),
376-
hex_to_u256(t["gasPrice"]),
377-
hex_to_u256(t["gas"]),
376+
hex_to_uint(t["gasPrice"]),
377+
hex_to_uint(t["gas"]),
378378
self.module("utils.hexadecimal").hex_to_address(t["to"])
379379
if t["to"]
380380
else Bytes0(b""),

0 commit comments

Comments
 (0)