Query editor
-- 【查询 1】明细列表:每一笔 mint 的时间、接收地址、数量selectblock_time,block_number,tx_hash,bytearray_substring(topic2, 13, 20) as to_address, -- 接收地址(去掉前12字节padding)bytearray_to_uint256(data) / 1e18 as amount -- 假设18位小数,如实际不同请调整除数from bnb.logswhere contract_address = 0x7c8d5502b544ddaf8852fc46d1174e34876d545cand topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef -- Transfer 签名and topic1 = 0x0000000000000000000000000000000000000000000000000000000000000000 -- from = 0x0order by block_time asc-- 【查询 2】按天汇总每日 mint 总量(用于画图/看趋势)-- select-- date_trunc('day', block_time) as mint_date,-- count(*) as mint_count,-- sum(bytearray_to_uint256(data) / 1e18) as total_minted-- from bnb.logs-- where contract_address = 0x7c8d5502b544ddaf8852fc46d1174e34876d545c-- and topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef-- and topic1 = 0x0000000000000000000000000000000000000000000000000000000000000000-- group by 1-- order by 1;-- 【查询 3】全部历史 mint 累计总量(单个数字)-- select-- sum(bytearray_to_uint256(data) / 1e18) as total_minted_all_time,-- count(*) as total_mint_events-- from bnb.logs-- where contract_address = 0x7c8d5502b544ddaf8852fc46d1174e34876d545c-- and topic0 = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef-- and topic1 = 0x0000000000000000000000000000000000000000000000000000000000000000;