> For the complete documentation index, see [llms.txt](https://docs.chiliz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chiliz.com/th/phatthana/sung-khuen/nft/rian-nft-contract.md).

# เลือก NFT Contract ที่เหมาะสม

ก่อนที่ไฟล์จะถูกสร้างเป็น NFT ได้ คุณต้องปรับใช้และยืนยัน NFT smart contract ที่เกี่ยวข้องบน Chiliz Chain เสียก่อน นี่เป็นขั้นตอนสำคัญเพื่อให้มั่นใจในความโปร่งใสและเปิดใช้งานการโต้ตอบกับ contract ของคุณบน chain

## **จะใช้ smart contract ไหนดี?**

มี smart contract มากมายในโลก blockchain และอาจไม่ชัดเจนว่าอันไหนเหมาะสมสำหรับการสร้าง NFT

smart contract ที่คุณต้องการขึ้นอยู่กับประเภทของโปรเจกต์ NFT ที่คุณมีในใจ:

* ชิ้นงานที่ไม่ซ้ำกันชิ้นเดียว:\
  ใช้ NFT contract แบบ [ERC-721](https://eips.ethereum.org/EIPS/eip-721) และสร้าง NFT รายการเดียวด้วย
* ชิ้นงานที่ไม่ซ้ำกันหลายชิ้น:\
  ใช้ NFT contract แบบ [ERC-721](https://eips.ethereum.org/EIPS/eip-721) และสร้างคอลเลกชันของรายการด้วย
* สำเนาหลายชุดของรายการเดียวกัน:\
  ใช้ Multi Token contract แบบ [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) (อนุญาตให้รายการหนึ่งมีได้มากกว่าหนึ่ง instance)
* สำเนาหลายชุดของหลายรายการ:\
  ใช้ Multi Token contract แบบ [ERC-1155](https://eips.ethereum.org/EIPS/eip-1155) เช่นเดียวกัน

มี smart contract อื่น ๆ (ที่รู้จักในชื่อ contract extension หรือ variant) สำหรับการใช้งานที่แตกต่างกัน (เช่น [ERC-2981](https://eips.ethereum.org/EIPS/eip-2981) สำหรับค่าลิขสิทธิ์, [ERC-4906](https://eips.ethereum.org/EIPS/eip-4906) สำหรับ event การอัปเดต metadata, ERC-721 Drop สำหรับ lazy-minting ฯลฯ) แต่สำหรับตอนนี้ การรู้จัก ERC-721/1155 ก็เพียงพอแล้ว

{% hint style="warning" %}
**ควรเขียน smart contract เองไหม?**

แม้ว่าคุณต้องการควบคุม code ของตัวเองอย่างเต็มที่ เราก็ไม่แนะนำให้เขียน contract ERC‑721 ตั้งแต่ต้น คุณควรใช้ contract ที่ผ่านการทดสอบอย่างหนักและตรวจสอบแล้วจากไลบรารี contract ที่มีชื่อเสียง
{% endhint %}

วิธีที่ปลอดภัยและพบได้บ่อยที่สุดในการรับ contract สำหรับสร้าง NFT คือการใช้จาก OpenZeppelin เช่น [contract ERC-721 ของพวกเขา](https://docs.openzeppelin.com/contracts/5.x/erc721) ซึ่งช่วยให้คุณไม่ต้องประดิษฐ์ล้อใหม่และช่วยป้องกันช่องโหว่ด้านความปลอดภัยที่พบได้บ่อย

{% hint style="success" %}
[OpenZeppelin](https://www.openzeppelin.com/) คือแพลตฟอร์มโอเพนซอร์สสำหรับการสร้าง dApp ที่ปลอดภัย

นอกจากบริการด้านความปลอดภัยและการตรวจสอบหลายรายการแล้ว พวกเขายังมี [ไลบรารีของ smart contract ที่ผ่านการตรวจสอบโดยชุมชน](https://docs.openzeppelin.com/contracts/) ซึ่งให้ใช้งานฟรีในโปรเจกต์ของคุณ

ดังนั้น contract ของ OpenZeppelin จึงถือเป็นมาตรฐานอุตสาหกรรม และคุณสามารถพึ่งพาได้อย่างมั่นใจ
{% endhint %}

## การปรับใช้และยืนยัน NFT Smart Contract ของคุณ

คุณสามารถปรับใช้ smart contract ของคุณบน Chiliz Chain โดยใช้แพลตฟอร์มที่มีชื่อเสียง เช่น [Remix IDE](https://remix.ethereum.org/) หรือ [thirdweb](https://thirdweb.com/) หรือโดยตรงผ่าน [Hardhat](https://hardhat.org/)

เมื่อคุณปรับใช้แล้ว คุณต้องยืนยัน contract บน block explorer เพื่อให้เครื่องมือสำหรับนักพัฒนาและแพลตฟอร์มต่าง ๆ สามารถอ่าน ABI (Application Binary Interface) และโต้ตอบกับมันได้

ทำตามคู่มือเหล่านี้เพื่อปรับใช้แล้วยืนยัน NFT contract ของคุณ:

[Deploy smart contract](/th/phatthana/phuenthan/deploy-smart-contract.md)

{% hint style="warning" %}
ตรวจสอบให้แน่ใจว่าได้ยืนยัน contract ของคุณบน block explorer ของ Chiliz Chain แห่งใดแห่งหนึ่ง!\
[Verify Smart Contract](/th/phatthana/phuenthan/verify-smart-contract.md)

เฉพาะ contract ที่ยืนยันแล้วเท่านั้นที่สามารถสร้าง NFT ที่เข้ากันได้กับ Socios.com และ Socios.com Wallet
{% endhint %}

อีกครั้ง ให้ใส่ใจในการใช้รายละเอียด network ที่ถูกต้องสำหรับ Chiliz Chain และ Spicy Testnet:

[เชื่อมต่อโดยใช้ RPC](/th/phatthana/phuenthan/tho-chiliz-chain/tho-rpc.md)


---

# 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://docs.chiliz.com/th/phatthana/sung-khuen/nft/rian-nft-contract.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.
