freemartianUser unstake
Updated 2024-07-23
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
›
⌄
-- 0xc148cf85: unstake
-- 0xc88d9ba6: stake
WITH unstake AS (
SELECT
tx_hash,
(ethereum.public.udf_hex_to_int(data :: STRING)/pow(10,18)) AS value
FROM blast.core.fact_event_logs
WHERE origin_to_address = '0xe1784da2b8f42c31fb729e870a4a8064703555c2'
AND contract_address = '0xe1784da2b8f42c31fb729e870a4a8064703555c2'
AND origin_function_signature = '0xc148cf85'
),
datas AS (
SELECT
block_timestamp,
tx.tx_hash,
from_address,
unstake.value AS value,
tx_fee,
'Unstake' AS label
FROM blast.core.fact_transactions tx
INNER JOIN unstake ON unstake.tx_hash = tx.tx_hash
)
SELECT
from_address,
count(tx_hash) AS transactions,
SUM(value) AS unstake_value,
SUM(tx_fee) AS fee
QueryRunArchived: QueryRun has been archived