Don't use PotentialIssue system in deprectated ops module

origin_model
Bernhard Mueller 5 years ago
parent 4391d1ae55
commit f731c3bbde
  1. 15
      mythril/analysis/module/modules/deprecated_ops.py

@ -1,8 +1,6 @@
"""This module contains the detection code for deprecated op codes."""
from mythril.analysis.potential_issues import (
PotentialIssue,
get_potential_issues_annotation,
)
from mythril.analysis.report import Issue
from mythril.analysis.swc_data import DEPRECATED_FUNCTIONS_USAGE
from mythril.analysis.module.base import DetectionModule, EntryPoint
from mythril.laser.ethereum.state.global_state import GlobalState
@ -34,8 +32,7 @@ class DeprecatedOperations(DetectionModule):
return
issues = self._analyze_state(state)
annotation = get_potential_issues_annotation(state)
annotation.potential_issues.extend(issues)
self.issues.extend(issues)
def _analyze_state(self, state):
"""
@ -71,20 +68,18 @@ class DeprecatedOperations(DetectionModule):
else:
return []
potential_issue = PotentialIssue(
issue = Issue(
contract=state.environment.active_account.contract_name,
function_name=state.environment.active_function_name,
address=instruction["address"],
title=title,
bytecode=state.environment.code.bytecode,
detector=self,
swc_id=swc_id,
severity="Medium",
description_head=description_head,
description_tail=description_tail,
constraints=[],
)
return [potential_issue]
return [issue]
detector = DeprecatedOperations()

Loading…
Cancel
Save