AMM | INPUT_MINT | INPUT_AMOUNT | OUTPUT_MINT | OUTPUT_AMOUNT | |
---|---|---|---|---|---|
1 | stkitrT1Uoy18Dk1fTrgPw8W6MVzoCfYoAFT4MLsmhq | So11111111111111111111111111111111111111112 | 122932608911389 | jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v | 121361693123874 |
flyingfishDecoding Jupiter Swap Data - Route Details
Updated 2025-04-17
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
›
⌄
⌄
/*
For this transactions the data of interest is:
Base58 Inner_instruction data:
QMqFu4fYGGeUEysFnenhAvDL4RcPoJp122cSi94QyLHDzArH7bFZ3tFhxssWx21TYGqfUgqzKaeApVDCSoAufTX6mS7MLEgxJMoDF1C65nXPm1efHfArkydjSDV98ZZAF7TpRBYKvC4TzA3h99CMzWH95Z2cf6C6WAHGhhKCC88sRHZ
HEX Inner_instruction data:
0xe445a52e51cb9a1d40c6cde8260871e20d098f06e96e863e94f9a844ab96b9c4863996f6f12bf75f72fc497561be9bb0069b8857feab8184fb687f634618c035dac439dc1aeb3b5598a0f000000000011d487c7ace6f00000afe1d91671422c765c7a06a1139ff6139d380fcb422ba78f778bed53c697d8122a59bb8606e0000
*/
with decode_data as (
select
-- INNER_INSTRUCTION HEX SIGNATURE: 0xe445a52e51cb9a1d
livequery.utils.udf_base58_to_hex(value:data) as inner_hex_data
, livequery.utils.udf_hex_to_base58('0x' || substr(inner_hex_data, 3 + 16 + 16, 64)) as amm
, livequery.utils.udf_hex_to_base58('0x' || substr(inner_hex_data, 3 + 16 + 16 + 64, 64)) as input_mint
, livequery.utils.udf_hex_to_int(to_char(reverse(to_binary(substr(inner_hex_data, 3 + 16 + 16 + 64 + 64, 16))))) as input_amount
, livequery.utils.udf_hex_to_base58('0x' || substr(inner_hex_data, 3 + 16 + 16 + 64 + 64 + 16, 64)) as output_mint
, livequery.utils.udf_hex_to_int(to_char(reverse(to_binary(substr(inner_hex_data, 3 + 16 + 16 + 64 + 64 + 16 + 64, 16))))) as output_amount
from solana.core.fact_events
, lateral flatten(input => inner_instruction:instructions)
where block_id = 269009550
and tx_id = '4GsnFLMhiQayxCSwaxXiF47yMcsZs7Fq4stLWVLN8Xz4JSHsSWjBuP4qYjCtPNa8YgRdnMjVP1oApB8ca2gwFkru'
-- Filter inner_instruction to get the JUP v6 inner event instruction data
and value:programId = 'JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4'
)
select
*
exclude inner_hex_data
from decode_data
Last run: about 1 month ago
1
177B
14s