Skip to main content

VaultsRegistry

Git Source ↗

Inherits: Ownable2Step ↗, IVaultsRegistry

Defines the registry functionality that keeps track of Vaults, Factories and Vault upgrades

State Variables​

vaults​

mapping(address => bool) public override vaults

factories​

mapping(address => bool) public override factories

vaultImpls​

mapping(address => bool) public override vaultImpls

_initialized​

bool private _initialized

Functions​

constructor​

Constructor

constructor() Ownable(msg.sender);

addVault​

Function for adding Vault to the registry. Can only be called by the whitelisted Factory.

function addVault(address vault) external override;

Parameters

NameTypeDescription
vaultaddressThe address of the Vault to add

addVaultImpl​

Function for adding Vault implementation contract

function addVaultImpl(address newImpl) external override onlyOwner;

Parameters

NameTypeDescription
newImpladdressThe address of the new implementation contract

removeVaultImpl​

Function for removing Vault implementation contract

function removeVaultImpl(address impl) external override onlyOwner;

Parameters

NameTypeDescription
impladdressThe address of the removed implementation contract

addFactory​

Function for adding the factory to the whitelist

function addFactory(address factory) external override onlyOwner;

Parameters

NameTypeDescription
factoryaddressThe address of the factory to add to the whitelist

removeFactory​

Function for removing the factory from the whitelist

function removeFactory(address factory) external override onlyOwner;

Parameters

NameTypeDescription
factoryaddressThe address of the factory to remove from the whitelist

initialize​

Function for initializing the registry. Can only be called once during the deployment.

function initialize(address _owner) external override onlyOwner;

Parameters

NameTypeDescription
_owneraddressThe address of the owner of the contract