This commit is contained in:
2026-07-23 16:37:12 +02:00
parent 99c345f2f2
commit 0da75c1311
2159 changed files with 230833 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
// file: kb_decoder_lending_marginfi_v2/src/decoder.rs
// version: 5
//! Decoder scaffold for the `kb_decoder_lending_marginfi_v2` crate.
/// Initial decoder implementation placeholder.
#[derive(Clone, Debug, Default)]
pub struct LendingMarginfiV2Decoder;
impl kb_decoder_api::ProtocolDecoder for crate::LendingMarginfiV2Decoder {
fn decoder_name(&self) -> &'static str {
return "kb_decoder_lending_marginfi_v2";
}
fn decoder_version(&self) -> &'static str {
return env!("CARGO_PKG_VERSION");
}
fn program_ids(&self) -> &'static [&'static str] {
return &[kb_program_ids::LENDING_MARGINFI_V2_PROGRAM_ID];
}
fn supports_observation(
&self,
observation: &kb_model::ProgramObservation,
) -> kb_decoder_api::DecoderSupport {
return if self.handles_program_id(&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());
}
}