# 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.

![](https://1563666604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FExVtY885R6zefiJOQZzR%2Fuploads%2FqFBLqJeQSAm5aaYR6T4K%2Fimage.png?alt=media\&token=55f94b7a-c489-4aa3-bf5c-5d3874b39158)

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.

{% embed url="<https://github.com/pangea-protocol/contribution-point>" %}

## Methods

### contributionPointOf

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

### contributionRecordByIndex

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

### contributionRecordCounts

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

### contributionRecords

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

### contributorIdOf

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

### createRecord

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

### createTag

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

### deleteRecord

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

### totalTags

```solidity
function totalTags() external view returns (uint256)
```

### updateRecord

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

### updateTagDescription

```solidity
function updateTagDescription(uint32 tagId, string desc) external nonpayable
```

### usePoint

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