mirror of https://github.com/ConsenSys/mythril
Use better issue annotations for search (#1615)
* Check versions before using integer module * Use IssueAnnotationspull/1616/head
parent
dfcf5d2cc0
commit
38313273e5
@ -0,0 +1,26 @@ |
||||
from typing import List |
||||
|
||||
from mythril.analysis.report import Issue |
||||
from mythril.laser.ethereum.state.annotation import StateAnnotation |
||||
from mythril.laser.smt import Bool |
||||
|
||||
|
||||
class IssueAnnotation(StateAnnotation): |
||||
def __init__(self, conditions: List[Bool], issue: Issue, detector): |
||||
""" |
||||
Issue Annotation to propogate issues |
||||
- conditions: A list of independent conditions [a, b, c, ...] |
||||
Each of these have to be independently be satisfied |
||||
- issue: The issue of the annotation |
||||
- detector: The detection module |
||||
""" |
||||
self.conditions = conditions |
||||
self.issue = issue |
||||
self.detector = detector |
||||
|
||||
def persist_to_world_state(self) -> bool: |
||||
return True |
||||
|
||||
@property |
||||
def persist_over_calls(self) -> bool: |
||||
return True |
Loading…
Reference in new issue