IROJIVerseRoyaltiesFacet
IROJIVerseRoyaltiesFacet
This is a facet that is added to the ROJIVerseDiamond contract. The events are emitted by the diamond.
RoyaltyReceiverCannotBeNull
Raised when address(0)
is passed as a roalty receiver.
BPSMustNotExceed10000
Raised when the BPS exceeds 10000. In general BPS should be between 0 and 1000, e.g. up to 10%.
RoyaltiesForTierChanged
Emitted when the royalty for a tier is changed.
Parameters
oldIsActive
bool
Boolean indicating if the tier was active before this update.
isActive
bool
Boolean indicating if the tier is active after this update.
oldBps
uint16
BPS before the update.
bps
uint16
BP after the update.
RoyaltiesReceiverChanged
emitted when the royalties receiver is changed.
Parameters
oldRoyaltyReceiver
address
The previous royalty receiver.
royaltyReceiver
address
The new royalty receiver.
RoyaltiesBPSChanged
Emitted when the default bps is changed.
Parameters
oldBps
uint16
BPS before the update.
bps
uint16
BP after the update.
setRoyaltiesForTier
Sets the royalty information for a given tier.
Parameters
tier
bytes32
The tier to set the royalty information for.
isActive
bool
Boolean that indicates the tier is active. If set to false then the default bps (royaltyBPS
) will be returned.
bps
uint16
Tbe basis points for the royalty. Allowed range is 0 to 10000, with an upper limit of 1000 recommended.
setRoyaltiesReceiver
set the default royalities receiver.
Parameters
royaltyReceiver
address
A valid address that will receive the royalties. Must not be address(0)
setRoyaltiesBPS
set the default royalities BPS. This is the fallback value if the tier is not found or is inactive.
Parameters
royaltyBPS
uint16
Tbe basis points for the royalty. Allowed range is 0 to 10000, with an upper limit of 1000 recommended.
royaltiesForTier
Returns the royalty information for a given tier, or the default value if not active.
Parameters
tier
bytes32
The tier to retrieve the royalty information for. This is a keccak of the tier string.
royaltiesReceiver
Returns the receiver for the royalties. This is guaranteed to be a valid address and not address(0)
.
Return Values
royaltyReceiver
address
The address of the royalties receiver.
royaltiesBPS
Returns the default BPS for the royalties.
Return Values
royaltyBPS
uint16
The default BPS for the royalties. Always between 0 and 10,000. 1% equals 100 bps.
Was this helpful?