diff --git a/slither/solc_parsing/slither_compilation_unit_solc.py b/slither/solc_parsing/slither_compilation_unit_solc.py index 3054b4470..d12bda1b4 100644 --- a/slither/solc_parsing/slither_compilation_unit_solc.py +++ b/slither/solc_parsing/slither_compilation_unit_solc.py @@ -257,7 +257,6 @@ class SlitherCompilationUnitSolc: scope.accessible_scopes.append(get_imported_scope) elif top_level_data[self.get_key()] == "StructDefinition": - scope = self.compilation_unit.get_scope(filename) st = StructureTopLevel(self.compilation_unit, scope) st.set_offset(top_level_data["src"], self._compilation_unit) st_parser = StructureTopLevelSolc(st, top_level_data, self) @@ -279,7 +278,6 @@ class SlitherCompilationUnitSolc: self._variables_top_level_parser.append(var_parser) scope.variables[var.name] = var elif top_level_data[self.get_key()] == "FunctionDefinition": - scope = self.compilation_unit.get_scope(filename) func = FunctionTopLevel(self._compilation_unit, scope) scope.functions.add(func) func.set_offset(top_level_data["src"], self._compilation_unit) @@ -290,7 +288,6 @@ class SlitherCompilationUnitSolc: self.add_function_or_modifier_parser(func_parser) elif top_level_data[self.get_key()] == "ErrorDefinition": - scope = self.compilation_unit.get_scope(filename) custom_error = CustomErrorTopLevel(self._compilation_unit, scope) custom_error.set_offset(top_level_data["src"], self._compilation_unit)