ISLAYRegistryV2
Interface for the registry that manages services and operators in the SatLayer ecosystem
This interface defines the contract methods for registering services and operators, managing their relationships, and handling slashing parameters
Functions
registerAsService
Registers the caller as a service provider
URI and name are not stored on-chain, they’re emitted in an event MetadataUpdated and separately indexed. The caller can be both a service and an operator simultaneously. This relationship is not exclusive.
function registerAsService(string calldata uri, string calldata name) external;
Parameters
Name | Type | Description |
---|---|---|
uri | string | URI of the service’s project to display in the UI |
name | string | Name of the service’s project to display in the UI |
registerAsOperator
Registers the caller as an operator
URI and name are not stored on-chain, they’re emitted in an event MetadataUpdated and separately indexed. The caller can be both a service and an operator simultaneously. This relationship is not exclusive.
function registerAsOperator(string calldata uri, string calldata name) external;
Parameters
Name | Type | Description |
---|---|---|
uri | string | URI of the operator’s project to display in the UI |
name | string | Name of the operator’s project to display in the UI |
updateMetadata
Updates metadata for the service or operator
This function can be called by both services and operators.
Emits a MetadataUpdated
event with the new URI and name.
Name and URI are not validated or stored on-chain.
Non-compliant uri or name will not affect the REGISTRY, given its offchain uses.
function updateMetadata(string calldata uri, string calldata name) external;
Parameters
Name | Type | Description |
---|---|---|
uri | string | URI of the provider’s project to display in the UI |
name | string | Name of the provider’s project to display in the UI |
registerOperatorToService
Registers an operator to a service (the caller is the service)
*To call this function, the following conditions must be met:
- Service must be registered via registerAsService
- Operator must be registered via {registerAsOperator}
If the operator has registered this service, the relationship status will be set to
RelationshipV2.Status.Active
. Otherwise, the relationship status will be set toRelationshipV2.Status.ServiceRegistered
.*
function registerOperatorToService(address operator) external;
Parameters
Name | Type | Description |
---|---|---|
operator | address | Address of the operator to pair with the service |
deregisterOperatorFromService
Deregisters an operator from a service (the caller is the service)
Sets the relationship status to RelationshipV2.Status.Inactive
and removes the operator
from the service’s active relationships.
function deregisterOperatorFromService(address operator) external;
Parameters
Name | Type | Description |
---|---|---|
operator | address | Address of the operator to opt out of the relationship |
registerServiceToOperator
Registers a service to an operator (the caller is the operator)
*To call this function, the following conditions must be met:
- Service must be registered via registerAsService
- Operator must be registered via {registerAsOperator}
If the service has registered this operator, the relationship status will be set to
RelationshipV2.Status.Active
. Otherwise, the relationship status will be set toRelationshipV2.Status.OperatorRegistered
.*
function registerServiceToOperator(address service) external;
Parameters
Name | Type | Description |
---|---|---|
service | address | Address of the service to pair with the operator |
deregisterServiceFromOperator
Deregisters a service from an operator (the caller is the operator)
Sets the relationship status to RelationshipV2.Status.Inactive
and removes the service
from the operator’s active relationships.
function deregisterServiceFromOperator(address service) external;
Parameters
Name | Type | Description |
---|---|---|
service | address | Address of the service to opt out of the relationship |
getRelationshipStatus
Gets the current relationship status for a given service-operator pair
Retrieves the status from the latest checkpoint in the relationship history
function getRelationshipStatus(address service, address operator) external view returns (RelationshipV2.Status);
Parameters
Name | Type | Description |
---|---|---|
service | address | The address of the service |
operator | address | The address of the operator |
Returns
Name | Type | Description |
---|---|---|
<none> | RelationshipV2.Status | The latest relationship status for the service-operator pair |
getRelationshipStatusAt
Gets the relationship status for a given service-operator pair at a specific timestamp
Retrieves the status from the checkpoint history at the specified timestamp
function getRelationshipStatusAt(address service, address operator, uint32 timestamp)
external
view
returns (RelationshipV2.Status);
Parameters
Name | Type | Description |
---|---|---|
service | address | The address of the service |
operator | address | The address of the operator |
timestamp | uint32 | The timestamp to check the relationship status at |
Returns
Name | Type | Description |
---|---|---|
<none> | RelationshipV2.Status | The relationship status at the specified timestamp |
isOperator
Checks if an account is registered as an operator
Returns the registration status from the operators mapping
function isOperator(address account) external view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
account | address | The address to check |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | True if the address is registered as an operator, false otherwise |
isService
Checks if an account is registered as a service
Returns the registration status from the services mapping
function isService(address account) external view returns (bool);
Parameters
Name | Type | Description |
---|---|---|
account | address | The address to check |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | True if the address is registered as a service, false otherwise |
setWithdrawalDelay
Sets the withdrawal delay for an operator’s vault
Only the operator can set this value. The delay must be at least equal to the DEFAULT_WITHDRAWAL_DELAY (7 days) and must be greater than or equal to any active service’s minimum withdrawal delay.
function setWithdrawalDelay(uint32 delay) external;
Parameters
Name | Type | Description |
---|---|---|
delay | uint32 | The delay in seconds before a withdrawal can be processed |
getWithdrawalDelay
Gets the withdrawal delay for an operator’s vault
Returns the configured withdrawal delay for the specified operator
function getWithdrawalDelay(address operator) external view returns (uint32);
Parameters
Name | Type | Description |
---|---|---|
operator | address | The address of the operator |
Returns
Name | Type | Description |
---|---|---|
<none> | uint32 | The withdrawal delay in seconds |
enableSlashing
Enables slashing for a service by providing slash parameters
The caller must be a registered service. This sets up the parameters that will be used when slashing is applied to operators who have approved slashing for this service.
function enableSlashing(SlashParameter calldata parameter) external;
Parameters
Name | Type | Description |
---|---|---|
parameter | SlashParameter | The slash parameters to be set for the service, containing: - destination : Address where the slashed collateral will be moved to at the end of the slashing lifecycle - maxMbips : Maximum slashable amount in milli-bips (1 milli-bip = 0.00001%, 10,000,000 milli-bips = 100%) - resolutionWindow : Time window in seconds during which an operator can refute slash accusations |
disableSlashing
Disables slashing for a service
*The caller must be a registered service. This function:
- Sets the slash parameter ID to 0 (indicating slashing is disabled)
- Does not remove existing slash relationships
- Prevents new slash relationships from being created when operators call {approveSlashingFor(address)}*
function disableSlashing() external;
approveSlashingFor
Approves slashing parameters for a service the operator is validating
*This function allows an operator to enable, disable, or update slashing parameters for a service. Requirements:
- The caller must be a registered operator
- The service and operator must have an active relationship
- To enable slashing: the service must have already enabled slashing via {enableSlashing(SlashParameter)}
- To disable slashing: the service must have already disabled slashing via {disableSlashing()}
- To update parameters: the service must have registered new slash parameters via {enableSlashing(SlashParameter)}
- The function will revert if no update is registered*
function approveSlashingFor(address service) external;
Parameters
Name | Type | Description |
---|---|---|
service | address | The address of the service for which slashing is being approved |
getSlashParameter
Gets the current slash parameters for a given service
Retrieves the slash parameters that are currently set for the specified service. Reverts if slashing is not enabled for the service.
function getSlashParameter(address service) external view returns (SlashParameter memory);
Parameters
Name | Type | Description |
---|---|---|
service | address | The address of the service |
Returns
Name | Type | Description |
---|---|---|
<none> | SlashParameter | The slash parameters for the service |
setMaxActiveRelationshipsForService
Sets the maximum number of active relationships allowed for services
Only the contract owner can call this function. The new maximum must be greater than zero and greater than the current maximum.
function setMaxActiveRelationshipsForService(uint8 maxActive) external;
Parameters
Name | Type | Description |
---|---|---|
maxActive | uint8 | The new maximum number of active relationships |
setMaxActiveRelationshipsForOperator
Sets the maximum number of active relationships allowed for operators
Only the contract owner can call this function. The new maximum must be greater than zero and greater than the current maximum.
function setMaxActiveRelationshipsForOperator(uint8 maxActive) external;
Parameters
Name | Type | Description |
---|---|---|
maxActive | uint8 | The new maximum number of active relationships |
getMaxActiveRelationshipsForService
Gets the current maximum number of active relationships allowed
Returns the maximum number of active relationships that a service can have
function getMaxActiveRelationshipsForService() external view returns (uint8);
Returns
Name | Type | Description |
---|---|---|
<none> | uint8 | The maximum number of active relationships allowed |
getMaxActiveRelationshipsForOperator
Gets the current maximum number of active relationships allowed
Returns the maximum number of active relationships that an operator can have
function getMaxActiveRelationshipsForOperator() external view returns (uint8);
Returns
Name | Type | Description |
---|---|---|
<none> | uint8 | The maximum number of active relationships allowed |
getSlashParameterAt
Gets the slash parameters that an operator had approved at a specific timestamp
Retrieves the historical slash parameters for a service-operator relationship at the given timestamp. Reverts if slashing was not enabled at that timestamp.
function getSlashParameterAt(address service, address operator, uint32 timestamp)
external
view
returns (SlashParameter memory);
Parameters
Name | Type | Description |
---|---|---|
service | address | The address of the service |
operator | address | The address of the operator |
timestamp | uint32 | The timestamp at which to check the slash parameters |
Returns
Name | Type | Description |
---|---|---|
<none> | SlashParameter | The slash parameters that were in effect at the specified timestamp |
setMinWithdrawalDelay
Sets the minimum withdrawal delay for a service
This function can only be called by the service. All of the service’s active operators must have a withdrawal delay greater than or equal to this value, otherwise the function will revert. The delay must be greater than zero.
function setMinWithdrawalDelay(uint32 delay) external;
Parameters
Name | Type | Description |
---|---|---|
delay | uint32 | The new minimum withdrawal delay in seconds |
getMinWithdrawalDelay
Gets the minimum withdrawal delay for a service
Returns the configured minimum withdrawal delay for the specified service. This is the minimum delay that any operator working with this service must respect.
function getMinWithdrawalDelay(address service) external view returns (uint32);
Parameters
Name | Type | Description |
---|---|---|
service | address | The address of the service |
Returns
Name | Type | Description |
---|---|---|
<none> | uint32 | The minimum withdrawal delay in seconds |
setDefaultWithdrawalDelay
Sets the default withdrawal delay for operators’s vaults
This function can only be called by the contract owner. The new default delay is only applied to new operators and operators updating their withdrawal delay.
function setDefaultWithdrawalDelay(uint32 delay) external;
Parameters
Name | Type | Description |
---|---|---|
delay | uint32 | The new default withdrawal delay in seconds |
getActiveOperatorCount
Gets the number of active operators registered to a service
function getActiveOperatorCount(address service) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
service | address | The address of the service |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The number of active operators registered to the service |
getActiveServiceCount
Gets the number of active services registered to an operator
function getActiveServiceCount(address operator) external view returns (uint256);
Parameters
Name | Type | Description |
---|---|---|
operator | address | The address of the operator |
Returns
Name | Type | Description |
---|---|---|
<none> | uint256 | The number of active services registered to the operator |
Events
ServiceRegistered
Emitted when a service is registered.
event ServiceRegistered(address indexed service);
OperatorRegistered
Emitted when a operator is registered.
event OperatorRegistered(address indexed operator);
MetadataUpdated
Emitted when a service is registered with metadata. Name and URI are not validated or stored on-chain.
event MetadataUpdated(address indexed provider, string uri, string name);
Parameters
Name | Type | Description |
---|---|---|
provider | address | The address of the service/operator provider. |
uri | string | URI of the provider’s project to display in the UI. |
name | string | Name of the provider’s project to display in the UI. |
RelationshipUpdated
Emitted when a service-operator relationship is updated.
event RelationshipUpdated(
address indexed service, address indexed operator, RelationshipV2.Status status, uint32 slashParameterId
);
Parameters
Name | Type | Description |
---|---|---|
service | address | The address of the service. |
operator | address | The address of the operator. |
status | RelationshipV2.Status | The updated relationship status. |
slashParameterId | uint32 | The ID of the slash parameter if slashing is enabled, otherwise 0. |
WithdrawalDelayUpdated
Emitted when an operator updates the withdrawal delay.
event WithdrawalDelayUpdated(address indexed operator, uint32 delay);
Parameters
Name | Type | Description |
---|---|---|
operator | address | The address of the operator setting the delay. |
delay | uint32 | The new withdrawal delay in seconds. |
MinWithdrawalDelayUpdated
Emitted when a service updates the minimum withdrawal delay.
event MinWithdrawalDelayUpdated(address indexed service, uint32 delay);
Parameters
Name | Type | Description |
---|---|---|
service | address | The address of the service setting the delay. |
delay | uint32 | The new minimum withdrawal delay in seconds. |
DefaultWithdrawalDelayUpdated
Emitted when the default withdrawal delay is updated.
event DefaultWithdrawalDelayUpdated(uint32 oldDelay, uint32 newDelay);
Parameters
Name | Type | Description |
---|---|---|
oldDelay | uint32 | The previous default withdrawal delay in seconds. |
newDelay | uint32 | The new default withdrawal delay in seconds. |
SlashParameterUpdated
Emitted when SlashParameter for a service is updated.
event SlashParameterUpdated(address indexed service, address destination, uint24 maxMbips, uint32 resolutionWindow);
Parameters
Name | Type | Description |
---|---|---|
service | address | The address of the service |
destination | address | The address at which slash collateral will be moved. |
maxMbips | uint24 | The maximum slashable amount in mbips. |
resolutionWindow | uint32 | An operator’s refutable period in seconds in the event of slash. |
MaxActiveRelationshipsForServiceUpdated
Emitted when owner updates the maximum number of active relationships for a service
event MaxActiveRelationshipsForServiceUpdated(uint8 oldMaxActive, uint8 maxActive);
Parameters
Name | Type | Description |
---|---|---|
oldMaxActive | uint8 | The previous maximum number of active relationships. |
maxActive | uint8 | The new maximum number of active relationships. |
MaxActiveRelationshipsForOperatorUpdated
Emitted when owner updates the maximum number of active relationships for an operator
event MaxActiveRelationshipsForOperatorUpdated(uint8 oldMaxActive, uint8 maxActive);
Parameters
Name | Type | Description |
---|---|---|
oldMaxActive | uint8 | The previous maximum number of active relationships. |
maxActive | uint8 | The new maximum number of active relationships. |
Errors
OperatorNotFound
Account is not registered as an operator.
error OperatorNotFound(address account);
ServiceNotFound
Account is not registered as a service.
error ServiceNotFound(address account);
OperatorRelationshipsExceeded
the operator is already actively registered to max number of services.
error OperatorRelationshipsExceeded();
ServiceRelationshipsExceeded
the service is already actively registered to max number of operators.
error ServiceRelationshipsExceeded();
WithdrawalDelayIncompatible
thrown when a service and operator withdrawal delay does not match.
error WithdrawalDelayIncompatible(address service, address operator, uint32 withdrawalDelay, uint32 minWithdrawalDelay);
Structs
ServiceEntry
struct ServiceEntry {
bool registered;
uint32 slashParameterId;
uint32 minWithdrawalDelay;
}
OperatorEntry
struct OperatorEntry {
bool registered;
uint32 withdrawalDelay;
}
SlashParameter
The Slash Parameter for a particular service. This struct defines the parameters for slashing in the ecosystem.
struct SlashParameter {
address destination;
uint24 maxMbips;
uint32 resolutionWindow;
}