IRioLRTAVSRegistry

Git Source

Functions

initialize

Initializes the contract.

function initialize(address initialOwner, address token) external;

Parameters

getAVS

Returns the AVS associated with the given ID.

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

Parameters

Returns

isActiveSlashingContract

Checks if the provided slashing contract is active.

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

Parameters

Returns

isActiveRegistryContract

Checks if the provided registry contract is active.

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

Parameters

Returns

addAVS

Adds a new AVS to the registry.

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

Parameters

activateAVS

Activates an AVS in the registry.

function activateAVS(uint128 avsId) external;

Parameters

deactivateAVS

Deactivates an AVS in the registry.

function deactivateAVS(uint128 avsId) external;

Parameters

Events

AVSAdded

Emitted when a new AVS is added to the registry.

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

Parameters

AVSActivated

Emitted when an AVS is activated in the registry.

event AVSActivated(uint128 indexed avsId);

Parameters

AVSDeactivated

Emitted when an AVS is deactivated in the registry.

event AVSDeactivated(uint128 indexed avsId);

Parameters

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();

SLASHING_CONTRACT_ALREADY_ACTIVE

Thrown when attempting add or activate an AVS with a slashing contract that is already active in another AVS.

error SLASHING_CONTRACT_ALREADY_ACTIVE();

REGISTRY_CONTRACT_ALREADY_ACTIVE

Thrown when attempting add or activate an AVS with a registry contract that is already active in another AVS.

error REGISTRY_CONTRACT_ALREADY_ACTIVE();

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