43 lines
1.3 KiB
Rust
43 lines
1.3 KiB
Rust
// file: kb_decoder_launchpad_pump_fun/src/decoder.rs
|
|
// version: 5
|
|
|
|
//! Decoder scaffold for the `kb_decoder_launchpad_pump_fun` crate.
|
|
|
|
/// Initial decoder implementation placeholder.
|
|
#[derive(Clone, Debug, Default)]
|
|
pub struct LaunchpadPumpFunDecoder;
|
|
|
|
impl kb_decoder_api::ProtocolDecoder for crate::LaunchpadPumpFunDecoder {
|
|
fn decoder_name(&self) -> &'static str {
|
|
return "kb_decoder_launchpad_pump_fun";
|
|
}
|
|
|
|
fn decoder_version(&self) -> &'static str {
|
|
return env!("CARGO_PKG_VERSION");
|
|
}
|
|
|
|
fn program_ids(&self) -> &'static [&'static str] {
|
|
return &[kb_program_ids::LAUNCHPAD_PUMP_FUN_PROGRAM_ID];
|
|
}
|
|
|
|
fn supports_observation(
|
|
&self,
|
|
observation: &kb_model::ProgramObservation,
|
|
) -> kb_decoder_api::DecoderSupport {
|
|
return if kb_decoder_api::ProtocolDecoder::handles_program_id(self, &observation.program_id)
|
|
{
|
|
kb_decoder_api::DecoderSupport::Maybe
|
|
} else {
|
|
kb_decoder_api::DecoderSupport::No
|
|
};
|
|
}
|
|
|
|
fn decode_observation(
|
|
&self,
|
|
_observation: &kb_model::ProgramObservation,
|
|
) -> kb_core::Result<std::vec::Vec<kb_model::DecodedProtocolEvent>> {
|
|
let _target = crate::TRACING_TARGET;
|
|
return std::result::Result::Ok(std::vec::Vec::new());
|
|
}
|
|
}
|