Inconsistency with the Rarible royalty registry and royalty implementation #34
-
Question Posted: 06 July 2021, in Discord
@eugene Nacu | Rarible hello! I'm Wilkins from Manifold. I've been going through your contracts and noticed an inconsistency with the Rarible royalty registry and royalty implementation. (Note: I love how you allow for people to set a provider for backwards compatibility) defines: defines as: In implementations: reference the signature 0x44c74bcc, which is different from the implementation references. So, the question is:
Sorry about the collision, I was relying on the signature and definition in LibRoyaltiesV2.sol to avoid it, but it seems the actual usage might be different.
@wwhchung could you send me a code of your contracts so I can check it and find a workaround
sure, here's an example: https://etherscan.io/address/0x00372812abcb11c2ea291aeb7f612d9e0524b013#code specifically, the code is in CreatorCore.sol bytes4 private constant _INTERFACE_ID_ROYALTIES_CREATORCORE = 0xbb3bafd6; ICreatorCore.sol function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory); a number of artists/creators have this out now
So, I think we need to fix interface id for RoyaltiesV2
well, yes, for rarible specific use case, we can implement RoyaltiesV2 and set a provider. But the reason I wanted to avoid collision was for the longer term. I think it would be beneficial to differentiate between a royalty provider implementation and a base contract implementation. One of the things I'm coding up right now (and I'll send to you briefly) is an extended concept of your RoyaltyRegistry, one which does the following (and theoretically could be used by any marketplace to do royalty lookup):
The problem with this approach, and if our royalty implementation signatures aren't differentiated, is that this logic kind of fails. I'll be checking in the code and making the repo public shortly for thoughts from the broader marketplaces. (just writing some tests right now) note re: above, when I say providerAddress, it gives similar optionality as what you did to allow old contracts to set up a provider. @eugene Nacu | Rarible ok, I just went ahead and checked it in. It's relatively simple. Would love your thoughts. The idea is to provide a global unified royalty interface across all specs. I understand the provider design, but I also thought that there was a possibility that people would take RoyaltiesV2.sol and use it directly in a smart contract. If this were the case, it would result in a conflict between us and RoyaltiesV2 spec (i.e. a marketplace could not determine the return type appropriately). for Rarible marketplace specifically, I agree, there's no immediate issue (since I would simply implement IRoyaltyProvider, which I need to do anyways, and set it for all manifold contracts on the Rarible marketplace).
e.g.
will yield supportsInterface = true for 0xbb3bafd6, but will have different return values. Which is problematic for any marketplaces that try to use it directly, or even in the royalty registry concept above.
@wwhchung thanks, will check this |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Since we need to group and filter the discussions page, I'll be adding this reply as an answer since these kinds of threads(from discord) won't have activity any time soon. |
Beta Was this translation helpful? Give feedback.
Since we need to group and filter the discussions page, I'll be adding this reply as an answer since these kinds of threads(from discord) won't have activity any time soon.