Sbhn_NPM2 copy
Updated 2023-11-06
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
›
⌄
-- forked from M2 @ https://flipsidecrypto.xyz/edit/queries/16216ae6-0004-4e0d-9e30-c1a77b6ef3a5
select
date_trunc('month', block_timestamp) as date,
case
when left(instruction:data, 10) in (
'2DvUoCCiuh',
'nYzkW8xJGz',
'BFKkpiWdoe',
'5U68bmgYxR'
) then 'PerpPlaceOrder/PerpCancelOrder'
when left(instruction:data, 10) = '5hLyoWnwMR' then 'PerpUpdateFunding'
when left(instruction:data, 10) = 'LYzV1JVqtm' then 'PerpConsumeEvents'
when left(instruction:data, 10) = 'P13hrgiKkt' then 'TokenUpdateIndexAndRate'
when left(instruction:data, 10) = 'i3XwBMcmiF' then 'PerpSettlePNL'
when left(instruction:data, 10) in ('3QNQ3isqTC', 'FFtxkQuhn9') then 'Serum3PlaceOrder/Serum3SettleFunds'
when left(instruction:data, 10) = '27KAVDDSHc' then 'TokenDeposit'
when left(instruction:data, 10) in ('3GuGyuqM7P', 'qWEJu44RSe') then 'FlashLoan'
when left(instruction:data, 10) = 'bp7UHQ2zfX' then 'Serum3CloseOpenOrders'
when left(instruction:data, 10) = 'NFC7Q32hkJ' then 'PerpCancelOrder'
when left(instruction:data, 10) = '2Q4PAEyuQE' then 'PerpLiqForceCancelOrders'
when left(instruction:data, 10) = 'st22nBhZ1x' then 'Serum3CancelOrder/Serum3SettleFunds'
when left(instruction:data, 10) = '5L8e3F26vZ' then 'Serum3CancelOrder/Serum3SettleFunds/Serum3PlaceOrder'
when left(instruction:data, 10) = '4qvHshjT49' then 'PerpPlaceOrderPegged'
when left(instruction:data, 10) = 'QNty8x2YoT' then 'Serum3LiqForceCancelOrders'
else 'Other'
end as events,
count(DISTINCT tx_id) as txs
from
solana.core.fact_events
where
program_id = '4MangoMjqJ2firMokCjjGgoK8d4MXcrgL7XJaL3w6fVg'
and block_timestamp::date > '2022-12-08'
and succeeded
group by
1,
Run a query to Download Data