SalehT-J-small fish have taken
Updated 2022-12-18Copy Reference Fork
999
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
›
⌄
--***********************************************Check Balace************************************************************
with lst_single_send as (
select
TX_HASH
,try_parse_json( TX:actions[0]) as a
,split_part(a,'{"',2) as task
,split_part(a,':',2) as check1
, split_part(a,':',3) as amount_char
,to_number(regexp_replace(amount_char , '[^0-9]'))/1e24 as amount
-- ,TX_RECEIVER as receiver
,TX_SIGNER as sender
from near.core.fact_transactions
where
task='Transfer":'
and check1='{"deposit"'
and block_timestamp::date >=CURRENT_DATE-90
)
, lst_tx_send_multi as (
select
tx_signer
,tx_hash
from near.core.fact_transactions
where TX_RECEIVER='multisender.app.near'
and block_timestamp::date >=CURRENT_DATE-90
)
, lst_send_multi as (
select
tx_signer as sender
,args
,f.value:amount/1e24 as amount
from near.core.fact_actions_events_function_call fc
join lst_tx_send_multi on lst_tx_send_multi.tx_hash = fc.tx_hash
,table(flatten(parse_json(args),path=>'accounts',OUTER => false,RECURSIVE => false)) f
where METHOD_NAME='multisend_from_balance_unsafe'
and block_timestamp::date >=CURRENT_DATE-90
Run a query to Download Data