ModuleRegistry

Git Source

Inherits: IModuleRegistry, Ownable, Initializable

State Variables

factory

IArrakisMetaVaultFactory public factory;

admin

should be a timelock contract.

address public immutable admin;

_guardian

address internal immutable _guardian;

_beacons

EnumerableSet.AddressSet internal _beacons;

Functions

constructor

constructor(address owner_, address guardian_, address admin_);

initialize

function used to initialize module registry.

function initialize(address factory_) external initializer;

Parameters

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

beacons

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

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

Returns

NameTypeDescription
<none>address[]beacons 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.

whitelistBeacons

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

function whitelistBeacons(address[] calldata beacons_)
    external
    onlyOwner;

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
    onlyOwner;

Parameters

NameTypeDescription
beacons_address[]list of beacon to blacklist.

_createModule

function _createModule(
    address vault_,
    address beacon_,
    bytes calldata payload_
) internal returns (address module);

_checkVaultNotAddressZero

function _checkVaultNotAddressZero(address vault_) internal pure;