To transfer tokens to different blockchain networks using LayerZero, you have 3 options:Documentation Index
Fetch the complete documentation index at: https://docs.layerzero.network/llms.txt
Use this file to discover all available pages before exploring further.
- Build your own Omnichain Token using LayerZero contract standards.
- Send native gas tokens as part of your message’s execution options.
- Utilize a native bridge built on top of LayerZero (e.g., Stargate).
Building Your Own Omnichain Token
The Omnichain Fungible Token (OFT) Standard and Omnichain Non-Fungible Token (ONFT) Standard are ideal for creating tokens that exist on multiple chains. These standards allow tokens to be transferred across multiple blockchains without asset wrapping or middlechains, ensuring consistency and interoperability for holders. For new tokens, inherit fromOFT or ONFT.
For existing tokens, use OFTAdapter or ONFTAdapter.
To build a token using OFT or ONFT, you need to deploy the standard contracts on each chain where the token you own will or currently exists.
Read the OFT Quickstart and the ONFT Quickstart to learn more.
Sending Small Amounts of Native Gas
Depending on your destination application’s logic, you may want to transfer small amounts of native gas tokens for the destination chain’s transaction fees or to help users onboard to the new blockchain. LayerZero Message Execution Options enable you to send small amounts of native gas as part of your crosschain call or to a specific address on the destination chain:-
lzReceive: SendgasLimitAND / ORmsg.valueas part of the destinationEndpointV2.lzReceivecall. -
lzCompose: SendgasLimitAND / ORmsg.valueas part of the destinationEndpointV2.lzComposecall. -
lzNativeDrop: Send an_amountof native gas in wei to a specific_receiveraddress.
EndpointV2.send within your application, abstracting gas management from your users.
For more information, see Transaction Pricing.