diff --git a/slither/printers/summary/when_not_paused.py b/slither/printers/summary/when_not_paused.py index d8a57b6c79..aaeeeacec2 100644 --- a/slither/printers/summary/when_not_paused.py +++ b/slither/printers/summary/when_not_paused.py @@ -10,8 +10,6 @@ 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): @@ -23,7 +21,7 @@ def _use_modifier(function: Function, modifier_name: str = "whenNotPaused") -> b class PrinterWhenNotPaused(AbstractPrinter): - ARGUMENT = "pausable" + ARGUMENT = "not-pausable" HELP = "Print functions that do not use whenNotPaused" WIKI = "https://github.com/trailofbits/slither/wiki/Printer-documentation#when-not-paused" @@ -46,6 +44,8 @@ def output(self, _filename: str) -> output.Output: 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])