40 lines
1.2 KiB
Rust
40 lines
1.2 KiB
Rust
// file: ks-lib/src/decoder/amm/one_dex.rs
|
|
// version: 5
|
|
|
|
//! Reserved protocol decoder for `amm_one_dex`.
|
|
|
|
/// Reserved decoder for the `amm_one_dex` program surface.
|
|
#[derive(Clone, Debug, Default)]
|
|
pub struct DcAmmOneDexDecoder;
|
|
|
|
impl crate::DcApiProtocolDecoder for crate::DcAmmOneDexDecoder {
|
|
fn decoder_name(&self) -> &'static str {
|
|
return "kb-lib.decoder.amm.one_dex";
|
|
}
|
|
|
|
fn decoder_version(&self) -> &'static str {
|
|
return env!("CARGO_PKG_VERSION");
|
|
}
|
|
|
|
fn program_ids(&self) -> &'static [&'static str] {
|
|
return &[ks_program_ids::AMM_ONE_DEX_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,
|
|
) -> ks_core::Result<std::vec::Vec<crate::MdDecodedProtocolEvent>> {
|
|
return std::result::Result::Ok(std::vec::Vec::new());
|
|
}
|
|
}
|