From 82960f387c0216b94e2ee404e882a2da30c88e08 Mon Sep 17 00:00:00 2001 From: aga7hokakological Date: Thu, 6 Apr 2023 00:25:52 +0530 Subject: [PATCH] fixed: pausable printer includes checks on constructor() --- slither/printers/summary/when_not_paused.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slither/printers/summary/when_not_paused.py b/slither/printers/summary/when_not_paused.py index c45f32d5b..aaeeeacec 100644 --- a/slither/printers/summary/when_not_paused.py +++ b/slither/printers/summary/when_not_paused.py @@ -10,8 +10,6 @@ from slither.utils.myprettytable import MyPrettyTable def _use_modifier(function: Function, modifier_name: str = "whenNotPaused") -> bool: - if function.is_constructor or function.view or function.pure: - return False for internal_call in function.all_internal_calls(): if isinstance(internal_call, SolidityFunction): @@ -46,6 +44,8 @@ class PrinterWhenNotPaused(AbstractPrinter): table = MyPrettyTable(["Name", "Use whenNotPaused"]) for function in contract.functions_entry_points: + if function.is_constructor or function.view or function.pure: + continue status = "X" if _use_modifier(function, modifier_name) else "" table.add_row([function.solidity_signature, status])