The VaultConfigurator contract provides a streamlined and modular deployment mechanism for setting up a new Vault instance and its associated managers. It orchestrates the creation and initialization of the following components:
VaultShareManagerFeeManagerRiskManagerOracleIt ensures that all components are correctly wired together by setting appropriate references between them.
This contract is designed to be used by an actor that need to deploy and configure fully functional vaults in a deterministic and upgradeable way, using versioned module factories.
IFactory public immutable shareManagerFactory;
IFactory public immutable feeManagerFactory;
IFactory public immutable riskManagerFactory;
IFactory public immutable oracleFactory;
IFactory public immutable vaultFactory;
Each of these holds a reference to a factory contract responsible for creating a specific type of contract.
constructor(
address shareManagerFactory_,
address feeManagerFactory_,
address riskManagerFactory_,
address oracleFactory_,
address vaultFactory_
)
Initializes the configurator with references to module factories.
struct InitParams {
uint256 version;
address proxyAdmin;
address vaultAdmin;
uint256 shareManagerVersion;
bytes shareManagerParams;
uint256 feeManagerVersion;
bytes feeManagerParams;
uint256 riskManagerVersion;
bytes riskManagerParams;
uint256 oracleVersion;
bytes oracleParams;
address defaultDepositHook;
address defaultRedeemHook;
uint256 queueLimit;
Vault.RoleHolder[] roleHolders;
}