> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dune.com/llms.txt
> Use this file to discover all available pages before exploring further.

# layerzero.messages

> LayerZero cross-chain messages — message payloads, endpoints, and routing data.

export const TableSample = ({tableName, tableSchema}) => <>
    <div className="hidden dark:block">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}&darkMode=true`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
    <div className="dark:hidden">
      <iframe src={`https://dune.com/embeds/3419983/5785629?table_schema_t6f0df=${tableSchema}&table_name_t6f0df=${tableName}`} style={{
  width: '100%',
  height: '500px',
  border: 'none',
  marginTop: '10px'
}} />
    </div>
  </>;

The `layerzero.messages` table contains all cross-chain messages sent through the LayerZero protocol. Each message represents a cross-chain communication event between source and destination chains.

## Table Schema

| Column Name | Data Type | Description |
| - | - | - |
| timestampUpdated | timestamp | Timestamp of the last update |
| primary\_key | string | Unique identifier for the message |
| transfer\_foreign\_key | string | Foreign key reference to the transfer |
| tx\_hash\_source | string | Transaction hash on the source chain |
| tx\_hash\_destination | string | Transaction hash on the destination chain |
| ts\_source | timestamp | Timestamp of the message on source chain |
| ts\_destination | timestamp | Timestamp of the message on destination chain |
| block\_number\_source | decimal(38,0) | Block number on the source chain |
| block\_number\_destination | decimal(38,0) | Block number on the destination chain |
| addr\_from | string | Address of the message sender |
| usd\_dvn\_fee | double | USD value of the DVN fee |
| usd\_executor\_fee | double | USD value of the executor fee |
| usd\_value | double | Total USD value of the message |
| source\_contract | string | Contract address on the source chain |
| source\_chain | string | Source chain identifier |
| source\_chain\_key | string | Source chain key |
| source\_layer | string | Source chain layer |
| destination\_contract | string | Contract address on the destination chain |
| destination\_chain | string | Destination chain identifier |
| destination\_chain\_key | string | Destination chain key |
| destination\_layer | string | Destination chain layer |
| project | string | Project identifier |
| state | string | Current state of the message |
| layerzero\_version | string | Version of LayerZero protocol used |
| uln\_version | string | Version of ULN used |
| \_updated\_at | timestamp | Last update timestamp |
| \_ingested\_at | timestamp | Ingestion timestamp |

## Sample Query

```sql theme={null}
-- Get the total number of messages and total value transferred per chain pair
SELECT 
    source_chain,
    destination_chain,
    COUNT(*) as message_count,
    SUM(usd_value) as total_value_usd
FROM layerzero.messages
WHERE ts_source >= NOW() - INTERVAL '7' DAY
GROUP BY source_chain, destination_chain
ORDER BY total_value_usd DESC
LIMIT 10;
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.