# CRC721 合约代码部署示例

开发过程的细节总是枯燥的，所以这里提供了一个快速部署 CRC721 合约的教程，即使你对 Web3 编程一无所知也可以拥有自己的 NFT。

Note: 此合约仅作为教学案例使用，实际应用中的合约更为复杂，可以参考前文介绍的生态开发实用教程提供的范例工程合约。

部署过程请参照如下做法:

1. 进入此链接，下载合约 JSON 文件: <https://github.com/xhypnosis/CRC-721-Demo/blob/main/build/contracts/Demo721.json>
2. 参照此教程，使用刚才下载的 JSON 文件在 ConfluxScan 上部署合约 (**注意: 教程中使用 ConfluxPortal 钱包，现已不再更新且不推荐使用，应该使用 Fluent 钱包**): 如何在 Scan 上注册合约和代币展示: <https://conflux-wiki.github.io/conflux-wiki/development/register-contract-and-token-display/>
3. 完成合约部署后，需要先对合约进行验证，才能在 ConfluxScan 上与合约交互。用于合约验证的完整代码通过此链接下载: <https://github.com/xhypnosis/CRC-721-Demo/blob/main/test/Validation.sol>
4. 参照此教程，在 ConfluxScan 上验证你的合约: <https://conflux-technical-support.gitbook.io/conflux-nft-kai-fa-zhi-nan/confluxscan/yu-he-yue-jiao-hu>
5. 验证完成后，就可以尝试进行使用 safeMint 方法铸造你的第一个 NFT 了。首先点击 ConfluxScan 右上角 `连接钱包` 按钮连接你的 Fluent 钱包，注意连接的钱包地址地址应该是你在第2步在部署合约时的地址。然后在合约信息页下方找到 `合约` ，选择 `写入合约` ，在下方显示的一系列方法中找到 `mint` 方法，在 to (address) 一栏中填入你希望接收 NFT 的目标地址，比如你自己的钱包地址，点击 `写入` 就会调用钱包执行交易，确认后过一会儿就可以通过 ConfluxScan 返回的交易信息查看你铸造的 NFT 了，方法参数如下所示:

![](/files/kMQB3KudHboY2QHbbnX4)

Note: 根据 ConfluxScan 的机制，在第一次调用 safeMint 铸造 NFT 之后，还需要接收此 NFT 的地址调用合约的 safeTransferFrom 方法进行一次转账，此合约的 NFT 相关信息才会在 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/crc721-he-yue-dai-ma-bu-shu-shi-li.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.
