> For the complete documentation index, see [llms.txt](https://pangeaswap.gitbook.io/pangeaswap/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pangeaswap.gitbook.io/pangeaswap/en/developers/contracts/contribution-point-nft.md).

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

![](/files/PvtxfYBoLnHFJHqcoDm3)

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
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://pangeaswap.gitbook.io/pangeaswap/en/developers/contracts/contribution-point-nft.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
