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

ERC2981 External Traits #1172

Open
immrsd opened this issue Oct 2, 2024 · 0 comments · May be fixed by #1173
Open

ERC2981 External Traits #1172

immrsd opened this issue Oct 2, 2024 · 0 comments · May be fixed by #1173
Assignees
Milestone

Comments

@immrsd
Copy link
Collaborator

immrsd commented Oct 2, 2024

IERC2981 interface consists of a single royalty_info function, but there are 6 more external functions for reading state or managing royalties:

  • default_royalty (read)
  • token_royalty (read)
  • set_default_royalty (write)
  • delete_default_royalty (write)
  • set_token_royalty (write)
  • reset_token_royalty (write)

It would be helpful to provide a ready-made external implementation for the 2 read functions.
Also, we can implement a trait that contains the functions for managing royalties and provide 2 versions: based on Ownable and AccessControl components

This will make component integration way easier and will reduce the amount of boilerplate

@immrsd immrsd self-assigned this Oct 2, 2024
@immrsd immrsd added this to the 1. current milestone Oct 2, 2024
@immrsd immrsd linked a pull request Oct 2, 2024 that will close this issue
@ggonzalez94 ggonzalez94 modified the milestones: 1. current, 2. next Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 👀 In review
Development

Successfully merging a pull request may close this issue.

2 participants