Query editor
-- Hobba activity (deposits/withdraws/borrows/repays) filtered to one origin.-- Origin mapping: UserInitialized events carry `origin` (u8 at byte 73);-- a wallet's origin is recorded at its first position init. Activity events-- (UserDeposited/Withdrew/Borrowed/Repaid) carry no origin, so we join-- through the wallet set. Origin 1 = Perena on mainnet.---- Event layouts (1-indexed):-- all: [1..8] disc, [9..40] user, [41..72] collateral_mint-- activity: [73..80] amount (u64 LE; collateral base units for-- deposit/withdraw, micro-USDC for borrow/repay)-- UserInitialized:[73] origin (u8)WITH hobba_instructions AS (SELECT DISTINCT block_date, block_time, tx_id, log_messagesFROM solana.instruction_callsWHERE block_date >= DATE '2026-04-14'AND executing_account = 'Hobbakk1LmW2DhE4nAKnCeU1iK7V7pKHTq3ihaE2i8qG'),discs AS (SELECTbytearray_substring(sha256(to_utf8('event:UserInitialized')), 1, 8) AS d_init,bytearray_substring(sha256(to_utf8('event:UserDeposited')), 1, 8) AS d_deposit,bytearray_substring(sha256(to_utf8('event:UserWithdrew')), 1, 8) AS d_withdraw,bytearray_substring(sha256(to_utf8('event:UserBorrowed')), 1, 8) AS d_borrow,bytearray_substring(sha256(to_utf8('event:UserRepaid')), 1, 8) AS d_repay),program_data_lines AS (SELECT DISTINCTblock_date,block_time,tx_id,try(from_base64(regexp_extract(log_msg, '^Program data: ([A-Za-z0-9+/=]+)', 1))) AS event_bytesFROM hobba_instructionsCROSS JOIN UNNEST(log_messages) AS u(log_msg)WHERE log_msg LIKE 'Program data: %'),-- Wallets whose FIRST position was created with the target origin.origin_wallets AS (SELECT DISTINCT to_base58(bytearray_substring(p.event_bytes, 9, 32)) AS user_addrFROM program_data_lines pCROSS JOIN discs dWHERE p.event_bytes IS NOT NULLAND bytearray_substring(p.event_bytes, 1, 8) = d.d_initAND bytearray_to_bigint(bytearray_substring(p.event_bytes, 73, 1)) = 1 -- origin: 1 = Perena),events AS (SELECTp.block_date,p.block_time,p.tx_id,CASEWHEN bytearray_substring(p.event_bytes, 1, 8) = d.d_deposit THEN 'deposit'WHEN bytearray_substring(p.event_bytes, 1, 8) = d.d_withdraw THEN 'withdraw'WHEN bytearray_substring(p.event_bytes, 1, 8) = d.d_borrow THEN 'borrow'WHEN bytearray_substring(p.event_bytes, 1, 8) = d.d_repay THEN 'repay'END AS event_type,