IERC2981Upgradeable
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.
Methods
royaltyInfo
function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount)
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.
Parameters
Name | Type | Description |
---|---|---|
tokenId | uint256 | undefined |
salePrice | uint256 | undefined |
Returns
Name | Type | Description |
---|---|---|
receiver | address | undefined |
royaltyAmount | uint256 | undefined |
supportsInterface
function supportsInterface(bytes4 interfaceId) external view returns (bool)
Returns true if this contract implements the interface defined by interfaceId
. See the corresponding https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] to learn more about how these ids are created. This function call must use less than 30 000 gas.
Parameters
Name | Type | Description |
---|---|---|
interfaceId | bytes4 | undefined |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |