From f8ac87dabf48611807bd38a06ce1b66f7f50c3ae Mon Sep 17 00:00:00 2001 From: Alexander Remie Date: Sun, 13 Dec 2020 22:27:24 +0100 Subject: [PATCH 1/2] fix set self.filename when using crytic-compile --- slither/slither.py | 1 + 1 file changed, 1 insertion(+) diff --git a/slither/slither.py b/slither/slither.py index 430b921b9..dcd18bb66 100644 --- a/slither/slither.py +++ b/slither/slither.py @@ -74,6 +74,7 @@ class Slither(SlitherCore): # pylint: disable=too-many-instance-attributes else: crytic_compile = CryticCompile(target, **kwargs) self._crytic_compile = crytic_compile + self.filename = crytic_compile.target except InvalidCompilation as e: # pylint: disable=raise-missing-from raise SlitherError(f"Invalid compilation: \n{str(e)}") From e41900288ad2154500abaa78359230cddac91069 Mon Sep 17 00:00:00 2001 From: Alexander Remie Date: Mon, 14 Dec 2020 16:31:08 +0100 Subject: [PATCH 2/2] use self._crytic_compile.target instead of self.filename --- slither/slither.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/slither/slither.py b/slither/slither.py index dcd18bb66..d3d20a9c2 100644 --- a/slither/slither.py +++ b/slither/slither.py @@ -74,7 +74,6 @@ class Slither(SlitherCore): # pylint: disable=too-many-instance-attributes else: crytic_compile = CryticCompile(target, **kwargs) self._crytic_compile = crytic_compile - self.filename = crytic_compile.target except InvalidCompilation as e: # pylint: disable=raise-missing-from raise SlitherError(f"Invalid compilation: \n{str(e)}") @@ -189,7 +188,7 @@ class Slither(SlitherCore): # pylint: disable=too-many-instance-attributes :return: List of registered printers outputs. """ - return [p.output(self.filename).data for p in self._printers] + return [p.output(self._crytic_compile.target).data for p in self._printers] @property def triage_mode(self):