Skip to content

Commit

Permalink
Merge pull request ethereum#250 from ethermarket/develop
Browse files Browse the repository at this point in the history
Implement `bool` return type support.
  • Loading branch information
vbuterin committed Apr 27, 2015
2 parents a19c47e + 30d8ed6 commit 0484f38
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ethereum/abi.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ def decode_single(data, base, sub):
elif base == 'real':
high, low = [int(x) for x in sub.split('x')]
return (big_endian_to_int(data) * 1.0 / 2**low) % 2**high
elif base == 'bool':
return bool(int(data.encode('hex'), 16))


def decode_any(data, base, sub, arrlist):
Expand Down

0 comments on commit 0484f38

Please sign in to comment.