Skip to content

Commit d54e5ed

Browse files
committed
fix bug
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
1 parent 6ff68a8 commit d54e5ed

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/zkevm/test_worst_stateful_opcodes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ def test_worst_selfdestruct_existing(
492492
"""Test running a block with as many SELFDESTRUCTs as possible for existing contracts."""
493493
env = Environment(gas_limit=100_000_000_000)
494494
attack_gas_limit = Environment().gas_limit
495+
pre.fund_address(env.fee_recipient, 1)
495496

496497
# Template code that will be used to deploy a large number of contracts.
497498
selfdestructable_contract_addr = pre.deploy_contract(code=Op.SELFDESTRUCT(Op.COINBASE))
@@ -621,6 +622,7 @@ def test_worst_selfdestruct_created(
621622
the same transaction.
622623
"""
623624
env = Environment()
625+
pre.fund_address(env.fee_recipient, 1)
624626

625627
# SELFDESTRUCT(COINBASE) contract deployment
626628
# code = Op.MSTORE8(0, 0x41) + Op.MSTORE8(1, 0xFF) + Op.RETURN(0, 2)
@@ -640,12 +642,12 @@ def test_worst_selfdestruct_created(
640642
),
641643
# Stop before we run out of gas for the whole tx execution.
642644
# The value was found by trial-error rounded to the next 1000 multiple.
643-
condition=Op.GT(Op.GAS, 25_000),
645+
condition=Op.GT(Op.GAS, 10_000),
644646
)
645647
+ Op.SSTORE(0, 42) # Done for successful tx execution assertion below.
646648
)
647649
# The 0 storage slot is initialize to avoid creation costs in SSTORE above.
648-
code_addr = pre.deploy_contract(code=code, storage={0: 1})
650+
code_addr = pre.deploy_contract(code=code, balance=100_000, storage={0: 1})
649651
code_tx = Transaction(
650652
to=code_addr,
651653
gas_limit=env.gas_limit,

0 commit comments

Comments
 (0)