0.5.1-pre.002
This commit is contained in:
39
ks-lib/src/decoder/amm/aldrin_v2.rs
Normal file
39
ks-lib/src/decoder/amm/aldrin_v2.rs
Normal file
@@ -0,0 +1,39 @@
|
||||
// file: ks-lib/src/decoder/amm/aldrin_v2.rs
|
||||
// version: 5
|
||||
|
||||
//! Reserved protocol decoder for `amm_aldrin_v2`.
|
||||
|
||||
/// Reserved decoder for the `amm_aldrin_v2` program surface.
|
||||
#[derive(Clone, Debug, Default)]
|
||||
pub struct DcAmmAldrinV2Decoder;
|
||||
|
||||
impl crate::DcApiProtocolDecoder for crate::DcAmmAldrinV2Decoder {
|
||||
fn decoder_name(&self) -> &'static str {
|
||||
return "kb-lib.decoder.amm.aldrin_v2";
|
||||
}
|
||||
|
||||
fn decoder_version(&self) -> &'static str {
|
||||
return env!("CARGO_PKG_VERSION");
|
||||
}
|
||||
|
||||
fn program_ids(&self) -> &'static [&'static str] {
|
||||
return &[ks_program_ids::AMM_ALDRIN_V2_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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user