Pine Analyticstasteless-amethyst copy copy
Updated 2024-11-21
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 tab1 as (
SELECT
taker as wallet,
tx_hash,
fee_usd,
usd_amount
from (
SELECT
tx_hash,
block_timestamp,
decoded_log:taker as taker,
decoded_log:maker as maker,
decoded_log:fee / power(10, 18) as fee_usd,
case when decoded_log:takerAssetId = 0 then decoded_log:takerAmountFilled
when decoded_log:makerAssetId = 0 then decoded_log:makerAmountFilled
end / power(10, 18) as USD_amount
FROM blast.core.fact_decoded_event_logs
where contract_address in (lower('0x739f0331594029064C252559436eDce0E468E37a'), lower('0x6a3796c21e733a3016bc0ba41edf763016247e72'))
and event_name LIKE 'OrderFilled'
)
UNION all
SELECT
maker as wallet,
tx_hash,
0 as fee_usd,
usd_amount
from (
SELECT
tx_hash,
block_timestamp,
decoded_log:taker as taker,
QueryRunArchived: QueryRun has been archived