From ee128760eeff3f221428d05ca0a66e4218ef230c Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Thu, 2 Nov 2023 17:35:14 -0500 Subject: [PATCH] fix: arrays in logs --- src/ape_ethereum/ecosystem.py | 2 ++ tests/functional/test_contract_event.py | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ape_ethereum/ecosystem.py b/src/ape_ethereum/ecosystem.py index 18824d0f5e..eb87d9064f 100644 --- a/src/ape_ethereum/ecosystem.py +++ b/src/ape_ethereum/ecosystem.py @@ -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. diff --git a/tests/functional/test_contract_event.py b/tests/functional/test_contract_event.py index 5e2e9dda90..1d4d951a6d 100644 --- a/tests/functional/test_contract_event.py +++ b/tests/functional/test_contract_event.py @@ -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]