CREATE2 · EVM · offline
CREATE2 vanity contract address
When you deploy through a factory with CREATE2, the contract address is determined by deployer, salt, and init-code hash. vanity-address grinds salts until the predicted address matches your pattern — locally.
What you need
- Factory / deployer address (checksummed
0x…) - Init code hash of the bytecode you will deploy
- A short hex prefix or suffix for the resulting contract
How to run
- Open /generate/ → Contract mode → CREATE2, or use the CLI.
- Paste deployer + init-code hash.
- Set your pattern and grind until a salt matches.
- Use that salt in your factory’s
create2call.
npx vanity-address --create2 \ --deployer 0xYourFactory \ --init-code-hash 0xYourHash \ --prefix cafe
CREATE (nonce 0) vs CREATE2
If you do not have a factory and only care about the first contract from a fresh deployer, use EVM contract mode (evm-contract) instead — it grinds the deployer key, not a salt.
Hex difficulty for contract addresses
CREATE2 addresses are 20-byte values shown as 40 hex characters, so each fixed character multiplies the expected number of salts by 16. The tool re-computes the address from the exact inputs before showing a result.
| Pattern length | Expected attempts | Average time @ 1M keys/s |
|---|---|---|
| 1 | 16 | under a second |
| 2 | 256 | under a second |
| 3 | 4,096 | under a second |
| 4 | 65,536 | under a second |
| 5 | 1.0 million | 1 second |
| 6 | 16.8 million | 17 seconds |
| 7 | 268 million | 4.5 minutes |
| 8 | 4.3 billion | 1.2 hours |
Times assume one million keys per second and are illustrative.
Frequently asked questions
What exactly is ground in CREATE2 vanity?
The salt. The contract address is the last 20 bytes of keccak256(0xff ++ deployer ++ salt ++ init_code_hash), so you search salts until the address matches.
Can I change the contract code afterwards?
No. Changing the init code changes init_code_hash and therefore the address, so finalise the bytecode and constructor arguments before grinding.
Is a CREATE2 vanity address the same on every chain?
It can be, provided the same deployer, salt and init code are used on each chain.
How hard is a 6-hex-character prefix?
16⁶ ≈ 16.8 million salts on average.