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

Commit ff161ed

Browse files
author
Jan Xie
committed
fix address value encoding in abi
1 parent 0e817cb commit ff161ed

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
@@ -236,7 +236,7 @@ def encode_single(typ, arg):
236236
return zpad(arg, 32)
237237
elif len(arg) == 40:
238238
return zpad(decode_hex(arg), 32)
239-
elif len(arg) == 42 and arg[2:] == '0x':
239+
elif len(arg) == 42 and arg[:2] == '0x':
240240
return zpad(decode_hex(arg[2:]), 32)
241241
else:
242242
raise EncodingError("Could not parse address: %r" % arg)

0 commit comments

Comments
 (0)