LTirrellxNFT createInstall summary by xNFT
Updated 2024-01-15
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
›
⌄
-- forked from xNFT createInstall summary @ https://flipsidecrypto.xyz/edit/queries/1855ee78-f80c-43f4-8a1d-5605ff20b086
-- forked from xNFT_all @ https://flipsidecrypto.xyz/edit/queries/8a368540-2f46-4582-b0e5-76342d1f07df
with
base as (
select
block_timestamp,
block_id,
tx_id,
instructions[0]:accounts[0] as xnft, -- only the xNFT account for certain instructions
instructions[0]:data as program_data, -- can be used to find instruction name
case
when program_data = '7tyNegi96Ez' then 'createInstall'
else program_data
end as instruction_type,
instructions[0]:programId as programId,
signers[0] as fee_payer,
succeeded,
instructions[0]:accounts as all_accounts -- unparsed account info
-- ROW_NUMBER() OVER (
-- PARTITION BY
-- xnft
-- ORDER BY
-- block_timestamp
-- ) as xnft_rn,
-- ROW_NUMBER() OVER (
-- PARTITION BY
-- fee_payer
-- ORDER BY
-- block_timestamp
-- ) as user_rn
from
solana.core.fact_transactions
where
programId = 'xnft5aaToUM4UFETUQfj7NUDUBdvYHTVhNFThEYTm55'
and block_timestamp::date >= '2023-02-22' -- date of xNFT v2 IDL upgrade, with new program address:
QueryRunArchived: QueryRun has been archived