From c878a8fc25b8a82fb41b4400f2c97f0ec6061fc6 Mon Sep 17 00:00:00 2001 From: Tadashi Date: Fri, 15 Apr 2022 23:22:13 +0200 Subject: [PATCH] Added parameters that should be changed in info --- slither/detectors/functions/external_function.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/slither/detectors/functions/external_function.py b/slither/detectors/functions/external_function.py index 5344a6881..a24bc0e93 100644 --- a/slither/detectors/functions/external_function.py +++ b/slither/detectors/functions/external_function.py @@ -232,6 +232,12 @@ class ExternalFunction(AbstractDetector): info = [f"{function_definition.full_name} should be declared external:\n"] info += ["\t- ", function_definition, "\n"] + if self.compilation_unit.solc_version >= "0.5.": + info += [ + "Moreover, the following function parameters should change its data location:\n" + ] + for reference_arg in reference_args: + info += [f"{reference_arg} location should be calldata\n"] for other_function_definition in all_function_definitions: info += ["\t- ", other_function_definition, "\n"]