0

Given that it seems possible, using somehow CREATE2, to deploy a new smart contract at a certain address where a different smart contract existed before to be killed...

(see @smarx answer here Can you selfdestruct a contract more than once?)

is it the case? How can I do it in practice?

1

The CREATE2 is a new opcode introduced in the Constantinople update earlier this year. It's otherwise similar to the traditional CREATE opcode which creates a new smart contract but with CREATE2 you can more freely influence the resulting contract address - for example to create a contract to the same address where another contract existed earlier (but which was selfdestructed).

Given the complexity of the topic I'm not going to explain here how it works (and because I haven't tried it and don't really understand all how it works).

This feature is still very new and there is not much information (and even less written experiences) about it yet. Here's one decent article: https://blog.ricmoo.com/wisps-the-magical-world-of-create2-5c2177027604 . Here are some more links: https://www.reddit.com/r/ethereum/comments/cqlnwd/eli5_create2/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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