Dispatcher
. Once created, funds can be migrated to the newest release. The global logic for these actions is located in the Dispatcher
and additional release-level logic is located in the FundDeployer
.FundDeployer
operates as the top-level release contract, governing:ComptrollerProxy
is deployed and attached to the VaultProxy
as its accessor
via each of these actions. It stores core config options, and the config relative to extensions and their plugins are stored in those particular contracts by reference to the ComptrollerProxy
. The ComptrollerProxy
thus serves as the primary configuration object of a fund.FundDeployer.createNewFund()
and all components and configuration of the fund are created atomically. The steps taken by this function are:FundDeployer
deploys a new ComptrollerProxy
instance, which sets the caller-provided core and extension config.FundDeployer
calls to the Dispatcher
to deploy a new VaultProxy
with the CallerA-provided fundOwner
and fundName
(note that fundOwner
does not need to be CallerA), along with the release's VaultLib
and the newly-created ComptrollerProxy
that will become the VaultProxy
's accessor
.FundDeployer
sets the newly-deployed VaultProxy
on the ComptrollerProxy
and callsComptrollerProxy.activate()
to perform the final setup logic and give extensions a final chance to validate and update state.FundDeployer.createMigrationRequest()
, which deploys a new ComptrollerProxy
instance, setting the caller-provided core and extension config, and the VaultProxy
that will be migrated.migrationTimelock
defined on the Dispatcher
to pass.FundDeployer.executeMigration()
, which calls up to Dispatcher.executeMigration()
Dispatcher
updates the VaultProxy
's VaultLib
and assigns the newly-created ComptrollerProxy
as its accessor
.FundDeployer
calls ComptrollerProxy.activate()
to give extensions a final chance to validate and update state.Dispatcher
invokes hooks at each stage of the migration that call down to the outbound FundDeployer
, giving this release the chance to execute arbitrary code, reacting to the migration.invokeMigrationOutHook
that runs immediately prior to executing the migration. It:selfdestruct()
on the ComptrollerProxy
ComptrollerProxy
is created to replace the old ComptrollerProxy
, within the same release. It can even be called an "intra-release migration."Dispatcher
, the FundDeployer
itself stores a reconfigurationRequest
and defines a localreconfigurationTimelock
.FundDeployer.createReconfigurationRequest()
, which deploys a new ComptrollerProxy
instance, setting the caller-provided core and extension config, and the VaultProxy
that will be moved.reconfigurationTimelock
to pass.FundDeployer.executeReconfiguration()
, which assigns the newly-created ComptrollerProxy
as its accessor
.FundDeployer
deactivates the old ComptrollerProxy
as described in "Migration from this release to a new release".FundDeployer
calls ComptrollerProxy.activate()
to give extensions a final chance to validate and update state.ComptrollerProxy
with new configuration live on this release.