> 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/pl/tworzenie/zaawansowane/generowanie-liczb-losowych.md). Agents can also search and read this documentation through its [MCP server](https://docs.chiliz.com/~gitbook/mcp).

# Generowanie liczb losowych on-chain

Generuj kryptograficznie bezpieczne liczby losowe na Chiliz Chain używając Pyth Entropy: idealne do mintowania NFT, mechanik gier i rynków przewidywań.

Prawdziwa losowość to trudny temat w informatyce i trudno ją osiągnąć samodzielnie. Gdy losowość jest kluczem do projektu, zalecamy użycie renomowanego Generatora Liczb Losowych (RNG).

## Czym jest RNG?

Produkując sekwencje liczb, których nie można przewidzieć, RNG zapewniają uczciwość i unikalność w projektach blockchain. Zwiększa to integralność i wiarygodność, zapobiegając manipulacjom i zapewniając sprawiedliwe wyniki.

## Co to oznacza dla deweloperów Chiliz Chain?

Włączając RNG, projekty sportowo-rozrywkowe mogą znacznie zwiększyć zaufanie, emocje i uczciwość tego, co oferują.

## Jak to zrobić za pomocą Pyth?

Chiliz Chain obsługuje Pyth Entropy.

Entropy pozwala deweloperom szybko i łatwo generować liczby losowe na blockchainie dla aplikacji takich jak mintowanie NFT, gry i nie tylko.\
Poprzez SDK Solidity umożliwia to deweloperom łatwe integrowanie RNG w aplikacjach EVM.

{% hint style="info" %}
Użyj następującego adresu, aby korzystać z Entropy na Chiliz.

#### Na Chiliz Mainnet

* Chain ID:\
  `chiliz`
* Adres kontraktu Entropy:\
  `0x0708325268dF9F66270F1401206434524814508b`
* Dostawca:\
  `0x52DeaA1c84233F7bb8C8A45baeDE41091c616506`<br>

#### Na Spicy Testnet

* Chain ID:\
  `chiliz-spicy`
* Adres kontraktu Entropy:\
  `0xD458261E832415CFd3BAE5E416FdF3230ce6F134`
* Dostawca:\
  `0x6CC14824Ea2918f5De5C2f75A9Da968ad4BD6344`
  {% endhint %}

Pyth oferuje pełny zestaw [dokumentacji dotyczącej Entropy](https://docs.pyth.network/entropy), w tym:

* [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)
* [Przykładowa aplikacja demonstrująca użycie Pyth Entropy do rzutu monetą](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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chiliz.com/pl/tworzenie/zaawansowane/generowanie-liczb-losowych.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
