| File | Notes |
|---|---|
ProtocolRegistry.sol |
core logic |
ProtocolRegistryStorage.sol |
state variables |
IProtocolRegistry.sol |
interface, events, and types |
Libraries and Mixins:
| File | Notes |
|---|---|
AccessControlEnumerableUpgradeable |
role-based access control |
Initializable |
protects initializer |
ShortStringsUpgradeable |
compact semantic version storage |
EnumerableMap |
iterable mapping for deployment catalog |
IPausable |
pause hook invoked during emergencies |
ProtocolRegistry is the canonical catalog of EigenLayer protocol deployments. It maps human-readable deployment names to contract addresses, tracks per-contract configuration flags, emits semantic-version updates every time a new protocol shipment occurs, and exposes functionality to pause the the entire core protocol. This contract is deployed on all EigenLayer source and destination chains.
DEFAULT_ADMIN_ROLE: Full control, required forinitialize,ship, andconfigure.PAUSER_ROLE: Defined ashex"01"in storage. Addresses with this role can invokepauseAll().
struct DeploymentConfig {
bool pausable; // deployment supports IPausable.pauseAll()
bool deprecated; // deployment should no longer be interacted with
}pausablegates whetherpauseAll()targets the deployment.deprecatedprevents new pauses from being attempted against sunset contracts.
function initialize(address initialAdmin, address pauserMultisig) external initializerInitializes the proxy once by granting:
DEFAULT_ADMIN_ROLEtoinitialAdmin.PAUSER_ROLEtopauserMultisig.
The constructor disables further initializers; therefore initialize must be called exactly once after deployment. Upon deployment the executorMultisig will be the default admin and the pauserMultisig will hold the PAUSER_ROLE.
function ship(
address[] calldata addresses,
DeploymentConfig[] calldata configs,
string[] calldata names,
string calldata semanticVersion
) external onlyRole(DEFAULT_ADMIN_ROLE)Ships a new semantic version and batch-registers deployments:
Effects:
- Calls
_updateSemanticVersion(semanticVersion)and emitsSemanticVersionUpdated. - For each address to ship:
- Calls
_appendDeployment, which stores the name→address mapping, records the config, and emitsDeploymentShipped.
- Calls
Requirements:
- Caller must hold
DEFAULT_ADMIN_ROLE. addresses,configs, andnamesmust have equal length.- For each address to ship:
- Address must be non-zero
- Contract names must be non-empty strings.
In practice, for upgrades that do not deploy net new contracts, only the semanticVersion parameter will be populated, with the rest left empty.
A contract name may be passed to this function repeatedly; each time, the previous address mapping for that name is overwritten with the new one. In general, this should be uncommon, as changing a core contract's address is an exceptional event.
function configure(string calldata name, DeploymentConfig calldata config) external onlyRole(DEFAULT_ADMIN_ROLE)Updates the stored DeploymentConfig for a single deployment:
Effects:
- Looks up the address for
namefrom_deployments. - Overwrites
_deploymentConfigs[addr]with the supplied configuration. - Emits
DeploymentConfigured(addr, config).
Requirements:
- Caller must hold
DEFAULT_ADMIN_ROLE. namemust have been previously shipped.
function pauseAll() external onlyRole(PAUSER_ROLE)Triggers emergency pausing across all tracked deployments:
Effects:
- Iterates over
_deployments, invokingIPausable(addr).pauseAll()on every entry markedpausableand notdeprecated. - Silently skips deployments that fail the interface call (propagates no revert) to maximize coverage in emergencies.
Requirements:
- Caller must hold
PAUSER_ROLE. - Deployments targeted must implement
IPausable; registry does not enforce this at compile time, so operators should ensure configs reflect actual contract capabilities.
Intended for crisis response (e.g., discovered exploit) where pauser multisig needs to freeze protocol components rapidly.
Returns the full semantic version string (e.g., "1.9.0") by decoding _semanticVersion.
Extracts and returns only the major component (characters before the first dot) of the semantic version.
Resolves a deployment name to its registered address. Useful for on-chain lookups by other contracts that only need the address.
Returns both the address and DeploymentConfig for a given name. Preferred by off-chain services that need to inspect configuration flags alongside the address.
Materializes the entire registry into parallel arrays of names, addresses, and configs. Primarily intended for off-chain introspection.
Returns the length of _deployments, which doubles as the number of rows the registry will iterate over during pauseAll().