IModuleRegistry

Git Source

Author: Arrakis Team.

interface of module registry that contains all whitelisted modules.

Functions

beacons

function to get the whitelisted list of IBeacon that have module as implementation.

function beacons() external view returns (address[] memory beacons);

Returns

NameTypeDescription
beaconsaddress[]list of upgradeable beacon.

beaconsContains

function to know if the beacons enumerableSet contain beacon_

function beaconsContains(address beacon_)
    external
    view
    returns (bool isContained);

Parameters

NameTypeDescription
beacon_addressbeacon address to check

guardian

function used to get the guardian address of arrakis protocol.

function guardian() external view returns (address);

Returns

NameTypeDescription
<none>addressguardian address of the pauser.

admin

function used to get the admin address that can upgrade beacon implementation.

admin address should be a timelock contract.

function admin() external view returns (address);

Returns

NameTypeDescription
<none>addressadmin address that can upgrade beacon implementation.

initialize

function used to initialize module registry.

function initialize(address factory_) external;

Parameters

NameTypeDescription
factory_addressaddress of ArrakisMetaVaultFactory, who is the only one who can call the init management function.

whitelistBeacons

function used to whitelist IBeacon that contain implementation of valid module.

function whitelistBeacons(address[] calldata beacons_) external;

Parameters

NameTypeDescription
beacons_address[]list of beacon to whitelist.

blacklistBeacons

function used to blacklist IBeacon that contain implementation of unvalid (from now) module.

function blacklistBeacons(address[] calldata beacons_) external;

Parameters

NameTypeDescription
beacons_address[]list of beacon to blacklist.

createModule

function used to create module instance that can be whitelisted as module inside a vault.

function createModule(
    address vault_,
    address beacon_,
    bytes calldata payload_
) external returns (address module);

Parameters

NameTypeDescription
vault_address
beacon_addresswhich whitelisted beacon's implementation we want to create an instance of.
payload_bytespayload to create the module.

Events

LogWhitelistBeacons

Log whitelist action of beacons.

event LogWhitelistBeacons(address[] beacons);

Parameters

NameTypeDescription
beaconsaddress[]list of beacons whitelisted.

LogBlacklistBeacons

Log blacklist action of beacons.

event LogBlacklistBeacons(address[] beacons);

Parameters

NameTypeDescription
beaconsaddress[]list of beacons blacklisted.

Errors

AddressZero

error AddressZero();

AlreadyWhitelistedBeacon

error AlreadyWhitelistedBeacon(address beacon);

NotAlreadyWhitelistedBeacon

error NotAlreadyWhitelistedBeacon(address beacon);

NotWhitelistedBeacon

error NotWhitelistedBeacon();

NotBeacon

error NotBeacon();

ModuleNotLinkedToMetaVault

error ModuleNotLinkedToMetaVault();

NotSameGuardian

error NotSameGuardian();

NotSameAdmin

error NotSameAdmin();