Implement Non Fungible Token Royalty (EIP2981) (#3012)
Co-authored-by: Francisco Giordano <frangio.1@gmail.com> Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
@ -6,15 +6,17 @@ pragma solidity ^0.8.0;
|
||||
import "./IERC165.sol";
|
||||
|
||||
/**
|
||||
* @dev Interface for the NFT Royalty Standard
|
||||
* @dev Interface for the NFT Royalty Standard.
|
||||
*
|
||||
* A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
|
||||
* support for royalty payments across all NFT marketplaces and ecosystem participants.
|
||||
*
|
||||
* _Available since v4.5._
|
||||
*/
|
||||
interface IERC2981 is IERC165 {
|
||||
/**
|
||||
* @dev Called with the sale price to determine how much royalty is owed and to whom.
|
||||
* @param tokenId - the NFT asset queried for royalty information
|
||||
* @param salePrice - the sale price of the NFT asset specified by `tokenId`
|
||||
* @return receiver - address of who should be sent the royalty payment
|
||||
* @return royaltyAmount - the royalty payment amount for `salePrice`
|
||||
* @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
|
||||
* exchange. The royalty amount is denominated and should be payed in that same unit of exchange.
|
||||
*/
|
||||
function royaltyInfo(uint256 tokenId, uint256 salePrice)
|
||||
external
|
||||
|
||||
Reference in New Issue
Block a user