KaskoazulPOOLS-TRANSFERS DAI
Updated 2022-11-28
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 POOLS as(
select block_timestamp::date as fecha,
tx_id,
case event_inputs:pool
when '102' then 'Fuse-18 DAI'
when '101' then 'Fuse-7 DAI'
when '100' then 'Fuse-6 DAI'
when '2' then 'AAVE'
when '1' then 'Compound'
else 'you lost money'
end as pool_name
from ethereum.events_emitted
where tx_to_address = '0xafd2aade64e6ea690173f6de59fc09f5c9190d74' --DAI VAULT Controller
and tx_from_address = '0x1e87ebbe2e02037dd4697d443c5507ff97959c99'
and event_name = 'PoolAllocation'
),
TRANSFERS as (
select block_timestamp::date as fecha,
tx_id,
event_inputs:to as event_to,
event_inputs:from as event_from,
event_inputs:value/pow(10,18) as amount,
contract_name as currency
from ethereum.events_emitted
where tx_to_address = '0xafd2aade64e6ea690173f6de59fc09f5c9190d74' --DAI VAULT Controller
and tx_from_address = '0x1e87ebbe2e02037dd4697d443c5507ff97959c99'
and event_name = 'Transfer'
and contract_address = '0x6b175474e89094c44da98b954eedeac495271d0f'
)
select t.fecha,
t.tx_id,
t.event_from,
t.event_to,
Run a query to Download Data