Skip to content

Commit 2344675

Browse files
committed
refactor: explicit check that there are NO changes for invalid nonce 7702
1 parent ddd70d7 commit 2344675

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

tests/amsterdam/eip7928_block_level_access_lists/test_block_access_lists_eip7702.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def test_bal_7702_delegation_update(
140140
oracle1 = pre.deploy_contract(code=Op.STOP)
141141
oracle2 = pre.deploy_contract(code=Op.STOP)
142142

143-
## Perhaps create pre existing delegation,
143+
## Perhaps create pre existing delegation,
144144
## see `test_bal_7702_delegated_storage_access` since
145145
## `test_bal_7702_delegation_create` already tests creation
146146
tx_create = Transaction(
@@ -361,7 +361,6 @@ def test_bal_7702_delegated_storage_access(
361361
oracle = pre.deploy_contract(code=Op.SLOAD(0x01) + Op.PUSH1(0x42) + Op.PUSH1(0x02) + Op.SSTORE)
362362
bob = pre.fund_eoa()
363363

364-
## Is there a cleaner way to create pre-existing delegation?
365364
alice = pre.deploy_contract(nonce=0x1, code=Spec7702.delegation_designation(oracle), balance=0)
366365

367366
tx = Transaction(
@@ -440,18 +439,15 @@ def test_bal_7702_invalid_nonce_authorization(
440439
txs=[tx],
441440
expected_block_access_list=BlockAccessListExpectation(
442441
account_expectations={
443-
alice: BalAccountExpectation(
444-
# No code_changes because authorization failed
445-
nonce_changes=[],
446-
code_changes=[],
447-
),
448442
# Ensuring silent fail
449443
bob: BalAccountExpectation(
450444
balance_changes=[BalBalanceChange(tx_index=1, post_balance=10)]
451445
),
452446
relayer: BalAccountExpectation(
453447
nonce_changes=[BalNonceChange(tx_index=1, post_nonce=1)],
454448
),
449+
# Alice's account was marked warm but no changes were made
450+
alice: BalAccountExpectation.empty(),
455451
# Oracle must NOT be present - authorization failed so
456452
# account is never accessed
457453
oracle: None,

0 commit comments

Comments
 (0)