Updated 2025-01-09
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
›
⌄
⌄
SELECT
'0x' || SUBSTR(topics[1], 27) AS caller,
'0x' || SUBSTR(topics[2], 27) AS owner,
'0x' || SUBSTR(topics[3], 27) AS asset,
ethereum.public.udf_hex_to_int(SUBSTRING(l.data, 3, 64)) AS amount,
ethereum.public.udf_hex_to_int(SUBSTRING(l.data, 67, 64)) AS shares,
l.block_timestamp AS block_timestamp,
l.tx_hash AS tx_hash,
l.origin_function_signature AS origin_function_signature,
l.origin_from_address AS origin_from_address,
l.origin_to_address AS origin_to_address,
l.event_index AS event_index,
l.contract_address AS contract_address,
topics[1] AS topic1,
topics[2] AS topic2,
topics[3] AS topic3,
l.data AS data
FROM ethereum.core.fact_event_logs l
WHERE l.contract_address = LOWER('0x8f88ae3798e8ff3d0e0de7465a0863c9bbb577f0') --stakeSTONE ETH
AND l.topics[0] = '0x5fe47ed6d4225326d3303476197d782ded5a4e9c14f479dc9ec4992af4e85d59' --deposits
AND DATE_TRUNC('day', l.block_timestamp) > '2024-12-24 00:00:00'
/*
SELECT
'0x' || SUBSTR(topics[1], 27) AS caller, -- Extract and format as Ethereum address
'0x' || SUBSTR(topics[2], 27) AS owner,
'0x' || SUBSTR(topics[3], 27) AS asset,
ethereum.public.udf_hex_to_int(SUBSTRING(l.data, 3, 64)) AS amount, -- Convert to integer
ethereum.public.udf_hex_to_int(SUBSTRING(l.data, 67, 64)) AS shares -- Convert to integer
FROM ethereum.core.fact_event_logs l
WHERE LOWER(l.contract_address) = '0x8f88ae3798e8ff3d0e0de7465a0863c9bbb577f0'
AND l.topics[0] = '0x5fe47ed6d4225326d3303476197d782ded5a4e9c14f479dc9ec4992af4e85d59'
LIMIT 100;
*/
QueryRunArchived: QueryRun has been archived