test_sstore_restoration_refund()¶
Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py::test_sstore_restoration_refund@87aba1a3.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py::test_sstore_restoration_refund --fork Amsterdam
Test SSTORE zero-to-nonzero-to-zero restoration refunds state gas.
When a slot is written from zero to nonzero and then restored to zero in the same transaction, the state gas charge (STATE_BYTES_PER_STORAGE_SET * cost_per_state_byte) is refunded via refund_counter along with the regular gas write cost.
Source code in tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_sstore.py
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 1 fork.