Skip to content

VaultFactoryDeploymentCore ​

Git Source

Inherits:VaultFactoryCore, VaultFactoryAuth

implements VaultFactory deploy vault related helpers.

Functions ​

_deploy ​

Deploys a contract using the CREATE opcode with the provided bytecode (bytecode_). This is an internal function, meant to be used within the contract to facilitate the deployment of other contracts.

solidity
function _deploy(bytes memory bytecode_) internal returns (address address_);

Parameters

NameTypeDescription
bytecode_bytesThe bytecode of the contract to be deployed.

Returns

NameTypeDescription
address_addressReturns the address of the deployed contract.

_deployVaultStart ​

solidity
function _deployVaultStart(address vaultDeploymentLogic_) internal returns (address vault_, uint256 vaultId_);

_deployVaultFinalize ​

solidity
function _deployVaultFinalize(address vault_, uint256 vaultId_, bool success_, bytes memory data_) internal;

getVaultAddress ​

Computes the address of a vault based on its given ID (vaultId_).

solidity
function getVaultAddress(uint256 vaultId_) public view returns (address vault_);

Parameters

NameTypeDescription
vaultId_uint256The ID of the vault.

Returns

NameTypeDescription
vault_addressReturns the computed address of the vault.

isVault ​

Checks if a given address (vault_) corresponds to a valid vault.

solidity
function isVault(address vault_) public view returns (bool);

Parameters

NameTypeDescription
vault_addressThe vault address to check.

Returns

NameTypeDescription
<none>boolReturns true if the given address corresponds to a valid vault, otherwise false.

totalVaults ​

Returns the total number of vaults deployed by the factory.

solidity
function totalVaults() external view returns (uint256);

Returns

NameTypeDescription
<none>uint256Returns the total number of vaults.