AeraV2Factory
AeraV2Factory
Inherits: IAeraV2Factory, Sweepable
Used to create new vaults and deploy modules.
Only one instance of the factory will be required per chain.
State Variables
wrappedNativeToken
The address of wrapped native token.
parameters
STORAGE ///
Vault parameters for vault deployment.
Functions
constructor
FUNCTIONS ///
Initialize the factory contract.
Parameters
wrappedNativeToken_
address
The address of wrapped native token.
create
Create V2 vault.
Parameters
saltInput
bytes32
The salt input value to generate salt.
description
string
Vault description.
vaultParameters
VaultParameters
Struct details for vault deployment.
assetRegistryParameters
AssetRegistryParameters
Struct details for asset registry deployment.
hooksParameters
HooksParameters
Struct details for hooks deployment.
Returns
deployedVault
address
The address of deployed vault.
deployedAssetRegistry
address
The address of deployed asset registry.
deployedHooks
address
The address of deployed hooks.
computeVaultAddress
Calculate deployment address of V2 vault.
Parameters
saltInput
bytes32
The salt input value to generate salt.
description
string
Vault description.
vaultParameters
VaultParameters
Struct details for vault deployment.
_deployAssetRegistry
INTERNAL FUNCTIONS ///
Deploy asset registry.
Parameters
salt
bytes32
The salt value to deploy asset registry.
vault
address
Vault address.
assetRegistryParameters
AssetRegistryParameters
Struct details for asset registry deployment.
Returns
deployed
address
The address of deployed asset registry.
_deployHooks
Deploy hooks.
Parameters
salt
bytes32
The salt value to deploy hooks.
vault
address
Vault address.
hooksParameters
HooksParameters
Struct details for hooks deployment.
Returns
deployed
address
The address of deployed hooks.
_deployVault
Deploy V2 vault.
Parameters
salt
bytes32
The salt value to create vault.
assetRegistry
address
Asset registry address.
hooks
address
Hooks address.
description
string
Vault description.
vaultParameters
VaultParameters
Struct details for vault deployment.
Returns
deployed
address
The address of deployed vault.
_computeVaultAddress
Calculate deployment address of V2 vault.
Parameters
salt
bytes32
The salt value to create vault.
Returns
<none>
address
Calculated deployment address.
_calculateSalt
Calculate salt from vault parameters.
Parameters
saltInput
bytes32
The salt value to create vault.
vaultParameters
VaultParameters
Struct details for vault deployment.
description
string
Vault description.
Events
VaultCreated
EVENTS ///
Emitted when the vault is created.
Errors
Aera__DescriptionIsEmpty
ERRORS ///
Aera__WrappedNativeTokenIsZeroAddress
Aera__InvalidWrappedNativeToken
Aera__VaultAddressMismatch
Aera__GuardianIsAssetRegistryOwner
Aera__GuardianIsHooksOwner
Last updated