diff --git a/src/ape/contracts/base.py b/src/ape/contracts/base.py index ace090b9ad..89ce9c5388 100644 --- a/src/ape/contracts/base.py +++ b/src/ape/contracts/base.py @@ -667,6 +667,8 @@ def query( columns_ls = validate_and_expand_columns(columns, ContractLog) data = map(partial(extract_fields, columns=columns_ls), contract_events) df = pd.DataFrame(columns=columns_ls, data=data) + # Note: The below check is to check for `event_arguments` in the request. + # If `event_arguments` exists in the request, we flatten the field. if "event_arguments" in columns_ls: event_arguments = df["event_arguments"].apply(pd.Series) df = pd.concat([df.drop("event_arguments", axis=1), event_arguments], axis=1)