Afonso_DiazTotal
Updated 2024-12-08
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
›
⌄
with
pricet as (
select
hour::date as date,
decimals,
token_address,
symbol,
avg(price) as price_usd
from
near.price.ez_prices_hourly
group by 1, 2, 3, 4
),
supply as (
select
tx_hash,
block_timestamp,
args:amount as amount_unadj,
signer_id as user,
predecessor_id as token_address,
'Supply' as event_name
from
near.core.fact_actions_events_function_call
join
lateral flatten (input => logs) f
where
receipt_succeeded
and receiver_id = 'v1.nearlend-official.near'
and method_name = 'ft_on_transfer'
and try_parse_json(replace(f.value, 'EVENT_JSON:', '')):event = 'deposit'
),
borrow as (
select
tx_hash,
QueryRunArchived: QueryRun has been archived