DatafiResearch on Kraken $ATOM unbond event
Updated 2023-01-30
999
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 unbond_tx as
(select
block_id,
block_timestamp,
tx_id,
attribute_index,
case
when attribute_value like '%uatom%' then replace(attribute_value,'uatom', '')
else attribute_value
end as attribute_value
from cosmos.core.fact_msg_attributes
where msg_type = 'unbond'
and tx_succeeded = True
),
unbond_amount AS
(
SELECT
block_id,
block_timestamp,
tx_id,
cast(attribute_value as int) as amount
FROM unbond_tx
WHERE attribute_index = 1
),
unbond_time AS
(
SELECT
block_id,
block_timestamp,
tx_id,
cast(attribute_value as timestamp) as completion_time
FROM unbond_tx
WHERE attribute_index = 2
),
Run a query to Download Data