40 lines
1.2 KiB
Rust
40 lines
1.2 KiB
Rust
// file: kb-lib/src/decoder/nft/metaplex_bubblegum.rs
|
|
// version: 4
|
|
|
|
//! Reserved protocol decoder for `nft_metaplex_bubblegum`.
|
|
|
|
/// Reserved decoder for the `nft_metaplex_bubblegum` program surface.
|
|
#[derive(Clone, Debug, Default)]
|
|
pub struct DcNftMetaplexBubblegumDecoder;
|
|
|
|
impl crate::DcApiProtocolDecoder for crate::DcNftMetaplexBubblegumDecoder {
|
|
fn decoder_name(&self) -> &'static str {
|
|
return "kb-lib.decoder.nft.metaplex_bubblegum";
|
|
}
|
|
|
|
fn decoder_version(&self) -> &'static str {
|
|
return env!("CARGO_PKG_VERSION");
|
|
}
|
|
|
|
fn program_ids(&self) -> &'static [&'static str] {
|
|
return &[kb_program_ids::NFT_METAPLEX_BUBBLEGUM_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());
|
|
}
|
|
}
|