From ce89fc810d29501c0328d3e3a73bcc8adf6ab89b Mon Sep 17 00:00:00 2001 From: Joran Honig Date: Thu, 9 Aug 2018 12:05:02 +0200 Subject: [PATCH] Ignore failed contract creations --- mythril/laser/ethereum/svm.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mythril/laser/ethereum/svm.py b/mythril/laser/ethereum/svm.py index e0c2b81b..2620fdd3 100644 --- a/mythril/laser/ethereum/svm.py +++ b/mythril/laser/ethereum/svm.py @@ -122,8 +122,9 @@ class LaserEVM: transaction, return_global_state = e.global_state.transaction_stack.pop() if return_global_state is None: - e.global_state.world_state.node = global_state.node - self.open_states.append(e.global_state.world_state) + if not isinstance(transaction, ContractCreationTransaction) or transaction.return_data: + e.global_state.world_state.node = global_state.node + self.open_states.append(e.global_state.world_state) new_global_states = [] else: # First execute the post hook for the transaction ending instruction