BTB
/

LayerZero V2

Bridgewebsite
Cross-chain messaging protocol. Apps send messages and token transfers between chains through the EndpointV2 contract on each chain. Agents can quote and send OFT (omnichain token) transfers and read messaging state.

What you can do

send-omnichain-tokenMove an OFT token to another chainget the token's OFT address for the source chain from its own registry entry or the token issuer's deployments page; call quoteSend(sendParam, false) for the native fee, approve the token if the OFT is an adapter, then send{value: nativeFee}(sendParam, fee, refundAddress). sendParam.dstEid is the destination Endpoint ID, sendParam.to is the recipient as bytes32.
find-endpoint-idGet the LayerZero Endpoint ID for a chainuse the chain's entry on the LayerZero deployments page (mainnet IDs are in the 30xxx range, testnets 40xxx). Ethereum mainnet is 30101.
track-messageCheck the status of a cross-chain messagelook it up with the LayerZero Scan tool or API from the LayerZero docs using the source transaction hash.
Cross-chain messages are not final until the destination executor delivers them. Delivery can take minutes or longer, and a failed message can be retried.
Messaging depends on the configured DVNs (verifiers) and executor for each route. A route with weak verification has more trust risk.
OFT adapters lock tokens on the source chain and mint or unlock them on the destination. Only one adapter should exist for a token, or supply can break.
Sends need native gas on the source chain for the messaging fee. Set minAmountLD to avoid losing value to slippage.

Contracts

Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).
EndpointV2 (ethereum, Endpoint ID 30101)bridge on ethereum0x1a44076050125825900e736c501f859c50fE728c
read eid()
This chain's LayerZero Endpoint ID (for example 30101 on Ethereum). Destinations are addressed by Endpoint ID, not chain ID.
read quote((uint32,bytes32,bytes,bytes,bool),address)
Fee for a message: (MessagingParams(dstEid, receiver as bytes32, message, options, payInLzToken), sender OApp). Returns (nativeFee, lzTokenFee). Agents normally call the OApp or OFT's own quoteSend instead.
write send((uint32,bytes32,bytes,bytes,bool),address)
Called by an OApp, not by wallets directly: sends a message with the native fee as value; the second argument is the refund address.
read getSendLibrary(address,uint32)
Message library an OApp uses to send to a destination Endpoint ID.
read outboundNonce(address,uint32,bytes32)
Messages sent so far from (sender OApp, destination Endpoint ID, receiver as bytes32).
read inboundNonce(address,uint32,bytes32)
Highest message nonce delivered in order to (receiver OApp, source Endpoint ID, sender as bytes32).
EndpointV2 (arbitrum, Endpoint ID 30110)bridge on arbitrum0x1a44076050125825900e736c501f859c50fE728c
read eid()
This chain's LayerZero Endpoint ID (for example 30101 on Ethereum). Destinations are addressed by Endpoint ID, not chain ID.
read quote((uint32,bytes32,bytes,bytes,bool),address)
Fee for a message: (MessagingParams(dstEid, receiver as bytes32, message, options, payInLzToken), sender OApp). Returns (nativeFee, lzTokenFee). Agents normally call the OApp or OFT's own quoteSend instead.
EndpointV2 (base, Endpoint ID 30184)bridge on base0x1a44076050125825900e736c501f859c50fE728c
read eid()
This chain's LayerZero Endpoint ID (for example 30101 on Ethereum). Destinations are addressed by Endpoint ID, not chain ID.
read quote((uint32,bytes32,bytes,bytes,bool),address)
Fee for a message: (MessagingParams(dstEid, receiver as bytes32, message, options, payInLzToken), sender OApp). Returns (nativeFee, lzTokenFee). Agents normally call the OApp or OFT's own quoteSend instead.
EndpointV2 (optimism, Endpoint ID 30111)bridge on optimism0x1a44076050125825900e736c501f859c50fE728c
read eid()
This chain's LayerZero Endpoint ID (for example 30101 on Ethereum). Destinations are addressed by Endpoint ID, not chain ID.
read quote((uint32,bytes32,bytes,bytes,bool),address)
Fee for a message: (MessagingParams(dstEid, receiver as bytes32, message, options, payInLzToken), sender OApp). Returns (nativeFee, lzTokenFee). Agents normally call the OApp or OFT's own quoteSend instead.
EndpointV2 (polygon, Endpoint ID 30109)bridge on polygon0x1a44076050125825900e736c501f859c50fE728c
read eid()
This chain's LayerZero Endpoint ID (for example 30101 on Ethereum). Destinations are addressed by Endpoint ID, not chain ID.
read quote((uint32,bytes32,bytes,bytes,bool),address)
Fee for a message: (MessagingParams(dstEid, receiver as bytes32, message, options, payInLzToken), sender OApp). Returns (nativeFee, lzTokenFee). Agents normally call the OApp or OFT's own quoteSend instead.
EndpointV2 (bsc, Endpoint ID 30102)bridge on bsc0x1a44076050125825900e736c501f859c50fE728c
read eid()
This chain's LayerZero Endpoint ID (for example 30101 on Ethereum). Destinations are addressed by Endpoint ID, not chain ID.
read quote((uint32,bytes32,bytes,bytes,bool),address)
Fee for a message: (MessagingParams(dstEid, receiver as bytes32, message, options, payInLzToken), sender OApp). Returns (nativeFee, lzTokenFee). Agents normally call the OApp or OFT's own quoteSend instead.
EndpointV2 (avalanche, Endpoint ID 30106)bridge on avalanche0x1a44076050125825900e736c501f859c50fE728c
read eid()
This chain's LayerZero Endpoint ID (for example 30101 on Ethereum). Destinations are addressed by Endpoint ID, not chain ID.
read quote((uint32,bytes32,bytes,bytes,bool),address)
Fee for a message: (MessagingParams(dstEid, receiver as bytes32, message, options, payInLzToken), sender OApp). Returns (nativeFee, lzTokenFee). Agents normally call the OApp or OFT's own quoteSend instead.