# Create2 & create3

**URL:** <https://forum.openzeppelin.com/t/create2-create3/37224>\
**Category:** Smart Contracts\
**Created:** [July 27, 2023, 5:22pm UTC](https://forum.openzeppelin.com/t/create2-create3/37224 "2023-07-27T17:22:22Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mow](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mow](https://forum.openzeppelin.com/u/mow)\
**Post date:** [July 27, 2023, 5:22pm UTC](https://forum.openzeppelin.com/t/create2-create3/37224/1 "2023-07-27T17:22:23Z")

</div>

Both CREATE2 and CREATE3 have been around for some time. They allow us to know the address of a contract before it's deployed, which can be very useful. They also make it possible to deploy a contract to the same address on multiple blockchains.

CREATE2 no longer requires the nonce, whereas CREATE3 also no longer requires the bytecode.

CREATE3 seems to be the most convenient solution for multi-blockchain apps. But there doesn't seem to be much information about it.

So should we be using CREATE3 over CREATE2?  
Are there any issues with either?

---

<div class="post-metadata">

**Author:** ![mow](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mow](https://forum.openzeppelin.com/u/mow)\
**Post date:** [July 27, 2023, 6:05pm UTC](https://forum.openzeppelin.com/t/create2-create3/37224/2 "2023-07-27T18:05:11Z")

</div>

CREATE2 factory with contract deployed on many blockchains (at 0x98b2920d53612483f91f12ed7754e51b4a77919e): [https://docs.axelar.dev/dev/general-message-passing/solidity-utilities#constant-address-deployer](https://docs.axelar.dev/dev/general-message-passing/solidity-utilities#constant-address-deployer)

CREATE3 factory with contract deployed on many blockchains (at 0x93FEC2C00BfE902F733B57c5a6CeeD7CD1384AE1): [https://github.com/lifinance/create3-factory](https://github.com/lifinance/create3-factory)

---

<div class="post-metadata">

**Author:** ![mow](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mow](https://forum.openzeppelin.com/u/mow)\
**Post date:** [July 28, 2023, 6:23am UTC](https://forum.openzeppelin.com/t/create2-create3/37224/3 "2023-07-28T06:23:33Z")

</div>

A widely used deterministic CREATE2 deployer: [https://github.com/Arachnid/deterministic-deployment-proxy](https://github.com/Arachnid/deterministic-deployment-proxy)

It has been deployed on 31 blockchains (at 0x4e59b44847b379578588920cA78FbF26c0B4956C) for anyone to use to deploy their own contracts.

---

<div class="post-metadata">

**Author:** ![mow](https://avatars.discourse-cdn.com/v4/letter/m/7ab992/32.png) [@mow](https://forum.openzeppelin.com/u/mow)\
**Post date:** [July 30, 2023, 1:27pm UTC](https://forum.openzeppelin.com/t/create2-create3/37224/4 "2023-07-30T13:27:22Z")

</div>

> [@mow](#):
>
> A widely used deterministic CREATE2 deployer: [Arachnid/deterministic-deployment-proxy](https://github.com/Arachnid/deterministic-deployment-proxy)

I think this one's the best future-proof option, e.g when a new blockchain comes along and you want to deploy your own contract at the same address as on the other blockchains. With the other options, you'd have to ask whoever had deployed the CREATE2 deployer contract to also deploy on the new blockchain so that you can then use it, as they're the ones who can make a transaction that would get the deployer contract to the same address.

With [Arachnid/deterministic-deployment-proxy](https://github.com/Arachnid/deterministic-deployment-proxy) you can just send a raw transaction of the original contract creation transaction bytecode to the new blockchain, and it'll get created at the same address. Then you can use that to deploy your own contract, which would end up having the same address as on other blockchains.

The reusable deployment transaction bytecode is at [https://etherscan.io/getRawTx?tx=0xeddf9e61fb9d8f5111840daef55e5fde0041f5702856532cdbb5a02998033d26](https://etherscan.io/getRawTx?tx=0xeddf9e61fb9d8f5111840daef55e5fde0041f5702856532cdbb5a02998033d26)

You can see that it has already been deployed onto other blockchains e.g.:

> **[Goerli Get Raw Transaction Hex](https://goerli.etherscan.io/getRawTx?tx=0xeddf9e61fb9d8f5111840daef55e5fde0041f5702856532cdbb5a02998033d26)**
>
> The Ethereum BlockChain Explorer, API and Analytics Platform

[https://testnet.bobascan.com/getRawTx?tx=0xeddf9e61fb9d8f5111840daef55e5fde0041f5702856532cdbb5a02998033d26](https://testnet.bobascan.com/getRawTx?tx=0xeddf9e61fb9d8f5111840daef55e5fde0041f5702856532cdbb5a02998033d26)  
[https://optimistic.etherscan.io/getRawTx?tx=0xeddf9e61fb9d8f5111840daef55e5fde0041f5702856532cdbb5a02998033d26](https://optimistic.etherscan.io/getRawTx?tx=0xeddf9e61fb9d8f5111840daef55e5fde0041f5702856532cdbb5a02998033d26)

To deploy the same deployer contract using ethers you'd just run this on a blockchain that doesn't have the contract at `0x4e59b44847b379578588920ca78fbf26c0b4956c` yet:

```auto
txHash = await ethers.provider.send("eth_sendRawTransaction", ["0xf8a58085174876e800830186a08080b853604580600e600039806000f350fe7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe03601600081602082378035828234f58015156039578182fd5b8082525050506014600cf31ba02222222222222222222222222222222222222222222222222222222222222222a02222222222222222222222222222222222222222222222222222222222222222"])

```

---

<div class="post-metadata">

**Author:** ![frangio](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/frangio/32/15251_2.png) [@frangio](https://forum.openzeppelin.com/u/frangio)\
**Post date:** [July 31, 2023, 10:57pm UTC](https://forum.openzeppelin.com/t/create2-create3/37224/5 "2023-07-31T22:57:22Z")

</div>

CREATE2 is more easily available, because it's just an opcode. I would stick to it unless you specifically need to use CREATE3 to create deterministic addresses that don't depend on the code.

---

<div class="post-metadata">

**Author:** ![SKYBITDev3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skybitdev3/32/19072_2.png) [@SKYBITDev3](https://forum.openzeppelin.com/u/SKYBITDev3)\
**Post date:** [September 3, 2023, 7:58am UTC](https://forum.openzeppelin.com/t/create2-create3/37224/6 "2023-09-03T07:58:06Z")

</div>

> [@frangio](#):
>
> specifically need to use CREATE3 to create deterministic addresses that don't depend on the code

When even blank spaces and commented text affects bytecode and thus deployment address, it helps to have less factors that affect address when trying to deploy contracts to the same addresses across many blockchains.

New blockchains have been appearing which means there will be more dapps that support multiple blockchains. The same contracts need to be deployed to each of them, and that may not happen all at one time, as there could be future blockchains to add support for. Same addresses help to keep code simple and elegant.

The best way to deploy contracts to the same addresses on multiple blockchains is to **use a keylessly-deployed CREATE3 factory contract to deploy your contracts**.

If a keylessly-deployed CREATE3 factory contract doesn't exist yet on a blockchain, then deploy it yourself, and it will get the same address as the same factory contract on other blockchains (as long as the deployment creation code remains unchanged) because of the keyless deployment method - **nobody owns (or knows the private keys of) the signer** whose address is in the `from` field in the transaction, as that address is derived from a manually-entered signature.

The pros and cons of various ways to deploy contracts in order to achieve the goal of same addresses on multiple blockchains is covered in [SKYBIT Keyless Deployment](https://github.com/SKYBITDev3/SKYBIT-Keyless-Deployment).

There you'll also find scripts to:

- deploy CREATE3 factories using the keyless deployment method;
- deploy your contracts keylessly if you don't want to use a factory;
- deploy your contracts (including upgradeable contracts) via CREATE3.

---

<div class="post-metadata">

**Author:** ![SKYBITDev3](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/skybitdev3/32/19072_2.png) [@SKYBITDev3](https://forum.openzeppelin.com/u/SKYBITDev3)\
**Post date:** [October 8, 2023, 8:56pm UTC](https://forum.openzeppelin.com/t/create2-create3/37224/7 "2023-10-08T20:56:03Z")

</div>

> [@mow](#):
>
> A widely used deterministic CREATE2 deployer: [Arachnid/deterministic-deployment-proxy](https://github.com/Arachnid/deterministic-deployment-proxy)

Don't use that one, because it doesn't hash deploying account's address with the salt, so others could deploy your contract to the same address on a different blockchain, which you may not have wanted.
