carbon_drift_v2_decoder/instructions/
initialize_signed_msg_user_orders.rs1use carbon_core::{borsh, CarbonDeserialize};
2
3#[derive(
4 CarbonDeserialize, Debug, serde::Serialize, serde::Deserialize, PartialEq, Eq, Clone, Hash,
5)]
6#[carbon(discriminator = "0xa4639c7e9c3963b4")]
7pub struct InitializeSignedMsgUserOrders {
8 pub num_orders: u16,
9}
10
11pub struct InitializeSignedMsgUserOrdersInstructionAccounts {
12 pub signed_msg_user_orders: solana_pubkey::Pubkey,
13 pub authority: solana_pubkey::Pubkey,
14 pub payer: solana_pubkey::Pubkey,
15 pub rent: solana_pubkey::Pubkey,
16 pub system_program: solana_pubkey::Pubkey,
17}
18
19impl carbon_core::deserialize::ArrangeAccounts for InitializeSignedMsgUserOrders {
20 type ArrangedAccounts = InitializeSignedMsgUserOrdersInstructionAccounts;
21
22 fn arrange_accounts(
23 accounts: &[solana_instruction::AccountMeta],
24 ) -> Option<Self::ArrangedAccounts> {
25 let [signed_msg_user_orders, authority, payer, rent, system_program, _remaining @ ..] =
26 accounts
27 else {
28 return None;
29 };
30
31 Some(InitializeSignedMsgUserOrdersInstructionAccounts {
32 signed_msg_user_orders: signed_msg_user_orders.pubkey,
33 authority: authority.pubkey,
34 payer: payer.pubkey,
35 rent: rent.pubkey,
36 system_program: system_program.pubkey,
37 })
38 }
39}