IRoyaltyManager

Git Source

Author: fx(hash)

Extension for managing secondary royalties of FxGenArt721 tokens

Functions

getRoyalties

Gets the royalties for a specific token ID

function getRoyalties(uint256 _tokenId) external view returns (address[] memory, uint256[] memory);

Parameters

NameTypeDescription
_tokenIduint256ID of the token

Returns

NameTypeDescription
<none>address[]Total receivers and basis points
<none>uint256[]

royaltyInfo

Returns the royalty information for a specific token ID and sale price

function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address, uint256);

Parameters

NameTypeDescription
_tokenIduint256ID of the token
_salePriceuint256Sale price of the token

Returns

NameTypeDescription
<none>addressreceiver Address receiving royalties
<none>uint256royaltyAmount Amount to royalties being paid out

Events

TokenIdRoyaltiesUpdated

Event emitted when the royalties for a token ID have been updated

event TokenIdRoyaltiesUpdated(uint256 indexed _tokenId, address _receiver, uint96 _basisPoints);

Parameters

NameTypeDescription
_tokenIduint256ID of the token
_receiveraddressAddresses receiving the royalties
_basisPointsuint96Points used to calculate royalty payments (100 = 1%)

TokenRoyaltiesUpdated

Event emitted when the royalties for a list of receivers have been updated

event TokenRoyaltiesUpdated(
    address indexed _receiver, address[] _receivers, uint32[] _allocations, uint96 _basisPoints
);

Parameters

NameTypeDescription
_receiveraddressThe address receiving royalties for the token either an account or a split address
_receiversaddress[]Array of addresses receiving royalties
_allocationsuint32[]Array of allocations used to determine the proportional share of royalty payments
_basisPointsuint96Points used to calculate royalty payments (100 = 1%)

Errors

BaseRoyaltiesNotSet

Error thrown when the royalties are not set

error BaseRoyaltiesNotSet();

InvalidRoyaltyConfig

Error thrown when royalty configuration is greater than or equal to 100%

error InvalidRoyaltyConfig();

LengthMismatch

Error thrown when array lengths do not match

error LengthMismatch();

MoreThanOneRoyaltyReceiver

Error thrown when more than one royalty receiver is set

error MoreThanOneRoyaltyReceiver();

NonExistentToken

Error thrown when the token ID does not exist

error NonExistentToken();

NoRoyaltyReceiver

Error thrown when royalty receiver is zero address

error NoRoyaltyReceiver();

OverMaxBasisPointsAllowed

Error thrown when total basis points exceeds maximum value allowed

error OverMaxBasisPointsAllowed();

TokenRoyaltiesNotSet

Error thrown when the token royalties are not set

error TokenRoyaltiesNotSet();