IEIP2981

Git Source

Interface for the NFT Royalty Standard

Functions

royaltyInfo

ERC165 bytes to add to interface array - set in parent contract implementing this standard bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a

Called with the sale price to determine how much royalty

function royaltyInfo(uint256 tokenId, uint256 salePrice)
    external
    view
    returns (address receiver, uint256 royaltyAmount);

Parameters

NameTypeDescription
tokenIduint256The NFT asset queried for royalty information
salePriceuint256The sale price of the NFT asset specified by tokenId

Returns

NameTypeDescription
receiveraddressAddress of who should be sent the royalty payment
royaltyAmountuint256The royalty payment amount for salePrice