Documentation Index
Fetch the complete documentation index at: https://docs.cultura.xyz/llms.txt
Use this file to discover all available pages before exploring further.
Solidity API
Contract: VerifierModule
registerVerifierBond
function registerVerifierBondfunction registerVerifierBond(address digitalAssetAddress, uint256 digitalAssetId, address verifier, uint256 bondedAmount) external
Parameters
| Name | Description |
|---|
digitalAssetAddress | The address of the digital asset contract |
digitalAssetId | The token ID of the digital asset |
verifier | The address of the verifier |
bondedAmount | The amount of tokens bonded by the verifier |
Dev: Register a verifier’s bond for a specific verified rights
receiveFees
function receiveFeesfunction receiveFees(address digitalAssetAddress, uint256 digitalAssetId, uint256 amount, address sender) external
Parameters
| Name | Description |
|---|
digitalAssetAddress | The address of the DigitalAsset contract |
digitalAssetId | The token ID of the DigitalAsset |
amount | The amount of tokens that should have been sent to this contract |
sender | The address that sent the tokens |
Dev: Receive rewards for a specific VR (called by CulturaRightsBoundAccount)
claimRewards
function claimRewardsfunction claimRewards(address digitalAssetAddress, uint256 digitalAssetId) external
Parameters
| Name | Description |
|---|
digitalAssetAddress | The address of the DigitalAsset contract |
digitalAssetId | The token ID of the DigitalAsset |
Dev: Allow an verifier to claim their rewards for a specific VR
distributeRewards
function distributeRewardsfunction distributeRewards(address digitalAssetAddress, uint256 digitalAssetId, address boundAccount, uint256 period) external
Parameters
| Name | Description |
|---|
digitalAssetAddress | The address of the DigitalAsset contract |
digitalAssetId | The token ID of the DigitalAsset |
boundAccount | The address of the CulturaRightsBoundAccount |
period | The payment period to claim from |
Dev: Allows any verifier to trigger the distribution of rewards from the bound account
getVerifierBond
function getVerifierBondfunction getVerifierBond(address digitalAssetAddress, uint256 digitalAssetId, address verifier) external view returns (uint256)
Parameters
| Name | Description |
|---|
digitalAssetAddress | The address of the DigitalAsset contract |
digitalAssetId | The token ID of the DigitalAsset |
verifier | The address of the verifier |
Return Values
| Description |
|---|
| The amount of tokens bonded by the verifier |
Dev: Get the amount of tokens an verifier has bonded for a specific VR
getTotalBondedAmount
function getTotalBondedAmountfunction getTotalBondedAmount(address digitalAssetAddress, uint256 digitalAssetId) external view returns (uint256)
Parameters
| Name | Description |
|---|
digitalAssetAddress | The address of the DigitalAsset contract |
digitalAssetId | The token ID of the DigitalAsset |
Return Values
| Description |
|---|
| The total amount of tokens bonded for the VR |
Dev: Get the total amount of tokens bonded for a specific VR
Public Functions
constructor
function constructorconstructor(address _paymentToken, address _casAddress) public
Parameters
| Name | Description |
|---|
_paymentToken | The address of the ERC20 token used for payments |
_casAddress | The address of the Cultura Attestation Service |
Dev: Initialize the contract with payment token address and CAS address
calculateClaimableRewards
function calculateClaimableRewardsfunction calculateClaimableRewards(address digitalAssetAddress, uint256 digitalAssetId, address verifier) public view returns (uint256 claimableAmount)
Parameters
| Name | Description |
|---|
digitalAssetAddress | The address of the DigitalAsset contract |
digitalAssetId | The token ID of the DigitalAsset |
verifier | The address of the verifier |
Return Values
| Description |
|---|
| The amount of tokens the verifier can claim |
Dev: Calculate the claimable rewards for an verifier for a specific VR
Events
VerifierRegistered
event VerifierRegisteredevent VerifierRegistered(bytes32 vrId, address verifier, uint256 bondedAmount)
RewardsReceived
event RewardsReceivedevent RewardsReceived(bytes32 vrId, uint256 amount)
RewardsClaimed
event RewardsClaimedevent RewardsClaimed(bytes32 vrId, address verifier, uint256 amount)
RewardsDistributed
event RewardsDistributedevent RewardsDistributed(bytes32 vrId, address boundAccount, uint256 period, uint256 amount)
Custom Errors
ZeroAddress
error ZeroAddresserror ZeroAddress(string paramName)
OnlyCASCanRegisterVerifiers
error OnlyCASCanRegisterVerifierserror OnlyCASCanRegisterVerifiers()
NoVerifiersRegisteredForVR
error NoVerifiersRegisteredForVRerror NoVerifiersRegisteredForVR()
TokenTransferFailed
error TokenTransferFailederror TokenTransferFailed()
NoRewardsToClaim
error NoRewardsToClaimerror NoRewardsToClaim()
NotAnVerifierForVR
error NotAnVerifierForVRerror NotAnVerifierForVR()
NoRewardsToDistribute
error NoRewardsToDistributeerror NoRewardsToDistribute()