Skip to content
This repository was archived by the owner on May 23, 2023. It is now read-only.

Commit ccd1064

Browse files
committed
Cherry-pick abi.py from 679c564
This is in order to get the py3 tests fixed.
1 parent baa87f6 commit ccd1064

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ethereum/abi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ def encode_single(typ, arg):
344344
return zpad(arg, 32)
345345
elif len(arg) == 40:
346346
return zpad(decode_hex(arg), 32)
347-
elif len(arg) == 42 and arg[:2] == '0x':
347+
elif len(arg) == 42 and arg[:2] in {'0x', b'0x'}:
348348
return zpad(decode_hex(arg[2:]), 32)
349349
else:
350350
raise EncodingError("Could not parse address: %r" % arg)

0 commit comments

Comments
 (0)