freemartianLVN remove liquidity
Updated 2023-12-29
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 remove_liquidity AS (
SELECT
tx_id,
msg:attributes[3]:value AS pool_id,
msg:attributes[2]:value AS sender
FROM osmosis.core.fact_msgs
WHERE tx_id in(
SELECT tx_id
FROM osmosis.core.fact_tx_body_msgs
WHERE msg_type = '/osmosis.concentratedliquidity.v1beta1.MsgWithdrawPosition'
AND block_timestamp::date >= current_date - 10
)
AND msg_type = 'withdraw_position'
AND pool_id IN ('1325','1337')
)
SELECT
block_timestamp,
msgs.tx_id,
pool_id,
sender,
split_part(msg:attributes[1]:value,',',1) AS msg1,
(CASE
WHEN msg1 LIKE '%/ulvn%' THEN RIGHT(msg1,76)
WHEN msg1 LIKE '%uosmo%' THEN RIGHT(msg1,5)
WHEN msg1 LIKE '%498A0751C798A0D9A389AA3691123DADA57DAA4FE165D5C75894505B876BA6E4%' THEN RIGHT(msg1,68)
ELSE msg1
END
) AS token1_denom,
(CASE
QueryRunArchived: QueryRun has been archived