Papasotpact.fi LP mints/burns
Updated 2023-01-03
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
With pact_app_ids as
( SELECT DISTINCT tx_message :txn :apid :: NUMBER AS app_id
FROM algorand.transactions
WHERE inner_tx = 'FALSE'
AND tx_message :dt :itx [0] :txn :type :: STRING = 'acfg'
AND tx_message :dt :itx [0] :txn :apar :an :: STRING LIKE '%PACT LP Token'
AND tx_message :dt :itx [0] :txn :apar :au :: STRING = 'https://pact.fi/' )
select
date_trunc('day',block_timestamp) as block_day,
case
when TRY_BASE64_DECODE_STRING(tx_message :txn :apaa [0] :: STRING) = 'ADDLIQ' then 'LP mint'
else 'LP burn' end as note,
count(tx_message)
from algorand.application_call_transaction where app_id IN ( SELECT app_id FROM pact_app_ids ) And
TRY_BASE64_DECODE_STRING(tx_message :txn :apaa [0] :: STRING) = 'ADDLIQ' OR TRY_BASE64_DECODE_STRING(tx_message :txn :apaa [0] :: STRING) = 'REMLIQ'
group by block_day, note
order by block_day
Run a query to Download Data