Skip to content

Commit e90f065

Browse files
committed
Javadoc and comment fixes
1 parent 833f4f6 commit e90f065

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

contracts/factories/DelegatedManagerFactory.sol

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ contract DelegatedManagerFactory {
5353

5454
/**
5555
* @dev Emitted on DelegatedManager creation
56-
* @param _setToken Instance of the SetToken being levered
56+
* @param _setToken Instance of the SetToken being created
5757
* @param _manager Address of the DelegatedManager
5858
* @param _deployer Address of the deployer
5959
*/
@@ -65,7 +65,7 @@ contract DelegatedManagerFactory {
6565

6666
/**
6767
* @dev Emitted on DelegatedManager initialization
68-
* @param _setToken Instance of the SetToken being levered
68+
* @param _setToken Instance of the SetToken being initialized
6969
* @param _manager Address of the DelegatedManager owner
7070
*/
7171
event DelegatedManagerInitialized(
@@ -81,10 +81,12 @@ contract DelegatedManagerFactory {
8181
// Mapping which stores manager creation metadata between creation and initialization steps
8282
mapping(ISetToken=>InitializeParams) public initializeState;
8383

84-
// Mapping of all sets that have succesfully initialized
84+
// Mapping of all Sets that have been created by this factory
85+
// NOTE: these may be pending initialization
8586
mapping(ISetToken=>bool) public isValidSet;
8687

87-
// Address array of all sets that have succesfully initialized
88+
// Address array of all Sets that have been created by this factory.
89+
// NOTE: these may be pending initialization
8890
address[] internal validSets;
8991

9092
/* ============ Constructor ============ */
@@ -170,7 +172,7 @@ contract DelegatedManagerFactory {
170172
* @param _owner Address to set as the DelegateManager's `owner` role
171173
* @param _methodologist Address to set as the DelegateManager's methodologist role
172174
* @param _operators List of operators authorized for the DelegateManager
173-
* @param _assets List of assets DelegateManager can trade. When empty, manager can trade any asset
175+
* @param _assets List of assets DelegateManager can trade. When empty, asset allow list is not enforced
174176
* @param _extensions List of extensions authorized for the DelegateManager
175177
*
176178
* @return (address) Address of the created DelegatedManager
@@ -209,9 +211,13 @@ contract DelegatedManagerFactory {
209211
* ONLY DEPLOYER: Wires SetToken, DelegatedManager, global manager extensions, and modules together
210212
* into a functioning package.
211213
*
214+
* NOTE: When migrating to this manager system from an existing SetToken, the SetToken's current manager address
215+
* must be reset to point at the newly deployed DelegatedManager contract in a separate, final transaction.
216+
*
217+
*
212218
* @param _setToken Instance of the SetToken
213219
* @param _ownerFeeSplit Percent of fees in precise units (10^16 = 1%) sent to operator, rest to methodologist
214-
* @param _ownerFeeRecipient Address which receives operator's share of fees when they're distributed
220+
* @param _ownerFeeRecipient Address which receives owner's share of fees when they're distributed
215221
* @param _initializeTargets List of addresses of any extensions or modules which need to be initialized
216222
* @param _initializeBytecode List of bytecode encoded calls to relevant target's initialize function
217223
*/
@@ -236,6 +242,8 @@ contract DelegatedManagerFactory {
236242
_initializeTargets[i].functionCallWithValue(_initializeBytecode[i], 0);
237243
}
238244

245+
// If the SetToken was factory-deployed & factory is its current `manager`, transfer
246+
// managership to the new DelegatedManager
239247
if (_setToken.manager() == address(this)) {
240248
_setToken.setManager(address(manager));
241249
}
@@ -301,7 +309,7 @@ contract DelegatedManagerFactory {
301309
* @param _methodologist Address to set as the DelegateManager's methodologist role
302310
* @param _extensions List of extensions authorized for the DelegateManager
303311
* @param _operators List of operators authorized for the DelegateManager
304-
* @param _assets List of assets DelegateManager can trade. When empty, manager can trade any asset
312+
* @param _assets List of assets DelegateManager can trade. When empty, asset allow list is not enforced
305313
*
306314
* @return Address of created DelegatedManager
307315
*/
@@ -315,7 +323,10 @@ contract DelegatedManagerFactory {
315323
internal
316324
returns (DelegatedManager)
317325
{
326+
// If asset array is empty, manager's useAssetAllowList will be set to false
327+
// and the asset allow list is not enforced
318328
bool useAssetAllowlist = _assets.length > 0;
329+
319330
DelegatedManager newManager = new DelegatedManager(
320331
_setToken,
321332
address(this),

0 commit comments

Comments
 (0)