From b3ad2ffd09a91bac1d8c7e559fe32cc5298ae1fa Mon Sep 17 00:00:00 2001 From: pdobacz <5735525+pdobacz@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:08:19 +0200 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Mario Vega --- tests/prague/eip7692_eof_v1/eip7069_extcall/test_calls.py | 7 ++++--- .../eip7692_eof_v1/eip7620_eof_create/test_eofcreate.py | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/prague/eip7692_eof_v1/eip7069_extcall/test_calls.py b/tests/prague/eip7692_eof_v1/eip7069_extcall/test_calls.py index f240d24822..409f548472 100644 --- a/tests/prague/eip7692_eof_v1/eip7069_extcall/test_calls.py +++ b/tests/prague/eip7692_eof_v1/eip7069_extcall/test_calls.py @@ -632,16 +632,17 @@ def test_callee_context( value=tx_value, ) + expected_bytes: Address | int if expected_result == "destination": - expected_bytes: bytes = destination_contract_address + expected_bytes = destination_contract_address elif expected_result == "caller": expected_bytes = calling_contract_address elif expected_result == "sender": expected_bytes = sender elif expected_result == "tx_value": - expected_bytes = to_fixed_size_bytes(tx_value, 32) + expected_bytes = tx_value elif isinstance(expected_result, int): - expected_bytes = to_fixed_size_bytes(expected_result, 32) + expected_bytes = expected_result else: raise TypeError("Unexpected expected_result", expected_result) diff --git a/tests/prague/eip7692_eof_v1/eip7620_eof_create/test_eofcreate.py b/tests/prague/eip7692_eof_v1/eip7620_eof_create/test_eofcreate.py index aeb097bf5c..d499e021ac 100644 --- a/tests/prague/eip7692_eof_v1/eip7620_eof_create/test_eofcreate.py +++ b/tests/prague/eip7692_eof_v1/eip7620_eof_create/test_eofcreate.py @@ -640,14 +640,15 @@ def test_eofcreate_context( tx = Transaction(sender=sender, to=calling_contract_address, gas_limit=1000000, value=value) + expected_bytes: Address | int if expected_result == "destination": - expected_bytes: bytes = destination_contract_address + expected_bytes = destination_contract_address elif expected_result == "caller": expected_bytes = calling_contract_address elif expected_result == "sender": expected_bytes = sender elif expected_result == "eofcreate_value": - expected_bytes = to_fixed_size_bytes(eofcreate_value, 32) + expected_bytes = eofcreate_value else: raise TypeError("Unexpected expected_result", expected_result)