# Cách sử dụng RNG

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