Skip to main content
Omnichain interoperability protocol enabling cross-chain messaging. Powers OFT tokens and arbitrary message passing.

Notes

  • This is a messaging protocol, not a direct token bridge. Token bridging is done via OFT (Omnichain Fungible Token) contracts built on top of LayerZero
  • Uses endpoint IDs (dstEid) for chain identification, NOT EVM chain IDs
  • The endpoint address is the same on most chains; zkSync’s and Arc’s differ
  • Use quote to estimate fees before sending
  • Finality: depends on DVN (Decentralized Verifier Network) configuration, typically 1-5 minutes
  • Powers Stargate V2, OFT tokens, and many cross-chain dApps
  • On Arc (5042, eid 30417) the messaging fee msg.value is native USDC at 18 decimals, from the same balance as the USDC ERC-20 0x3600…0000

Its names in a program

On Ethereum, Layerzero is a namespace: its contracts need no import.

Deployments

ABI

LayerZeroEndpointV2ABI

import LayerZeroEndpointV2ABI from "./protocols/layerzero/LayerZeroEndpointV2ABI.json"; Speaks for: endpointV2.
  • send((uint32 dstEid, bytes32 receiver, bytes message, bytes options, bool payInLzToken) _params, address _refundAddress) payable returns ((bytes32 guid, uint64 nonce, (uint256 nativeFee, uint256 lzTokenFee) fee) receipt)
  • quote((uint32 dstEid, bytes32 receiver, bytes message, bytes options, bool payInLzToken) _params, address _sender) view returns ((uint256 nativeFee, uint256 lzTokenFee) fee)

Next steps