Skip to content

test_blobbasefee_before_fork()

Documentation for tests/cancun/eip7516_blobgasfee/test_blobgasfee_opcode.py::test_blobbasefee_before_fork@83970623.

Generate fixtures for these test cases for Prague with:

fill -v tests/cancun/eip7516_blobgasfee/test_blobgasfee_opcode.py::test_blobbasefee_before_fork --fork Prague

Tests that the BLOBBASEFEE opcode results on exception when called before the fork.

Source code in tests/cancun/eip7516_blobgasfee/test_blobgasfee_opcode.py
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
@pytest.mark.parametrize("caller_pre_storage", [{1: 1}], ids=[""])
@pytest.mark.valid_at_transition_to("Cancun")
def test_blobbasefee_before_fork(
    state_test: StateTestFiller,
    pre: Alloc,
    caller_address: Address,
    callee_address: Address,
    tx: Transaction,
):
    """Tests that the BLOBBASEFEE opcode results on exception when called before the fork."""
    # Fork happens at timestamp 15_000
    timestamp = 7_500
    post = {
        caller_address: Account(
            storage={1: 0},
        ),
        callee_address: Account(
            balance=0,
        ),
    }
    state_test(
        env=Environment(
            timestamp=timestamp,
        ),
        pre=pre,
        tx=tx,
        post=post,
    )

Parametrized Test Cases

This test case is only parametrized by fork and fixture format.

Test ID (Abbreviated) caller_pre_storage
...fork_ShanghaiToCancunAtTime15k-blockchain_test- {1: 1}
...fork_ShanghaiToCancunAtTime15k-state_test- {1: 1}