IERC2981.sol 1.1 KB

1234567891011121314151617181920212223242526
  1. // SPDX-License-Identifier: MIT
  2. // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC2981.sol)
  3. pragma solidity >=0.6.2;
  4. import {IERC165} from "../utils/introspection/IERC165.sol";
  5. /**
  6. * @dev Interface for the NFT Royalty Standard.
  7. *
  8. * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
  9. * support for royalty payments across all NFT marketplaces and ecosystem participants.
  10. */
  11. interface IERC2981 is IERC165 {
  12. /**
  13. * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
  14. * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
  15. *
  16. * NOTE: ERC-2981 allows setting the royalty to 100% of the price. In that case all the price would be sent to the
  17. * royalty receiver and 0 tokens to the seller. Contracts dealing with royalty should consider empty transfers.
  18. */
  19. function royaltyInfo(
  20. uint256 tokenId,
  21. uint256 salePrice
  22. ) external view returns (address receiver, uint256 royaltyAmount);
  23. }