Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print bytes32 values as hex #1117

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
hlint fixes
  • Loading branch information
ggrieco-tob committed Sep 18, 2023
commit eb9493319d48fac2b2d718d87cb4c5d4a8be6fd2
2 changes: 1 addition & 1 deletion lib/Echidna/ABI.hs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ ppAbiValue = \case
AbiInt _ n -> show n
AbiAddress n -> "0x" <> showHex n ""
AbiBool b -> if b then "true" else "false"
AbiBytes 32 b -> "0x" <> (BS.foldr (\x -> (<>) (printf "%02x" x)) "" b)
AbiBytes 32 b -> "0x" <> BS.foldr ((<>) . printf "%02x") "" b
AbiBytes _ b -> show b
AbiBytesDynamic b -> show b
AbiString s -> show s
Expand Down