Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Mario Vega <[email protected]>
  • Loading branch information
pdobacz and marioevz authored Sep 26, 2024
1 parent 912fc8e commit b3ad2ff
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions tests/prague/eip7692_eof_v1/eip7069_extcall/test_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit b3ad2ff

Please sign in to comment.