Any data, whether it’s a fungible token transfer, an NFT, or some other smart contract input can be encoded onchain as a bytes array, and delivered to a destination chain to trigger some action using LayerZero. Because of this, any blockchain that broadly supports state propagation and events can be connected to LayerZero, like Solana.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.
LayerZero provides sister Solana Programs that can communicate with the equivalent Solidity Contract Libraries you deploy on the Ethereum Virtual Machine (EVM). These programs, like their solidity counterparts, simplify calling the LayerZero Endpoint, provide message handling, interfaces for protocol configurations, and other utilities for interoperability:
-
Omnichain Fungible Token (OFT): an extension of
OAppbuilt for handling and supporting omnichain SPL Token transfers. - Omnichain Application (OApp): the base program utilities for omnichain messaging and configuration.
Differences from the Ethereum Virtual Machine
The full differences between Solidity and Solana are outside the scope of this overview (e.g., see A Complete Guide to Solana Development for Ethereum Developers or 60 Days of Solana by RareSkills.Skip this section if you already feel comfortable working within the Solana Virtual Machine (SVM) and the Solana Account Model.
Writing Smart Contracts on Solana
To create a new ERC20 tokens on an EVM-compatible blockchain, a developer will have to inherit and redeploy the ERC20 smart contract. Solana is different. Direct translation of Solidity contract inheritance to Solana is not possible because Rust does not have classes like Solidity. Instead, the Solana Account Model enables program reusability.Sometimes you’ll see Solana tokens referred to as “SPL tokens.” SPL stands for Solana Program Library, which is a set of Solana programs that the Solana team has deployed onchain. SPL tokens are similar to ERC20 tokens, since every SPL token has a standard set of functionality.
A Program Derived Address (PDA) can then be used as the address (unique identifier) for an onchain account, providing a method to easily store, map, and fetch program state. For example, a user’s wallet and the SPL Token Mint can be used to derive the Token Account.
LayerZero Labs may eventually in the future maintain with another entity a version of the OFT Program which users can use to create OFT Store Accounts from, but for now developers should consider deploying their own version of the OFT Program.