-
Notifications
You must be signed in to change notification settings - Fork 15
Metadata Manager
Rahul Saxena edited this page Aug 11, 2023
·
4 revisions
File: MetadataManager.sol
- This module is used to manage(set and get) the metadata of three different entities:
- Manager
- Orchestrator
- Member
- The metadata is additional information about these entities used for initialization or for other auxiliary functionalities.
- The metadata are defined as following:
-
struct ManagerMetadata { string name; address account; string twitterHandle; }
-
struct OrchestratorMetadata { string title; string descriptionShort; string descriptionLong; string[] externalMedias; string[] categories; }
-
struct MemberMetadata { string name; address account; string url; }
function getManagerMetadata()
external
view
returns (ManagerMetadata memory)
Returns the metadata of the manager in the form of struct ManagerMetadata
.
- ManagerMetadata: The metadata of the manager in the form of
struct ManagerMetadata
function getOrchestratorMetadata()
external
view
returns (OrchestratorMetadata memory)
Returns the metadata of the orchestrator in the form of struct OrchestratorMetadata
.
- OrchestratorMetadata: The metadata of the orchestrator in the form of
struct OrchestratorMetadata
function getTeamMetadata()
external
view
returns (MemberMetadata[] memory)
Returns an array of the metadata of the members involved in the project, each in the form of struct MemberMetadata
.
- MemberMetadata[]: Array of the metadata of the members involved in the project, each in the form of
struct MemberMetadata
.
function init(
IOrchestrator orchestrator_,
Metadata memory metadata,
bytes memory configData
) external override(Module) initializer
Initializes the MetadataManager
module itself and then sets the initial values for the manager
, orchestrator
, and team
metadata, that is decoded from the configData
.
- IOrchestrator orchestrator_: The Orchestrator instance on which the Metadata Manager will operate.
- Metadata metadata: Metadata for the Metadata Manager
- bytes configData: Additional data for the initialization of other things in the module
function setManagerMetadata(ManagerMetadata calldata managerMetadata_)
external
Sets the manager metadata.
- ManagerMetadata managerMetadata_: New value of the Manager Metadata
function setOrchestratorMetadata(
OrchestratorMetadata calldata orchestratorMetadata_
) public
Sets the orchestrator metadata
- OrchestratorMetadata orchestratorMetadata_: New value of the Orchestrator Metadata
function setTeamMetadata(MemberMetadata[] calldata teamMetadata_)
external
Sets the team metadata.
- MemberMetadata[] teamMetadata_: New value of the Team metadata.