KaskoazulRef_finance staked
Updated 2022-08-10
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
›
⌄
with raw_stake as (
select t.tx_hash,
t.block_timestamp,
t.tx_signer,
try_parse_json(e.args) as p_args,
p_args:amount / pow (10,18) as amount,
p_args:receiver_id as receiver
from near.core.fact_transactions t
left join near.core.fact_actions_events_function_call e
on t.tx_hash = e.tx_hash
where t.tx_receiver = 'token.v2.ref-finance.near'
and e.method_name = 'ft_transfer_call'
and receiver = 'xtoken.ref-finance.near'
),
raw_unstake as (
select t.tx_hash,
t.block_timestamp,
t.tx_signer,
try_parse_json(e.args) as p_args,
p_args:amount / pow (10,18) as amount,
p_args:receiver_id as receiver
from near.core.fact_transactions t
left join near.core.fact_actions_events_function_call e
on t.tx_hash = e.tx_hash
where t.tx_receiver = 'xtoken.ref-finance.near'
and e.method_name = 'unstake'
)
select sum (amount) as stake, count (distinct tx_signer) as users from raw_stake
Run a query to Download Data