test_zero_gas_price_and_touching()
Documentation for tests/frontier/touch/test_touch.py::test_zero_gas_price_and_touching@ffe48572.
Generate fixtures for these test cases for Berlin with:
fill -v tests/frontier/touch/test_touch.py::test_zero_gas_price_and_touching --fork Berlin
Test sending a zero gasprice transaction in early forks respects
account touching rules.
Source code in tests/frontier/touch/test_touch.py
| @pytest.mark.valid_from("Frontier")
@pytest.mark.valid_before("EIP1559")
@pytest.mark.eels_base_coverage
def test_zero_gas_price_and_touching(
state_test: StateTestFiller,
pre: Alloc,
) -> None:
"""
Test sending a zero gasprice transaction in early forks respects
account touching rules.
"""
sender = pre.fund_eoa()
value = 0x01
contract = pre.deploy_contract(
code=(Op.SSTORE(0, value) + Op.STOP),
)
tx = Transaction(
to=contract,
gas_price=0, # Part of the test, do not change.
sender=sender,
protected=False,
)
state_test(
env=Environment(),
pre=pre,
tx=tx,
post={contract: Account(storage={0: value})},
)
|
Parametrized Test Cases
This test generates 1 parametrized test case across 9 forks.