EIPs Explained

ERC-7955 · Draft · ERC · 2025-05-15

ERC-7955: Permissionless CREATE2 Factory

A permissionless recipe that lets anyone deploy the same minimal CREATE2 factory to the same address on any EIP-7702 chain, solving the bootstrap problem for deterministic cross-chain deployments.

What problem does it solve?

Deploying a contract to the same address on many chains is usually done through a CREATE2 factory (EIP-1014) that already sits at a known address. But how does the factory itself get there? Today there are three answers, each with drawbacks:

  • Nick's method: a pre-signed, non-EIP-155 transaction from a keyless account. It fails on chains that require replay protection and breaks if gas parameters differ, because the signed gas price and limit cannot be changed.
  • A guarded deployer key: flexible, but permissioned. Whoever holds the key decides which chains get the factory, and a lost key or a mistake at the wrong nonce can make the canonical address unreachable.
  • Chain preinstalls: convenient, but not standardised and up to each chain.

ERC-7955 proposes a fourth, permissionless route using EIP-7702 and standardises one universal factory so the ecosystem shares a single copy.

How it works

The spec publishes a deployer private key on purpose (derived from a documented vanity mnemonic), a fixed factory init code and a fixed salt. Because the key is public, anyone can sign with it.

  1. Deploy any bootstrap contract whose code runs create2(0, initCode, salt) with the standard init code and salt.
  2. Sign an EIP-7702 authorization with the public deployer key, delegating the deployer account to that bootstrap contract.
  3. Send a type 0x4 transaction that includes the authorization and calls the deployer address, which runs the bootstrap code.

Because CREATE2 binds the address to the deployer, salt and init code, the result is always the factory at 0xC0DEb853af168215879d284cc8B4d0A645fA9b0E with the same runtime code. Nothing the deployer account does can permanently block that outcome.

The factory takes salt (32 bytes) || init_code as calldata, runs CREATE2, forwards msg.value, returns the new address left-padded to 32 bytes (ABI-compatible), and bubbles up revert data on failure. It avoids PUSH0 for compatibility with chains that lack EIP-3855.

Sample code

Deploying a contract through the factory and predicting its address (ethers v6):

import { Contract, concat, getCreate2Address, keccak256, zeroPadValue, toBeHex } from "ethers";

const FACTORY = "0xC0DEb853af168215879d284cc8B4d0A645fA9b0E";
const salt = zeroPadValue(toBeHex(1n), 32);
const initCode = myContractFactory.bytecode; // plus encoded constructor args if any

const predicted = getCreate2Address(FACTORY, salt, keccak256(initCode));

const tx = await signer.sendTransaction({
  to: FACTORY,
  data: concat([salt, initCode]),   // salt || init_code
});
await tx.wait();
console.log("deployed at", predicted);

Things to know

  • Status is Draft.
  • Never send funds to the deployer address or use its key for anything else: the key is public by design.
  • Because the key is public, someone can front-run a deployment and bump the deployer's nonce, invalidating your authorization. The spec treats this as gas griefing only; retry, or use a private transaction.
  • A future upgrade that lets accounts set code permanently could, on chains where the factory is not yet deployed, let someone lock the deployer account. The spec suggests an RIP could pin the factory code if that happens.
  • Related approaches: ERC-2470 (an older singleton factory using Nick's method, Stagnant) and EIP-7997 (a protocol-level deterministic factory).

#create2 #deployment #factory #multichain #7702

Details

Authors
Nicholas Rodrigues Lordello (@nlordell), Richard Meissner (@rmeissner), Valentin Seehausen (@vseehausen)
Status
Draft
Type
Standards Track / ERC
Created
2025-05-15
Requires

Machine-readable: Markdown · JSON