From 15199a6d857951f3d42925409ada68176099965f Mon Sep 17 00:00:00 2001 From: johnson2427 Date: Wed, 31 Jul 2024 16:20:45 -0500 Subject: [PATCH] feat: add note --- src/ape/contracts/base.py | 2 ++ 1 file changed, 2 insertions(+) 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)