purifplugins
Updated 2024-08-12
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with data as (
SELECT name , address
FROM (
VALUES
('Infrared HONEY-WETH','0x170d64fb2fcd6bb6639ed0d37b981f6af0e26c3a'),
('Infrared bHONEY','0x7ab142c0fd1af1ee0c52e80b251b3cf153ad4033'),
('Kodiak HONEY-BERA','0xfe12b5f5adb8e20f7c43a6014844479e7dc8dc49'),
('Infrared HONEY-BERA','0x120e4b564d608ab8ea110df0a1429998cca580d0'),
('BEX HONEY-BERA','0x37e888f8a28bf1da9761bbdd914fa4280da434a8'),
('BERPS bHONEY','0x9d7a7198ecfe07414c5e9b3e233878fcc30b9048'),
('Infrared HONEY-BTC','0xb5469370776d165e82d726f36e3e0933c307d4c4'),
('Infrared HONEY-USDC','0x017a47e19e02d4aaf88738b8c78de2a48904b2e1'),
('Kodiak HONEY-USDC','0xb3d10c15360e444abb2673d772d6f2ee32aaab34'),
('Trifecta YEET-BERA','0x80d7759fa55f6a1f661d5fcbb3bc5164dc63eb4d'),
('Infrared iBGT','0xe9ee66a91f540a6e5297b1b1780061278ab1ac78')
) AS X(name,address)
),
plugins as (select concat('0x',substr(TOPICS[1], 27,64)) as plugin, concat('0x',substr(TOPICS[2], 27,64)) as gauge from berachain.testnet.fact_event_logs
where ORIGIN_TO_ADDRESS=lower('0x580ABF764405aA82dC96788b356435474c5956A7')
and ORIGIN_FUNCTION_SIGNATURE='0xd8867fc8'
and topics[0]='0xb920b936f556d443772609e0cc06a72c3bb67fc606de10dcdd51323d1ddbc7fc'),
deposits as (
select date_trunc('day',block_timestamp) as day, count(distinct tx_hash) as deposits_txs from berachain.testnet.fact_event_logs
where ORIGIN_TO_ADDRESS in (select plugin from plugins)
and ORIGIN_FUNCTION_SIGNATURE='0x2f4f21e2'
group by 1
),
withdraws as (
select date_trunc('day',block_timestamp) as day, count(distinct tx_hash) as withdraws_tx from berachain.testnet.fact_event_logs
where ORIGIN_TO_ADDRESS in (select plugin from plugins)
and ORIGIN_FUNCTION_SIGNATURE='0x205c2878'
group by 1
),
farm_reward_claim as (
select date_trunc('day',block_timestamp) as day,count(distinct tx_hash) as farm_claim from berachain.testnet.fact_event_logs
where ORIGIN_TO_ADDRESS in (select gauge from plugins)
QueryRunArchived: QueryRun has been archived