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

Commit 30d8ed6

Browse files
author
Ryan Casey
committed
Implement bool return type support.
1 parent ad3f88c commit 30d8ed6

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
@@ -315,6 +315,8 @@ def decode_single(data, base, sub):
315315
elif base == 'real':
316316
high, low = [int(x) for x in sub.split('x')]
317317
return (big_endian_to_int(data) * 1.0 / 2**low) % 2**high
318+
elif base == 'bool':
319+
return bool(int(data.encode('hex'), 16))
318320

319321

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

0 commit comments

Comments
 (0)