NFT On-Chain Royalties (EIP-2981) 2 — Questions and Answers
Question 1: What does the royaltyInfo function in EIP-2981 return?
- The receiver address and royalty amount (Correct answer)
- Only the royalty percentage
- The token owner and price
- A boolean indicating royalty support
Correct answer: The receiver address and royalty amount
royaltyInfo returns a tuple of the receiver address and the royalty amount owed for a given sale price.
Question 2: Which two parameters does royaltyInfo take as inputs?
- tokenId and salePrice (Correct answer)
- owner and amount
- receiver and percentage
- tokenURI and buyer
Correct answer: tokenId and salePrice
royaltyInfo accepts a _tokenId and a _salePrice to compute the royalty owed.
Question 3: EIP-2981 expresses royalties in what unit relative to sale price?
- A fixed wei amount
- An absolute amount derived from the sale price you pass in (Correct answer)
- Always a percentage stored as a string
- USD cents
Correct answer: An absolute amount derived from the sale price you pass in
The standard returns an absolute royaltyAmount computed from the salePrice argument, in the same unit of exchange.
Question 4: How is EIP-2981 support advertised to other contracts?
- Via ERC-165 supportsInterface with the 2981 interface ID (Correct answer)
- Through an on-chain registry contract
- By emitting a RoyaltyEnabled event
- It cannot be detected programmatically
Correct answer: Via ERC-165 supportsInterface with the 2981 interface ID
Contracts signal EIP-2981 compliance through ERC-165's supportsInterface using the standard's interface identifier.
Question 5: What is the ERC-165 interface ID for EIP-2981?
- 0x2a55205a (Correct answer)
- 0x80ac58cd
- 0x01ffc9a7
- 0x5b5e139f
Correct answer: 0x2a55205a
0x2a55205a is the interface ID corresponding to the royaltyInfo selector for EIP-2981.
Question 6: Does EIP-2981 enforce that marketplaces actually pay the royalty?
- No, it only signals the amount; payment enforcement is up to the marketplace (Correct answer)
- Yes, the standard reverts sales that skip royalties
- Yes, the EVM blocks transfers without payment
- Only on Ethereum mainnet
Correct answer: No, it only signals the amount; payment enforcement is up to the marketplace
EIP-2981 is purely informational; it standardizes how to query royalties but does not enforce payment.
Question 7: EIP-2981 can be implemented for which token standards?
- Both ERC-721 and ERC-1155 (Correct answer)
- Only ERC-721
- Only ERC-20
- Only ERC-1155
Correct answer: Both ERC-721 and ERC-1155
EIP-2981 is designed to work with both ERC-721 and ERC-1155 NFT contracts.
What does the royaltyInfo function in EIP-2981 return?