MajorM111ref v1 join to get sig and 1 line
Updated 2024-12-16
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_event_logs AS (
SELECT DISTINCT
tx_hash,
origin_function_signature
FROM
avalanche.core.fact_event_logs
WHERE
origin_function_signature IN (
'0xe8e33700',
'0xf91b3f72',
'0xe324a3e4',
'0xea8f43d8',
'0xa3c7271a',
'0x8efc2b2c'
)
),
filtered_decoded_event_logs AS (
SELECT
block_number,
block_timestamp,
tx_hash,
event_index,
event_name,
contract_address,
TO_JSON(decoded_log) AS decoded_log -- Convertit l'objet en JSON pour LISTAGG
FROM
avalanche.core.fact_decoded_event_logs
WHERE
tx_hash = LOWER('0x176282a196d2194ac7c61ce0d2438b19ff3198501da79bf317b4b350e72989f1')
),
joined_logs AS (
SELECT
t2.origin_function_signature,
t1.block_number,
t1.block_timestamp,
t1.tx_hash,
QueryRunArchived: QueryRun has been archived