# Conflux NFT 合约编写规范

<mark style="color:red;">**！！！如果你想要在 Conflux 链上开发 NFT 相关应用，请务必遵循以下规范:**</mark>

* 由工程范例 NFT 2.0 提供的 [CRC721NatureAutoId](https://github.com/conflux-dao-toc/NFT2.0/blob/main/contracts/CRC721NatureAutoId.sol) 合约完全符合 Conflux 标准，**推荐使用**
* 合约中需要有 name 和 symbol 这两个 public 属性，方便在 ConfluxScan 上搜索和展示
* 任何时候都要保证你的合约所发行的 NFT 的**非同质化:** 每一个 tokenId 都只对应一个NFT，不能存在一个 tokenId 下有多个 NFT 副本的情况；因此请**优先考虑使用 ERC 721 标准**，足够满足大多数情况的使用。如果因各种原因不得不使用 ERC 1155 标准，也请务必保证一个 tokenId 对应1个 NFT，以免造成用户对于 NFT 价值的疑虑
* 必须添加 **Enumrable** (枚举) 函数，这是为了方便第三方应用查询你的合约保存的 NFT 信息，否则无法保证你的 NFT 能够被 ConfluxScan 和钱包正确显，Conflux CRC 721 和CRC 1155 的枚举实现可参考以下链接:
* * CRC 721: <https://github.com/conflux-fans/conflux-contracts/blob/main/contracts/token/CRC721/extensions/CRC721Enumerable.sol>
  * CRC 1155: <https://github.com/conflux-fans/conflux-contracts/blob/main/contracts/token/CRC1155/extensions/CRC1155Enumerable.sol>
* 请务必在你的合约中引入代付合约并正确配置，保证任何用户与你的合约交互都能被代付机制赞助而无需花费 cfx，在当下环境，这对于你的 NFT 应用的合规性很重要。范例工程合约 NFT 1.0 和 2.0 默认配置了代付，部署后在 <https://confluxscan.net/sponsor> 申请即可
* 合约必须在 ConfluxScan 上开源验证，才能获得代付支持


---

# Agent Instructions: 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:

```
GET https://conflux-technical-support.gitbook.io/conflux-nft-kai-fa-zhi-nan/step-3-bian-xie-nft-he-yue/conflux-nft-he-yue-bian-xie-gui-fan.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
