use carbon_core::{borsh, CarbonDeserialize};
use super::super::types::*;
#[derive(CarbonDeserialize, Debug, serde::Serialize, serde::Deserialize, PartialEq, Eq, Clone, Hash)]
#[carbon(discriminator = "0xaa50f8b0aa8e1195")]
pub struct UpdateCollectionV1{
pub update_collection_v1_args: UpdateCollectionV1Args,
}
pub struct UpdateCollectionV1InstructionAccounts {
pub collection: solana_sdk::pubkey::Pubkey,
pub payer: solana_sdk::pubkey::Pubkey,
pub authority: solana_sdk::pubkey::Pubkey,
pub new_update_authority: solana_sdk::pubkey::Pubkey,
pub system_program: solana_sdk::pubkey::Pubkey,
pub log_wrapper: solana_sdk::pubkey::Pubkey,
}
impl carbon_core::deserialize::ArrangeAccounts for UpdateCollectionV1 {
type ArrangedAccounts = UpdateCollectionV1InstructionAccounts;
fn arrange_accounts(accounts: Vec<solana_sdk::instruction::AccountMeta>) -> Option<Self::ArrangedAccounts> {
let collection = accounts.get(0)?;
let payer = accounts.get(1)?;
let authority = accounts.get(2)?;
let new_update_authority = accounts.get(3)?;
let system_program = accounts.get(4)?;
let log_wrapper = accounts.get(5)?;
Some(UpdateCollectionV1InstructionAccounts {
collection: collection.pubkey,
payer: payer.pubkey,
authority: authority.pubkey,
new_update_authority: new_update_authority.pubkey,
system_program: system_program.pubkey,
log_wrapper: log_wrapper.pubkey,
})
}
}