> 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/phuenthan/verify-smart-contract/verify-chiliscan.md).

# Verify ด้วย Chiliscan

[Chiliscan](https://chiliscan.com/) คือบริการที่สร้างโดย Routescan คุณจึงสามารถอ้างอิง[เอกสารของพวกเขา](https://routescan.io/documentation)สำหรับการใช้งานในชีวิตประจำวันได้

Routescan มีหลายวิธีในการยืนยัน smart contract ของคุณบน Chiliz Chain:

* สำหรับ smart contract ส่วนใหญ่: ใช้แบบฟอร์มยืนยันบน Chiliscan
* สำหรับ smart contract ที่ซับซ้อนกว่า: ใช้เครื่องมือ command-line เช่น Hardhat
* สำหรับ smart contract ที่ง่าย: ใช้ API ของพวกเขา

ดู[เอกสารเกี่ยวกับการยืนยัน contract](https://info.routescan.io/en/collections/14599808-contract-verification) ของ Routescan

## การใช้แบบฟอร์มยืนยันของ Chiliscan

Chiliscan มีอินเทอร์เฟซสำหรับยืนยัน contract บน Chiliz Mainnet ที่ <https://chiliscan.com/verifycontract>\
และยังมีเอกสารประกอบที่นี่: <https://info.routescan.io/en/articles/11991234-verifying-contracts-ui>

{% hint style="info" %}
คุณยังสามารถยืนยัน contract บน Spicy Testnet ด้วยอินเทอร์เฟซนี้:\
<https://testnet.chiliscan.com/verifycontract>
{% endhint %}

{% hint style="info" %}
สำหรับ smart contract ที่มีหลายไฟล์ ให้แน่ใจว่าโค้ดของคุณถูก flatten ก่อนอัปโหลด

ตัวอย่างเช่น หากคุณใช้ Remix IDE คุณสามารถคลิกขวาที่ไฟล์ contract `contract-XYZ.sol` ที่คอมไพล์แล้วใน File Explorer แล้วเลือกตัวเลือก "Flatten"\
จากนั้น ดาวน์โหลดไฟล์ที่ได้ (ชื่อ `contract-XYZ_flattened.sol`) เพื่ออัปโหลดไปยังแบบฟอร์มยืนยัน
{% endhint %}

ขั้นตอน:

1. ในช่อง "Contract address" ให้ใส่ที่อยู่ของ smart contract ที่คุณต้องการยืนยัน\
   \&#xNAN;*ขึ้นอยู่กับสถานการณ์ เครื่องมืออาจแจ้งให้คุณทราบว่า contract ยังไม่มีอยู่บน Chiliz Chain หรือได้รับการยืนยันแล้ว หากไม่ใช่ทั้งสองกรณี องค์ประกอบอินเทอร์เฟซเพิ่มเติมจะปรากฏขึ้น*<br>

   <figure><img src="/files/quX3EJpgCG2RMWnxCMUY" alt="" width="375"><figcaption></figcaption></figure>
2. คลิก "Import from Solidity" และกรอกแบบฟอร์มให้ถูกต้อง:
   1. เลือก "0.8.30+xxx" เป็นเวอร์ชัน compiler
   2. เลือก "Prague" เป็นเวอร์ชัน EVM
   3. อัปโหลดไฟล์ contract ของคุณ
3. คลิก "Verify Contract"

หากสำเร็จ contract ของคุณจะถูกระบุอย่างชัดเจนว่าได้รับการยืนยันแล้ว โดยมีเครื่องหมายถูกสีเขียว block explorer จะแสดงซอร์สโค้ดและเปิดใช้งานฟีเจอร์อินเทอร์แอคทีฟทั้งหมด

<figure><img src="/files/6EkvsUAdhdePkmKeAora" alt=""><figcaption></figcaption></figure>

หากเกิดข้อผิดพลาด อินเทอร์เฟซจะแสดงข้อความแจ้งข้อผิดพลาดที่เกี่ยวข้องเพื่อแนะนำคุณ

## การใช้เครื่องมือ command-line

เอกสารของ Routescan มี[คู่มือโดยละเอียด](https://info.routescan.io/en/collections/14599808-contract-verification)เกี่ยวกับวิธีใช้เครื่องมือ command-line สำหรับการยืนยัน ซึ่งมีประโยชน์อย่างยิ่งหากคุณต้องการทำให้การยืนยัน contract เป็นแบบอัตโนมัติในสภาพแวดล้อมการพัฒนาของคุณ

คุณสามารถอ่านคู่มือเกี่ยวกับการ deploy และยืนยันด้วย:

* [Hardhat v2](https://info.routescan.io/en/articles/11991333-deploying-and-verifying-contracts-hardhat)
* [Hardhat v3](https://info.routescan.io/en/articles/12867834-deploying-and-verifying-contracts-hardhat-v3)
* [Foundry](https://info.routescan.io/en/articles/11992459-deploying-and-verifying-contracts-foundry)

## การใช้ Routescan API

Routescan มี contract API เฉพาะที่คุณสามารถใช้ยืนยัน contract ได้:

{% embed url="<https://routescan.io/documentation/api/etherscan-like/contracts>" %}

หากคุณทำงานกับ smart contract ที่ง่ายกว่า มีคู่มือที่ Routescan จัดทำไว้บน Paragraph.com คู่มือนี้จะพาคุณผ่านขั้นตอนการเตรียมและยืนยัน contract ที่ไม่ต้องการกระบวนการ build ที่ซับซ้อน

* เข้าถึง [A Guide to Easily Verify Your Smart Contract Programmatically Using Routescan's API](https://paragraph.com/@routescan-io/a-guide-to-easily-verify-your-smart-contract-programmatically-using-routescan-s-api)

หมายเหตุ: จำเป็นต้องทำให้ contract ถูก flatten ก่อน


---

# 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/phuenthan/verify-smart-contract/verify-chiliscan.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.
