KaskoazulTinyman LP Pool Delta Mints/Burns
Updated 2022-03-03
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 TINYMAN_ACTION AS (
SELECT
block_timestamp::date as fecha,
tx_id,
CASE
WHEN tx_message:txn:apas[2] IS NULL then tx_message:txn:apas[1]
WHEN tx_message:txn:apas[2] != 0 then tx_message:txn:apas[2]
END AS LP_AssetID,
tx_message:txn:apas[0],
tx_message:txn:apas[1],
tx_message:txn:apas[2],
try_base64_decode_string(tx_message:txn:apaa[0]::string) as Action
FROM algorand.application_call_transaction
WHERE
fecha >= '2022-01-01'
AND try_base64_decode_string(tx_message:txn:apaa[0]::string) IN ('mint', 'burn')
AND app_id IN (552635992) --Tinyman
),
LP_ACTION AS (
SELECT
LP.Action,
a.asset_name,
count (LP.tx_id) as Number
FROM TINYMAN_ACTION LP
INNER JOIN algorand.asset a
ON LP.LP_AssetID = a.asset_ID
GROUP BY 1,2
),
MINT AS (
SELECT
asset_name,
Action,
Number
FROM LP_ACTION
Run a query to Download Data