mmdrezaorca rank
Updated 2024-12-25
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 jackguy / silky-scarlet copy copy copy @ https://flipsidecrypto.xyz/jackguy/q/0c4a6-SYMFNE/silky-scarlet-copy-copy-copy
WITH log_data AS (
SELECT
signers[0] as wallet,
tx_id as tx
FROM
eclipse.core.fact_transactions t,
TABLE(FLATTEN(log_messages)) f
WHERE SUCCEEDED
AND value in ('Program log: Instruction: SwapV2', 'Program log: Instruction: TwoHopSwapV2')
), tab1 as (
SELECT
tx_id,
block_timestamp,
wallet,
mint as mint_out,
amount/power(10, decimal) as out_amount
from eclipse.core.fact_transfers
left outer join log_data
on tx = tx_id
where tx_id in (SELECT tx from log_data)
and wallet = tx_to
), tab2 as (
SELECT
tx_id as tx,
mint as mint_in,
amount/power(10, decimal) as in_amount
from eclipse.core.fact_transfers
left outer join log_data
on tx = tx_id
where tx_id in (SELECT tx from log_data)
and wallet = tx_from
), tab3 as (
QueryRunArchived: QueryRun has been archived