Deterministic contract deployment factory using the CREATE2 opcode
0x4e59b44847b379578588920ca78fbf26c0b4956c
Deployment Status: Default preinstall
Gas Cost: Deployment cost + ~32,000 gas overhead
Cross-chain Deployments
Counterfactual Interactions
Upgrade Patterns
Factory Patterns
Aspect | CREATE | CREATE2 |
---|---|---|
Address Calculation | Based on deployer + nonce | Based on deployer + salt + bytecode |
Predictability | Requires knowing nonce | Fully deterministic |
Cross-chain | Different addresses | Same address possible |
Gas Cost | Baseline | ~32,000 gas overhead |
Use Case | Standard deployments | Deterministic deployments |
Issue | Solution |
---|---|
”Create2 deployment failed” | Ensure sufficient gas and correct bytecode format |
Address mismatch | Verify salt and bytecode are identical to computation |
Contract already deployed | CREATE2 can’t deploy to the same address twice |
Invalid bytecode | Ensure bytecode includes constructor arguments if needed |