adriaparcerisasosol9
Updated 2023-01-13
999
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
fees as (
select
instruction:accounts[4]::string as pool, --credits: marqu
instruction:accounts[7]::string as fees,
instruction :accounts[1] ::string as token1,
instruction :accounts[2] ::string as token2,
case
when fees = '5cyhCta55L7DrWB9bi9Uwh1f98ag71wScRbGqcSAbyGN' then 0
when fees = 'GaiUH8finbmCZRcfmepKVP1xVx66fd81BmoDvoVGhA3s' then 0
when fees = '62dSkn5ktwY1PoKPNMArZA4bZsvyemuknWUnnQ2ATTuN' then 0.0001
when fees = 'GBtp54LJqqDSWonLT878KWerkJAYqYq4jasZ1UYs8wfD' then 0.0005
when fees = 'HYbauzbeSCCmJgt5Cf9npFXwQiDphFNQCWVE3tzPf9nV' then 0.0025
when fees = 'HT55NVGVTjWmWLjV7BrSMPVZ7ppU8T2xE5nCAZ6YaGad' then 0.003
when fees = '8cdyfqnUEgGeaHvqGyMQZd3Sdax9VyDu74dqVcZWE3t7' then 0.003
when fees = '4kuxsCskbbAvoME1JEdNXJJFWRWP2af2kotyQpmwsVcU' then 0.0035
when fees = 'BGnhGXT9CCt5WYS23zg9sqsAT2MGXkq7VSwch9pML82W' then 0.01
else 0
end as fees_pcg
from solana.core.fact_events events
inner join solana.core.fact_transactions txs
on events.tx_id = txs.tx_id
and events.block_timestamp = txs.block_timestamp
and regexp_replace(log_messages[1], '^Program log: Instruction: ') = 'InitializePool'
where events.succeeded
and txs.succeeded
and events.block_timestamp > '2022-12-30' -- bonk launch
and txs.block_timestamp > '2022-12-30' -- bonk launch
and program_id = 'whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc'
and events.inner_instruction :instructions[0] :parsed :type ::string = 'createAccount'
and events.inner_instruction :instructions[0] :parsed :info :newAccount ::string = instruction :accounts[4] ::string
),
labels as (
select distinct pool,
case
Run a query to Download Data