Skip to content

Commit c47b047

Browse files
committed
fix(tests): EIP-7702, extra parametrization
1 parent 6c71ce4 commit c47b047

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/prague/eip7702_set_code_tx/test_set_code_txs.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,18 @@ def test_set_code_to_non_empty_storage_non_zero_nonce(
256256
)
257257

258258

259+
@pytest.mark.parametrize(
260+
"access_list_in_tx",
261+
[
262+
pytest.param(None, id=""),
263+
pytest.param("sender", id="sender_in_access_list"),
264+
pytest.param("auth_signer", id="auth_signer_in_access_list"),
265+
],
266+
)
259267
def test_set_code_to_sstore_then_sload(
260268
blockchain_test: BlockchainTestFiller,
261269
pre: Alloc,
270+
access_list_in_tx: str | None,
262271
):
263272
"""Test the executing a simple SSTORE then SLOAD in two separate set-code transactions."""
264273
auth_signer = pre.fund_eoa(auth_account_start_balance)
@@ -288,6 +297,16 @@ def test_set_code_to_sstore_then_sload(
288297
sender=sender,
289298
)
290299

300+
access_list = (
301+
[
302+
AccessList(
303+
address=sender if access_list_in_tx == "sender" else auth_signer,
304+
storage_keys=[Hash(storage_key_1)],
305+
)
306+
]
307+
if access_list_in_tx
308+
else []
309+
)
291310
tx_2 = Transaction(
292311
gas_limit=100_000,
293312
to=auth_signer,
@@ -299,6 +318,7 @@ def test_set_code_to_sstore_then_sload(
299318
signer=auth_signer,
300319
),
301320
],
321+
access_list=access_list,
302322
sender=sender,
303323
)
304324

0 commit comments

Comments
 (0)