Skip to main content
Version: v4.3.1

Registry

The Registry is a contract deployed on L1 that tracks canonical and historical rollup instances. It allows you to query the current rollup contract and look up prior deployments by version.

Links: Interface, Implementation.

numberOfVersions()​

Retrieves the number of versions that have been deployed.

registry_number_of_versions
function numberOfVersions() external view returns (uint256);
Source code: l1-contracts/src/governance/interfaces/IRegistry.sol#L25-L27
NameDescription
ReturnValueThe number of versions that have been deployed

getCanonicalRollup()​

Retrieves the current rollup contract.

registry_get_canonical_rollup
function getCanonicalRollup() external view returns (IHaveVersion);
Source code: l1-contracts/src/governance/interfaces/IRegistry.sol#L17-L19
NameDescription
ReturnValueThe current rollup

getRollup(uint256 _version)​

Retrieves the rollup contract for a specific version.

registry_get_rollup
function getRollup(uint256 _chainId) external view returns (IHaveVersion);
Source code: l1-contracts/src/governance/interfaces/IRegistry.sol#L21-L23
NameDescription
_versionThe version identifier of the rollup
ReturnValueThe rollup for the specified version

Other view functions​

FunctionReturnsDescription
getVersion(uint256)uint256Returns the version number stored at the given index in the historical versions list
getGovernance()addressReturns the governance contract address (owner)
getRewardDistributor()IRewardDistributorReturns the reward distributor contract