Query editor
with velo_bribe as (select 'Velodrome Bribe' as project, block_time, block_date, bytearray_to_uint256(bytearray_substring(data,1,32)) * 1.00 / pow(10,18) as amt, bytearray_to_uint256(topic3) as epoch, tx_hashfrom optimism.logs logwhere block_time > cast('2024-05-01' as timestamp)and log.contract_address = 0xc0D4c43B7Db2932AF068022816A66F09EB12E905 -- velo bribeand topic0 = 0x52977ea98a2220a03ee9ba5cb003ada08d394ea10155483c95dc2dc77a7eb24b --NotifyReward evtand bytearray_ltrim(log.topic1) in (0x9644a6920bd0a1923c2c6c1dddf691b7a42e8a65, 0xAE870C725ea01C206FF828B81Eee2553Cd43C119) -- TC addressand bytearray_ltrim(log.topic2) = 0x4200000000000000000000000000000000000042 -- OP Token), all_emissions as (select amt, project from velo_bribe)select 200000 as total, sum(amt) as distributed, 200000 - sum(amt) as remaining, project from all_emissionsgroup by project