EncryptedVaultFactory
EncryptedVaultFactory
A factory contract for creating Orion encrypted vaults using Beacon Proxy pattern
This contract deploys BeaconProxy instances that point to a shared encrypted vault implementation.
config
contract IOrionConfig config
Orion Config contract address
vaultBeacon
contract UpgradeableBeacon vaultBeacon
UpgradeableBeacon for encrypted vaults
upgradeTimelock
address upgradeTimelock
Address of the upgrade timelock that must authorise all implementation upgrades
constructor
constructor() public
Constructor that disables initializers for the implementation contract
initialize
function initialize(address initialOwner, address configAddress, address vaultBeaconAddress) public
Initialize the contract
Parameters
| Name | Type | Description |
|---|---|---|
| initialOwner | address | The address of the initial owner |
| configAddress | address | The address of the OrionConfig contract |
| vaultBeaconAddress | address | The address of the UpgradeableBeacon for vaults |
createVault
function createVault(address strategist, string name, string symbol, uint8 feeType, uint16 performanceFee, uint16 managementFee, address depositAccessControl) external returns (address vault)
Creates a new encrypted vault
Parameters
| Name | Type | Description |
|---|---|---|
| strategist | address | The address of the vault strategist |
| name | string | The name of the vault |
| symbol | string | The symbol of the vault |
| feeType | uint8 | The fee type |
| performanceFee | uint16 | The performance fee |
| managementFee | uint16 | The management fee |
| depositAccessControl | address | The address of the deposit access control contract (address(0) = permissionless) |
Return Values
| Name | Type | Description |
|---|---|---|
| vault | address | The address of the new encrypted vault |
setVaultBeacon
function setVaultBeacon(address newVaultBeacon) external
Updates the vault beacon address
Parameters
| Name | Type | Description |
|---|---|---|
| newVaultBeacon | address | The new UpgradeableBeacon address |
setUpgradeTimelock
function setUpgradeTimelock(address newTimelock) external
Sets the upgrade timelock address.
If no timelock is set yet, only the owner may call this. Once a timelock is active, only the timelock itself may replace it, preventing the owner from bypassing the delay.
Parameters
| Name | Type | Description |
|---|---|---|
| newTimelock | address | The new timelock address (e.g. OpenZeppelin TimelockController); address(0) not permitted |
_authorizeUpgrade
function _authorizeUpgrade(address) internal
Authorizes an upgrade to a new implementation
Requires the caller to be the upgrade timelock (if set) or the owner (during initial bootstrapping before a timelock has been configured).