diff --git a/tests/cancun/eip1153_tstore/test_yul_coverage.py b/tests/cancun/eip1153_tstore/test_yul_coverage.py index 868b22c1d5..2df3a97c8d 100644 --- a/tests/cancun/eip1153_tstore/test_yul_coverage.py +++ b/tests/cancun/eip1153_tstore/test_yul_coverage.py @@ -5,16 +5,7 @@ import pytest -from ethereum_test_forks import Shanghai -from ethereum_test_tools import ( - Account, - Address, - Alloc, - Environment, - StateTestFiller, - Transaction, - Yul, -) +from ethereum_test_tools import Address, Alloc, Environment, StateTestFiller, Transaction from ethereum_test_tools.vm.opcode import Opcodes as Op REFERENCE_SPEC_GIT_PATH = "N/A" @@ -29,8 +20,7 @@ def test_yul_coverage( """ This test complete the coverage gaps by calling the codes, produced by yul compiler """ - pre.deploy_contract( - address=Address("0xB00000000000000000000000000000000000000B"), + missed_coverage = pre.deploy_contract( balance=0, code=Op.SHL(0x0000000000000000000000000000000000000000000000000000000000000001, 0x00) + Op.SHR(0x0000000000000000000000000000000000000000000000000000000000000001, 0x00) @@ -51,27 +41,9 @@ def test_yul_coverage( ) address_to = pre.deploy_contract( balance=1_000_000_000_000_000_000, - code=Yul( - """ - { - let ok := call(gas(), 0xB00000000000000000000000000000000000000B, 0, 0, 0, 0, 0) - mstore(0, ok) - return(0, 32) - } - """, - fork=Shanghai, - ), + code=Op.MSTORE(0, Op.CALL(Op.GAS, missed_coverage, 0, 0, 0, 0, 0)) + Op.RETURN(0, 32), ) - # Uncalled account - uncalled_account = pre.deploy_contract( - nonce=0, - balance=7_000_000_000_000_000_000, - code="0x", - storage={}, - ) - post = {uncalled_account: Account()} - tx = Transaction( sender=pre.fund_eoa(7_000_000_000_000_000_000), gas_limit=100000, @@ -83,4 +55,4 @@ def test_yul_coverage( max_priority_fee_per_gas=5, ) - state_test(env=Environment(), pre=pre, post=post, tx=tx) + state_test(env=Environment(), pre=pre, post={}, tx=tx)