Query editor
-- Parameters:-- {{RUN_DATE}} : DATE stamp for the output partition (data itself is always "now")-- {{BLOCKCHAIN}} : one of ('arbitrum','avalanche_c','base','ethereum','optimism','polygon','linea','worldchain')-- v2 pipeline: current-balances snapshot from balances_{{BLOCKCHAIN}}.latest-- (Dune premium dataset, refreshed hourly, balance_usd priced at refresh time).-- Replaces the fact-table reconstruction + prices join done by the v1-- export for the customer-facing appkit_balances RDS table.-- EVM only: balances_<chain> has no solana coverage — solana stays on v1.SELECTb.blockchain,b.address,b.token_symbol,b.token_address,b.balance,b.balance_usd,CAST(b.updated_at AS VARCHAR) AS balance_updated_at,'{{RUN_DATE}}' AS run_dateFROM balances_{{BLOCKCHAIN}}.latest bINNER JOIN dune.walletconnect.appkit_addresses aON b.address = TRY(FROM_HEX(a.address))WHERE b.token_standard IN ('erc20', 'native')-- dust filter; matches the wc_api__appkit_balances_with_tokens contract-- (balance_usd > 1) and doubles as the trusted-token filter: Dune leaves-- balance_usd NULL for unpriced/spam tokens.AND b.balance_usd > 1