Files
khadhroony-bot3/kb-lib/src/decoder/amm/meteora_damm_v1.rs
2026-07-24 15:59:00 +02:00

40 lines
1.2 KiB
Rust

// file: kb-lib/src/decoder/amm/meteora_damm_v1.rs
// version: 3
//! Reserved protocol decoder for `amm_meteora_damm_v1`.
/// Reserved decoder for the `amm_meteora_damm_v1` program surface.
#[derive(Clone, Debug, Default)]
pub struct DcAmmMeteoraDammV1Decoder;
impl crate::DcApiProtocolDecoder for crate::DcAmmMeteoraDammV1Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_amm_meteora_damm_v1";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::AMM_METEORA_DAMM_V1_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &crate::MdProgramObservation,
) -> crate::DcApiDecoderSupport {
if crate::DcApiProtocolDecoder::handles_program_id(self, &observation.program_id) {
return crate::DcApiDecoderSupport::Maybe;
}
return crate::DcApiDecoderSupport::No;
}
fn decode_observation(
&self,
_observation: &crate::MdProgramObservation,
) -> kb_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
return std::result::Result::Ok(std::vec::Vec::new());
}
}