Skip to content
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

Merged
merged 16 commits into from
Aug 8, 2024
Merged

Dock Registry implementation #18

merged 16 commits into from
Aug 8, 2024

Conversation

gabrielstoica
Copy link
Collaborator

@gabrielstoica gabrielstoica commented Aug 2, 2024

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 their Containers through a single access point.

DockRegistry follows the Factory Pattern, allowing users to deploy and manage multiple Containers and keep track of their parent Dock.

Breaking changes

DockRegistry stores the address of the ModuleKeeper. Therefore, when a new module is to be enabled, by calling the _enableModule() method on the ModuleManager, an extra call to get the ModuleKeeper address is made on the registry. For reference, check this line.

Container does not inherit from Ownable anymore. Instead, there is a local onlyOwner modifier that calls the DockRegistry.ownerOfContainer() method to check if msg.sender is the actual owner of the Container. As a result, the registry is the single place where the ownership of a container can be updated through the transferContainerOwnership() method.

task: c4378d88023a473187a82bd81ce095cc

@gabrielstoica gabrielstoica requested a review from V1d0r August 5, 2024 17:44
@V1d0r
Copy link
Contributor

V1d0r commented Aug 8, 2024

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.

@V1d0r V1d0r merged commit 625b11a into main Aug 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants