winnie-fsHelium - [gov] locked HNT copy
Updated 2023-05-23
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 marqu / Helium - [gov] locked HNT @ https://flipsidecrypto.xyz/marqu/q/2023-04-03-12-38-pm-_ZuAwu
with
position_inits as (
select
instruction :accounts[4] ::string as position,
instruction :accounts[5] ::string as mint,
instruction :accounts[10] ::string as vault
from solana.core.fact_events
where succeeded
and program_id = 'hvsrNC3NKbcryqDs2DocYHZ9yPKEVzdSjQG6RVtK1s8' -- voter stake registry
and instruction :accounts[1] = 'HBgj24hUAAQs5ghzrrrM7T4WgZ7CQm3JiSUm3sUhTwGb' -- Helium DAO hVSR
and left(instruction :data, 10) = 'MxqkiN3fbo' -- InitializePositionV0
and block_timestamp > '2023-04-18'
union
select
f.value :accounts[4] ::string as position,
f.value :accounts[5] ::string as mint,
f.value :accounts[10] ::string as vault
from solana.core.fact_events
inner join lateral flatten (input => inner_instruction :instructions) f
where succeeded
and f.value :programId = 'hvsrNC3NKbcryqDs2DocYHZ9yPKEVzdSjQG6RVtK1s8'
and f.value :accounts[1] = 'HBgj24hUAAQs5ghzrrrM7T4WgZ7CQm3JiSUm3sUhTwGb'
and left(f.value :data, 10) = 'MxqkiN3fbo'
and block_timestamp > '2023-04-18'
),
Run a query to Download Data