Create a Contract with Create2

Published by Mario Oettler on

Last Updated on 23. March 2023 by Martin Schuster

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.

Categories:

https://blockchain-academy.hs-mittweida.de/wp-content/uploads/2021/04/logo_bcam_rgb_gross.png

Welcome

Blockchain Academy

Continue with credential

No account yet?

Powered by Hidy

Register with Hidy


Register
Sign in

We need the following credential to register:

please select:

To create a new account, we need the following data from you:

We would appreciate the following additional information from you for the creation of your account:

Welcome

Blockchain Academy

Continue with credential

Already have an account?

Powered by Hidy

Sign in with Hidy


Register
Sign in

We need the following credential to log in:

please select: