def _detect(self):
        """ Detect the suicidal functions
        """
        results = []
        for c in self.contracts:
            functions = self.detect_suicidal(c)
            for func in functions:

                txt = "{}.{} ({}) allows anyone to destruct the contract\n"
                info = txt.format(func.contract.name,
                                  func.name,
                                  func.source_mapping_str)

                json = self.generate_json_result(info)
                self.add_function_to_json(func, json)
                results.append(json)

        return results
def _detect ( self ) : results = [ ] for c in self . contracts : functions = self . detect_suicidal ( c ) for func in functions : txt = "{}.{} ({}) allows anyone to destruct the contract\n" info = txt . format ( func . contract . name , func . name , func . source_mapping_str ) json = self . generate_json_result ( info ) self . add_function_to_json ( func , json ) results . append ( json ) return results
Detect the suicidal functions