From 9e45f1ca1c1b641a2b877cfad06b3e82717b159d Mon Sep 17 00:00:00 2001 From: Joran Honig Date: Thu, 28 Mar 2019 11:34:47 +0100 Subject: [PATCH] use environment instead of node in depcrecated ops module --- mythril/analysis/modules/deprecated_ops.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mythril/analysis/modules/deprecated_ops.py b/mythril/analysis/modules/deprecated_ops.py index a23b55bd..0d74bbc7 100644 --- a/mythril/analysis/modules/deprecated_ops.py +++ b/mythril/analysis/modules/deprecated_ops.py @@ -30,13 +30,13 @@ def _analyze_state(state): "Use of msg.origin is deprecated and the instruction may be removed in the future. " "Use msg.sender instead.\nSee also: " "https://solidity.readthedocs.io/en/develop/security-considerations.html#tx-origin".format( - node.function_name + state.environment.active_function_name ) ) swc_id = DEPRECATED_FUNCTIONS_USAGE elif instruction["opcode"] == "CALLCODE": - log.debug("CALLCODE in function " + node.function_name) + log.debug("CALLCODE in function " + state.environment.active_function_name) title = "Use of callcode" description_head = "Use of callcode is deprecated." description_tail = ( @@ -47,8 +47,8 @@ def _analyze_state(state): swc_id = DEPRECATED_FUNCTIONS_USAGE issue = Issue( - contract=node.contract_name, - function_name=node.function_name, + contract=state.environment.active_account.contract_name, + function_name=state.environment.active_function_name, address=instruction["address"], title=title, bytecode=state.environment.code.bytecode,