Skip to content

Instantly share code, notes, and snippets.

@kobigurk
Created May 2, 2015 11:36
Show Gist options
  • Save kobigurk/cb30f97f9fae261e1ad3 to your computer and use it in GitHub Desktop.
Save kobigurk/cb30f97f9fae261e1ad3 to your computer and use it in GitHub Desktop.
self = <ethereum.abi.ContractTranslator instance at 0x7fae30eeb5a8>
full_signature = [{'constant': False, 'inputs': [{'name': 'receiver', 'type': 'address'}, {'name': 'amount', 'type': 'uint256'}], 'name...'name': 'getBalance', 'outputs': [{'name': 'balance', 'type': 'uint256'}], ...}, {'inputs': [], 'type': 'constructor'}]
def __init__(self, full_signature):
self.function_data = {}
self.event_data = {}
v = vars(self)
print full_signature
if is_string(full_signature):
full_signature = json_decode(full_signature)
for sig_item in full_signature:
encode_types = [f['type'] for f in sig_item['inputs']]
> name = sig_item['name']
E KeyError: 'name'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment