Add '0x' prefix in encode_calldata

pull/2/head
Bernhard Mueller 7 years ago
parent d24531611a
commit 273deaba79
  1. 2
      mythril/ether/util.py

@ -33,7 +33,7 @@ def encode_calldata(func_name, arg_types, args):
mid = method_id(func_name, arg_types) mid = method_id(func_name, arg_types)
function_selector = zpad(encode_int(mid), 4) function_selector = zpad(encode_int(mid), 4)
args = encode_abi(arg_types, args) args = encode_abi(arg_types, args)
return function_selector + args return "0x" + function_selector + args
def raw_bytes_to_file(filename, bytestring): def raw_bytes_to_file(filename, bytestring):
with open(filename, 'wb') as f: with open(filename, 'wb') as f:

Loading…
Cancel
Save