> 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).

# Generowanie liczb losowych on-chain

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 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/pl/tworzenie/zaawansowane/generowanie-liczb-losowych.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.
