Query editor
-- ============================================================-- TermiX AACP — 15 Active Addresses (DAU 24h / MAU 30d)-- Single row, one column per counter. Dashboard usage: add this query-- once, then create one "Counter" visualization per column.---- Active address = distinct wallet that sent a transaction which emitted-- at least one event from a TermiX contract (escrow / campaign vault /-- staking / reputation) on BNB Chain (56) or Base (8453), in a rolling-- window ending now (24h = DAU, 30d = MAU).-- * Wallet = tx_from. If the tx went through an ERC-4337 EntryPoint-- (smart wallet), the bundler is replaced by the smart-account sender-- from the UserOperationEvent that follows our log in the same tx.-- * total_* counts an address active on both chains once.-- * Includes txs sent by TermiX's own evaluator/arbitrator/provider-- bots, if any; exclude their addresses in `excluded` below.-- ============================================================WITH contracts (chain, address) AS (VALUES('bnb', 0x6a52ba4c84b348faeae13ddc7a97b4f6af23913c), -- escrow USDC('bnb', 0xce02f987d8b8af694e13c8a843db9c77cabf544c), -- escrow USDT('bnb', 0x5bae7834b32a4b357f65dd20248068993466d294), -- vault USDC('bnb', 0x16261f2bcbe8ee47065c5ecb4be32c1571289809), -- vault USDT('bnb', 0x0bd066f5113e6b8336b06f8aa3ef90d37f7e65fc), -- staking USDC('bnb', 0x1dcaffb7275fa2650d480a4f939a0c0d5874750b), -- staking USDT('bnb', 0xff3f7038c4919a420b30d7b3533cb386d5898189), -- reputation('base', 0xc3d963e0856a2c2d6f75c83c1355f680fd8f9f10), -- escrow USDC('base', 0xff3f7038c4919a420b30d7b3533cb386d5898189), -- escrow USDT('base', 0x97d14d248d956148a34e4fe636cddba8bb80e551), -- vault USDC('base', 0x911d5c2a20dda9be9dae53fe3ad9183e5b583d7f), -- vault USDT('base', 0x8320448539dcafde9c26b4f538504bb180de55b3), -- staking USDC('base', 0xeef5672208ece3ba6b32f1fec3c3802a6d2dba8a), -- staking USDT('base', 0xc66d8d8877989bb48d63dc6df15e79635e490b85) -- reputation),-- Addresses to leave out (e.g. TermiX-operated bots). Placeholder row never matches.excluded (address) AS (VALUES (0x0000000000000000000000000000000000000000)),entrypoints (address) AS (VALUES(0x5ff137d4b0fdcd49dca30c7cf57e578a026d2789), -- ERC-4337 EntryPoint v0.6(0x0000000071727de22e5e9d8baf0edac6f37da032), -- v0.7(0x4337084d9e255ff0702461cf8895ce9e3b5ff108) -- v0.8),our_logs AS (SELECT 'bnb' AS chain, l.block_time, l.tx_hash, l.index AS log_index, l.tx_from, l.tx_toFROM bnb.logs lJOIN contracts c ON c.chain = 'bnb' AND c.address = l.contract_addressWHERE l.block_time >= NOW() - INTERVAL '30' DAYUNION ALLSELECT 'base', l.block_time, l.tx_hash, l.index, l.tx_from, l.tx_toFROM base.logs lJOIN contracts c ON c.chain = 'base' AND c.address = l.contract_addressWHERE l.block_time >= NOW() - INTERVAL '30' DAY),-- UserOperationEvent(bytes32 indexed userOpHash, address indexed sender, address indexed paymaster, ...)userops AS (SELECT 'bnb' AS chain, tx_hash, index AS log_index, bytearray_substring(topic2, 13, 20) AS senderFROM bnb.logsWHERE block_time >= NOW() - INTERVAL '30' DAYAND topic0 = 0x49628fd1471006c1482da88028e9ce4dbb080b815c9b0344d39e5a8e6ec1419f