-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathISuperVaultFactory.sol
72 lines (59 loc) · 2.86 KB
/
ISuperVaultFactory.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
/// @title ISuperVaultFactory Interface
/// @notice Interface for the SuperVaultFactory contract
/// @author SuperForm Labs
interface ISuperVaultFactory {
//////////////////////////////////////////////////////////////
// ERRORS //
//////////////////////////////////////////////////////////////
/// @notice Error thrown when the pending management is not set
error FAILED_TO_SET_PENDING_MANAGEMENT();
/// @notice Error thrown when the performance fee is not set
error FAILED_TO_SET_PERFORMANCE_FEE();
/// @notice Error thrown when array lengths do not match
error ARRAY_LENGTH_MISMATCH();
/// @notice Error thrown when the number of superforms is zero
error ZERO_SUPERFORMS();
/// @notice Error thrown when a zero address is provided
error ZERO_ADDRESS();
/// @notice Error thrown when the final superform IDs array is empty
error EMPTY_FINAL_SUPERFORM_IDS();
//////////////////////////////////////////////////////////////
// EVENTS //
//////////////////////////////////////////////////////////////
/// @notice Emitted when a SuperVault is created
/// @param superVault The address of the created SuperVault
event SuperVaultCreated(address indexed superVault);
//////////////////////////////////////////////////////////////
// EXTERNAL VIEW FUNCTIONS //
//////////////////////////////////////////////////////////////
/// @notice Returns all SuperVaults
/// @return Number of SuperVaults
function getNumberOfSuperVaults() external view returns (uint256);
//////////////////////////////////////////////////////////////
// EXTERNAL WRITE FUNCTIONS //
//////////////////////////////////////////////////////////////
/// @notice Creates a new SuperVault
/// @dev Sets pending management to deployer, deployer will have to accept management in SuperVault
/// @param asset_ Address of the asset token
/// @param strategist_ Address of the strategist
/// @param vaultManager_ Address of the vault manager
/// @param name_ Name of the strategy
/// @param depositLimit_ Maximum deposit limit
/// @param superformIds_ Array of Superform IDs
/// @param startingWeights_ Array of starting weights for each Superform
/// @param formImplementationId5115_ Form implementation ID for 5115
function createSuperVault(
address asset_,
address strategist_,
address vaultManager_,
string memory name_,
uint256 depositLimit_,
uint256[] memory superformIds_,
uint256[] memory startingWeights_,
uint32 formImplementationId5115_
)
external
returns (address superVault);
}