Create a Contract with Create2

Published by Mario Oettler on

Create2 gives us the opportunity to know the address of a smart contract before its creation. Every account has a transaction counter called nonce. For EOAs, the nonce increases with every transaction. With contracts, the nonce increases with every contract creation. The nonce is part of the input from what the new contract address is calculated. This makes it hard to predict the address because you don’t know how many times the nonce increases in the meantime.

But with create2, the address creation becomes independent from future events.