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

Commit 0484f38

Browse files
committed
Merge pull request #250 from ethermarket/develop
Implement `bool` return type support.
2 parents a19c47e + 30d8ed6 commit 0484f38

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ethereum/abi.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,8 @@ def decode_single(data, base, sub):
302302
elif base == 'real':
303303
high, low = [int(x) for x in sub.split('x')]
304304
return (big_endian_to_int(data) * 1.0 / 2**low) % 2**high
305+
elif base == 'bool':
306+
return bool(int(data.encode('hex'), 16))
305307

306308

307309
def decode_any(data, base, sub, arrlist):

0 commit comments

Comments
 (0)