Handle invalid contract addresses

pull/33/head
Bernhard Mueller 7 years ago
parent fccdc757a0
commit 775152b1ce
  1. 3
      myth

@ -163,6 +163,9 @@ if (args.code):
contracts.append(ETHContract(args.code, name="MAIN", address = util.get_indexed_address(0)))
elif (args.address):
if not re.match(r'0x[a-fA-F0-9]{40}', args.address):
exitWithError("Invalid contract address. Expected format is '0x...'.")
try:
code = eth.eth_getCode(args.address)

Loading…
Cancel
Save