test_recreate_self_destructed_contract_different_txs()
¶
Documentation for tests/cancun/eip6780_selfdestruct/test_selfdestruct.py::test_recreate_self_destructed_contract_different_txs@21fb11c8
.
Generate fixtures for these test cases for Prague with:
fill -v tests/cancun/eip6780_selfdestruct/test_selfdestruct.py::test_recreate_self_destructed_contract_different_txs --fork Prague
Test that a contract can be recreated after it has self-destructed, over the lapse of multiple transactions.
Behavior should be the same before and after EIP-6780.
Test using
- Different initial balances for the self-destructing contract
- Contract creating opcodes that are not CREATE
Source code in tests/cancun/eip6780_selfdestruct/test_selfdestruct.py
508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 |
|
Parametrized Test Cases¶
The interactive table below is also available as a standalone page.
Test ID (Abbreviated) | sendall_recipient_addresses | call_times | recreate_times | selfdestruct_contract_initial_balance | create_opcode |
---|---|---|---|---|---|
...fork_Shanghai-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_0-selfdestruct_other_address-create_opcode_CREATE2 | ['pre_deploy_contract_1'] | 1 | 1 | 0 | CREATE2 |
...fork_Shanghai-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_0-selfdestruct_to_self-create_opcode_CREATE2 | [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'] | 1 | 1 | 0 | CREATE2 |
...fork_Shanghai-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_100000-selfdestruct_other_address-create_opcode_CREATE2 | ['pre_deploy_contract_1'] | 1 | 1 | 100000 | CREATE2 |
...fork_Shanghai-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_100000-selfdestruct_to_self-create_opcode_CREATE2 | [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'] | 1 | 1 | 100000 | CREATE2 |
...fork_Cancun-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_0-selfdestruct_other_address-create_opcode_CREATE2 | ['pre_deploy_contract_1'] | 1 | 1 | 0 | CREATE2 |
...fork_Cancun-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_0-selfdestruct_to_self-create_opcode_CREATE2 | [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'] | 1 | 1 | 0 | CREATE2 |
...fork_Cancun-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_100000-selfdestruct_other_address-create_opcode_CREATE2 | ['pre_deploy_contract_1'] | 1 | 1 | 100000 | CREATE2 |
...fork_Cancun-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_100000-selfdestruct_to_self-create_opcode_CREATE2 | [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'] | 1 | 1 | 100000 | CREATE2 |
...fork_Prague-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_0-selfdestruct_other_address-create_opcode_CREATE2 | ['pre_deploy_contract_1'] | 1 | 1 | 0 | CREATE2 |
...fork_Prague-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_0-selfdestruct_to_self-create_opcode_CREATE2 | [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'] | 1 | 1 | 0 | CREATE2 |
...fork_Prague-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_100000-selfdestruct_other_address-create_opcode_CREATE2 | ['pre_deploy_contract_1'] | 1 | 1 | 100000 | CREATE2 |
...fork_Prague-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_100000-selfdestruct_to_self-create_opcode_CREATE2 | [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'] | 1 | 1 | 100000 | CREATE2 |
...fork_Osaka-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_0-selfdestruct_other_address-create_opcode_CREATE2 | ['pre_deploy_contract_1'] | 1 | 1 | 0 | CREATE2 |
...fork_Osaka-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_0-selfdestruct_to_self-create_opcode_CREATE2 | [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'] | 1 | 1 | 0 | CREATE2 |
...fork_Osaka-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_100000-selfdestruct_other_address-create_opcode_CREATE2 | ['pre_deploy_contract_1'] | 1 | 1 | 100000 | CREATE2 |
...fork_Osaka-blockchain_test-call_times_1-recreate_times_1-selfdestruct_contract_initial_balance_100000-selfdestruct_to_self-create_opcode_CREATE2 | [b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01'] | 1 | 1 | 100000 | CREATE2 |