A minimal factory for deploying ERC-1967 UUPS proxies with no admin backdoors.
- Deploys minimal ERC-1967 proxies using solady's OptimisedLibClone bytecode
- Supports deterministic (CREATE2) deployment
- Supports initialization during deployment
- No factory admin - factory is out of the picture after deployment
- No upgrade functions in factory - upgrades only via UUPS
upgradeToAndCall()on the proxy
forge installMinimalUUPSFactory factory = new MinimalUUPSFactory();
// Simple deployment
address proxy = factory.deploy(implementation);
// Deployment with initialization
bytes memory initData = abi.encodeCall(Implementation.initialize, (owner));
address proxy = factory.deployAndCall(implementation, initData);
// Deterministic deployment
address proxy = factory.deployDeterministic(implementation, salt);
// Deterministic deployment with initialization
address proxy = factory.deployDeterministicAndCall(implementation, salt, initData);address predicted = factory.predictDeterministicAddress(implementation, salt);forge test- Copy
.env.exampleto.envand configure your values:
cp .env.example .env- Import your deployer key into Foundry's keystore:
cast wallet import keyDeployer --interactive- Set
DEPLOYER_ADDRESSin.envto match the imported keystore account.
| Target | Description |
|---|---|
make deploy |
Deploy and verify on the configured network |
make deploy-no-verify |
Deploy without Etherscan verification |
make deploy-dry |
Simulate deployment (no broadcast) |
make deploy-local |
Deploy to a local Anvil instance |
MIT