Skip to main content

carbon_memo_program_decoder/instructions/
add_memo.rs

1//! This code was AUTOGENERATED using the Codama library.
2use carbon_core::deserialize::ArrangeAccounts;
3#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
4#[derive(Debug, Clone, borsh::BorshSerialize, borsh::BorshDeserialize, PartialEq)]
5pub struct AddMemo {
6    pub memo: Vec<u8>,
7}
8
9#[derive(Debug, Clone, PartialEq)]
10#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
11pub struct AddMemoInstructionAccounts {}
12
13impl AddMemo {
14    pub fn decode(data: &[u8]) -> Option<Self> {
15        Some(AddMemo {
16            memo: data.to_vec(),
17        })
18    }
19}
20
21impl ArrangeAccounts for AddMemo {
22    type ArrangedAccounts = AddMemoInstructionAccounts;
23
24    fn arrange_accounts(
25        _accounts: &[solana_instruction::AccountMeta],
26    ) -> Option<Self::ArrangedAccounts> {
27        Some(AddMemoInstructionAccounts {})
28    }
29}