Query editor
-- LayerZero V2 OFT transfer legs on Stellar, one row per leg. OFTs are discovered, not listed:-- * an oft_sent / oft_received counts only when EndpointV2 emits the matching packet in the-- same tx (event names are free text; the endpoint is the proof)-- * the token is the same-tx transfer in tokens_stellar.transfers matching the leg on amount-- and owner: burn / mint, or a transfer into / out of the OFT (lock/unlock OFTs)-- * amount comes from tokens_stellar.transfers (decimals handled there); USD uses SDF's-- recognized-asset prices, nearest known price at either end of a token's series;-- unrecognized tokens stay unpriced-- * project = issuing company of a recognized asset, else the asset code-- packet_sent payload (hex, 1-based): guid 163 | message 227 (send_to first).-- operation_id is not null dedupes the duplicate copy of every contract event.-- Chain names mirror SDF's dbt seed bridge_chain_mappings (layerzero_oft).-- Mirrors SDF's internal dbt model bridge_transfers__layerzero.withevents as (selecttransaction_hash, closed_at, contract_id, topics_decoded, data_decoded, json_extract_scalar(topics_decoded, '$[0].symbol') as event_name, row_number() over (partition bytransaction_hash, json_extract_scalar(topics_decoded, '$[0].symbol'), coalesce(json_extract_scalar(topics_decoded, '$[2].address'), contract_id)order by topics_decoded, data_decoded) as pair_ordinalfrom stellar.history_contract_eventswhereclosed_at_date >= date '2026-07-01' -- LayerZero V2 mainnet deploy on Stellarand successfuland operation_id is not nulland (json_extract_scalar(topics_decoded, '$[0].symbol') in ('oft_sent', 'oft_received')or (contract_id = 'CCQLLRE5JBAWYCW3KTWOIWLMFDUOKROQVZNSALQMGOSXNW3ERUOWTZGK' -- EndpointV2and json_extract_scalar(topics_decoded, '$[0].symbol') in ('packet_sent', 'packet_delivered')))), transfers as (select transaction_hash, contract_id, asset_code, "from", "to", amount_raw, amountfrom tokens_stellar.transferswhereblock_date >= date '2026-07-01'and event_topic in ('mint', 'burn', 'transfer')and transaction_hash in (select transaction_hash from events where event_name in ('oft_sent', 'oft_received'))), sent_packets as (selecttransaction_hash, substr(json_extract_scalar(data_decoded, '$.map[0].val.bytes'), 163, 64) as guid, substr(json_extract_scalar(data_decoded, '$.map[0].val.bytes'), 227, 64) as counterparty_bytesfrom eventswhere event_name = 'packet_sent'