I was reading a discussion on the topic, i have two questions

  1. it is commented

The SELFDESTRUCT and recreation cannot happen within one transaction, due to how SELFDESTRUCT operates.

could someone explain why, or link to some documentation on the topic?

  1. the discussion doesn't seem to have a closure, is this still the current situation or has something changed? how is this issue being mitigated?

reference link: https://ethereum-magicians.org/t/potential-security-implications-of-create2-eip-1014/2614/104

1 Answer 1


I believe your question gets answered here:

"This is a limitation of the EVM. When a contract selfdestructs it is only marked for destruction at the very end of the transaction. Only then its code is completely purged. So if you try to selfdestruct and recreate immediately, it will not work as it will see there is still code in the address."

source: https://forum.openzeppelin.com/t/selfdestruct-and-redeploy-in-the-same-transaction-using-create2-fails/8797

This issue persists and is a security risk to keep in mind!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.