ADR-46: Royalties Manager v1

More details about this document
Latest published version:
https://adr.decentraland.org/adr/ADR-46
Authors:
agusferreira
fzavalia
nicosantangelo
cazala
lautaropetaccio
nachomazzara
Feedback:
GitHub decentraland/adr (pull requests, new issue, open issues)
Edit this documentation:
GitHub View commits View commits on githistory.xyz

Statement of the problem

The user generated collections (Decentraland Collections V2) does not support royalties out of the box when a transfer occurs.

Solution proposed

Decentraland marketplaces (Marketplace and Bid) can support royalties with the help of a new module: Royalties Manager.

For the first version, the royalties manager will return just the royalties receiver which is the address where the royalties should be sent. The royalties receiver is going to be defined by quering the collection on-chain:

Moreover, if the collection is not a Decentraland collection V2 compliant, the royalties receiver will be the zero address.

The collection is compliant, if implements the following interface:

interface IERC721CollectionV2 {
    function creator() external view returns (address);
    function decodeTokenId(uint256 _tokenId) external view returns (uint256, uint256);
    function items(uint256 _itemId) external view returns (string memory, uint256, uint256, uint256, address, string memory, string memory);
}

Interface

The interface proposed for the Royalties Manager is

interface IRoyaltiesManager {
    function getRoyaltiesReceiver(address _contractAddress, uint256 _tokenId) external view returns (address);
}

Implementation

License

Copyright and related rights waived via CC0-1.0. Living