kakamorascratch pad
Updated 2022-06-20
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 hop_bridges as (
select
address,
address_name
from ethereum.core.DIM_LABELS
where LABEL = 'hop protocol'
and address_name like '%bridge%'
UNION
select
lower('0x3666f603cc164936c1b87e207f36beba4ac5f18a'),
'hop protocol: usdc bridge'
),
transfers as (
SELECT
tx_hash,
block_timestamp,
to_date(block_timestamp) as date,
origin_from_address as wallet,
symbol as token,
amount as token_amount,
amount_usd as token_amount_usd
FROM flipside_prod_db.ethereum_core.ez_token_transfers
INNER JOIN hop_bridges ON TO_ADDRESS = address and address_name not ilike '%eth%'
UNION
SELECT
tx_hash,
block_timestamp,
to_date(block_timestamp) as date,
origin_from_address as wallet,
'ETH' as token,
amount as token_amount,
amount_usd as token_amount_usd
FROM ethereum.core.ez_eth_transfers
INNER JOIN hop_bridges ON ORIGIN_TO_ADDRESS = address and address_name like '%eth%'
),
Run a query to Download Data