poseidon_client/transactions/
compiled_instruction.rs1use borsh::{BorshDeserialize, BorshSerialize};
2use core::fmt;
3use serde::{Deserialize, Serialize};
4
5#[derive(PartialEq, Eq, Clone, BorshSerialize, BorshDeserialize, Deserialize, Serialize)]
13#[serde(rename_all = "camelCase")]
14pub struct CompiledInstruction {
15 pub program_id_index: u8,
18 #[serde(with = "short_vec")]
21 pub accounts: Vec<u8>,
22 #[serde(with = "short_vec")]
24 pub data: Vec<u8>,
25}
26
27impl fmt::Debug for CompiledInstruction {
28 fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
29 f.debug_struct("CompiledInstruction")
30 .field("program_id_index", &self.program_id_index)
31 .field("accounts", &self.accounts)
32 .field("data", &blake3::hash(&self.data).to_hex())
33 .finish()
34 }
35}