-
Notifications
You must be signed in to change notification settings - Fork 561
Add support for RoyaltyRegistry / RoyaltyEngine #418
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
Conversation
// Payout royalties | ||
{ | ||
// Get royalty recipients and amounts | ||
(address payable[] memory recipients, uint256[] memory amounts) = RoyaltyPaymentsLogic(address(this)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use the general/widespread recognizable IRoyaltyEngineV1
interface to make the call, instead of our own custom RoyaltyPaymentsLogic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code in getRoyalty
of RoyaltyPaymentsLogic handles the case when royalty-engine is not present on some network (needed for any evm).
Hence, I guess using IRoyaltyEngine
interface to make the call will be confusing to read, since we're not directly calling the engine, and marketplace-contract is not an engine either.
// Payout royalties | ||
{ | ||
// Get royalty recipients and amounts | ||
(address payable[] memory recipients, uint256[] memory amounts) = RoyaltyPaymentsLogic(address(this)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, let's use IRoyaltyEngineV1
instead of RoyaltyPaymentsLogic
// Payout royalties | ||
{ | ||
// Get royalty recipients and amounts | ||
(address payable[] memory recipients, uint256[] memory amounts) = RoyaltyPaymentsLogic(address(this)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, let's use IRoyaltyEngineV1
instead of RoyaltyPaymentsLogic
// Payout royalties | ||
{ | ||
// Get royalty recipients and amounts | ||
(address payable[] memory recipients, uint256[] memory amounts) = RoyaltyPaymentsLogic(address(this)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we call the external function getRoyalty
instead of the view function getRoyaltyView
?
I see that the IRoyaltyEngineV1
has both functions in there. What's the difference in usage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getRoyalty
saves the spec of a token's royalty setup in a cache, if not present. (For e.g., whether using ERC-2981, or any other).
Further calls to this function will be same as getRoyaltyView
.
No description provided.