IReadingFacet
Functions
Section titled “Functions”getProjectDetails
Section titled “getProjectDetails”Gets the project details in readable format
function getProjectDetails() external view returns (Outputs.ProjectDetails memory projectDetails);Returns
| Name | Type | Description |
|---|---|---|
projectDetails | Outputs.ProjectDetails | The project details |
getCycleDetails
Section titled “getCycleDetails”Gets the cycle by its ID in readable format
function getCycleDetails(uint256 cycleId) external view returns (Outputs.CycleDetails memory cycleDetails);Parameters
| Name | Type | Description |
|---|---|---|
cycleId | uint256 | The cycle ID |
Returns
| Name | Type | Description |
|---|---|---|
cycleDetails | Outputs.CycleDetails | The cycle details |
getCertificateDetails
Section titled “getCertificateDetails”Gets the certificate by its ID in readable format
function getCertificateDetails(uint256 certificateId) external view returns (Outputs.CertificateDetails memory certificateDetails);Parameters
| Name | Type | Description |
|---|---|---|
certificateId | uint256 | The certificate ID |
Returns
| Name | Type | Description |
|---|---|---|
certificateDetails | Outputs.CertificateDetails | The certificate details |
getCertificateClaimableRewardsForToken
Section titled “getCertificateClaimableRewardsForToken”Gets the certificate claimable rewards (available for withdrawal)
function getCertificateClaimableRewardsForToken( uint256 certificateId, address rewardTokenAddress) external view returns (uint256 claimableAmount);Parameters
| Name | Type | Description |
|---|---|---|
certificateId | uint256 | The certificate ID |
rewardTokenAddress | address | The reward token address |
Returns
| Name | Type | Description |
|---|---|---|
claimableAmount | uint256 | The current claimable rewards amount |
getRewardTokenDetails
Section titled “getRewardTokenDetails”Gets the reward token data in readable format
function getRewardTokenDetails(address rewardTokenAddress) external view returns (Outputs.RewardSlotDetails memory slotDetails);Parameters
| Name | Type | Description |
|---|---|---|
rewardTokenAddress | address | The reward token address |
Returns
| Name | Type | Description |
|---|---|---|
slotDetails | Outputs.RewardSlotDetails | The reward token slot data |
getAllRewardSlotsDetails
Section titled “getAllRewardSlotsDetails”Gets the reward slots details in readable format
function getAllRewardSlotsDetails() external view returns (Outputs.RewardSlotDetails[] memory rewardList);Returns
| Name | Type | Description |
|---|---|---|
rewardList | Outputs.RewardSlotDetails[] | The reward slots details in an array |
getCertificateNFTDetails
Section titled “getCertificateNFTDetails”Gets the certificate NFT details in readable format
This function is used to render the NFT metadata in external applications.
function getCertificateNFTDetails(uint256 certificateId) external view returns (Outputs.CertificateNFTDetails memory certificateNFTDetails);Parameters
| Name | Type | Description |
|---|---|---|
certificateId | uint256 | The certificate ID |
Returns
| Name | Type | Description |
|---|---|---|
certificateNFTDetails | Outputs.CertificateNFTDetails | The certificate NFT details |