> 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/tokeny-omnichain.md).

# Tokeny omnichain

Kompletny przewodnik po standardach OFT i ONFT LayerZero na Chiliz Chain: mechanika lock-and-mint, wzorzec OFT Adapter oraz mostkowanie między łańcuchami EVM i Solana.

## O LayerZero i standardach tokenów omnichain

[LayerZero](https://layerzero.network/) to protokół komunikacji omnichain.

W odróżnieniu od tradycyjnego „mostu", który blokuje aktywa w jednym chainie i mintuje opakowaną kopię w innym, LayerZero umożliwia smart kontraktom na różnych chainach bezpośrednią „komunikację" ze sobą.\
Odbywa się to przez standard Omnichain Fungible Token (OFT) dla zwykłych tokenów oraz standard Omnichain Non-Fungible Token (ONFT) dla NFT.

Dowiedz się więcej o standardach OFT i ONFT:

{% embed url="<https://docs.layerzero.network/v2/concepts/applications/oft-standard>" %}

W praktyce OFT LayerZero umożliwia tokenowi projektu (np. $PSG lub $CITY) istnienie natywnie na Chiliz Chain i jednoczesne płynne przemieszczanie się do innych blockchainów i ich ekosystemów.

LayerZero obsługuje ponad 700 aktywów w ponad 170 sieciach blockchain dzięki tylu samo smart kontraktom OFT/ONFT:

{% embed url="<https://docs.layerzero.network/v2/deployments/oft-ecosystem-stargate-assets?stages=mainnet>" %}

Wśród tych sieci są chainy kompatybilne z EVM, takie jak Chiliz Chain, oczywiście Ethereum, ale również Base, Arbitrum, Polygon, BNB Chain itp.\
LayerZero obsługuje jednak również chainy non-EVM, takie jak Solana, Aptos, Sei, TON itp.

## Dlaczego warto uczynić tokeny projektu omnichain?

Mostkowanie tokenów projektu przez LayerZero przekształca je w aktywa omnichain, które mogą istnieć i być używane wszędzie. Przynosi to interoperacyjność, a co za tym idzie:

* Posiadacze tokenów projektu mogą używać tokenu tam, gdzie jest najbardziej przydatny.
* Deweloperzy dApp na Chiliz Chain mogą sprawić, by ich dApp przyjmowała depozyty od użytkowników z innych chainów.
* Kluby sportowe mogą poszerzyć zasięg swoich Fan Tokenów, otwierając dostęp fanom spoza bazy użytkowników Chiliz Chain.

Główna idea pozostaje ta sama: uczynienie tokenu projektu działającym na wielu chainach znacznie zwiększa jego użyteczność.

## Jak to działa

{% hint style="info" %}
To wyjaśnienie dotyczy chainów opartych na EVM, takich jak Chiliz Chain, Base i Ethereum.\
LayerZero obsługuje również chainy non-EVM, takie jak Solana.
{% endhint %}

By stworzyć token projektu omnichain na Chiliz Chain, musi on implementować kontrakt `OFT.sol`, który sam rozszerza standardowy kontrakt `ERC20.sol`.

{% embed url="<https://github.com/LayerZero-Labs/LayerZero-v2/blob/main/packages/layerzero-v2/evm/oapp/contracts/oft/OFT.sol>" %}

Ponieważ większość tokenów projektów istnieje jako standardowe tokeny ERC-20, nie możemy po prostu zastąpić ich kontraktów kontraktem `OFT.sol`.

By uczynić je omnichain bez ponownego emitowania, musimy użyć wzorca OFT Adapter:

{% embed url="<https://docs.layerzero.network/v2/developers/evm/oft/quickstart#oft-adapter>" %}

... który używa kontraktu `OFTAdapter.sol`:

{% embed url="<https://github.com/LayerZero-Labs/LayerZero-v2/blob/main/packages/layerzero-v2/evm/oapp/contracts/oft/OFTAdapter.sol>" %}

Pozwala to rozszerzyć możliwości tokenów bez ich modyfikacji: OFT Adapter działa jako pośrednik między istniejącym tokenem a siecią LayerZero.

Przez ten adapter token może komunikować się z kontraktem `OFT.sol` wdrożonym na chainie docelowym.\
Przy mostkowaniu tokenu kontrakt OFT Adapter na Chiliz Chain „blokuje" określoną ilość tokenów i informuje kontrakt OFT na chainie docelowym, by „zmintował" równoważną ilość tokenów dla tego chaina.\
Gdy posiadacz chce zwrócić token na Chiliz Chain, zdalny kontrakt OFT spala tokeny, a kontrakt OFT Adapter na Chiliz Chain odblokowuje i uwalnia oryginalne tokeny.

Ten mechanizm „Lock-and-Mint" zapewnia, że całkowita podaż w obiegu pozostaje stała we wszystkich chainach, zachowując jednocześnie niezmienność i historię oryginalnego kontraktu tokenu na Chiliz Chain.

## Przewodnik EVM do EVM

{% content-ref url="/pages/3DbX00XyeTW3867dDJG3" %}
[Most z Base do Chiliz Chain](/pl/tworzenie/zaawansowane/tokeny-omnichain/mostek-base-chiliz-chain.md)
{% endcontent-ref %}

{% content-ref url="/pages/AgknH9YJDoYxvRLysDSG" %}
[Most z Chiliz Chain do Base](/pl/tworzenie/zaawansowane/tokeny-omnichain/mostek-chiliz-chain-base.md)
{% endcontent-ref %}

## Przewodnik non-EVM do EVM

{% content-ref url="/pages/zfPnUDBxQdE1lVaRlSvB" %}
[Most z Solana do Chiliz Chain](/pl/tworzenie/zaawansowane/tokeny-omnichain/mostek-solana-chiliz-chain.md)
{% endcontent-ref %}

## Przewodnik EVM do non-EVM

{% content-ref url="/pages/A6SEHaeVw2arMQ2rEh9T" %}
[Most z Chiliz Chain do Solana](/pl/tworzenie/zaawansowane/tokeny-omnichain/mostek-chiliz-chain-solana.md)
{% endcontent-ref %}


---

# 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/tokeny-omnichain.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.
