Skip to content

Instantly share code, notes, and snippets.

@mgild
Created October 10, 2025 20:04
Show Gist options
  • Save mgild/33dad3d5deda305886ad40101c788967 to your computer and use it in GitHub Desktop.
Save mgild/33dad3d5deda305886ad40101c788967 to your computer and use it in GitHub Desktop.
#[derive(Debug, Clone, PartialEq, Eq, BorshSerialize, BorshDeserialize)]
pub struct SwitchboardQuote {
/// Queue pubkey that this oracle quote belongs to
pub queue: [u8; 32],
/// Uses 2-byte (u16) length prefix
pub signatures: SmallVec<OracleSignature, U16Prefix>,
/// Quote header containing the signed slot hash
pub quote_header: PackedQuoteHeader,
/// Array of feed information (max 255)
/// Uses 1-byte (u8) length prefix
pub feeds: SmallVec<PackedFeedInfo, U8Prefix>,
/// Oracle indices that correspond to the queue's oracle array (max 255)
/// Uses 1-byte (u8) length prefix
pub oracle_idxs: SmallVec<u8, U8Prefix>,
/// Recent slot from the ED25519 instruction data used for freshness validation
pub slot: u64,
/// Version from the ED25519 instruction data
pub version: u8,
/// Tail discriminator "SBOD" for validation
pub tail_discriminator: [u8; 4],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment