Skip to content

Commit

Permalink
fix: arrays in logs
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Nov 2, 2023
1 parent d885c02 commit ee12876
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/ape_ethereum/ecosystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,8 @@ def get_abi(_topic: HexStr) -> Optional[LogInputABICollection]:
sub_type = "[".join(_type.split("[")[:-1])
if sub_type == "address":
converted_arguments[key] = [self.decode_address(v) for v in value]
else:
converted_arguments[key] = value

else:
# No change.
Expand Down
5 changes: 2 additions & 3 deletions tests/functional/test_contract_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,8 @@ def test_address_arrays_in_events(contract_instance, owner):
)
assert tx.events == [expected]


def test_uint_arrays_in_events(contract_instance, owner):
tx = contract_instance.logUintArray(sender=owner)
expected = contract_instance.EventWithUintArray(
agents=[1]
)
expected = contract_instance.EventWithUintArray(agents=[1])
assert tx.events == [expected]

0 comments on commit ee12876

Please sign in to comment.