Overview
Proxy patterns enable contract upgradeability by separating logic (implementation) from state (proxy). The proxy delegates calls to the implementation while maintaining its own storage. Proxy Patterns:- ERC-1967: Standard storage slots for proxy metadata (implementation, admin, beacon)
- ERC-1167: Minimal proxy clone (45 bytes runtime) for gas-efficient deployment
- ERC-3448: MetaProxy with embedded metadata for factory patterns
Quick Start
- ERC-1967 Storage Slots
- ERC-1167 Minimal Proxy
- ERC-3448 MetaProxy
Proxy Patterns Comparison
| Feature | ERC-1967 | ERC-1167 | ERC-3448 |
|---|---|---|---|
| Purpose | Storage slots | Minimal clone | Clone + metadata |
| Bytecode size | Varies | 55 bytes (creation) | 55 + metadata + 32 |
| Runtime size | Varies | 45 bytes | 45 bytes (metadata not in runtime) |
| Gas cost | Standard | Minimal | Minimal + metadata |
| Upgradeability | Yes (UUPS/Transparent) | No | No |
| Metadata | No | No | Yes |
| Use case | Upgradeable proxies | Gas-efficient clones | Factory patterns |
API Documentation
Constants
ERC-1967 storage slot constants
generateErc1167
Generate minimal proxy bytecode
parseErc1167
Parse minimal proxy implementation
isErc1167
Check if bytecode is ERC-1167
generateErc3448
Generate MetaProxy with metadata
parseErc3448
Parse MetaProxy implementation and metadata
isErc3448
Check if bytecode is ERC-3448
Usage Patterns
UUPS Proxy Detection
Clone Factory
MetaProxy Factory with Metadata
Specification References
- ERC-1967 - Proxy Storage Slots
- ERC-1167 - Minimal Proxy Contract
- ERC-3448 - MetaProxy Standard
- ERC-1822 - Universal Upgradeable Proxy Standard (UUPS)
- EIP-1967 - Standard storage slots specification

