HosseinNear Native Transfer
Updated 2024-03-07
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 token_prices as (
select
timestamp :: date as date,
token_contract as token_contract,
avg(price_usd) as price_usd
from
near.price.fact_prices
where
token_contract = 'wrap.near'
group by
1,
2
), main as (
select
block_id,
block_timestamp,
tx_hash,
signer_id as from_address,
receiver_id as to_address,
iff(
regexp_like(action_data:deposit, '^[0-9]+$'), --numeric validation (there are some exceptions that needs to be ignored)
action_data:deposit,
null
) as amount_unadjusted
from
near.core.fact_actions_events
where
action_name = 'Transfer'
and amount_unadjusted > 0
union all
select
block_id,
block_timestamp,
tx_hash,
QueryRunArchived: QueryRun has been archived