DelegatedManagerFactory
Factory smart contract which provides asset managers the ability to create a SetToken with a DelegatedManager manager, create a DelegatedManager manager for an existing SetToken to migrate to, and initialize
extensions and modules.
createSetAndManager()
function createSetAndManager()
ANYONE CAN CALL: Deploys a new SetToken and DelegatedManager. Sets some temporary metadata about the deployment which will be read during a subsequent intialization step which wires everything together.
Parameter Name | Type | Description |
_components | address[] | List of addresses of components for initial Position |
_units | int256[] | List of units. Each unit is the # of components per 10^18 of a SetToken |
_name | string | Name of the SetToken |
_symbol | string | Symbol of the SetToken |
_owner | address | Address to set as the DelegateManager's |
_methodologist | address | Address to set as the DelegateManager's methodologist role |
_modules | address[] | List of modules to enable. All modules must be approved by the Controller |
_operators | address[] | List of operators authorized for the DelegateManager |
_assets | address[] | List of assets DelegateManager can trade. When empty, asset allow list is not enforced |
_extensions | address[] | List of extensions authorized for the DelegateManager |
createManager()
function createManager()
ONLY SETTOKEN MANAGER: Deploys a DelegatedManager and sets some temporary metadata about the deployment which will be read during a subsequent intialization step which wires everything together. This method is used when migrating an existing SetToken to the DelegatedManager system.
NOTES:
This flow should work well for SetTokens managed by an EOA. However, existing contract-managed Sets need to have their ownership temporarily transferred to an EOA when migrating
Existing SetTokens should already be initialized for all modules relevant to the extensions enabled for their new DelegatedManager. (There is no provision for adding new modules as part of the manager migration flow)
Parameter Name | Type | Description |
_setToken | address | Instance of SetToken to migrate to the DelegatedManager system |
_owner | address | Address to set as the DelegateManager's |
_methodologist | address | Address to set as the DelegateManager's methodologist role |
_operators | address[] | List of operators authorized for the DelegateManager |
_assets | address[] | List of assets DelegateManager can trade. When empty, asset allow list is not enforced |
_extensions | address[] | List of extensions authorized for the DelegateManager |
initialize()
function initialize()
ONLY DEPLOYER (the address which called createSetAndManager
or createManager
): Wires SetToken, DelegatedManager, global manager extensions, and modules together into a functioning package.
NOTES:
When migrating to this manager system from an existing SetToken, the SetToken's current manager address must be reset to point at the newly deployed DelegatedManager contract in a separate, final transaction.
See DelegatedManager extensions APIs at set.js for TS helpers to encode appropriate
initializeModuleAndExtension
orinitializeExtension
calls you will pass as arguments in theinitializeBytecode
parameter.
Parameter Name | Type | Description |
_setToken | address | Instance of SetToken to migrate to the DelegatedManager system |
_ownerFeeSplit | uint256 | Percent of fees in precise units (10^16 = 1%) sent to owner, rest to methodologist |
_ownerFeeRecipient | address | Address which receives owner's share of fees when they're distributed |
_extensions | address[] | List of addresses of extensions which need to be initialized |
_initializeBytecode | bytes[] | List of bytecode encoded calls to relevant target's initialize function |
Last updated