rezarwzexplorer stake
Updated 2023-09-16
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 base as (
SELECT
'stake' as action,
CASE
when fa.mint = 'HxhWkVpk5NS4Ltg5nij2G671CKXFRKPK8vy271Ub4uEK' Then 'HXRO'
when fa.mint = 'CPwspzHc4bKtBQGNRhpRG9v3qRiPLWP28GrfZepwmBSz' Then 'esHXRO'
when fa.mint = '36VFoo1rQ7a1w45jBwHmr2sodnUUhRtL7K6fsx2tuMwb' Then 'L-HXRO'
end as token_name,
amount as amount
FROM
solana.core.fact_transfers fa
inner join solana.core.fact_events ev on ev.tx_id = fa.tx_id
and ev.block_timestamp = fa.block_timestamp
and ev.block_id = fa.block_id
and ev.index = round(fa.index)
WHERE
fa.MINT in(
'CPwspzHc4bKtBQGNRhpRG9v3qRiPLWP28GrfZepwmBSz',
'36VFoo1rQ7a1w45jBwHmr2sodnUUhRtL7K6fsx2tuMwb',
'HxhWkVpk5NS4Ltg5nij2G671CKXFRKPK8vy271Ub4uEK'
)
and ev.PROGRAM_ID = '2jmux3fWV5zHirkEZCoSMEgTgdYZqkE9Qx2oQnxoHRgA'
and tx_to = 'BEYJqFx5G6whGmpJ4Ar9yyKfnDVBTcGWDSnJPPmsPWh6'
and tx_from = '{{user_Address}}'
AND fa.block_timestamp::date>='2022-10-01'
UNION
all
SELECT
'unstake' as action,
CASE
when fa.mint = 'HxhWkVpk5NS4Ltg5nij2G671CKXFRKPK8vy271Ub4uEK' Then 'HXRO'
when fa.mint = '36VFoo1rQ7a1w45jBwHmr2sodnUUhRtL7K6fsx2tuMwb' Then 'L-HXRO'
end as token_name,
-amount as amount
FROM
solana.core.fact_transfers fa
Run a query to Download Data