freemartianUser Activity
Updated 2024-07-18
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
mint AS(
SELECT
block_timestamp,
tx_hash,
event_data:account AS wallet,
(event_data:minted_thAPT)/pow(10,8) AS minted_thapt,
(event_data:staked_APT)/pow(10,8) AS staked_APT,
'mint'AS event
FROM aptos.core.fact_events
WHERE success
AND event_type = '0xfaf4e633ae9eb31366c9ca24214231760926576c7b625313b3688b5e900731f6::staking::StakeAPTEvent'
AND event_data:account = LOWER('{{wallet_address}}')
),
redeem AS (
SELECT
block_timestamp,
tx_hash,
event_data:account AS wallet,
(event_data:unstaked_amount)/pow(10,8) AS redeem_amount,
'redeem'AS event
FROM aptos.core.fact_events
WHERE success
AND event_type = '0xfaf4e633ae9eb31366c9ca24214231760926576c7b625313b3688b5e900731f6::staking::CompleteUnstakeAPTEvent'
AND event_data:account = LOWER('{{wallet_address}}')
)
SELECT
block_timestamp,
wallet,
tx_hash,
minted_thapt AS amount,
'Mint' AS event
FROM mint m
UNION
QueryRunArchived: QueryRun has been archived