ISuperRBAC

Git Source

Inherits: IAccessControl

Author: Zeropoint Labs.

interface for Super RBAC

Functions

setSuperRegistry

updates the super registry address

function setSuperRegistry(address superRegistry_) external;

setRoleAdmin

configures a new role in superForm

function setRoleAdmin(bytes32 role_, bytes32 adminRole_) external;

Parameters

NameTypeDescription
role_bytes32the role to set
adminRole_bytes32the admin role to set as admin

revokeRoleSuperBroadcast

revokes the role_ from superRegistryAddressId_ on all chains

function revokeRoleSuperBroadcast(
    bytes32 role_,
    address addressToRevoke_,
    bytes memory extraData_,
    bytes32 superRegistryAddressId_
)
    external
    payable;

Parameters

NameTypeDescription
role_bytes32the role to revoke
addressToRevoke_addressthe address to revoke the role from
extraData_bytesamb config if broadcasting is required
superRegistryAddressId_bytes32the super registry address id

stateSyncBroadcast

may not work for all roles

allows sync of global roles from different chains using broadcast registry

function stateSyncBroadcast(bytes memory data_) external;

PROTOCOL_ADMIN_ROLE

returns the id of the protocol admin role

function PROTOCOL_ADMIN_ROLE() external view returns (bytes32);

EMERGENCY_ADMIN_ROLE

returns the id of the emergency admin role

function EMERGENCY_ADMIN_ROLE() external view returns (bytes32);

PAYMENT_ADMIN_ROLE

returns the id of the payment admin role

function PAYMENT_ADMIN_ROLE() external view returns (bytes32);

BROADCASTER_ROLE

returns the id of the broadcaster role

function BROADCASTER_ROLE() external view returns (bytes32);

CORE_STATE_REGISTRY_PROCESSOR_ROLE

returns the id of the core state registry processor role

function CORE_STATE_REGISTRY_PROCESSOR_ROLE() external view returns (bytes32);

CORE_STATE_REGISTRY_RESCUER_ROLE

returns the id of the core state registry rescuer role

function CORE_STATE_REGISTRY_RESCUER_ROLE() external view returns (bytes32);

CORE_STATE_REGISTRY_DISPUTER_ROLE

returns the id of the core state registry rescue disputer role

function CORE_STATE_REGISTRY_DISPUTER_ROLE() external view returns (bytes32);

TIMELOCK_STATE_REGISTRY_PROCESSOR_ROLE

returns the id of the two steps state registry processor role

function TIMELOCK_STATE_REGISTRY_PROCESSOR_ROLE() external view returns (bytes32);

BROADCAST_STATE_REGISTRY_PROCESSOR_ROLE

returns the id of the broadcast state registry processor role

function BROADCAST_STATE_REGISTRY_PROCESSOR_ROLE() external view returns (bytes32);

DST_SWAPPER_ROLE

returns the id of the dst swapper role

function DST_SWAPPER_ROLE() external view returns (bytes32);

CORE_STATE_REGISTRY_UPDATER_ROLE

returns the id of the core state registry updater role

function CORE_STATE_REGISTRY_UPDATER_ROLE() external view returns (bytes32);

WORMHOLE_VAA_RELAYER_ROLE

returns the id of wormhole vaa relayer role

function WORMHOLE_VAA_RELAYER_ROLE() external view returns (bytes32);

hasProtocolAdminRole

returns whether the given address has the protocol admin role

function hasProtocolAdminRole(address admin_) external view returns (bool);

Parameters

NameTypeDescription
admin_addressthe address to check

hasEmergencyAdminRole

returns whether the given address has the emergency admin role

function hasEmergencyAdminRole(address admin_) external view returns (bool);

Parameters

NameTypeDescription
admin_addressthe address to check

Structs

InitialRoleSetup

struct InitialRoleSetup {
    address admin;
    address emergencyAdmin;
    address paymentAdmin;
    address csrProcessor;
    address tlProcessor;
    address brProcessor;
    address csrUpdater;
    address srcVaaRelayer;
    address dstSwapper;
    address csrRescuer;
    address csrDisputer;
}