purifworking-salmon
Updated 2024-12-28
99
1
2
3
4
5
6
7
8
9
10
›
⌄
select sum(amount) as revenue
from (
select concat('0x',substr(TOPICS[2], 27,64)) as recipient, (utils.udf_hex_to_int(substr(data,3,66))::int)/1e18 as amount from berachain.testnet.fact_event_logs
where topics[0]='0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
and contract_address=lower('0x7507c1dc16935B82698e4C63f2746A2fCf994dF8')
and concat('0x',substr(TOPICS[2], 27,64)) in (lower('0x19858F6c29eA886853dc97D1a68ABf8d4Cb07712'),lower('0x90bd6df5E84b0a97387Edf5345d1784988084d89'))
and concat('0x',substr(TOPICS[1], 27,64)) in (lower('0x5aD441790c3114e0AB27816abdB0c9693cd96399'),lower('0xb488543f69a9462F62b2E944C81CFd16Cf0237c0'))
)
QueryRunArchived: QueryRun has been archived