Skip to main content
This page lists common errors you may encounter when developing LayerZero applications on IOTA L1, along with their causes and solutions.

Deployment Issues

Git Dependencies Failed

Error Message:
Cause: Git dependencies for LayerZero packages don’t work due to missing Move.toml manifests in subdirectories. Solution: Use local dependencies instead:
Or use published package addresses (see Deployed Contracts).

Unpublished Dependencies Error

Error Message:
Cause: Package has dependencies that aren’t published onchain. Solution: Add the flag when publishing:

Package Size Exceeded

Error Message:
Cause: Your package exceeds IOTA’s 250 KiB limit per package object. See IOTA transaction limits. Solutions:
  1. Split into multiple packages
  2. Remove unused dependencies
  3. Optimize data structures
  4. Move large constants off-chain
Example Split:

Insufficient Gas for Deployment

Error Message:
Cause: Deployment requires more gas than budgeted. Solution: Increase gas budget:
Deployment typically requires:
  • Simple packages: 50-100M gas
  • Complex packages: 100-200M gas
  • With dependencies: 200M+ gas

Upgrade Authority Issues

Error Message:
Cause: The signer doesn’t own the UpgradeCap for the package. Solution:
  1. Verify you’re using the correct account
  2. Check UpgradeCap ownership:
  1. Transfer UpgradeCap if needed

Configuration Issues

Channel Not Initialized

Error Message:
Cause: Attempting to send message before initializing the messaging channel. Solution: Initialize channel first:

Peer Not Set

Error Message:
Cause: No peer OApp address configured for the destination chain. Solution: Set peer address:
Address Format: Ensure peer address is 32 bytes (pad EVM addresses).

Library Configuration Missing

Error Message:
Cause: Custom library set but not properly configured. Solution: Either:
  1. Use default libraries (don’t set custom)
  2. Or properly configure custom library:

Configuration Errors

Peer Address Error (oapp_registry abort)

Error Message:
Cause: Remote chain is using wrong receiver address - likely using object ID instead of package ID. Solution: On IOTA, peer addresses must be package IDs, not object IDs. Find Your Correct Package ID:
Update Peer on Remote Chain:
Why Package ID?
  • IOTA OApps use CapType::Package for CallCap
  • Registry and verification systems key by package address
  • Object IDs are instance-specific, package ID is deployment-specific

Package ID vs Object ID Confusion

Error Message:
Cause: Using package ID when object ID is required (or vice versa). Key Differences:
  • Package ID: Address of published code (immutable bytecode)
  • Object ID: Address of object instance (mutable state)
Example:
How to Find:

Invalid BCS Bytes Error

Error Message:
Cause: Using tx.pure() instead of SDK’s asBytes() helper for byte array parameters. Solution: Use the SDK’s asBytes() helper:
Why asBytes() is Required: The SDK’s asBytes() function performs proper BCS vector wrapping:
What it does:
  • Takes raw bytes and wraps them in BCS vector format
  • Handles Transaction Argument pass-through
  • Ensures proper deserialization in Move’s vector<u8> type
Why tx.pure() fails:
  • Direct tx.pure(bytes, 'vector<u8>') doesn’t apply BCS vector wrapping
  • Move deserializer expects BCS-encoded vector format
  • Results in InvalidBCSBytes error
Common Scenarios Requiring asBytes():
    • DVN/ULN configuration
    • Execution options
    • OApp info parameters
    • Any vector<u8> config parameter

Execution Errors

Executor Transaction Fails (UnusedValueWithoutDrop)

Error Message:
Cause: Executor can’t properly build the PTB to call your OApp/OFT’s lz_receive() function. Most Common Reason for OFTs: Missing or incorrect lz_receive_info during registration. Solution for OFTs:
  1. Generate proper lz_receive_info:
  1. Update OApp info in registry:
Prevention: Always provide lz_receive_info during initial OFT registration (see OFT Overview).

OApp Registry Error

Error Message:
Cause: Remote chain is using wrong receiver address - using object ID instead of package ID. Solution: On IOTA, peer addresses must be package IDs:
Update peer on remote chain:
Why: IOTA uses Package CallCaps where callCap.id() returns the package address.

Runtime Errors

Call Object Not Consumed

Error Message:
Cause: A Call object was not properly consumed before the transaction ended. Root Causes:
  1. Missing confirmation call (e.g., confirm_lz_send)
  2. PTB doesn’t route the Call through all required modules
  3. Call object created but never destroyed
Solution:
Debug Checklist:
  • Every Call creation has a corresponding confirm call
  • PTB includes all required routing steps
  • No early returns that skip confirmation
  • All Call objects are destroyed before transaction ends

Invalid Recipient

Error Message:
Cause: Trying to send tokens to an invalid or non-existent address. Solution:
  1. Verify recipient address is valid
  2. For token sends, check if recipient needs an account created
  3. Ensure address format is correct (32 bytes)

Gas Estimation Failures

Error Message:
Cause: Transaction simulation failed during gas estimation. Solutions:
  1. Check transaction parameters are valid
  2. Verify all required objects exist
  3. Ensure signer has necessary permissions
  4. Try with higher gas budget
Debug:

Transaction Issues

PTB Construction Failures

Error Message:
Cause: Programmable Transaction Block doesn’t include all required calls. Solution: Verify PTB structure:

Object Ownership Errors

Error Message:
Cause: Trying to use an owned object that belongs to a different address. Solutions:
  1. Verify object ownership:
Output types:
  • {"AddressOwner": "0x..."} - Owned by specific address
  • "Shared" - Shared object (accessible to anyone)
  • "Immutable" - Immutable object (read-only)
  1. Use correct signer: Ensure the transaction signer owns the object
  2. Check object type:
Example:

Storage Rebate Confusion

Error Message (not actually an error):
Cause: Transaction freed storage, resulting in a rebate. Explanation: This is normal behavior, not an error. When storage is freed:
  • You get a rebate for the freed storage
  • Net gas cost can be negative
  • Base budget of 1000 is still required
Example:

SDK Errors

Connection Timeout

Error Message:
Cause: RPC endpoint is slow or unresponsive. Solutions:
  1. Use a different RPC endpoint
  2. Increase timeout:
  1. Consider using a private RPC provider

Invalid Object ID

Error Message:
Cause: Object ID is not properly formatted. Solution: Ensure object IDs are 32-byte hex strings:

Type Mismatch

Error Message:
Cause: Wrong coin type passed to function. Solution: Verify coin types match:

Debugging Tips

Enable Verbose Logging

Check Transaction Effects

Inspect Objects

Use IOTA Explorer

Navigate to IOTA Explorer to:
  • View transaction details
  • Check object states
  • Inspect event logs
  • Verify package deployments

Test on Devnet First

Always test on devnet before testnet/mainnet:

Getting Help

If you continue to experience issues:
  1. Check Documentation: Review IOTA Documentation
  2. Search Discord: Look for similar issues in LayerZero Discord
  3. Ask for Help: Post in Discord with:
    • Error message
    • Transaction hash (if available)
    • Code snippet
    • What you’ve tried

Next Steps