Try it Live
Run Address examples in the interactive playground
- Auto-injected API
- Factory API
Algorithm
- Hash init code:
initCodeHash = keccak256(initCode) - Concatenate data:
data = 0xff ++ sender (20 bytes) ++ salt (32 bytes) ++ initCodeHash (32 bytes) - Hash and extract:
address = keccak256(data)[12:32]
Salt Formats
Bigint salt: Converted to 32-byte big-endian:Complete Example
Use Cases
Deterministic Deployments
Deploy to same address across different chains:Counterfactual Addresses
Interact with contract before deployment:Vanity Addresses
Generate addresses with specific patterns:Upgradeable Proxies
Deploy proxies to deterministic addresses:EIP-1014
CREATE2 was introduced in EIP-1014 to enable:- Deterministic addresses independent of nonce
- Counterfactual interactions (interact before deployment)
- State channels with guaranteed addresses
- Cross-chain consistency (same address on different chains)
CREATE vs CREATE2
| Feature | CREATE | CREATE2 |
|---|---|---|
| Formula | keccak256(rlp([addr, nonce]))[12:] | keccak256(0xff ++ addr ++ salt ++ keccak256(code))[12:] |
| Parameters | Deployer, nonce | Deployer, salt, init code |
| Determinism | Sequential (nonce-based) | Arbitrary (salt-based) |
| Redeployment | Different address | Same address if inputs identical |
| Cross-chain | Different addresses | Same address possible |
Performance
Cryptographic operations:- Two keccak256 hashes (init code + final data)
- No RLP encoding required
Error Handling
See Also
- calculateCreateAddress - CREATE address derivation
- fromHex - Parse address from hex
- Keccak256 - Keccak256 hash function
- EIP-1014: CREATE2 - CREATE2 specification
- Yellow Paper - Section 7 (Contract creation)

