Vanity contract address using CREATE2?

I would like to get a vanity contract address.

Just like 1INCH:

Just like TORN:

I would like to deploy to multiple chains: ETH mainnent, xDAI, BSC (Binance Smart Chain).

(I’m not religious about particular chain, some of them have fees that make use prohibitively expensive)

I think that in order to accomplish the same address on multiple chains, I will have to use CREATE2:

  1. Same contract address on multiple chains (EVM comparible) possible?
  2. Maybe you have a piece of code handy to generate a salt and find such cool addresses?

Thank you for suggestions

1 Like
  1. Maybe you have a piece of code handy to generate a salt and find such cool addresses?

Does that helps ?

1 Like

Hi @marsxr,

The problem appears to be in two parts. How to create a vanity address (trial and error) and how to create the same address on multiple chains.

OpenZeppelin Contracts includes a utility for Create2:

You could look at how EIP1820 registry uses the same address on every network (it also has a vanity address):

There are two parts to this question.

Here is another example:

Replaying the deployment, same account, same nonce, same gas price, everything the same.

The reason why I prefer CREATE2 and salt is less private key to manage, I could reuse one of the private keys that I already have in place.

I guess I’ll need to figure it out, my use case is not typical :sunglasses:

1 Like

Hello @marsxr,

I run into that issue a few months ago, and came up with this factory:

It is available on most networks, and there is a package to help you deploy on additional networks, or even on local test chains. It uses create2, so you just have to give it the bytecode and a salt.

I do not have a vanity address generator that, given a bytecode and a regexp would “mine” a salt for you, but it might not be very hard to write one.

1 Like

Realizing some troubles related to oracle (Chainlink).

BSC and XDAI do not have native oracle system yet.

Some of the DeFi functionality is ETH only.

I may still want to deploy a token on multiple chains, using the same address, using CREATE2

Then the contracts using that token can be a little bit different.


At this point I’m reaching a conclusion that I’m overthinking, paralysis analysis, done is better than perfect.

1 Like