Query editor
-- stonkbox on Base, contract 0x515a693fc474b2344a9a07f4962ef33ffc253447, from block 51277954-- BoxOpened data words: 1 roll, 2 prizeUsd, 3 token (address in bytes 77..96), 4 amountselectcase 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 as token,count(*) as wins,sum(bytearray_to_uint256(bytearray_substring(data, 33, 32))) / 1e6 as paid_usdc,sum(bytearray_to_uint256(bytearray_substring(data, 97, 32))) / 1e8 as token_amountfrom base.logswhere contract_address = 0x515a693fc474b2344a9a07f4962ef33ffc253447 and topic0 = 0xa0cb6ac2b5758d2e75f6f3fb20c12c440bc095a6ed084f08bc2633b3593b8501 and block_number >= 51277954group by 1order by 3 desc