Skip to content

Commit 17e7df9

Browse files
committed
improvements
Signed-off-by: Ignacio Hagopian <jsign.uy@gmail.com>
1 parent 09440f5 commit 17e7df9

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
@@ -623,13 +623,11 @@ def test_worst_selfdestruct_created(
623623
env = Environment()
624624

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

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

0 commit comments

Comments
 (0)