bachimango markets
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 withdraws as (
select
pre_token_balances[0] : mint as token,
inner_instructions : instructions[0] : parsed : info : amount as amount,
inner_instructions : instructions[0] : parsed : info : destination as wallet,
iff(
token not in (
'So11111111111111111111111111111111111111112',
'mSoLzYCxHdYgdzU16g5QSh3i5K3z3KZK7ytfqcJm7So'
),
amount / 1e6,
amount / 1e9
) as final_amount,
inner_instructions : instructions[0] : programId as inner_pid,
'withdraw' as type,
tx_id,
block_timestamp
from
solana.core.fact_transactions
where
instructions : programId = 'mv3ekLzLbnVPNxjSKvqBpU3ZeZXPQdEC3bp5MDEBG68' -- Mango Markets V3
and block_timestamp :: date >= '2022-02-01'
AND Succeeded = 'TRUE'
and inner_pid = 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA'
and token <> 'MangoCzJ36AjZyKwVj3VnYU4GTonjfVEnJmvvWaxLac'
and inner_instructions : instructions[0] : parsed : info : authority = '9BVcYqEQxyccuwznvxXqDkSJFavvTyheiTYk231T1A8S'
and CONTAINS(
instructions : accounts, '11111111111111111111111111111111'
)
),
deposits as (
select
pre_token_balances[0] : mint as token,
inner_instructions : instructions[0] : parsed : info : amount as amount,
inner_instructions : instructions[0] : parsed : info : source as wallet,
iff(
Run a query to Download Data