To create a smart contract that could assign Manager Roles in DSA. A manager can only be assigned by DSA, and managers could have access to one or more connectors. Also, managers can only interact with connectors using this contract, they wouldn't have access to DSA.
- Store manager and connector info in a nested mapping.
mapping(uint64 => mapping(address => string[])) DSAmanagerConnectors;
mapping(uint64 => address[]) DSAmanagers;
-
Adding manager for a list of connectors (will be called by DSA)
- check if DSA Id exist (using
accountID
fromInstaList
) - check if any duplicate connector name already present in:
DSAmanagerConnectors[DSA ID][manager address];
- add unique connector names to:
DSAmanagerConnectors[DSA ID][manager address];
- check if DSA Id exist (using
-
Removing a manager (will be called by DSA) | input-> manager address
- check length of
DSAmanagerConnectors[DSA ID][manager address]
delete DSAmanagerConnectors[DSA ID][manager address]
- check length of
-
Interacting with connectors (will be called by managers) | input-> target, data
- check length of
DSAmanagerConnectors[DSA ID][msg.sender]
- check if connector name mentioned in input is present in DSAmanagerConnectors[DSA ID][msg.sender]
- get
cast()
function fromInstaImplementationM1
, and call it internally.
- check length of
-
Getter functions for
DSAmanagerConnectors
andDSAmanagers