Kruys-CollinsAlmost there YEARN ARB
Updated 2024-11-11
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
›
⌄
-- forked from Almost there copy @ https://flipsidecrypto.xyz/studio/queries/ce70da06-29ec-4d2d-a8fc-8d426caedfd8
WITH
base AS (
SELECT
block_timestamp,
tx_hash,
contract_address,
decoded_log,
event_name,
event_index,
l.address_name,
l.address
FROM
arbitrum.core.fact_decoded_event_logs ct
JOIN arbitrum.core.dim_labels l ON ct.contract_address = l.address
WHERE contract_address IN (
SELECT address
FROM arbitrum.core.dim_labels
WHERE PROJECT_NAME = 'yearn'
AND LABEL_SUBTYPE = 'vault'
)
)
SELECT DISTINCT event_name From base
-- AND event_name IN ('Transfer', 'Withdraw', 'Deposit')
),
TA AS
(
SELECT
ct.block_timestamp as date,
ct.tx_hash,
decoded_log:from::string as frm_address,
decoded_log:to::string as t_address,
QueryRunArchived: QueryRun has been archived