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

minimal p/ownable Interface with multiple implementations #2193

Open
moul opened this issue May 25, 2024 · 2 comments
Open

minimal p/ownable Interface with multiple implementations #2193

moul opened this issue May 25, 2024 · 2 comments

Comments

@moul
Copy link
Member

moul commented May 25, 2024

Propose refactoring p/ownable from a struct with a specific implementation to a more minimal interface, allowing for custom ownership logic while retaining the current struct as the default implementation.

Details

  • Minimal Interface: Define a minimal interface, possibly just Owner() std.Address. Enabling read-only usage of Ownable everywhere with the possibility of custom ownership logic.
  • Default Implementation: Retain the current struct as the default implementation.
  • Extended Interface: Keep the current helpers (e.g., Transfer) in another interface, like Transferrable which embeds Ownable.

cc @leohhhn

@linhpn99
Copy link
Contributor

I think I understand this issue. If permitted, can I create a pull request to resolve it?

@moul moul changed the title minimal p/ownable Interface with multiple implementations minimal p/ownable Interface with multiple implementations May 25, 2024
@linhpn99
Copy link
Contributor

#2198
hey @moul @leohhhn I have implemented the PR for this issue. Can you take a look and provide any feedback? Do we need to add a custom implementation ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

3 participants