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

# Messaging Protocol Messages

> Inbound and outbound cross-chain messages from general-purpose messaging protocols, unified across all supported chains.

The `crosschain.bridges.messaging_protocols_inbound_messages` and `crosschain.bridges.messaging_protocols_outbound_messages` tables provide message activity from cross-chain communication layers across all supported chains. Both tables share an identical schema — the `direction` column distinguishes inbound from outbound records.

Messaging protocols support both token transfers and arbitrary message passing. Token transfer fields are populated when the message includes a token payload; `message_details` captures protocol-specific non-token message data.

**Protocols covered:** Axelar, Chainlink CCIP, Circle CCTP (v1, v2), Hyperlane, LayerZero (v2), Socket DL, Wormhole

**Chains:** Abstract, Aptos, Arbitrum, Avalanche, Base, BSC, Ethereum, HyperEVM, Ink, Katana, Mantle, Optimism, Plasma, Polygon, Scroll, SEI, Solana, Sui, Tron, Unichain, WorldChain

## Table Columns

Unique key: `unique_id`

| Column Name | Data Type | Description |
| - | - | - |
| chain | VARCHAR | The blockchain where this message was recorded (e.g., `ethereum`, `solana`). |
| project | VARCHAR | The messaging protocol name (e.g., `layerzero`, `wormhole`, `circle_cctp`). |
| protocol | VARCHAR | The specific protocol version identifier (e.g., `layerzero_v2`, `cctp_v2`). |
| contract\_address | VARCHAR | The messaging protocol contract address on this chain. |
| event\_name | VARCHAR | The on-chain event name that generated this record. |
| direction | VARCHAR | Message direction relative to this chain: `inbound` or `outbound`. |
| source\_chain | VARCHAR | The chain where the message originates. |
| destination\_chain | VARCHAR | The chain where the message is destined. |
| sender\_address | VARCHAR | The address that sent the message. |
| recipient\_address | VARCHAR | The address that receives the message on the destination chain. |
| token\_type | VARCHAR | The token standard, if this message includes a token transfer (e.g., `ERC20`, `SPL`). NULL for message-only transfers. |
| token\_address | VARCHAR | The contract address of the token being transferred. NULL for message-only transfers. |
| token\_name | VARCHAR | Human-readable token name. NULL for message-only transfers. |
| token\_symbol | VARCHAR | Token ticker symbol. NULL for message-only transfers. |
| amount\_raw | VARCHAR | Raw token amount, not adjusted for decimals. NULL for message-only transfers. |
| amount | VARCHAR | Decimal-adjusted token amount. NULL for message-only transfers. |
| usd\_amount | FLOAT | USD value of the token transfer at time of transaction. NULL for message-only transfers. |
| fee\_token\_address | VARCHAR | Contract address of the token used to pay messaging fees. NULL if not applicable. |
| fee\_token\_name | VARCHAR | Human-readable name of the fee token. |
| fee\_token\_symbol | VARCHAR | Fee token ticker symbol. |
| fee\_amount\_raw | VARCHAR | Raw fee amount, not adjusted for decimals. |
| fee\_amount | VARCHAR | Decimal-adjusted fee amount. |
| fee\_usd\_amount | FLOAT | USD value of the fee at the time of the transaction. |
| fee\_details | VARIANT | Protocol-specific fee breakdown. |
| message\_details | VARIANT | Protocol-specific message payload fields (non-token data such as nonces, sequence numbers, and message hashes). |
| extra\_fields | VARIANT | Protocol-specific additional fields not captured in standard columns. |
| transaction\_from\_address | VARCHAR | The EOA or contract that submitted the transaction. |
| transaction\_to\_address | VARCHAR | The contract address called in the transaction. |
| transaction\_hash | VARCHAR | The on-chain transaction hash. |
| transaction\_index | BIGINT | The transaction's position within the block. |
| log\_index | BIGINT | The log's position within the transaction. |
| block\_number | BIGINT | The block height at which this message was recorded. |
| block\_timestamp | TIMESTAMP\_NTZ(9) | The timestamp of the block. |
| block\_hash | VARCHAR | The hash of the block. |
| unique\_id | VARCHAR | A unique identifier for this message record. |
| \_created\_at | TIMESTAMP\_NTZ(9) | Timestamp when this record was created in Allium. |
| \_updated\_at | TIMESTAMP\_NTZ(9) | Timestamp when this record was last updated in Allium. |

## Sample Query

Outbound messaging protocol volume by protocol and destination chain in the last 7 days.

```sql theme={null}
SELECT
    project,
    protocol,
    destination_chain,
    COUNT(1) AS messages,
    COUNT_IF(usd_amount IS NOT NULL) AS token_transfers,
    SUM(usd_amount) AS usd_volume
FROM crosschain.bridges.messaging_protocols_outbound_messages
WHERE block_timestamp >= CURRENT_TIMESTAMP - INTERVAL '7 days'
GROUP BY ALL
ORDER BY messages DESC
LIMIT 50
```
