-
Notifications
You must be signed in to change notification settings - Fork 14
/
ITemplateRegistry.sol
45 lines (34 loc) · 1.7 KB
/
ITemplateRegistry.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
// SPDX-License-Identifier: GPL-3.0
// Docgen-SOLC: 0.8.15
pragma solidity ^0.8.15;
import { IOwned } from "../IOwned.sol";
/// @notice Template used for creating new clones
struct Template {
/// @Notice Cloneable implementation address
address implementation;
/// @Notice implementations can only be cloned if endorsed
bool endorsed;
/// @Notice Optional - Metadata CID which can be used by the frontend to add informations to a vault/adapter...
string metadataCid;
/// @Notice If true, the implementation will require an init data to be passed to the clone function
bool requiresInitData;
/// @Notice Optional - Address of an registry which can be used in an adapter initialization
address registry;
/// @Notice Optional - Only used by Strategies. EIP-165 Signatures of an adapter required by a strategy
bytes4[8] requiredSigs;
}
interface ITemplateRegistry is IOwned {
function templates(bytes32 templateCategory, bytes32 templateId) external view returns (Template memory);
function templateCategoryExists(bytes32 templateCategory) external view returns (bool);
function templateExists(bytes32 templateId) external view returns (bool);
function getTemplateCategories() external view returns (bytes32[] memory);
function getTemplate(bytes32 templateCategory, bytes32 templateId) external view returns (Template memory);
function getTemplateIds(bytes32 templateCategory) external view returns (bytes32[] memory);
function addTemplate(
bytes32 templateType,
bytes32 templateId,
Template memory template
) external;
function addTemplateCategory(bytes32 templateCategory) external;
function toggleTemplateEndorsement(bytes32 templateCategory, bytes32 templateId) external;
}