Skip to main content

VaultsRegistry

Git Source

Inherits: Ownable2Step ↗, IVaultsRegistry

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

Events

VaultAdded

Event emitted on a Vault addition

event VaultAdded(address indexed caller, address indexed vault);

Parameters

NameTypeDescription
calleraddressThe address that has added the Vault
vaultaddressThe address of the added Vault

VaultImplAdded

Event emitted on adding Vault implementation contract

event VaultImplAdded(address indexed impl);

Parameters

NameTypeDescription
impladdressThe address of the new implementation contract

VaultImplRemoved

Event emitted on removing Vault implementation contract

event VaultImplRemoved(address indexed impl);

Parameters

NameTypeDescription
impladdressThe address of the removed implementation contract

FactoryAdded

Event emitted on whitelisting the factory

event FactoryAdded(address indexed factory);

Parameters

NameTypeDescription
factoryaddressThe address of the whitelisted factory

FactoryRemoved

Event emitted on removing the factory from the whitelist

event FactoryRemoved(address indexed factory);

Parameters

NameTypeDescription
factoryaddressThe address of the factory removed from the whitelist

Functions

vaults

Registered Vaults

function vaults(address vault) external view returns (bool);

Parameters

NameTypeDescription
vaultaddressThe address of the vault to check whether it is registered

Returns

NameTypeDescription
<none>booltrue for the registered Vault, false otherwise

vaultImpls

Registered Vault implementations

function vaultImpls(address impl) external view returns (bool);

Parameters

NameTypeDescription
impladdressThe address of the vault implementation

Returns

NameTypeDescription
<none>booltrue for the registered implementation, false otherwise

factories

Registered Factories

function factories(address factory) external view returns (bool);

Parameters

NameTypeDescription
factoryaddressThe address of the factory to check whether it is whitelisted

Returns

NameTypeDescription
<none>booltrue for the whitelisted Factory, false otherwise

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