From fb3938bb3ea70e67ebf7daf64adbe92fd5bcd5ed Mon Sep 17 00:00:00 2001 From: Arun John Kuruvilla Date: Thu, 15 Mar 2018 16:31:18 -0400 Subject: [PATCH] Raises exception for contract with a function without code. Issue #789 (#797) --- manticore/ethereum.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manticore/ethereum.py b/manticore/ethereum.py index 19b76bb..effcdf6 100644 --- a/manticore/ethereum.py +++ b/manticore/ethereum.py @@ -624,6 +624,10 @@ class ManticoreEVM(Manticore): assert(name is not None) name = name.split(':')[1] + + if contract['bin'] == '': + raise Exception('Solidity failed to compile your contract.') + bytecode = contract['bin'].decode('hex') srcmap = contract['srcmap'].split(';') srcmap_runtime = contract['srcmap-runtime'].split(';')