Query editor
-- stonkbox on Base, contract 0x515a693fc474b2344a9a07f4962ef33ffc253447, from block 51277954-- The feed: purchases and payouts, newest first. BoxOpened data words: 1 roll, 2 prizeUsd, 3 token (bytes 77..96), 4 amountselect block_time, 'buy' as kind, bytearray_substring(topic1, 13, 20) as wallet,bytearray_to_uint256(bytearray_substring(data, 1, 32)) as qty,cast(null as double) as prize_usdc, cast(null as varchar) as token, tx_hashfrom base.logs where contract_address = 0x515a693fc474b2344a9a07f4962ef33ffc253447 and topic0 = 0x793212bc54a93b64ad49d45a9d02304eb16c908134ea23af900d90d8bffb8783 and block_number >= 51277954union allselect block_time, 'win', bytearray_substring(topic1, 13, 20),cast(null as uint256), bytearray_to_uint256(bytearray_substring(data, 33, 32)) / 1e6,case bytearray_substring(data, 77, 20)when 0xb200000000000000000000c2e324d24d7eecd1fb then 'AAPLc'when 0xb200000000000000000000d9192b6b456483c2e8 then 'AMZNc'when 0xb2000000000000000000002d0ba3164cc74f58b7 then 'GOOGLc'when 0xb2000000000000000000008bc8786b856e61707c then 'METAc'when 0xb200000000000000000000ab99cfa739e253872b then 'MSFTc'when 0xb2000000000000000000004884b426556b92883d then 'MSTRc'when 0xb20000000000000000000078ee7ce2fe4908108c then 'NVDAc'when 0xb200000000000000000000397293cb8cda9a10c5 then 'SNDKc'when 0xb2000000000000000000007b9fcbd005511acbd5 then 'SPCXc'when 0xb2000000000000000000001e800a7f5189430cd0 then 'TSLAc'when 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 then 'USDC'else cast(bytearray_substring(data, 77, 20) as varchar) end, tx_hashfrom base.logs where contract_address = 0x515a693fc474b2344a9a07f4962ef33ffc253447 and topic0 = 0xa0cb6ac2b5758d2e75f6f3fb20c12c440bc095a6ed084f08bc2633b3593b8501 and block_number >= 51277954order by 1 desclimit 100