Skip to content

Commit 6ecbaa0

Browse files
committed
improvements
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
1 parent 705e4a4 commit 6ecbaa0

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

tests/zkevm/test_worst_stateful_opcodes.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -621,13 +621,11 @@ def test_worst_selfdestruct_created(
621621
env = Environment()
622622

623623
# Template code that will be used to deploy a large number of contracts.
624-
selfdestructable_contract_addr = pre.deploy_contract(code=Op.SELFDESTRUCT(Op.COINBASE))
625-
initcode = Op.EXTCODECOPY(
626-
address=selfdestructable_contract_addr,
627-
dest_offset=0,
628-
offset=0,
629-
size=Op.EXTCODESIZE(selfdestructable_contract_addr),
630-
) + Op.RETURN(0, Op.EXTCODESIZE(selfdestructable_contract_addr))
624+
initcode = (
625+
Op.MSTORE8(0, 0x41) # COINBASE
626+
+ Op.MSTORE8(1, 0xFF) # SELFDESTRUCT
627+
+ Op.RETURN(0, 2)
628+
)
631629
initcode_address = pre.deploy_contract(code=initcode)
632630

633631
code = (
@@ -649,7 +647,7 @@ def test_worst_selfdestruct_created(
649647
),
650648
# Stop before we run out of gas for the whole tx execution.
651649
# The value was found by trial-error rounded to the next 1000 multiple.
652-
condition=Op.GT(Op.GAS, 42_000),
650+
condition=Op.GT(Op.GAS, 24_000),
653651
)
654652
+ Op.SSTORE(0, 42) # Done for successful tx execution assertion below.
655653
)

0 commit comments

Comments
 (0)