Skip to content

Commit

Permalink
feat: add note
Browse files Browse the repository at this point in the history
  • Loading branch information
johnson2427 committed Aug 13, 2024
1 parent 4e1c721 commit 15199a6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ape/contracts/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 15199a6

Please sign in to comment.