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/