From 1c207b0591426d973ea727c7cd1f29c201eedec3 Mon Sep 17 00:00:00 2001 From: Bernhard Mueller Date: Sat, 15 Jun 2019 19:55:26 +0200 Subject: [PATCH] Don't run in contract creation and 1st runtime tx --- .../ethereum/plugins/implementations/dependency_pruner.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mythril/laser/ethereum/plugins/implementations/dependency_pruner.py b/mythril/laser/ethereum/plugins/implementations/dependency_pruner.py index e57d79c3..be5abc4a 100644 --- a/mythril/laser/ethereum/plugins/implementations/dependency_pruner.py +++ b/mythril/laser/ethereum/plugins/implementations/dependency_pruner.py @@ -226,7 +226,8 @@ class DependencyPruner(LaserPlugin): :param annotation """ - if self.iteration < 1: + # Don't skip any blocks in the contract creation transaction + if self.iteration < 2: return annotation.path.append(address) @@ -291,6 +292,8 @@ class DependencyPruner(LaserPlugin): def world_state_filter_hook(state: GlobalState): if isinstance(state.current_transaction, ContractCreationTransaction): + # Reset iteration variable + self.iteration = 0 return world_state_annotation = get_ws_dependency_annotation(state)