Appearance
Solidity API
IPropsRoyalty
Interface for the PropsRoyalty facet, extending ERC2981 functionality
This interface defines methods for setting and managing royalties for tokens
setDefaultRoyalty
solidity
function setDefaultRoyalty(address recipient, uint96 royaltyBPS) externalSets the default royalty information for all tokens
This function allows setting a default royalty that applies to all tokens unless overridden
Parameters
| Name | Type | Description |
|---|---|---|
| recipient | address | Address to receive royalties |
| royaltyBPS | uint96 | Royalty amount in basis points (BPS). 100 BPS = 1% |
deleteDefaultRoyalty
solidity
function deleteDefaultRoyalty() externalDeletes the default royalty information
This function removes any previously set default royalty
setTokenRoyalty
solidity
function setTokenRoyalty(uint256 tokenId, address recipient, uint96 royaltyBPS) externalSets the token-specific royalty information
This function allows setting a custom royalty for a specific token, overriding the default
Parameters
| Name | Type | Description |
|---|---|---|
| tokenId | uint256 | ID of the token for which to set the royalty |
| recipient | address | Address to receive royalties for this specific token |
| royaltyBPS | uint96 | Royalty amount in basis points (BPS) for this specific token. 100 BPS = 1% |
resetTokenRoyalty
solidity
function resetTokenRoyalty(uint256 tokenId) externalDeletes token-specific royalty information
This function removes any custom royalty set for a specific token, reverting it to the default royalty (if any)
Parameters
| Name | Type | Description |
|---|---|---|
| tokenId | uint256 | ID of the token for which to reset the royalty |
feeDenominator
solidity
function feeDenominator() external pure returns (uint96)Returns the fee denominator used in royalty calculations
This function returns the denominator used to calculate royalty percentages
Return Values
| Name | Type | Description |
|---|---|---|
| [0] | uint96 | The fee denominator value, typically 10000 for basis points (100% = 10000) |