carbon_points_decoder/instructions/
increment_level_beyond_threshold.rs1use carbon_core::{CarbonDeserialize, account_utils::next_account, borsh};
2
3#[derive(
4 CarbonDeserialize, Debug, serde::Serialize, serde::Deserialize, PartialEq, Eq, Clone, Hash,
5)]
6#[carbon(discriminator = "0xd5f007323b9d9bc5")]
7pub struct IncrementLevelBeyondThreshold {}
8
9#[derive(Debug, PartialEq, Eq, Clone, Hash, serde::Serialize, serde::Deserialize)]
10pub struct IncrementLevelBeyondThresholdInstructionAccounts {
11 pub category: solana_pubkey::Pubkey,
12 pub user_points_account: solana_pubkey::Pubkey,
13 pub points_modifier_account: solana_pubkey::Pubkey,
14}
15
16impl carbon_core::deserialize::ArrangeAccounts for IncrementLevelBeyondThreshold {
17 type ArrangedAccounts = IncrementLevelBeyondThresholdInstructionAccounts;
18
19 fn arrange_accounts(
20 accounts: &[solana_instruction::AccountMeta],
21 ) -> Option<Self::ArrangedAccounts> {
22 let mut iter = accounts.iter();
23 let category = next_account(&mut iter)?;
24 let user_points_account = next_account(&mut iter)?;
25 let points_modifier_account = next_account(&mut iter)?;
26
27 Some(IncrementLevelBeyondThresholdInstructionAccounts {
28 category,
29 user_points_account,
30 points_modifier_account,
31 })
32 }
33}