-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dock Registry implementation #18
Conversation
…ry it for 'ModuleKeeper' address
…pdate 'DeployContainer' to use 'DockRegistry'
This is a valuable enhancement, bringing the Dock onto the blockchain. The Dock is a critical component, and having the registry on-chain enables users to effectively manage containers, track ownership, and control permissions. Additionally, the ability to transfer containers and docks as the service evolves introduces the desired granularity and modularity. Regarding the module keeper address stored in the Dock registry, it’s important to minimize redundant calls elsewhere in the code. It may be worthwhile to consider how other essential addresses, such as those for future management contracts, will be stored. For example, should we implement a mapping system for efficient address management? Should the contract be designed to be upgradable? These are questions worth exploring further. |
As discussed with @V1d0r and team, we're going to move the
Dock
creation process on-chain. This allows a MetaDock user to create and manage theirContainer
s through a single access point.DockRegistry
follows the Factory Pattern, allowing users to deploy and manage multipleContainer
s and keep track of their parent Dock.Breaking changes
DockRegistry
stores the address of theModuleKeeper
. Therefore, when a new module is to be enabled, by calling the_enableModule()
method on theModuleManager
, an extra call to get theModuleKeeper
address is made on the registry. For reference, check this line.Container
does not inherit fromOwnable
anymore. Instead, there is a localonlyOwner
modifier that calls theDockRegistry.ownerOfContainer()
method to check ifmsg.sender
is the actual owner of theContainer
. As a result, the registry is the single place where the ownership of a container can be updated through thetransferContainerOwnership()
method.task: c4378d88023a473187a82bd81ce095cc