GenericVaultFactory
Allows anyone to reliably deploy a new GenericVault contract
deploy
Deploys a new Vault contract
This function creates a new Vault instance It MUST emit a VaultCreated event upon successful creation An IVault type object is returned because Vault implementations are specific to each implementation but have to follow the IVault interface
Parameters
| Name | Type | Description |
|---|---|---|
| bytes |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | contract IVault | IVault The created Vault contract following IVault interface |
deployDeterministic
Deploys a new Vault contract at a deterministic address
This function creates a new Vault instance at a deterministic address, we recommend using the Create2 opcode It MUST emit a VaultCreated event upon successful creation An IVault type object is returned because Vault implementations are specific to each implementation but have to follow the IVault interface
Parameters
| Name | Type | Description |
|---|---|---|
| salt | bytes32 | |
| bytes |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | contract IVault | IVault The created Vault contract following IVault interface |
computeVaultAddress
Computes the deterministic address of a Vault contract
This function calculates the address where a GenericVault contract will be deployed using the Create2 opcode, given the deployer's address and a salt
Parameters
| Name | Type | Description |
|---|---|---|
| deployer | address | |
| salt | bytes32 | |
| bytes |
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | address | address The computed deterministic address of the Vault contract |

