diff --git a/fuzz_utils/fuzzers/Medusa.py b/fuzz_utils/fuzzers/Medusa.py index 57e17ea..037fab9 100644 --- a/fuzz_utils/fuzzers/Medusa.py +++ b/fuzz_utils/fuzzers/Medusa.py @@ -74,10 +74,17 @@ def _parse_call_object(self, call_dict: dict) -> tuple[str, str]: time_delay = int(call_dict["blockTimestampDelay"]) block_delay = int(call_dict["blockNumberDelay"]) has_delay = time_delay > 0 or block_delay > 0 + function_name: str = "" # TODO check how Medusa handles empty calls - - function_name = call_dict["call"]["dataAbiValues"]["methodName"] + if "methodName" in call_dict["call"]["dataAbiValues"]: + function_name = call_dict["call"]["dataAbiValues"]["methodName"] + elif "methodSignature" in call_dict["call"]["dataAbiValues"]: + function_name = call_dict["call"]["dataAbiValues"]["methodSignature"].split("(")[0] + else: + handle_exit( + "There was an issue parsing the Medusa call sequences. This indicates a breaking change in the call sequence format, please open an issue at https://github.com/crytic/fuzz-utils/issues" + ) function_parameters = call_dict["call"]["dataAbiValues"]["inputValues"] if len(function_parameters) == 0: function_parameters = ""