sambeginner series - decoded logs 2
Updated 2025-01-19
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
›
⌄
⌄
/*
json
arrays
flattening and joining
molecule, element, basefire
*/
-- select
-- tx_hash,
-- block_timestamp,
-- event_index,
-- decoded_log,
-- decoded_log:ethAmount::int as eth_amount,
-- decoded_log:trader::string as trader
-- from base.core.ez_decoded_event_logs
-- where block_timestamp::Date >= '2024-11-18'
-- and contract_address = lower('0x20893fdd12E5F968B2231821Fc65Dd0e4eAB797C')
-- and event_name = 'Traded'
-- limit 10
with raw as (
select
tx_hash,
event_index,
decoded_log,
decoded_log:erc20Token::string as erc_20_token,
decoded_log:erc20TokenAmount::int as erc_20_amount,
decoded_log:fees as fees_array,
from base.core.ez_decoded_event_logs
where block_timestamp::date >= '2025-01-17'
and contract_address = lower('0xa39A5f160a1952dDf38781Bd76E402B0006912A9')
and event_name = 'ERC721SellOrderFilled'
and array_size(decoded_log:fees) > 1
),
QueryRunArchived: QueryRun has been archived