pull/1730/head
webthethird 2 years ago
parent 6a2250f60d
commit 772710cded
  1. 2
      slither/core/declarations/contract.py

@ -956,6 +956,7 @@ class Contract(SourceMapping): # pylint: disable=too-many-public-methods
def generate_interface(self) -> str: def generate_interface(self) -> str:
interface = f"interface I{self.name} {{\n" interface = f"interface I{self.name} {{\n"
for struct in self.structures: for struct in self.structures:
if isinstance(struct.interface_def_str(), str):
interface += struct.interface_def_str() interface += struct.interface_def_str()
for var in self.state_variables_entry_points: for var in self.state_variables_entry_points:
interface += ( interface += (
@ -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: if func.is_constructor or func.is_fallback or func.is_receive:
continue continue
interface += f" function {func.interface_signature_str};\n" interface += f" function {func.interface_signature_str};\n"
interface += "}\n"
return interface return interface
# endregion # endregion

Loading…
Cancel
Save