Skip to content

Commit

Permalink
fix: 4 bytes instead of 3
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Feb 19, 2025
1 parent 32623e3 commit eb164c1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ape/api/transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,13 +190,13 @@ def __str__(self) -> str:
if isinstance(data["data"], str):
data["data"] = (
"0x"
+ bytes(data["data"][:3], encoding="utf8").hex()
+ bytes(data["data"][:4], encoding="utf8").hex()
+ "..."
+ bytes(data["data"][-3:], encoding="utf8").hex()
+ bytes(data["data"][-4:], encoding="utf8").hex()
)
else:
data["data"] = (
to_hex(bytes(data["data"][:3])) + "..." + to_hex(bytes(data["data"][-3:]))
to_hex(bytes(data["data"][:4])) + "..." + to_hex(bytes(data["data"][-4:]))
)
else:
if isinstance(data["data"], str):
Expand Down

0 comments on commit eb164c1

Please sign in to comment.