maybeyonashop_usage_daily
Updated 2022-06-17
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_bridge_txs as (
select
date(block_timestamp) as date,
case contract_address
when lower('0x22b1cbb8d98a01a3b71d034bb899775a76eb1cc2') then '0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0'
when lower('0xb98454270065A31D71Bf635F6F7Ee6A518dFb849') then '0x2260fac5e5542a773aa44fbcfedf7c193bc2c599'
when lower('0xb8901acB165ed027E32754E0FFe830802919727f') then '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
when lower('0x3d4Cc8A61c7528Fd86C55cfe061a78dCBA48EDd1') then '0x6b175474e89094c44da98b954eedeac495271d0f'
when lower('0x3E4a3a4796d16c0Cd582C382691998f7c06420B6') then '0xdac17f958d2ee523a2206206994597c13d831ec7'
when lower('0x3666f603Cc164936C1b87e207F36BEBa4AC5f18a') then '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48'
end as token_address,
case contract_address
when lower('0x22b1cbb8d98a01a3b71d034bb899775a76eb1cc2') then 'matic'
when lower('0xb98454270065A31D71Bf635F6F7Ee6A518dFb849') then 'wbtc'
when lower('0xb8901acB165ed027E32754E0FFe830802919727f') then 'weth'
when lower('0x3d4Cc8A61c7528Fd86C55cfe061a78dCBA48EDd1') then 'dai'
when lower('0x3E4a3a4796d16c0Cd582C382691998f7c06420B6') then 'usdt'
when lower('0x3666f603Cc164936C1b87e207F36BEBa4AC5f18a') then 'usdc'
end as token,
case event_inputs:chainId::string
when 10 then 'optimism'
when 100 then 'gnosis'
when 137 then 'polygon'
when 42161 then 'arbitrum'
end as chain,
count(distinct tx_hash) as bridges,
sum(event_inputs:amount) as asset_vol
from ethereum_core.fact_event_logs
where block_timestamp >= '2022-01-01'
and contract_address in (
lower('0x22b1cbb8d98a01a3b71d034bb899775a76eb1cc2'), -- matic
lower('0xb98454270065A31D71Bf635F6F7Ee6A518dFb849'), -- wbtc
lower('0xb8901acB165ed027E32754E0FFe830802919727f'), -- weth
lower('0x3d4Cc8A61c7528Fd86C55cfe061a78dCBA48EDd1'), -- dai
lower('0x3E4a3a4796d16c0Cd582C382691998f7c06420B6'), -- usdt
Run a query to Download Data