jgvf2024-02-23 01:05 PM
Updated 2024-02-23
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
›
⌄
-- forked from d3b72d1d-b2b4-4c2d-b7be-f587be074356
with multi_snd as (
select
tx_hash,
logs,
block_timestamp,
split_part(value,'Sending ',2) a,
try_to_numeric(split_part(a,' yNEAR',1))/1e24 as amount,
split_part(a,'@',2)::string as receiver
from near.core.fact_receipts, lateral flatten(input => logs) b
where RECEIVER_ID = 'multisender.app.near'
and STATUS_VALUE ilike '%SuccessValue%'
and logs[0] is not NULL
)
, multi_send as (
SELECT
a.tx_hash,
block_timestamp,
tx_signer as sender,
receiver,
amount
FROM multi_snd a join near.core.fact_transactions b USING(tx_hash)
)
,multi_receive as (
select
tx_hash,
block_timestamp,
split_part(value,'Sending ',2) a,
split_part(a,'@',2) as receiver,
try_to_numeric(split_part(a,' yNEAR',1))/1e24 as amount
from near.core.fact_receipts, lateral flatten(input => logs) b
where RECEIVER_ID = 'multisender.app.near'
and STATUS_VALUE ilike '%SuccessValue%'
and logs[0] is not NULL
QueryRunArchived: QueryRun has been archived