Skip to main content
Test LayerZero Solana programs directly from your browser. Build and send instructions without writing code. Explore key program instructions for message fee calculation, sending, receiving, and configuration management.

Experimental Feature

This playground is experimental and uses simplified instruction encoding. For production use, please use the official LayerZero Solana SDK which provides proper type-safe instruction builders.Current Limitations:
  • Instruction data encoding is simplified and may not match the exact format expected by the programs
  • Some complex instructions may require specific account ordering or additional accounts not shown here
  • The actual instruction discriminators and data encoding may differ from what’s shown here
  • Simulations may fail with “InvalidAccountForFee” or other errors - this is expected as the playground uses experimental encoding
For accurate interaction with LayerZero programs, please use the official SDKs:

LayerZero Endpoint Program

The main entry point for all crosschain messaging operations on Solana. This program handles message routing, fee calculation, and configuration management.

OApp Registration & Setup

registerOapp() - Register OApp

initNonce() - Initialize Nonce

Message Operations

quote() - Get Fee Estimates

send() - Send Crosschain Message

Message Verification

initVerify() - Initialize Verification

verify() - Verify Inbound Message

Compose Messages

sendCompose() - Send Compose Message

clearCompose() - Clear Compose Message

Message Recovery & Security

skip() - Skip Inbound Nonce

burn() - Permanently Block Message

nilify() - Mark Message as Nil

clear() - Clear Payload

Library Configuration

initSendLibrary() - Initialize Send Library

setSendLibrary() - Set Send Library

initReceiveLibrary() - Initialize Receive Library

setReceiveLibrary() - Set Receive Library

setReceiveLibraryTimeout() - Set Library Timeout

Configuration Management

initConfig() - Initialize Configuration

setConfig() - Set Configuration

setDelegate() - Set Delegate

Admin Functions

withdrawRent() - Withdraw Rent

LayerZero OFT Program

Omnichain Fungible Token (OFT) enables seamless crosschain token transfers. Deploy once and bridge your SPL tokens to any supported blockchain.

tip

If your OFT program hasn’t been deployed to a specific network, you can supply a custom program ID in the input field.

Token Setup

initOft() - Initialize OFT

Crosschain Operations

quoteOft() - Get OFT Quote

quoteSend() - Get Send Quote

send() - Send Tokens Crosschain

lzReceive() - Receive Tokens

lzReceiveTypes() - Get Receive Account Types

Token Information

oftVersion() - Get OFT Version

Configuration

setPeerConfig() - Configure Remote Peer

setOftConfig() - Update OFT Settings

setPause() - Pause/Unpause OFT

withdrawFee() - Withdraw Collected Fees

Usage Tips

Getting Started

  1. Connect Your Wallet: Click “Connect Phantom Wallet” to connect your Solana wallet
  2. Select Network: Choose between Solana Mainnet and Devnet
  3. Custom RPC (Optional): If you encounter rate limits (403 errors), add a custom RPC URL:

Common Workflows

Sending Tokens Crosschain (OFT)

  1. Initialize your OFT with initOft()
  2. Configure peers with setPeerConfig()
  3. Get a quote with quoteOft() or quoteSend()
  4. Send tokens with send()

Setting Up Messaging (Endpoint)

  1. Register your OApp with registerOapp()
  2. Initialize nonce tracking with initNonce()
  3. Set up libraries with initSendLibrary() and initReceiveLibrary()
  4. Configure DVNs/executors with setConfig()
  5. Get quotes with quote() and send messages with send()

Troubleshooting

  • 403 Errors: Use a custom RPC URL instead of public endpoints
  • “Account does not exist”: Ensure all required accounts have been initialized
  • “Invalid arguments”: Check that byte arrays are properly formatted (0x prefix)
  • Simulation failures: This playground uses simplified encoding - use official SDKs for production
For production applications, always use the official LayerZero SDKs which provide proper type safety and encoding.