test_selfdestruct_after_create2_collision()¶
Documentation for tests/paris/eip7610_create_collision/test_collision_selfdestruct.py::test_selfdestruct_after_create2_collision@b47f0253.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/paris/eip7610_create_collision/test_collision_selfdestruct.py::test_selfdestruct_after_create2_collision --fork Amsterdam
Test that a failed CREATE2 collision does not count as creation.
A CREATE2 that collides with an existing contract fails. A subsequent SELFDESTRUCT on the same address must not destroy the contract because EIP-6780 only allows destruction if the contract was created in the same transaction.
Source code in tests/paris/eip7610_create_collision/test_collision_selfdestruct.py
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 | |
Parametrized Test Cases¶
This test generates 1 parametrized test case across 4 forks.