Core
Other
Extension
Royalties

RMRKRoyalties

RMRK team

RMRKRoyalties

Smart contract of the RMRK Royalties module.

Methods

getRoyaltyPercentage

function getRoyaltyPercentage() external view returns (uint256 royaltyPercentageBps)

Used to retrieve the specified royalty percentage.

Returns

NameTypeDescription
royaltyPercentageBpsuint256The royalty percentage expressed in the basis points

getRoyaltyRecipient

function getRoyaltyRecipient() external view returns (address recipient)

Used to retrieve the recipient of royalties.

Returns

NameTypeDescription
recipientaddressAddress of the recipient of royalties

royaltyInfo

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

Used to retrieve the information about who shall receive royalties of a sale of the specified token and how much they will be.

Parameters

NameTypeDescription
tokenIduint256ID of the token for which the royalty info is being retrieved
salePriceuint256Price of the token sale

Returns

NameTypeDescription
receiveraddressThe beneficiary receiving royalties of the sale
royaltyAmountuint256The value of the royalties recieved by the receiver from the sale

updateRoyaltyRecipient

function updateRoyaltyRecipient(address newRoyaltyRecipient) external nonpayable

Used to update recipient of royalties.

Custom access control has to be implemented to ensure that only the intended actors can update the beneficiary.

Parameters

NameTypeDescription
newRoyaltyRecipientaddressAddress of the new recipient of royalties

Errors

RMRKRoyaltiesTooHigh

error RMRKRoyaltiesTooHigh()

Attempting to set the royalties to a value higher than 100% (10000 in basis points)