Query editor
-- VeeFriends: Rarible Marketplace Gap Check-- Compares Rarible contract events against nft.trades to find missing trades---- Rarible Contracts (from https://github.com/rarible/protocol-contracts):-- Ethereum:-- - ExchangeV2: 0x9757F2d2b135150BBeb65308D4a91804107cd8D6-- - ExchangeMetaV2: 0x6C65a3C3AA67b126e43F86DA85775E0F5e9743F7 (meta transactions)-- - RaribleExchangeWrapper: 0x9BDB46adb3972f9a5e2eadCcd009f0bf3e386845-- - TransferProxy: 0x4fee7b061c97c9c496b01dbce9cdb10c02f0a0be-- Base:-- - ExchangeMetaV2: 0x6C65a3C3AA67b126e43F86DA85775E0F5e9743F7-- - RaribleExchangeWrapper: 0x6563a331A411829918025D8a7e1d348f8b250906-- - TransferProxy: 0x4217a346C8b4731641327b65bb6F6d3243d64e2---- This query helps identify trades that may be missing from Dune's nft.trades table.-- Run this periodically to monitor data completeness.---- Output:-- - summary: Total counts comparison (Ethereum + Base)-- - missing_trades: Rarible trades not in nft.trades (sample)-- - by_collection: Missing trades grouped by VeeFriends collection-- ============================================================================-- VEEFRIENDS CONTRACTS-- ============================================================================WITH vf_contracts AS (SELECT contract_address, blockchain, collection_name FROM (VALUES(0xA3AEE8BCE55BEEA1951EF834B99F3AC60D1ABEEB, 'ethereum', 'Series 1'),(0x9378368ba6b85c1fba5b131b530f5f5bedf21a18, 'ethereum', 'Series 2'),(0x65FFF8F5F6A9922B6DC13FE06345A0FE46DD413D, 'ethereum', 'Iconics'),(0x6bb33db533dcc47d26570408559228d180bcd67c, 'base', 'Book Games')) AS t(contract_address, blockchain, collection_name)),-- ============================================================================-- RARIBLE EXCHANGE CONTRACTS-- ============================================================================rarible_contracts_eth AS (SELECT contract_address, contract_name FROM (VALUES(0x9757F2d2b135150BBeb65308D4a91804107cd8D6, 'ExchangeV2'),(0x6C65a3C3AA67b126e43F86DA85775E0F5e9743F7, 'ExchangeMetaV2'),(0x9BDB46adb3972f9a5e2eadCcd009f0bf3e386845, 'RaribleExchangeWrapper')) AS t(contract_address, contract_name)),rarible_contracts_base AS (SELECT contract_address, contract_name FROM (VALUES(0x6C65a3C3AA67b126e43F86DA85775E0F5e9743F7, 'ExchangeMetaV2'),(0x6563a331A411829918025D8a7e1d348f8b250906, 'RaribleExchangeWrapper')) AS t(contract_address, contract_name)),-- ============================================================================-- RARIBLE MATCH EVENTS - ETHEREUM-- ExchangeV2/ExchangeMetaV2 use "Match" event for trades-- RaribleExchangeWrapper may use different events-- ============================================================================rarible_events_eth AS (SELECTl.block_time,