bachihop users
Updated 2022-06-22Copy Reference Fork
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'
)
/*select * from ethereum.core.ez_token_transfers where to_address in (
'0x40ec5b33f54e0e8a33a975908c5ba1c14e5bbbdf',
'0x99c9fc46f92e8a1c0dec1b1747d010903e884be1',
'0x4dbd4fc535ac27206064b68ffcf827b0a60bab3f')
and contract_address in (
select address from hop_bridges
) and block_timestamp >= current_date - 30*/
SELECT
date(tx.block_timestamp) as date,
round(sum(tx.amount),2) as volume,
count(DISTINCT tx.from_address) as wallets,
/*case when f.EVENT_INPUTS:chainId = '1' then 'Optimism'
when f.EVENT_INPUTS:chainId = '42161' then 'Arbitrum'
when f.EVENT_INPUTS:chainId = '137' then 'Polygon'
when f.EVENT_INPUTS:chainId = '137' then 'Polygon'
end as chain,*/
tx.symbol as asset
from ethereum_core.ez_token_transfers tx
join ethereum.core.fact_event_logs f on f.tx_hash = tx.tx_hash and f.EVENT_NAME = 'TransferSentToL2' --and f.EVENT_INPUTS:chainId = '137'
where date(tx.block_timestamp) >= current_date - 180
and lower(tx.to_address) in (
select address from hop_bridges
Run a query to Download Data