Skip to content

Commit c14495c

Browse files
committed
fix(tests): Remove unnecessary gas_costs checks from EIP-8037, EIP-8038 tests
1 parent 1aa92ff commit c14495c

24 files changed

Lines changed: 567 additions & 923 deletions

tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_block_2d_gas_accounting.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -368,24 +368,27 @@ def test_block_gas_used_call_new_account(
368368
GAS_NEW_ACCOUNT state gas) then SSTORE. Combined with a STOP tx,
369369
the 2D max must reflect state gas from account creation.
370370
"""
371-
new_account_state_gas = fork.gas_costs().NEW_ACCOUNT
372371
sstore_state_gas = Op.SSTORE(new_value=1).state_cost(fork)
373372

374373
target = pre.fund_eoa(amount=0)
375374

375+
call = Op.CALL(
376+
gas=100_000,
377+
address=target,
378+
value=1,
379+
value_transfer=True,
380+
account_new=True,
381+
)
376382
parent_storage = Storage()
377383
parent = pre.deploy_contract(
378-
code=(
379-
Op.CALL(gas=100_000, address=target, value=1)
380-
+ Op.SSTORE(parent_storage.store_next(1), 1)
381-
),
384+
code=(call + Op.SSTORE(parent_storage.store_next(1), 1)),
382385
balance=10**18,
383386
)
384387

385388
txs = [
386389
Transaction(
387390
to=parent,
388-
state_gas_reservoir=new_account_state_gas + sstore_state_gas,
391+
state_gas_reservoir=call.state_cost(fork) + sstore_state_gas,
389392
sender=pre.fund_eoa(),
390393
),
391394
] + stop_txs(pre, fork, 1)

0 commit comments

Comments
 (0)