LayerZero Endpoint Metadata
The LayerZero Endpoint Metadata provides a comprehensive JSON snapshot of all the key information needed to build and analyze cross-chain applications. This metadata includes details such as deployments, tokens, RPC endpoints, chain information, and more for each supported chain.
Overview
Location:
The metadata is typically available at:https://metadata.layerzero-api.com/v1/metadata
Structure:
The JSON object is organized by chain keys (for example,"ethereum"
,"bsc"
,"polygon"
, etc.). Each top-level key corresponds to a chain and maps to an object that contains various sub-fields, including:- Deployments: Information about bridging contracts for LayerZero V1 (such as
endpoint
,relayerV2
, andultraLightNodeV2
) and for LayerZero V2 (endpointV2
,executor
,SendUln302
, etc.). - RPCs: A list of RPC endpoints for interacting with the chain.
- Chain Details: Core data including
chainType
,nativeChainId
, and details of the native currency. - DVNs: A dictionary of Decentralized Verifier Networks, used for ensuring the integrity of cross-chain messages.
- Tokens: A mapping of token addresses deployed using LayerZero to details such as symbol, decimals, and, optionally, pegging information.
- Address to OApp: A lookup for known DApps by their on-chain addresses.
- Other Fields: Including
environment
(e.g.,"mainnet"
or"testnet"
),blockExplorers
, andchainName
.
- Deployments: Information about bridging contracts for LayerZero V1 (such as
Use Cases
Developers and applications can leverage this metadata to:
- Dynamically configure applications:
Automatically set bridging addresses, tokens, and RPC endpoints based on the current network configuration. - Display chain information:
Provide end users with up-to-date details like block explorer links, native currency information, and more. - Validate local configurations:
Ensure that your application’s on-chain references match the official metadata.
Typical Metadata Fields
Each chain’s metadata object usually includes:
Field | Description |
---|---|
environment | Indicates the network environment, typically "mainnet" or "testnet" . |
blockExplorers[] | An array of objects (e.g., {"url": "https://polygonscan.com"} ) that provide block explorer URLs. |
rpcs[] | An array of objects with RPC endpoint URLs (e.g., {"url": "https://rpc.ftm.tools"} ). |
chainDetails | An object with detailed chain data (such as chainType , nativeChainId , nativeCurrency , etc.). |
deployments[] | An array that describes bridging contract deployments (like endpointV2 , relayerV2 , etc.). |
dvns | A dictionary of Data Validation Nodes (keyed by address), including details like version and canonical name. |
tokens | A dictionary keyed by token contract addresses, with each entry providing symbol , decimals , and optionally peggedTo data. |
addressToOApp | A mapping of on-chain addresses to known DApps (each with an id and canonicalName ). |
chainName | A human-readable name for the chain (often matching the top-level key). |
This metadata is a vital resource for ensuring your application interacts with the correct chain configurations and remains in sync with official deployments.