test_selfdestruct_self_or_precompile_beneficiary()¶
Documentation for tests/amsterdam/eip8038_state_access_gas_cost_increase/test_selfdestruct_gas.py::test_selfdestruct_self_or_precompile_beneficiary@2867859a.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8038_state_access_gas_cost_increase/test_selfdestruct_gas.py::test_selfdestruct_self_or_precompile_beneficiary --fork Amsterdam
SELFDESTRUCT to self or a precompile is warm and charges no ACCOUNT_WRITE.
The executing account is in the accessed set on entry (self), and
precompiles are pre-warmed from the start, so neither pays a cold
surcharge: execution = OPCODE_SELFDESTRUCT_BASE (warm base, no
WARM_ACCESS) with no state gas.
The destructor balance is chosen so no account creation occurs: self
is alive (sending to itself never creates), and the precompile case
sends zero value (precompiles hold no state entry, so a value
transfer would otherwise create one and charge GAS_NEW_ACCOUNT on
the state axis).
Source code in tests/amsterdam/eip8038_state_access_gas_cost_increase/test_selfdestruct_gas.py
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 | |
Parametrized Test Cases¶
This test generates 2 parametrized test cases across 1 fork.