LayerZero Omnichain Messaging
LayerZero is an omnichain interoperability protocol that enables cross-chain messaging. Applications built on Linea can use the LayerZero protocol to seamlessly connect to 35+ supported blockchains.
LayerZero Endpoint has been deployed on Linea for builders to leverage omnichain
messaging in their dapps. LayerZero's Endpoint ULNv2 validation library relies
on two parties, the Oracle and Relayer, to transfer messages between onchain
smart contracts known as endpoints. When LayerZero sends a message from Linea to
chain X
, the message is routed through the endpoint on Linea to the ULNv2
validation library. The ULNv2 library notifies the Oracle and Relayer of the
message and its destination chain X
. The Oracle forwards the packet hash to
the endpoint on chain X
, and the Relayer submits the packet to be verified
onchain against the hash, and delivers the message.
As a developer, you can leverage LayerZero's Endpoint contract by using our
LzApp
interface for your User Application (UA). The Endpoint allows UAs to
configure the Messaging Library for sending and receiving verified messages and
guarantees the message-delivering ordering across all messaging libraries:
Send()
: the message will be sent through the endpoint first, and then redirected to the UA-configured Messaging Library.Receive()
: the message will be verified at the Messaging Library first, then forwarded to the endpoint and eventually delivered to the UA.
Learn how to integrate LayerZero into your contracts here.
Contract | Chain Name | Chain Id | Endpoint |
---|---|---|---|
Testnet | Linea | 10157 | 0x6EDCE65403992e310A62460808c4b910D972f10f |
Mainnet | Linea | 183 | 0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7 |