Contribution Point NFT

CP (Contribution Point) NFT is an NFT that manages user contribution history information of Pangea Swap.

Only one CP NFT can be owned per 1 wallet, and it is attributed to the wallet address in a non-transferable form. A CP NFT is issued at the time of the first contribution, and when additional contributions are made later, the contribution details are added to the CP NFT already held.

Information recorded in CP NFT is largely divided into [Tag] information and [Contribution Record] information. [Tag] indicates the type of contribution, and [Contribution Record] indicates the actual contribution by user (wallet address).

Managers have the right to add/modify/delete [Tag] and [Contribution Record], and users who actually receive CP NFT have the right to use the CP received according to their contribution.

CP NFT is designed in compliance with the metadata format provided by Opensea. Users can easily check their contribution history through Opensea's collection without calling the smart contract directly.

Users can later use the usePoint function to enjoy various benefits of the Pangea Swap (e.g., receive STONE rewards when it is launched) by using the CP of the CP NFT that they own.

Methods

contributionPointOf

function contributionPointOf(address contributor) external view returns (int256)

contributionRecordByIndex

function contributionRecordByIndex(address contributor, uint256 orderId) external view returns (struct IContributionStruct.ContributionRecord)

contributionRecordCounts

function contributionRecordCounts(address contributor) external view returns (uint256)

contributionRecords

function contributionRecords(address contributor, uint256 start, uint256 nums) external view returns (struct IContributionStruct.ContributionRecord[] records)

contributorIdOf

function contributorIdOf(address contributor) external view returns (uint256)

createRecord

function createRecord(address contributor, uint32 tagId, uint32 point) external nonpayable

createTag

function createTag(string desc) external nonpayable returns (uint32 tagId)

deleteRecord

function deleteRecord(address contributor, uint256 orderId) external nonpayable returns (struct IContributionStruct.ContributionRecord record)

totalTags

function totalTags() external view returns (uint256)

updateRecord

function updateRecord(address contributor, uint256 orderId, uint32 point) external nonpayable

updateTagDescription

function updateTagDescription(uint32 tagId, string desc) external nonpayable

usePoint

function usePoint(uint32 amount, address to, bytes data) external nonpayable

Last updated