This commit is contained in:
2026-05-24 17:17:26 +02:00
parent 6176c5d4cd
commit 69c8f6c957
25 changed files with 2354 additions and 133 deletions

View File

@@ -497,6 +497,37 @@ fn decode_raydium_clmm_candidate(
crate::decode_raydium_clmm_instruction(accounts_json.as_str(), data_json.as_str());
for decoded in decoded_events {
match decoded {
crate::RaydiumClmmDecodedEvent::Swap(event) => {
return Some(crate::OnchainDexPairCandidateDto {
signature: signature.to_string(),
slot,
block_time,
failed,
program_id: program_id.to_string(),
dex_code,
candidate_kind: "swap".to_string(),
confidence: "high".to_string(),
instruction_index: instruction.instruction_index,
inner_instruction_index: instruction.inner_instruction_index,
instruction_name: Some("raydium_clmm.swap".to_string()),
pool_address: Some(event.pool_state.clone()),
token_a_mint: Some(event.base_mint),
token_b_mint: Some(event.quote_mint),
verified_pool_address: Some(event.pool_state.clone()),
observed_token_mints: std::vec::Vec::new(),
token_balance_deltas: std::vec::Vec::new(),
candidate_pool_accounts: std::vec::Vec::new(),
candidate_token_vault_accounts: std::vec::Vec::new(),
candidate_program_accounts: std::vec::Vec::new(),
account_samples: sample_strings(instruction.accounts.as_slice(), 12),
log_samples: sample_logs(logs, 8),
backfill_hint: build_backfill_hint(
"pool",
Some(event.pool_state.as_str()),
signature,
),
});
},
crate::RaydiumClmmDecodedEvent::SwapV2(event) => {
return Some(crate::OnchainDexPairCandidateDto {
signature: signature.to_string(),