> 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/riang-ru/chiliz-chain/differences-from-ethereum.md).

# ความแตกต่างจาก Ethereum

หากคุณมาจาก Ethereum สิ่งที่คุณรู้ส่วนใหญ่ยังคงใช้ได้: Chiliz Chain รองรับ EVM ดังนั้น contract ที่เขียนด้วย Solidity จึง deploy ได้โดยไม่ต้องแก้ไข และเครื่องมือมาตรฐาน (Hardhat, Foundry, viem, ethers, MetaMask, OpenZeppelin) ก็ใช้งานได้ทันที

{% hint style="info" %}
ประเด็นสำคัญ: **Chiliz Chain เป็น fork ของ** [**BNB Smart Chain**](https://www.bnbchain.org/en/bnb-smart-chain) **(BSC) ซึ่งตัวมันเองนำ EVM ของ Ethereum มาใช้แต่ไม่ได้นำ consensus มาด้วย**

ดังนั้น Chiliz Chain จึงเหมือนกับ Ethereum ในระดับ contract แต่คล้ายกับ BSC ในระดับ consensus และเศรษฐศาสตร์
{% endhint %}

## ภาพรวมโดยสังเขป

| คุณสมบัติ               | Ethereum                           | Chiliz Chain                                        |
| ----------------------- | ---------------------------------- | --------------------------------------------------- |
| Consensus               | Proof of Stake (Gasper)            | Proof of Staked Authority (PoSA)                    |
| Validator ที่ผลิต block | หลายแสน, ไม่ต้องขออนุญาต           | 13, ผ่านการเลือกตั้ง (ณ ปี 2026)                    |
| เวลาต่อ block           | \~12 วินาที                        | \~3 วินาที                                          |
| Finality                | กำหนดแน่นอน, \~13 นาที (2 epoch)   | เชิงความน่าจะเป็น (\~15 ถึง 100 block ตามมูลค่า tx) |
| Gas token               | ETH                                | CHZ                                                 |
| โมเดลค่าธรรมเนียม       | EIP-1559 (base fee + priority tip) | EIP-1559 (base fee + priority tip)                  |
| Chain ID ของ Mainnet    | 1                                  | 88888                                               |
| Chain ID ของ Testnet    | (แตกต่างกันไป)                     | 88882 (Spicy)                                       |
| เวอร์ชัน EVM            | Prague                             | Prague                                              |
| Solidity                | ล่าสุด                             | สูงสุด 0.8.30                                       |
| ขนาด contract สูงสุด    | 24 KB                              | 24 KB                                               |
| มาตรฐาน token พื้นฐาน   | ERC-20                             | CAP-20 (Fan Tokens)                                 |

## Consensus, เวลาต่อ block และ finality

Ethereum ใช้ Proof of Stake แบบไม่ต้องขออนุญาตที่มีชุด validator ขนาดใหญ่มาก Chiliz Chain ใช้ **Proof of Staked Authority (PoSA)** ซึ่งเป็นลูกผสมระหว่าง Proof of Authority และ Proof of Stake โดยมีชุด validator ที่ผลิต block ขนาดเล็กและผ่านการเลือกตั้ง (ปัจจุบันมี 13 ราย) พวกเขาได้รับการเลือกตั้งในแต่ละ epoch และเปลี่ยนแปลงไปตามเวลา สามารถดูรายชื่อ validator ปัจจุบันได้ที่ [staking dApp](https://app.chilizchain.com/staking)

หนึ่ง epoch บน Chiliz Chain คือ:

* Chiliz Mainnet: 28,800 block ประมาณ 1 วัน
* Spicy Testnet: 7,200 block ประมาณ 6 ชั่วโมง

Finality บน Chiliz Chain เป็นเชิงความน่าจะเป็น: ยิ่ง block ถูกฝังลึกมากเท่าใด โอกาสที่จะเกิด reorganization ก็ยิ่งน้อยลง บน Mainnet การยืนยันแบบเสียงข้างมากขั้นสูง (2/3) จะถึงที่ค่ามัธยฐาน 14 block (\~42 วินาที สูงสุด \~35 block ในกรณีเลวร้ายที่สุด) และการยืนยันจากชุด validator ทั้งหมดที่ค่ามัธยฐาน 47 block (\~141 วินาที)

ในทางปฏิบัติ ให้รอการยืนยันมากขึ้นตามมูลค่าที่เกี่ยวข้อง:

| มูลค่าธุรกรรม | จำนวนการยืนยันที่แนะนำ | เวลาโดยประมาณ |
| ------------- | ---------------------- | ------------- |
| ต่ำ           | 15 block               | \~45 วินาที   |
| มาตรฐาน       | 40 block               | \~2 นาที      |
| สูง           | 100 block              | \~5 นาที      |

อ่านเพิ่มเติมได้ที่ [Consensus Mechanisms](/th/riang-ru/glossary/consensus-mechanisms.md) และ [เกี่ยวกับ Validator](/th/riang-ru/validator.md)

## Gas และค่าธรรมเนียม

Chiliz Chain ใช้งาน [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559) ดังนั้นการประมาณค่าธรรมเนียมและ priority fee จึงทำงานในแบบที่นักพัฒนา Ethereum คุ้นเคย

มีความแตกต่างในทางปฏิบัติสองประการ:

* Gas token คือ CHZ ไม่ใช่ ETH กระเป๋าเงินของผู้ deploy จะต้องเติมด้วย CHZ
* Base fee อยู่ที่ 2500 gwei

ค่าธรรมเนียมขั้นต่ำของเครือข่ายในปัจจุบัน:

* ธุรกรรมแบบ EIP-1559: ตั้ง priority fee อย่างน้อย 1 gwei และ max fee per gas อย่างน้อย 2501 gwei (2500 base + 1 priority)
* ธุรกรรมแบบ Legacy: ตั้ง gas price อย่างน้อย 2501 gwei

ค่าธรรมเนียมธุรกรรมโดยทั่วไปต่ำกว่า $0.01 มาก สำหรับตัวเลขแบบเรียลไทม์ ดูได้ที่ [ตัวติดตาม gas ของ scan.chiliz.com](https://scan.chiliz.com/gas-tracker)

## Fan Tokens และ CAP-20

Token พื้นฐานของ Chiliz Chain คือ Fan Token ซึ่งออกภายใต้มาตรฐาน CAP-20

CAP-20 มีการทำงานเทียบเท่ากับ [ERC-20](https://ethereum.org/developers/docs/standards/tokens/erc-20/) ของ Ethereum นับตั้งแต่ [การย้ายไปใช้ Decimal Fan Token ในปี 2026](/th/riang-ru/fan-tokens/yai-2026.md) token แบบ CAP-20 ใช้ 18 decimals เช่นเดียวกับ token ERC-20 มาตรฐาน

ดูเพิ่มเติมได้ที่ [เกี่ยวกับ Fan Tokens](/th/riang-ru/fan-tokens.md) และ [รายการคำศัพท์ CAP-20](/th/riang-ru/glossary/cap-20.md)

## ความสามารถในการทำงานร่วมกัน (Interoperability)

Chiliz Chain สามารถทำงานร่วมกับ Ethereum และ chain อื่นๆ ได้ผ่านการ bridge ด้วย [LayerZero OFT](https://layerzero.network/blog/explaining-the-oft-standard) ดูได้ที่ [Use Omnichain Tokens](/th/phatthana/sung-khuen/omnichain-tokens.md)

## สิ่งที่เหมือนกับ Ethereum

คุณไม่จำเป็นต้องเรียนรู้สิ่งเหล่านี้ใหม่:

* Contract ที่เขียนด้วย Solidity deploy ได้โดยไม่ต้องแก้ไข (compile สำหรับเวอร์ชัน EVM Prague, Solidity สูงสุด 0.8.30)
* Hardhat, Foundry, Remix, viem, ethers และ web3.js ทั้งหมดใช้งานได้โดยชี้ไปที่ [Chiliz RPC endpoint](/th/phatthana/phuenthan/tho-chiliz-chain/tho-rpc.md)
* MetaMask และกระเป๋าเงิน EVM อื่นๆ ใช้งานได้หลังจากเพิ่มเครือข่าย
* Contract ของ OpenZeppelin และ ERC interface มาตรฐานใช้งานได้ตามเดิม
* ขนาด contract สูงสุด 24 KB ([EIP-170](https://eips.ethereum.org/EIPS/eip-170)) มีผลบังคับใช้เช่นเดียวกับ Ethereum ทุกประการ

## ข้อควรระวังเมื่อย้าย contract จาก Ethereum

Contract ส่วนใหญ่ย้ายมาได้โดยไม่ต้องแก้ไข

โปรดระวังพฤติกรรมเฉพาะของ Chiliz เหล่านี้:

* Gas token คือ CHZ\
  ที่ใดก็ตามที่ script หรือ contract ของคุณสมมติว่าใช้ ETH สำหรับ gas หรือมูลค่า ให้ใช้ CHZ แทน
* Decimals ของ Fan Token\
  Fan Tokens ใช้ 0 decimals จนถึงการย้ายไปใช้ Decimal ในปี 2026 และตอนนี้ใช้ 18 หาก contract ของคุณโต้ตอบกับ Fan Tokens อย่า hardcode ค่า decimals: ให้อ่าน `token.decimals()` แบบไดนามิก เนื่องจากยังอาจพบ contract แบบ 0 decimals เดิมบน chain ได้\
  ดูได้ที่ [เขียน Smart Contract](/th/phatthana/phuenthan/khian-smart-contract.md) และ [หน้าการย้ายในปี 2026](/th/riang-ru/fan-tokens/yai-2026.md)
* **ชุด validator ที่เล็กกว่า**\
  ด้วยชุด validator ที่ผลิต block ขนาดเล็ก (ปัจจุบันมี 13 ราย) สมมติฐานเรื่องการกระจายศูนย์และ reorg จึงต่างจาก Ethereum สำหรับการดำเนินการที่มีมูลค่าสูง ให้รอสัก 2-3 block เพื่อ finality
* **System contracts**\
  Chiliz Chain มี system contract อยู่ที่ address คงที่ (เช่น contract ชุด validator และ staking) โดยทั่วไปแล้วจะไม่รบกวน contract ของแอปพลิเคชัน แต่คุณอาจเห็นธุรกรรมไปยัง address ระบบระดับต่ำบน explorer\
  ดูได้ที่ [ที่อยู่ Smart Contract](/th/rerm-ton/that-yu-smart-contract.md)

## รายการตรวจสอบการย้าย (Migration checklist)

* ชี้เครื่องมือของคุณไปที่ [Chiliz RPC endpoint](/th/phatthana/phuenthan/tho-chiliz-chain/tho-rpc.md) และ chain ID 88888 (Mainnet) หรือ 88882 (Spicy Testnet)
* เติม CHZ ให้กระเป๋าเงินของผู้ deploy
* Compile สำหรับเวอร์ชัน EVM Prague, Solidity สูงสุด 0.8.30
* หากคุณโต้ตอบกับ Fan Tokens ให้จัดการกับ 18 decimals และอ่าน `decimals()` แบบไดนามิก
* คง contract ที่ deploy ไว้ให้อยู่ภายในขีดจำกัด 24 KB


---

# 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/riang-ru/chiliz-chain/differences-from-ethereum.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.
