Skip to main content

Solidity API

Contract: CRS

registerRoyaltyDue

Registers or updates the royalty amount due for a specific token and period index.

Parameters

Dev: Can only be called by the VR creator. Creates a new period if index equals current count.

payRoyalty

Processes an on-chain royalty payment for a specific token and period.

Parameters

Dev: Can only be called by the VR creator. Interacts with the CulturaRightsBoundAccount.

reportOffChainPayment

Reports an off-chain payment made for a specific royalty period.

Parameters

Dev: Can only be called by the VR creator. Sets the payment status to PENDING.

acceptOffChainPayment

Accepts a pending off-chain payment report.

Parameters

Dev: Can only be called by the current owner of the VR. Requires EIP712 signature. Transfers calculated fees from the VR owner to the Cultura Rights Bound Account.

denyOffChainPayment

Denies a pending off-chain payment report.

Parameters

Dev: Can only be called by the current owner of the VR. Requires EIP712 signature.

getFullRoyaltyInfo

Retrieves all royalty information views for a specific token.

Parameters

Return Values

getRoyaltyInfoPeriod

Retrieves royalty information for a specific token and period index.

Parameters

Return Values

getRoyaltyInfoCount

Retrieves the count of royalty periods registered for a specific token.

Parameters

Return Values

Public Functions

constructor

Dev: Initializes the contract with necessary addresses and EIP712 domain.

Custom Errors

InvalidAddress

NotCreatorOfVR

NotOwnerOfParentVR

NoParentDigitalAssetToPay

NoRoyaltyDue

AmountPaidExceedsDue

InvalidDateRange

InvalidPeriodIndex

RoyaltyInfoIndexOutOfBounds

RoyaltyInfoAlreadyExists

NotVROwner

IncorrectOffChainPaymentStatus

InsufficientBalanceForFees

InsufficientAllowanceForFees

OffChainPaymentAlreadyExists

InvalidSignature

InvalidCulturaBoundAccount

RoyaltyPeriodNotFound

InvalidFeeCalculation