IRioLRTAVSRegistry

IRioLRTAVSRegistry

Functions

initialize

Initializes the contract.

function initialize(address initialOwner, address token) external;

Parameters

NameTypeDescription

initialOwner

address

The initial owner of the contract.

token

address

The address of the liquid restaking token.

getAVS

Returns the AVS associated with the given ID.

function getAVS(uint128 avsId) external view returns (AVS memory);

Parameters

NameTypeDescription

avsId

uint128

The ID of the AVS to retrieve.

Returns

NameTypeDescription

<none>

AVS

The AVS corresponding to the given ID.

isActiveSlashingContract

Checks if the provided slashing contract is active.

function isActiveSlashingContract(address slashingContract) external view returns (bool);

Parameters

NameTypeDescription

slashingContract

address

The address of the slashing contract to check.

Returns

NameTypeDescription

<none>

bool

True if the slashing contract is active, false otherwise.

isActiveRegistryContract

Checks if the provided registry contract is active.

function isActiveRegistryContract(address registryContract) external view returns (bool);

Parameters

NameTypeDescription

registryContract

address

The address of the registry contract to check.

Returns

NameTypeDescription

<none>

bool

True if the registry contract is active, false otherwise.

addAVS

Adds a new AVS to the registry.

function addAVS(string calldata name, address slashingContract, address registryContract) external;

Parameters

NameTypeDescription

name

string

The name of the AVS.

slashingContract

address

The address of the slashing contract.

registryContract

address

The address of the registry contract.

activateAVS

Activates an AVS in the registry.

function activateAVS(uint128 avsId) external;

Parameters

NameTypeDescription

avsId

uint128

The ID of the AVS to activate.

deactivateAVS

Deactivates an AVS in the registry.

function deactivateAVS(uint128 avsId) external;

Parameters

NameTypeDescription

avsId

uint128

The ID of the AVS to deactivate.

Events

AVSAdded

Emitted when a new AVS is added to the registry.

event AVSAdded(uint128 indexed avsId, string name, address slashingContract, address registryContract);

Parameters

NameTypeDescription

avsId

uint128

The ID of the newly added AVS.

name

string

The name of the AVS.

slashingContract

address

The address of the slashing contract.

registryContract

address

The address of the registry contract.

AVSActivated

Emitted when an AVS is activated in the registry.

event AVSActivated(uint128 indexed avsId);

Parameters

NameTypeDescription

avsId

uint128

The ID of the activated AVS.

AVSDeactivated

Emitted when an AVS is deactivated in the registry.

event AVSDeactivated(uint128 indexed avsId);

Parameters

NameTypeDescription

avsId

uint128

The ID of the deactivated AVS.

Errors

INVALID_NAME

Thrown when the provided name is empty.

error INVALID_NAME();

INVALID_SLASHING_CONTRACT

Thrown when the provided slashing contract address is not address(0) or a contract.

error INVALID_SLASHING_CONTRACT();

INVALID_REGISTRY_CONTRACT

Thrown when the provided registry contract address is not a contract.

error INVALID_REGISTRY_CONTRACT();

AVS_NOT_REGISTERED

Thrown when attempting to activate or deactivate an AVS that is not registered.

error AVS_NOT_REGISTERED();

AVS_ALREADY_ACTIVE

Thrown when attempting to activate an AVS that is already active.

error AVS_ALREADY_ACTIVE();

AVS_ALREADY_INACTIVE

Thrown when attempting to deactivate an AVS that is already inactive.

error AVS_ALREADY_INACTIVE();

Structs

AVS

Information about an AVS.

struct AVS {
    string name;
    bool active;
    address slashingContract;
    address registryContract;
}

Last updated