ERC721RoyaltyUpgradeable
Inherits: Initializable, ERC2981Upgradeable, ERC721Upgradeable
Extension of ERC-721 with the ERC-2981 NFT Royalty Standard, a standardized way to retrieve royalty payment information. Royalty information can be specified globally for all token ids via ERC2981-_setDefaultRoyalty, and/or individually for specific token ids via {ERC2981-_setTokenRoyalty}. The latter takes precedence over the first. IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the ERC. Marketplaces are expected to voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
Functions
__ERC721Royalty_init
function __ERC721Royalty_init() internal onlyInitializing;
__ERC721Royalty_init_unchained
function __ERC721Royalty_init_unchained() internal onlyInitializing;
supportsInterface
Query if a contract implements an interface
Interface identification is specified in ERC-165. This function uses less than 30,000 gas.
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Upgradeable, ERC2981Upgradeable)
returns (bool);
Parameters
Name | Type | Description |
---|---|---|
interfaceId | bytes4 |
Returns
Name | Type | Description |
---|---|---|
<none> | bool | true if the contract implements interfaceID and interfaceID is not 0xffffffff, false otherwise |