> 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/vi/phat-trien/nang-cao/cach-su-dung-rng.md).

# Cách sử dụng RNG

Tạo số ngẫu nhiên an toàn về mặt mật mã trên Chiliz Chain bằng Pyth Entropy: lý tưởng cho mint NFT, cơ chế game và thị trường dự đoán.

## RNG là gì?

Bằng cách tạo ra các chuỗi số không thể dự đoán trước, Random Number Generators (RNGs) đảm bảo tính công bằng và sự độc đáo trong các dự án blockchain.

## Điều này có ý nghĩa gì đối với các nhà phát triển Chiliz Chain

Bằng cách tích hợp RNGs, các dự án thể thao và giải trí có thể tăng cường đáng kể niềm tin, sự hào hứng và tính công bằng của những gì họ cung cấp.

## Cách thực hiện bằng cách sử dụng Pyth?

Testnet "Spicy" của Chiliz Chain hỗ trợ Pyth's Entropy.

Entropy cho phép các nhà phát triển nhanh chóng và dễ dàng tạo ra các số ngẫu nhiên trên blockchain cho các ứng dụng như NFT mints, gaming và nhiều hơn nữa.

Thông qua SDK Solidity, điều này cho phép các nhà phát triển dễ dàng tích hợp RNG vào các ứng dụng EVM của họ.

{% hint style="info" %}
Sử dụng địa chỉ sau để sử dụng Entropy trên testnet Spicy của Chiliz:

* Chain:\
  `chiliz-spicy`
* Entropy Contract Address:\
  `0xD458261E832415CFd3BAE5E416FdF3230ce6F134`
* Provider:\
  `0x6CC14824Ea2918f5De5C2f75A9Da968ad4BD6344`
  {% endhint %}

Pyth cung cấp một bộ tài liệu đầy đủ về Entropy, bao gồm:

* [Create your first Entropy app on EVM](https://docs.pyth.network/entropy/create-your-first-entropy-app)
* [How to Generate Random Numbers in EVM Contracts Using Pyth Entropy](https://docs.pyth.network/entropy/generate-random-numbers/evm)
* [A sample application demonstrating how to use Pyth Entropy to flip a fair coin](https://github.com/pyth-network/pyth-crosschain/blob/main/target_chains/ethereum/examples/coin_flip/contract/src/CoinFlip.sol).


---

# 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/vi/phat-trien/nang-cao/cach-su-dung-rng.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.
