IRegistryCoordinator

IRegistryCoordinator

Author: Layr Labs, Inc.

Functions

getOperator

Returns the operator struct for the given operator

function getOperator(address operator) external view returns (Operator memory);

getOperatorId

Returns the operatorId for the given operator

function getOperatorId(address operator) external view returns (bytes32);

getOperatorFromId

Returns the operator address for the given operatorId

function getOperatorFromId(bytes32 operatorId) external view returns (address operator);

getOperatorStatus

Returns the status for the given operator

function getOperatorStatus(address operator) external view returns (IRegistryCoordinator.OperatorStatus);

getQuorumBitmapIndicesByOperatorIdsAtBlockNumber

Returns the indices of the quorumBitmaps for the provided operatorIds at the given blockNumber

function getQuorumBitmapIndicesByOperatorIdsAtBlockNumber(uint32 blockNumber, bytes32[] memory operatorIds)
    external
    view
    returns (uint32[] memory);

getQuorumBitmapByOperatorIdAtBlockNumberByIndex

Returns the quorum bitmap for the given operatorId at the given blockNumber via the index

reverts if index is incorrect

function getQuorumBitmapByOperatorIdAtBlockNumberByIndex(bytes32 operatorId, uint32 blockNumber, uint256 index)
    external
    view
    returns (uint192);

getQuorumBitmapUpdateByOperatorIdByIndex

Returns the indexth entry in the operator with operatorId's bitmap history

function getQuorumBitmapUpdateByOperatorIdByIndex(bytes32 operatorId, uint256 index)
    external
    view
    returns (QuorumBitmapUpdate memory);

getCurrentQuorumBitmapByOperatorId

Returns the current quorum bitmap for the given operatorId

function getCurrentQuorumBitmapByOperatorId(bytes32 operatorId) external view returns (uint192);

getQuorumBitmapUpdateByOperatorIdLength

Returns the length of the quorum bitmap history for the given operatorId

function getQuorumBitmapUpdateByOperatorIdLength(bytes32 operatorId) external view returns (uint256);

registries

Returns the registry at the desired index

function registries(uint256) external view returns (address);

numRegistries

Returns the number of registries

function numRegistries() external view returns (uint256);

registerOperatorWithCoordinator

Registers msg.sender as an operator with the middleware

function registerOperatorWithCoordinator(bytes memory quorumNumbers, bytes calldata registrationData) external;

Parameters

NameTypeDescription

quorumNumbers

bytes

are the bytes representing the quorum numbers that the operator is registering for

registrationData

bytes

is the data that is decoded to get the operator's registration information

deregisterOperatorWithCoordinator

Deregisters the msg.sender as an operator from the middleware

function deregisterOperatorWithCoordinator(bytes calldata quorumNumbers, bytes calldata deregistrationData) external;

Parameters

NameTypeDescription

quorumNumbers

bytes

are the bytes representing the quorum numbers that the operator is registered for

deregistrationData

bytes

is the the data that is decoded to get the operator's deregistration information

Events

OperatorRegistered

Emits when an operator is registered

event OperatorRegistered(address indexed operator, bytes32 indexed operatorId);

OperatorDeregistered

Emits when an operator is deregistered

event OperatorDeregistered(address indexed operator, bytes32 indexed operatorId);

Structs

Operator

Data structure for storing info on operators

struct Operator {
    bytes32 operatorId;
    OperatorStatus status;
}

QuorumBitmapUpdate

Data structure for storing info on quorum bitmap updates where the quorumBitmap is the bitmap of the quorums the operator is registered for starting at (inclusive)updateBlockNumber and ending at (exclusive) nextUpdateBlockNumber

nextUpdateBlockNumber is initialized to 0 for the latest update

struct QuorumBitmapUpdate {
    uint32 updateBlockNumber;
    uint32 nextUpdateBlockNumber;
    uint192 quorumBitmap;
}

Enums

OperatorStatus

enum OperatorStatus {
    NEVER_REGISTERED,
    REGISTERED,
    DEREGISTERED
}

Last updated