freeman_7volume
Updated 2024-09-30
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 relevant_events AS (
SELECT
distinct tx_hash as tx_hash,
block_timestamp,
origin_from_address
FROM arbitrum.core.ez_decoded_event_logs
WHERE origin_to_address = LOWER('0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE')
OR decoded_log:bridgeData:integrator = 'jumper.exchange'
OR decoded_log:integrator = 'jumper.exchange'
AND event_name IN ('LiFiGenericSwapCompleted', 'LiFiTransferStarted', 'LiFiSwappedGeneric')
),
volume_metric AS (
select
date_time,
sum(amount_usd) as volume
from (
SELECT
distinct tx_hash as hash,
DATE(DATE_TRUNC('{{Period}}', block_timestamp)) AS date_time,
amount_usd
FROM arbitrum.core.ez_token_transfers
where origin_to_address = LOWER('0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE')
and ORIGIN_FUNCTION_SIGNATURE in ('0x14d53077','0x4630a0d8','0x733214a3')
UNION ALL
SELECT
distinct tx_hash as hash,
DATE(DATE_TRUNC('{{Period}}', block_timestamp)) AS date_time,
amount_usd
FROM arbitrum.core.ez_native_transfers
where origin_to_address = LOWER('0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE')
and ORIGIN_FUNCTION_SIGNATURE in ('0x14d53077','0x4630a0d8','0x733214a3')
) transfer
join relevant_events re ON re.tx_hash = transfer.hash
group by date_time
QueryRunArchived: QueryRun has been archived