From 772710cdede90ffd3fbd8c186e385219d0c467aa Mon Sep 17 00:00:00 2001 From: webthethird Date: Wed, 8 Mar 2023 16:22:13 -0600 Subject: [PATCH] Fix typo --- slither/core/declarations/contract.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/slither/core/declarations/contract.py b/slither/core/declarations/contract.py index ffd8a0862..1ca38a1a2 100644 --- a/slither/core/declarations/contract.py +++ b/slither/core/declarations/contract.py @@ -956,7 +956,8 @@ class Contract(SourceMapping): # pylint: disable=too-many-public-methods def generate_interface(self) -> str: interface = f"interface I{self.name} {{\n" for struct in self.structures: - interface += struct.interface_def_str() + if isinstance(struct.interface_def_str(), str): + interface += struct.interface_def_str() for var in self.state_variables_entry_points: interface += ( f" function {var.signature_str.replace('returns', 'external returns ')};\n" @@ -965,6 +966,7 @@ class Contract(SourceMapping): # pylint: disable=too-many-public-methods if func.is_constructor or func.is_fallback or func.is_receive: continue interface += f" function {func.interface_signature_str};\n" + interface += "}\n" return interface # endregion