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

Add note about 100% royalty in IERC2981 #5173

Merged
merged 3 commits into from
Sep 3, 2024

Conversation

ernestognw
Copy link
Member

Fixes L-01

PR Checklist

  • Tests
  • Documentation
  • Changeset entry (run npx changeset add)

Copy link

changeset-bot bot commented Aug 29, 2024

⚠️ No Changeset found

Latest commit: 7b22d45

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Comment on lines 19 to 20
* NOTE: Consider 100% royalty is a valid scenario, therefore contracts performing a royalty transfer with the value
* returned by this function may want to check for 0 value transfers.
Copy link
Collaborator

@Amxx Amxx Aug 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* NOTE: Consider 100% royalty is a valid scenario, therefore contracts performing a royalty transfer with the value
* returned by this function may want to check for 0 value transfers.
* NOTE: ERC-2981 authorizes setting the royalty to 100% of the price. In that scenario all the price would go
* toward the royalty receiver, and no tokens would go the the seller. Contracts dealing with royalty should
* consider that the transfer of value toward the seller might be empty.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm keeping it, but changing it to two lines, lmk if it doesn't work

suggestion

Suggested change
* NOTE: Consider 100% royalty is a valid scenario, therefore contracts performing a royalty transfer with the value
* returned by this function may want to check for 0 value transfers.
* NOTE: ERC-2981 allows setting the royalty to 100% of the price. In that case, all the price would be sent to the
* royalty receiver and 0 tokens to the seller. Contracts dealing with royalty should consider empty transfers.

@Amxx Amxx merged commit 55fd53c into OpenZeppelin:master Sep 3, 2024
21 checks passed
Amxx pushed a commit to Amxx/openzeppelin-contracts that referenced this pull request Oct 1, 2024
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Amxx pushed a commit that referenced this pull request Oct 2, 2024
Signed-off-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants