zpencerMad Lad W Claims Total
Updated 2024-09-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
›
⌄
-- forked from Mad Lad W Claims @ https://flipsidecrypto.xyz/edit/queries/acc519ab-78c0-421f-872a-a29204043e54
-- query to pull Wormhole claims done via Mad Lads xNFT
with events as (
select
block_timestamp,
tx_id,
index,
signers,
instruction,
inner_instruction,
signers [0] :: STRING AS owner_address
from
solana.core.fact_events
where
BLOCK_TIMESTAMP :: date >= '2024-04-17'
and SUCCEEDED = True
and program_id = '7DkjPwuKxvz6Viiawtbmb4CqnMKP6eGb1WqYas1airUS'
),
parsed as (
select
e.block_timestamp,
e.tx_id,
e.index,
e.owner_address,
e.instruction:accounts [2] :: STRING as mint,
IFF(
ARRAY_SIZE(e.inner_instruction:instructions) > 0
AND coalesce(
e.inner_instruction:instructions [1] :parsed:info:amount :: STRING,
e.inner_instruction:instructions [0] :parsed:info:tokenAmount:amount :: STRING
) IS NOT NULL,
coalesce(
e.inner_instruction:instructions [1] :parsed:info:amount :: STRING,
e.inner_instruction:instructions [0] :parsed:info:tokenAmount:amount :: STRING
) :: BIGINT / 1000000,
QueryRunArchived: QueryRun has been archived