//! This code was AUTOGENERATED using the codama library.
//! Please DO NOT EDIT THIS FILE, instead use visitors
//! to add features, then rerun codama to update it.
//!
//! <https://github.com/codama-idl/codama>
//!

use crate::instructions::{
    CloseBundledPosition as CloseBundledPositionIxAccounts,
    CloseBundledPositionInstructionArgs as CloseBundledPositionIxData,
    ClosePosition as ClosePositionIxAccounts,
    ClosePositionWithTokenExtensions as ClosePositionWithTokenExtensionsIxAccounts,
    CollectFees as CollectFeesIxAccounts, CollectFeesV2 as CollectFeesV2IxAccounts,
    CollectFeesV2InstructionArgs as CollectFeesV2IxData,
    CollectProtocolFees as CollectProtocolFeesIxAccounts,
    CollectProtocolFeesV2 as CollectProtocolFeesV2IxAccounts,
    CollectProtocolFeesV2InstructionArgs as CollectProtocolFeesV2IxData,
    CollectReward as CollectRewardIxAccounts, CollectRewardInstructionArgs as CollectRewardIxData,
    CollectRewardV2 as CollectRewardV2IxAccounts,
    CollectRewardV2InstructionArgs as CollectRewardV2IxData,
    DecreaseLiquidity as DecreaseLiquidityIxAccounts,
    DecreaseLiquidityInstructionArgs as DecreaseLiquidityIxData,
    DecreaseLiquidityV2 as DecreaseLiquidityV2IxAccounts,
    DecreaseLiquidityV2InstructionArgs as DecreaseLiquidityV2IxData,
    DeletePositionBundle as DeletePositionBundleIxAccounts,
    DeleteTokenBadge as DeleteTokenBadgeIxAccounts,
    IncreaseLiquidity as IncreaseLiquidityIxAccounts,
    IncreaseLiquidityInstructionArgs as IncreaseLiquidityIxData,
    IncreaseLiquidityV2 as IncreaseLiquidityV2IxAccounts,
    IncreaseLiquidityV2InstructionArgs as IncreaseLiquidityV2IxData,
    InitializeConfig as InitializeConfigIxAccounts,
    InitializeConfigExtension as InitializeConfigExtensionIxAccounts,
    InitializeConfigInstructionArgs as InitializeConfigIxData,
    InitializeFeeTier as InitializeFeeTierIxAccounts,
    InitializeFeeTierInstructionArgs as InitializeFeeTierIxData,
    InitializePool as InitializePoolIxAccounts,
    InitializePoolInstructionArgs as InitializePoolIxData,
    InitializePoolV2 as InitializePoolV2IxAccounts,
    InitializePoolV2InstructionArgs as InitializePoolV2IxData,
    InitializePositionBundle as InitializePositionBundleIxAccounts,
    InitializePositionBundleWithMetadata as InitializePositionBundleWithMetadataIxAccounts,
    InitializeReward as InitializeRewardIxAccounts,
    InitializeRewardInstructionArgs as InitializeRewardIxData,
    InitializeRewardV2 as InitializeRewardV2IxAccounts,
    InitializeRewardV2InstructionArgs as InitializeRewardV2IxData,
    InitializeTickArray as InitializeTickArrayIxAccounts,
    InitializeTickArrayInstructionArgs as InitializeTickArrayIxData,
    InitializeTokenBadge as InitializeTokenBadgeIxAccounts, LockPosition as LockPositionIxAccounts,
    LockPositionInstructionArgs as LockPositionIxData,
    OpenBundledPosition as OpenBundledPositionIxAccounts,
    OpenBundledPositionInstructionArgs as OpenBundledPositionIxData,
    OpenPosition as OpenPositionIxAccounts, OpenPositionInstructionArgs as OpenPositionIxData,
    OpenPositionWithMetadata as OpenPositionWithMetadataIxAccounts,
    OpenPositionWithMetadataInstructionArgs as OpenPositionWithMetadataIxData,
    OpenPositionWithTokenExtensions as OpenPositionWithTokenExtensionsIxAccounts,
    OpenPositionWithTokenExtensionsInstructionArgs as OpenPositionWithTokenExtensionsIxData,
    SetCollectProtocolFeesAuthority as SetCollectProtocolFeesAuthorityIxAccounts,
    SetConfigExtensionAuthority as SetConfigExtensionAuthorityIxAccounts,
    SetDefaultFeeRate as SetDefaultFeeRateIxAccounts,
    SetDefaultFeeRateInstructionArgs as SetDefaultFeeRateIxData,
    SetDefaultProtocolFeeRate as SetDefaultProtocolFeeRateIxAccounts,
    SetDefaultProtocolFeeRateInstructionArgs as SetDefaultProtocolFeeRateIxData,
    SetFeeAuthority as SetFeeAuthorityIxAccounts, SetFeeRate as SetFeeRateIxAccounts,
    SetFeeRateInstructionArgs as SetFeeRateIxData,
    SetProtocolFeeRate as SetProtocolFeeRateIxAccounts,
    SetProtocolFeeRateInstructionArgs as SetProtocolFeeRateIxData,
    SetRewardAuthority as SetRewardAuthorityIxAccounts,
    SetRewardAuthorityBySuperAuthority as SetRewardAuthorityBySuperAuthorityIxAccounts,
    SetRewardAuthorityBySuperAuthorityInstructionArgs as SetRewardAuthorityBySuperAuthorityIxData,
    SetRewardAuthorityInstructionArgs as SetRewardAuthorityIxData,
    SetRewardEmissions as SetRewardEmissionsIxAccounts,
    SetRewardEmissionsInstructionArgs as SetRewardEmissionsIxData,
    SetRewardEmissionsSuperAuthority as SetRewardEmissionsSuperAuthorityIxAccounts,
    SetRewardEmissionsV2 as SetRewardEmissionsV2IxAccounts,
    SetRewardEmissionsV2InstructionArgs as SetRewardEmissionsV2IxData,
    SetTokenBadgeAuthority as SetTokenBadgeAuthorityIxAccounts, Swap as SwapIxAccounts,
    SwapInstructionArgs as SwapIxData, SwapV2 as SwapV2IxAccounts,
    SwapV2InstructionArgs as SwapV2IxData, TwoHopSwap as TwoHopSwapIxAccounts,
    TwoHopSwapInstructionArgs as TwoHopSwapIxData, TwoHopSwapV2 as TwoHopSwapV2IxAccounts,
    TwoHopSwapV2InstructionArgs as TwoHopSwapV2IxData,
    UpdateFeesAndRewards as UpdateFeesAndRewardsIxAccounts,
};
use crate::ID;
use borsh::BorshDeserialize;

/// Whirlpool Instructions
#[derive(Debug)]
#[cfg_attr(feature = "tracing", derive(strum_macros::Display))]
pub enum WhirlpoolProgramIx {
    InitializeConfig(InitializeConfigIxAccounts, InitializeConfigIxData),
    InitializePool(InitializePoolIxAccounts, InitializePoolIxData),
    InitializeTickArray(InitializeTickArrayIxAccounts, InitializeTickArrayIxData),
    InitializeFeeTier(InitializeFeeTierIxAccounts, InitializeFeeTierIxData),
    InitializeReward(InitializeRewardIxAccounts, InitializeRewardIxData),
    SetRewardEmissions(SetRewardEmissionsIxAccounts, SetRewardEmissionsIxData),
    OpenPosition(OpenPositionIxAccounts, OpenPositionIxData),
    OpenPositionWithMetadata(
        OpenPositionWithMetadataIxAccounts,
        OpenPositionWithMetadataIxData,
    ),
    IncreaseLiquidity(IncreaseLiquidityIxAccounts, IncreaseLiquidityIxData),
    DecreaseLiquidity(DecreaseLiquidityIxAccounts, DecreaseLiquidityIxData),
    UpdateFeesAndRewards(UpdateFeesAndRewardsIxAccounts),
    CollectFees(CollectFeesIxAccounts),
    CollectReward(CollectRewardIxAccounts, CollectRewardIxData),
    CollectProtocolFees(CollectProtocolFeesIxAccounts),
    Swap(SwapIxAccounts, SwapIxData),
    ClosePosition(ClosePositionIxAccounts),
    SetDefaultFeeRate(SetDefaultFeeRateIxAccounts, SetDefaultFeeRateIxData),
    SetDefaultProtocolFeeRate(
        SetDefaultProtocolFeeRateIxAccounts,
        SetDefaultProtocolFeeRateIxData,
    ),
    SetFeeRate(SetFeeRateIxAccounts, SetFeeRateIxData),
    SetProtocolFeeRate(SetProtocolFeeRateIxAccounts, SetProtocolFeeRateIxData),
    SetFeeAuthority(SetFeeAuthorityIxAccounts),
    SetCollectProtocolFeesAuthority(SetCollectProtocolFeesAuthorityIxAccounts),
    SetRewardAuthority(SetRewardAuthorityIxAccounts, SetRewardAuthorityIxData),
    SetRewardAuthorityBySuperAuthority(
        SetRewardAuthorityBySuperAuthorityIxAccounts,
        SetRewardAuthorityBySuperAuthorityIxData,
    ),
    SetRewardEmissionsSuperAuthority(SetRewardEmissionsSuperAuthorityIxAccounts),
    TwoHopSwap(TwoHopSwapIxAccounts, TwoHopSwapIxData),
    InitializePositionBundle(InitializePositionBundleIxAccounts),
    InitializePositionBundleWithMetadata(InitializePositionBundleWithMetadataIxAccounts),
    DeletePositionBundle(DeletePositionBundleIxAccounts),
    OpenBundledPosition(OpenBundledPositionIxAccounts, OpenBundledPositionIxData),
    CloseBundledPosition(CloseBundledPositionIxAccounts, CloseBundledPositionIxData),
    OpenPositionWithTokenExtensions(
        OpenPositionWithTokenExtensionsIxAccounts,
        OpenPositionWithTokenExtensionsIxData,
    ),
    ClosePositionWithTokenExtensions(ClosePositionWithTokenExtensionsIxAccounts),
    LockPosition(LockPositionIxAccounts, LockPositionIxData),
    CollectFeesV2(CollectFeesV2IxAccounts, CollectFeesV2IxData),
    CollectProtocolFeesV2(CollectProtocolFeesV2IxAccounts, CollectProtocolFeesV2IxData),
    CollectRewardV2(CollectRewardV2IxAccounts, CollectRewardV2IxData),
    DecreaseLiquidityV2(DecreaseLiquidityV2IxAccounts, DecreaseLiquidityV2IxData),
    IncreaseLiquidityV2(IncreaseLiquidityV2IxAccounts, IncreaseLiquidityV2IxData),
    InitializePoolV2(InitializePoolV2IxAccounts, InitializePoolV2IxData),
    InitializeRewardV2(InitializeRewardV2IxAccounts, InitializeRewardV2IxData),
    SetRewardEmissionsV2(SetRewardEmissionsV2IxAccounts, SetRewardEmissionsV2IxData),
    SwapV2(SwapV2IxAccounts, SwapV2IxData),
    TwoHopSwapV2(TwoHopSwapV2IxAccounts, TwoHopSwapV2IxData),
    InitializeConfigExtension(InitializeConfigExtensionIxAccounts),
    SetConfigExtensionAuthority(SetConfigExtensionAuthorityIxAccounts),
    SetTokenBadgeAuthority(SetTokenBadgeAuthorityIxAccounts),
    InitializeTokenBadge(InitializeTokenBadgeIxAccounts),
    DeleteTokenBadge(DeleteTokenBadgeIxAccounts),
}

#[derive(Debug, Copy, Clone)]
pub struct InstructionParser;

impl yellowstone_vixen_core::Parser for InstructionParser {
    type Input = yellowstone_vixen_core::instruction::InstructionUpdate;
    type Output = WhirlpoolProgramIx;

    fn id(&self) -> std::borrow::Cow<str> {
        "Whirlpool::InstructionParser".into()
    }

    fn prefilter(&self) -> yellowstone_vixen_core::Prefilter {
        yellowstone_vixen_core::Prefilter::builder()
            .transaction_accounts([ID])
            .build()
            .unwrap()
    }

    async fn parse(
        &self,
        ix_update: &yellowstone_vixen_core::instruction::InstructionUpdate,
    ) -> yellowstone_vixen_core::ParseResult<Self::Output> {
        if ix_update.program.equals_ref(ID) {
            InstructionParser::parse_impl(ix_update)
        } else {
            Err(yellowstone_vixen_core::ParseError::Filtered)
        }
    }
}

impl yellowstone_vixen_core::ProgramParser for InstructionParser {
    #[inline]
    fn program_id(&self) -> yellowstone_vixen_core::Pubkey {
        ID.to_bytes().into()
    }
}

impl InstructionParser {
    pub(crate) fn parse_impl(
        ix: &yellowstone_vixen_core::instruction::InstructionUpdate,
    ) -> yellowstone_vixen_core::ParseResult<WhirlpoolProgramIx> {
        let accounts_len = ix.accounts.len();

        let ix_discriminator: [u8; 8] = ix.data[0..8].try_into()?;
        let mut ix_data = &ix.data[8..];
        let ix = match ix_discriminator {
            [208, 127, 21, 1, 194, 190, 196, 70] => {
                check_min_accounts_req(accounts_len, 3)?;
                let ix_accounts = InitializeConfigIxAccounts {
                    config: ix.accounts[0].0.into(),
                    funder: ix.accounts[1].0.into(),
                    system_program: ix.accounts[2].0.into(),
                };
                let de_ix_data: InitializeConfigIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::InitializeConfig(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [95, 180, 10, 172, 84, 174, 232, 40] => {
                check_min_accounts_req(accounts_len, 11)?;
                let ix_accounts = InitializePoolIxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    token_mint_a: ix.accounts[1].0.into(),
                    token_mint_b: ix.accounts[2].0.into(),
                    funder: ix.accounts[3].0.into(),
                    whirlpool: ix.accounts[4].0.into(),
                    token_vault_a: ix.accounts[5].0.into(),
                    token_vault_b: ix.accounts[6].0.into(),
                    fee_tier: ix.accounts[7].0.into(),
                    token_program: ix.accounts[8].0.into(),
                    system_program: ix.accounts[9].0.into(),
                    rent: ix.accounts[10].0.into(),
                };
                let de_ix_data: InitializePoolIxData = BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::InitializePool(ix_accounts, de_ix_data))
            }
            [11, 188, 193, 214, 141, 91, 149, 184] => {
                check_min_accounts_req(accounts_len, 4)?;
                let ix_accounts = InitializeTickArrayIxAccounts {
                    whirlpool: ix.accounts[0].0.into(),
                    funder: ix.accounts[1].0.into(),
                    tick_array: ix.accounts[2].0.into(),
                    system_program: ix.accounts[3].0.into(),
                };
                let de_ix_data: InitializeTickArrayIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::InitializeTickArray(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [183, 74, 156, 160, 112, 2, 42, 30] => {
                check_min_accounts_req(accounts_len, 5)?;
                let ix_accounts = InitializeFeeTierIxAccounts {
                    config: ix.accounts[0].0.into(),
                    fee_tier: ix.accounts[1].0.into(),
                    funder: ix.accounts[2].0.into(),
                    fee_authority: ix.accounts[3].0.into(),
                    system_program: ix.accounts[4].0.into(),
                };
                let de_ix_data: InitializeFeeTierIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::InitializeFeeTier(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [95, 135, 192, 196, 242, 129, 230, 68] => {
                check_min_accounts_req(accounts_len, 8)?;
                let ix_accounts = InitializeRewardIxAccounts {
                    reward_authority: ix.accounts[0].0.into(),
                    funder: ix.accounts[1].0.into(),
                    whirlpool: ix.accounts[2].0.into(),
                    reward_mint: ix.accounts[3].0.into(),
                    reward_vault: ix.accounts[4].0.into(),
                    token_program: ix.accounts[5].0.into(),
                    system_program: ix.accounts[6].0.into(),
                    rent: ix.accounts[7].0.into(),
                };
                let de_ix_data: InitializeRewardIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::InitializeReward(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [13, 197, 86, 168, 109, 176, 27, 244] => {
                check_min_accounts_req(accounts_len, 3)?;
                let ix_accounts = SetRewardEmissionsIxAccounts {
                    whirlpool: ix.accounts[0].0.into(),
                    reward_authority: ix.accounts[1].0.into(),
                    reward_vault: ix.accounts[2].0.into(),
                };
                let de_ix_data: SetRewardEmissionsIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::SetRewardEmissions(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [135, 128, 47, 77, 15, 152, 240, 49] => {
                check_min_accounts_req(accounts_len, 10)?;
                let ix_accounts = OpenPositionIxAccounts {
                    funder: ix.accounts[0].0.into(),
                    owner: ix.accounts[1].0.into(),
                    position: ix.accounts[2].0.into(),
                    position_mint: ix.accounts[3].0.into(),
                    position_token_account: ix.accounts[4].0.into(),
                    whirlpool: ix.accounts[5].0.into(),
                    token_program: ix.accounts[6].0.into(),
                    system_program: ix.accounts[7].0.into(),
                    rent: ix.accounts[8].0.into(),
                    associated_token_program: ix.accounts[9].0.into(),
                };
                let de_ix_data: OpenPositionIxData = BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::OpenPosition(ix_accounts, de_ix_data))
            }
            [242, 29, 134, 48, 58, 110, 14, 60] => {
                check_min_accounts_req(accounts_len, 13)?;
                let ix_accounts = OpenPositionWithMetadataIxAccounts {
                    funder: ix.accounts[0].0.into(),
                    owner: ix.accounts[1].0.into(),
                    position: ix.accounts[2].0.into(),
                    position_mint: ix.accounts[3].0.into(),
                    position_metadata_account: ix.accounts[4].0.into(),
                    position_token_account: ix.accounts[5].0.into(),
                    whirlpool: ix.accounts[6].0.into(),
                    token_program: ix.accounts[7].0.into(),
                    system_program: ix.accounts[8].0.into(),
                    rent: ix.accounts[9].0.into(),
                    associated_token_program: ix.accounts[10].0.into(),
                    metadata_program: ix.accounts[11].0.into(),
                    metadata_update_auth: ix.accounts[12].0.into(),
                };
                let de_ix_data: OpenPositionWithMetadataIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::OpenPositionWithMetadata(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [46, 156, 243, 118, 13, 205, 251, 178] => {
                check_min_accounts_req(accounts_len, 11)?;
                let ix_accounts = IncreaseLiquidityIxAccounts {
                    whirlpool: ix.accounts[0].0.into(),
                    token_program: ix.accounts[1].0.into(),
                    position_authority: ix.accounts[2].0.into(),
                    position: ix.accounts[3].0.into(),
                    position_token_account: ix.accounts[4].0.into(),
                    token_owner_account_a: ix.accounts[5].0.into(),
                    token_owner_account_b: ix.accounts[6].0.into(),
                    token_vault_a: ix.accounts[7].0.into(),
                    token_vault_b: ix.accounts[8].0.into(),
                    tick_array_lower: ix.accounts[9].0.into(),
                    tick_array_upper: ix.accounts[10].0.into(),
                };
                let de_ix_data: IncreaseLiquidityIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::IncreaseLiquidity(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [160, 38, 208, 111, 104, 91, 44, 1] => {
                check_min_accounts_req(accounts_len, 11)?;
                let ix_accounts = DecreaseLiquidityIxAccounts {
                    whirlpool: ix.accounts[0].0.into(),
                    token_program: ix.accounts[1].0.into(),
                    position_authority: ix.accounts[2].0.into(),
                    position: ix.accounts[3].0.into(),
                    position_token_account: ix.accounts[4].0.into(),
                    token_owner_account_a: ix.accounts[5].0.into(),
                    token_owner_account_b: ix.accounts[6].0.into(),
                    token_vault_a: ix.accounts[7].0.into(),
                    token_vault_b: ix.accounts[8].0.into(),
                    tick_array_lower: ix.accounts[9].0.into(),
                    tick_array_upper: ix.accounts[10].0.into(),
                };
                let de_ix_data: DecreaseLiquidityIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::DecreaseLiquidity(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [154, 230, 250, 13, 236, 209, 75, 223] => {
                check_min_accounts_req(accounts_len, 4)?;
                let ix_accounts = UpdateFeesAndRewardsIxAccounts {
                    whirlpool: ix.accounts[0].0.into(),
                    position: ix.accounts[1].0.into(),
                    tick_array_lower: ix.accounts[2].0.into(),
                    tick_array_upper: ix.accounts[3].0.into(),
                };
                Ok(WhirlpoolProgramIx::UpdateFeesAndRewards(ix_accounts))
            }
            [164, 152, 207, 99, 30, 186, 19, 182] => {
                check_min_accounts_req(accounts_len, 9)?;
                let ix_accounts = CollectFeesIxAccounts {
                    whirlpool: ix.accounts[0].0.into(),
                    position_authority: ix.accounts[1].0.into(),
                    position: ix.accounts[2].0.into(),
                    position_token_account: ix.accounts[3].0.into(),
                    token_owner_account_a: ix.accounts[4].0.into(),
                    token_vault_a: ix.accounts[5].0.into(),
                    token_owner_account_b: ix.accounts[6].0.into(),
                    token_vault_b: ix.accounts[7].0.into(),
                    token_program: ix.accounts[8].0.into(),
                };
                Ok(WhirlpoolProgramIx::CollectFees(ix_accounts))
            }
            [70, 5, 132, 87, 86, 235, 177, 34] => {
                check_min_accounts_req(accounts_len, 7)?;
                let ix_accounts = CollectRewardIxAccounts {
                    whirlpool: ix.accounts[0].0.into(),
                    position_authority: ix.accounts[1].0.into(),
                    position: ix.accounts[2].0.into(),
                    position_token_account: ix.accounts[3].0.into(),
                    reward_owner_account: ix.accounts[4].0.into(),
                    reward_vault: ix.accounts[5].0.into(),
                    token_program: ix.accounts[6].0.into(),
                };
                let de_ix_data: CollectRewardIxData = BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::CollectReward(ix_accounts, de_ix_data))
            }
            [22, 67, 23, 98, 150, 178, 70, 220] => {
                check_min_accounts_req(accounts_len, 8)?;
                let ix_accounts = CollectProtocolFeesIxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    whirlpool: ix.accounts[1].0.into(),
                    collect_protocol_fees_authority: ix.accounts[2].0.into(),
                    token_vault_a: ix.accounts[3].0.into(),
                    token_vault_b: ix.accounts[4].0.into(),
                    token_destination_a: ix.accounts[5].0.into(),
                    token_destination_b: ix.accounts[6].0.into(),
                    token_program: ix.accounts[7].0.into(),
                };
                Ok(WhirlpoolProgramIx::CollectProtocolFees(ix_accounts))
            }
            [248, 198, 158, 145, 225, 117, 135, 200] => {
                check_min_accounts_req(accounts_len, 11)?;
                let ix_accounts = SwapIxAccounts {
                    token_program: ix.accounts[0].0.into(),
                    token_authority: ix.accounts[1].0.into(),
                    whirlpool: ix.accounts[2].0.into(),
                    token_owner_account_a: ix.accounts[3].0.into(),
                    token_vault_a: ix.accounts[4].0.into(),
                    token_owner_account_b: ix.accounts[5].0.into(),
                    token_vault_b: ix.accounts[6].0.into(),
                    tick_array0: ix.accounts[7].0.into(),
                    tick_array1: ix.accounts[8].0.into(),
                    tick_array2: ix.accounts[9].0.into(),
                    oracle: ix.accounts[10].0.into(),
                };
                let de_ix_data: SwapIxData = BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::Swap(ix_accounts, de_ix_data))
            }
            [123, 134, 81, 0, 49, 68, 98, 98] => {
                check_min_accounts_req(accounts_len, 6)?;
                let ix_accounts = ClosePositionIxAccounts {
                    position_authority: ix.accounts[0].0.into(),
                    receiver: ix.accounts[1].0.into(),
                    position: ix.accounts[2].0.into(),
                    position_mint: ix.accounts[3].0.into(),
                    position_token_account: ix.accounts[4].0.into(),
                    token_program: ix.accounts[5].0.into(),
                };
                Ok(WhirlpoolProgramIx::ClosePosition(ix_accounts))
            }
            [118, 215, 214, 157, 182, 229, 208, 228] => {
                check_min_accounts_req(accounts_len, 3)?;
                let ix_accounts = SetDefaultFeeRateIxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    fee_tier: ix.accounts[1].0.into(),
                    fee_authority: ix.accounts[2].0.into(),
                };
                let de_ix_data: SetDefaultFeeRateIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::SetDefaultFeeRate(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [107, 205, 249, 226, 151, 35, 86, 0] => {
                check_min_accounts_req(accounts_len, 2)?;
                let ix_accounts = SetDefaultProtocolFeeRateIxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    fee_authority: ix.accounts[1].0.into(),
                };
                let de_ix_data: SetDefaultProtocolFeeRateIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::SetDefaultProtocolFeeRate(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [53, 243, 137, 65, 8, 140, 158, 6] => {
                check_min_accounts_req(accounts_len, 3)?;
                let ix_accounts = SetFeeRateIxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    whirlpool: ix.accounts[1].0.into(),
                    fee_authority: ix.accounts[2].0.into(),
                };
                let de_ix_data: SetFeeRateIxData = BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::SetFeeRate(ix_accounts, de_ix_data))
            }
            [95, 7, 4, 50, 154, 79, 156, 131] => {
                check_min_accounts_req(accounts_len, 3)?;
                let ix_accounts = SetProtocolFeeRateIxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    whirlpool: ix.accounts[1].0.into(),
                    fee_authority: ix.accounts[2].0.into(),
                };
                let de_ix_data: SetProtocolFeeRateIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::SetProtocolFeeRate(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [31, 1, 50, 87, 237, 101, 97, 132] => {
                check_min_accounts_req(accounts_len, 3)?;
                let ix_accounts = SetFeeAuthorityIxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    fee_authority: ix.accounts[1].0.into(),
                    new_fee_authority: ix.accounts[2].0.into(),
                };
                Ok(WhirlpoolProgramIx::SetFeeAuthority(ix_accounts))
            }
            [34, 150, 93, 244, 139, 225, 233, 67] => {
                check_min_accounts_req(accounts_len, 3)?;
                let ix_accounts = SetCollectProtocolFeesAuthorityIxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    collect_protocol_fees_authority: ix.accounts[1].0.into(),
                    new_collect_protocol_fees_authority: ix.accounts[2].0.into(),
                };
                Ok(WhirlpoolProgramIx::SetCollectProtocolFeesAuthority(
                    ix_accounts,
                ))
            }
            [34, 39, 183, 252, 83, 28, 85, 127] => {
                check_min_accounts_req(accounts_len, 3)?;
                let ix_accounts = SetRewardAuthorityIxAccounts {
                    whirlpool: ix.accounts[0].0.into(),
                    reward_authority: ix.accounts[1].0.into(),
                    new_reward_authority: ix.accounts[2].0.into(),
                };
                let de_ix_data: SetRewardAuthorityIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::SetRewardAuthority(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [240, 154, 201, 198, 148, 93, 56, 25] => {
                check_min_accounts_req(accounts_len, 4)?;
                let ix_accounts = SetRewardAuthorityBySuperAuthorityIxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    whirlpool: ix.accounts[1].0.into(),
                    reward_emissions_super_authority: ix.accounts[2].0.into(),
                    new_reward_authority: ix.accounts[3].0.into(),
                };
                let de_ix_data: SetRewardAuthorityBySuperAuthorityIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::SetRewardAuthorityBySuperAuthority(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [207, 5, 200, 209, 122, 56, 82, 183] => {
                check_min_accounts_req(accounts_len, 3)?;
                let ix_accounts = SetRewardEmissionsSuperAuthorityIxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    reward_emissions_super_authority: ix.accounts[1].0.into(),
                    new_reward_emissions_super_authority: ix.accounts[2].0.into(),
                };
                Ok(WhirlpoolProgramIx::SetRewardEmissionsSuperAuthority(
                    ix_accounts,
                ))
            }
            [195, 96, 237, 108, 68, 162, 219, 230] => {
                check_min_accounts_req(accounts_len, 20)?;
                let ix_accounts = TwoHopSwapIxAccounts {
                    token_program: ix.accounts[0].0.into(),
                    token_authority: ix.accounts[1].0.into(),
                    whirlpool_one: ix.accounts[2].0.into(),
                    whirlpool_two: ix.accounts[3].0.into(),
                    token_owner_account_one_a: ix.accounts[4].0.into(),
                    token_vault_one_a: ix.accounts[5].0.into(),
                    token_owner_account_one_b: ix.accounts[6].0.into(),
                    token_vault_one_b: ix.accounts[7].0.into(),
                    token_owner_account_two_a: ix.accounts[8].0.into(),
                    token_vault_two_a: ix.accounts[9].0.into(),
                    token_owner_account_two_b: ix.accounts[10].0.into(),
                    token_vault_two_b: ix.accounts[11].0.into(),
                    tick_array_one0: ix.accounts[12].0.into(),
                    tick_array_one1: ix.accounts[13].0.into(),
                    tick_array_one2: ix.accounts[14].0.into(),
                    tick_array_two0: ix.accounts[15].0.into(),
                    tick_array_two1: ix.accounts[16].0.into(),
                    tick_array_two2: ix.accounts[17].0.into(),
                    oracle_one: ix.accounts[18].0.into(),
                    oracle_two: ix.accounts[19].0.into(),
                };
                let de_ix_data: TwoHopSwapIxData = BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::TwoHopSwap(ix_accounts, de_ix_data))
            }
            [117, 45, 241, 149, 24, 18, 194, 65] => {
                check_min_accounts_req(accounts_len, 9)?;
                let ix_accounts = InitializePositionBundleIxAccounts {
                    position_bundle: ix.accounts[0].0.into(),
                    position_bundle_mint: ix.accounts[1].0.into(),
                    position_bundle_token_account: ix.accounts[2].0.into(),
                    position_bundle_owner: ix.accounts[3].0.into(),
                    funder: ix.accounts[4].0.into(),
                    token_program: ix.accounts[5].0.into(),
                    system_program: ix.accounts[6].0.into(),
                    rent: ix.accounts[7].0.into(),
                    associated_token_program: ix.accounts[8].0.into(),
                };
                Ok(WhirlpoolProgramIx::InitializePositionBundle(ix_accounts))
            }
            [93, 124, 16, 179, 249, 131, 115, 245] => {
                check_min_accounts_req(accounts_len, 12)?;
                let ix_accounts = InitializePositionBundleWithMetadataIxAccounts {
                    position_bundle: ix.accounts[0].0.into(),
                    position_bundle_mint: ix.accounts[1].0.into(),
                    position_bundle_metadata: ix.accounts[2].0.into(),
                    position_bundle_token_account: ix.accounts[3].0.into(),
                    position_bundle_owner: ix.accounts[4].0.into(),
                    funder: ix.accounts[5].0.into(),
                    metadata_update_auth: ix.accounts[6].0.into(),
                    token_program: ix.accounts[7].0.into(),
                    system_program: ix.accounts[8].0.into(),
                    rent: ix.accounts[9].0.into(),
                    associated_token_program: ix.accounts[10].0.into(),
                    metadata_program: ix.accounts[11].0.into(),
                };
                Ok(WhirlpoolProgramIx::InitializePositionBundleWithMetadata(
                    ix_accounts,
                ))
            }
            [100, 25, 99, 2, 217, 239, 124, 173] => {
                check_min_accounts_req(accounts_len, 6)?;
                let ix_accounts = DeletePositionBundleIxAccounts {
                    position_bundle: ix.accounts[0].0.into(),
                    position_bundle_mint: ix.accounts[1].0.into(),
                    position_bundle_token_account: ix.accounts[2].0.into(),
                    position_bundle_owner: ix.accounts[3].0.into(),
                    receiver: ix.accounts[4].0.into(),
                    token_program: ix.accounts[5].0.into(),
                };
                Ok(WhirlpoolProgramIx::DeletePositionBundle(ix_accounts))
            }
            [169, 113, 126, 171, 213, 172, 212, 49] => {
                check_min_accounts_req(accounts_len, 8)?;
                let ix_accounts = OpenBundledPositionIxAccounts {
                    bundled_position: ix.accounts[0].0.into(),
                    position_bundle: ix.accounts[1].0.into(),
                    position_bundle_token_account: ix.accounts[2].0.into(),
                    position_bundle_authority: ix.accounts[3].0.into(),
                    whirlpool: ix.accounts[4].0.into(),
                    funder: ix.accounts[5].0.into(),
                    system_program: ix.accounts[6].0.into(),
                    rent: ix.accounts[7].0.into(),
                };
                let de_ix_data: OpenBundledPositionIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::OpenBundledPosition(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [41, 36, 216, 245, 27, 85, 103, 67] => {
                check_min_accounts_req(accounts_len, 5)?;
                let ix_accounts = CloseBundledPositionIxAccounts {
                    bundled_position: ix.accounts[0].0.into(),
                    position_bundle: ix.accounts[1].0.into(),
                    position_bundle_token_account: ix.accounts[2].0.into(),
                    position_bundle_authority: ix.accounts[3].0.into(),
                    receiver: ix.accounts[4].0.into(),
                };
                let de_ix_data: CloseBundledPositionIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::CloseBundledPosition(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [212, 47, 95, 92, 114, 102, 131, 250] => {
                check_min_accounts_req(accounts_len, 10)?;
                let ix_accounts = OpenPositionWithTokenExtensionsIxAccounts {
                    funder: ix.accounts[0].0.into(),
                    owner: ix.accounts[1].0.into(),
                    position: ix.accounts[2].0.into(),
                    position_mint: ix.accounts[3].0.into(),
                    position_token_account: ix.accounts[4].0.into(),
                    whirlpool: ix.accounts[5].0.into(),
                    token2022_program: ix.accounts[6].0.into(),
                    system_program: ix.accounts[7].0.into(),
                    associated_token_program: ix.accounts[8].0.into(),
                    metadata_update_auth: ix.accounts[9].0.into(),
                };
                let de_ix_data: OpenPositionWithTokenExtensionsIxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::OpenPositionWithTokenExtensions(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [1, 182, 135, 59, 155, 25, 99, 223] => {
                check_min_accounts_req(accounts_len, 6)?;
                let ix_accounts = ClosePositionWithTokenExtensionsIxAccounts {
                    position_authority: ix.accounts[0].0.into(),
                    receiver: ix.accounts[1].0.into(),
                    position: ix.accounts[2].0.into(),
                    position_mint: ix.accounts[3].0.into(),
                    position_token_account: ix.accounts[4].0.into(),
                    token2022_program: ix.accounts[5].0.into(),
                };
                Ok(WhirlpoolProgramIx::ClosePositionWithTokenExtensions(
                    ix_accounts,
                ))
            }
            [227, 62, 2, 252, 247, 10, 171, 185] => {
                check_min_accounts_req(accounts_len, 9)?;
                let ix_accounts = LockPositionIxAccounts {
                    funder: ix.accounts[0].0.into(),
                    position_authority: ix.accounts[1].0.into(),
                    position: ix.accounts[2].0.into(),
                    position_mint: ix.accounts[3].0.into(),
                    position_token_account: ix.accounts[4].0.into(),
                    lock_config: ix.accounts[5].0.into(),
                    whirlpool: ix.accounts[6].0.into(),
                    token2022_program: ix.accounts[7].0.into(),
                    system_program: ix.accounts[8].0.into(),
                };
                let de_ix_data: LockPositionIxData = BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::LockPosition(ix_accounts, de_ix_data))
            }
            [207, 117, 95, 191, 229, 180, 226, 15] => {
                check_min_accounts_req(accounts_len, 13)?;
                let ix_accounts = CollectFeesV2IxAccounts {
                    whirlpool: ix.accounts[0].0.into(),
                    position_authority: ix.accounts[1].0.into(),
                    position: ix.accounts[2].0.into(),
                    position_token_account: ix.accounts[3].0.into(),
                    token_mint_a: ix.accounts[4].0.into(),
                    token_mint_b: ix.accounts[5].0.into(),
                    token_owner_account_a: ix.accounts[6].0.into(),
                    token_vault_a: ix.accounts[7].0.into(),
                    token_owner_account_b: ix.accounts[8].0.into(),
                    token_vault_b: ix.accounts[9].0.into(),
                    token_program_a: ix.accounts[10].0.into(),
                    token_program_b: ix.accounts[11].0.into(),
                    memo_program: ix.accounts[12].0.into(),
                };
                let de_ix_data: CollectFeesV2IxData = BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::CollectFeesV2(ix_accounts, de_ix_data))
            }
            [103, 128, 222, 134, 114, 200, 22, 200] => {
                check_min_accounts_req(accounts_len, 12)?;
                let ix_accounts = CollectProtocolFeesV2IxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    whirlpool: ix.accounts[1].0.into(),
                    collect_protocol_fees_authority: ix.accounts[2].0.into(),
                    token_mint_a: ix.accounts[3].0.into(),
                    token_mint_b: ix.accounts[4].0.into(),
                    token_vault_a: ix.accounts[5].0.into(),
                    token_vault_b: ix.accounts[6].0.into(),
                    token_destination_a: ix.accounts[7].0.into(),
                    token_destination_b: ix.accounts[8].0.into(),
                    token_program_a: ix.accounts[9].0.into(),
                    token_program_b: ix.accounts[10].0.into(),
                    memo_program: ix.accounts[11].0.into(),
                };
                let de_ix_data: CollectProtocolFeesV2IxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::CollectProtocolFeesV2(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [177, 107, 37, 180, 160, 19, 49, 209] => {
                check_min_accounts_req(accounts_len, 9)?;
                let ix_accounts = CollectRewardV2IxAccounts {
                    whirlpool: ix.accounts[0].0.into(),
                    position_authority: ix.accounts[1].0.into(),
                    position: ix.accounts[2].0.into(),
                    position_token_account: ix.accounts[3].0.into(),
                    reward_owner_account: ix.accounts[4].0.into(),
                    reward_mint: ix.accounts[5].0.into(),
                    reward_vault: ix.accounts[6].0.into(),
                    reward_token_program: ix.accounts[7].0.into(),
                    memo_program: ix.accounts[8].0.into(),
                };
                let de_ix_data: CollectRewardV2IxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::CollectRewardV2(ix_accounts, de_ix_data))
            }
            [58, 127, 188, 62, 79, 82, 196, 96] => {
                check_min_accounts_req(accounts_len, 15)?;
                let ix_accounts = DecreaseLiquidityV2IxAccounts {
                    whirlpool: ix.accounts[0].0.into(),
                    token_program_a: ix.accounts[1].0.into(),
                    token_program_b: ix.accounts[2].0.into(),
                    memo_program: ix.accounts[3].0.into(),
                    position_authority: ix.accounts[4].0.into(),
                    position: ix.accounts[5].0.into(),
                    position_token_account: ix.accounts[6].0.into(),
                    token_mint_a: ix.accounts[7].0.into(),
                    token_mint_b: ix.accounts[8].0.into(),
                    token_owner_account_a: ix.accounts[9].0.into(),
                    token_owner_account_b: ix.accounts[10].0.into(),
                    token_vault_a: ix.accounts[11].0.into(),
                    token_vault_b: ix.accounts[12].0.into(),
                    tick_array_lower: ix.accounts[13].0.into(),
                    tick_array_upper: ix.accounts[14].0.into(),
                };
                let de_ix_data: DecreaseLiquidityV2IxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::DecreaseLiquidityV2(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [133, 29, 89, 223, 69, 238, 176, 10] => {
                check_min_accounts_req(accounts_len, 15)?;
                let ix_accounts = IncreaseLiquidityV2IxAccounts {
                    whirlpool: ix.accounts[0].0.into(),
                    token_program_a: ix.accounts[1].0.into(),
                    token_program_b: ix.accounts[2].0.into(),
                    memo_program: ix.accounts[3].0.into(),
                    position_authority: ix.accounts[4].0.into(),
                    position: ix.accounts[5].0.into(),
                    position_token_account: ix.accounts[6].0.into(),
                    token_mint_a: ix.accounts[7].0.into(),
                    token_mint_b: ix.accounts[8].0.into(),
                    token_owner_account_a: ix.accounts[9].0.into(),
                    token_owner_account_b: ix.accounts[10].0.into(),
                    token_vault_a: ix.accounts[11].0.into(),
                    token_vault_b: ix.accounts[12].0.into(),
                    tick_array_lower: ix.accounts[13].0.into(),
                    tick_array_upper: ix.accounts[14].0.into(),
                };
                let de_ix_data: IncreaseLiquidityV2IxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::IncreaseLiquidityV2(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [207, 45, 87, 242, 27, 63, 204, 67] => {
                check_min_accounts_req(accounts_len, 14)?;
                let ix_accounts = InitializePoolV2IxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    token_mint_a: ix.accounts[1].0.into(),
                    token_mint_b: ix.accounts[2].0.into(),
                    token_badge_a: ix.accounts[3].0.into(),
                    token_badge_b: ix.accounts[4].0.into(),
                    funder: ix.accounts[5].0.into(),
                    whirlpool: ix.accounts[6].0.into(),
                    token_vault_a: ix.accounts[7].0.into(),
                    token_vault_b: ix.accounts[8].0.into(),
                    fee_tier: ix.accounts[9].0.into(),
                    token_program_a: ix.accounts[10].0.into(),
                    token_program_b: ix.accounts[11].0.into(),
                    system_program: ix.accounts[12].0.into(),
                    rent: ix.accounts[13].0.into(),
                };
                let de_ix_data: InitializePoolV2IxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::InitializePoolV2(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [91, 1, 77, 50, 235, 229, 133, 49] => {
                check_min_accounts_req(accounts_len, 9)?;
                let ix_accounts = InitializeRewardV2IxAccounts {
                    reward_authority: ix.accounts[0].0.into(),
                    funder: ix.accounts[1].0.into(),
                    whirlpool: ix.accounts[2].0.into(),
                    reward_mint: ix.accounts[3].0.into(),
                    reward_token_badge: ix.accounts[4].0.into(),
                    reward_vault: ix.accounts[5].0.into(),
                    reward_token_program: ix.accounts[6].0.into(),
                    system_program: ix.accounts[7].0.into(),
                    rent: ix.accounts[8].0.into(),
                };
                let de_ix_data: InitializeRewardV2IxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::InitializeRewardV2(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [114, 228, 72, 32, 193, 48, 160, 102] => {
                check_min_accounts_req(accounts_len, 3)?;
                let ix_accounts = SetRewardEmissionsV2IxAccounts {
                    whirlpool: ix.accounts[0].0.into(),
                    reward_authority: ix.accounts[1].0.into(),
                    reward_vault: ix.accounts[2].0.into(),
                };
                let de_ix_data: SetRewardEmissionsV2IxData =
                    BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::SetRewardEmissionsV2(
                    ix_accounts,
                    de_ix_data,
                ))
            }
            [43, 4, 237, 11, 26, 201, 30, 98] => {
                check_min_accounts_req(accounts_len, 15)?;
                let ix_accounts = SwapV2IxAccounts {
                    token_program_a: ix.accounts[0].0.into(),
                    token_program_b: ix.accounts[1].0.into(),
                    memo_program: ix.accounts[2].0.into(),
                    token_authority: ix.accounts[3].0.into(),
                    whirlpool: ix.accounts[4].0.into(),
                    token_mint_a: ix.accounts[5].0.into(),
                    token_mint_b: ix.accounts[6].0.into(),
                    token_owner_account_a: ix.accounts[7].0.into(),
                    token_vault_a: ix.accounts[8].0.into(),
                    token_owner_account_b: ix.accounts[9].0.into(),
                    token_vault_b: ix.accounts[10].0.into(),
                    tick_array0: ix.accounts[11].0.into(),
                    tick_array1: ix.accounts[12].0.into(),
                    tick_array2: ix.accounts[13].0.into(),
                    oracle: ix.accounts[14].0.into(),
                };
                let de_ix_data: SwapV2IxData = BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::SwapV2(ix_accounts, de_ix_data))
            }
            [186, 143, 209, 29, 254, 2, 194, 117] => {
                check_min_accounts_req(accounts_len, 24)?;
                let ix_accounts = TwoHopSwapV2IxAccounts {
                    whirlpool_one: ix.accounts[0].0.into(),
                    whirlpool_two: ix.accounts[1].0.into(),
                    token_mint_input: ix.accounts[2].0.into(),
                    token_mint_intermediate: ix.accounts[3].0.into(),
                    token_mint_output: ix.accounts[4].0.into(),
                    token_program_input: ix.accounts[5].0.into(),
                    token_program_intermediate: ix.accounts[6].0.into(),
                    token_program_output: ix.accounts[7].0.into(),
                    token_owner_account_input: ix.accounts[8].0.into(),
                    token_vault_one_input: ix.accounts[9].0.into(),
                    token_vault_one_intermediate: ix.accounts[10].0.into(),
                    token_vault_two_intermediate: ix.accounts[11].0.into(),
                    token_vault_two_output: ix.accounts[12].0.into(),
                    token_owner_account_output: ix.accounts[13].0.into(),
                    token_authority: ix.accounts[14].0.into(),
                    tick_array_one0: ix.accounts[15].0.into(),
                    tick_array_one1: ix.accounts[16].0.into(),
                    tick_array_one2: ix.accounts[17].0.into(),
                    tick_array_two0: ix.accounts[18].0.into(),
                    tick_array_two1: ix.accounts[19].0.into(),
                    tick_array_two2: ix.accounts[20].0.into(),
                    oracle_one: ix.accounts[21].0.into(),
                    oracle_two: ix.accounts[22].0.into(),
                    memo_program: ix.accounts[23].0.into(),
                };
                let de_ix_data: TwoHopSwapV2IxData = BorshDeserialize::deserialize(&mut ix_data)?;
                Ok(WhirlpoolProgramIx::TwoHopSwapV2(ix_accounts, de_ix_data))
            }
            [55, 9, 53, 9, 114, 57, 209, 52] => {
                check_min_accounts_req(accounts_len, 5)?;
                let ix_accounts = InitializeConfigExtensionIxAccounts {
                    config: ix.accounts[0].0.into(),
                    config_extension: ix.accounts[1].0.into(),
                    funder: ix.accounts[2].0.into(),
                    fee_authority: ix.accounts[3].0.into(),
                    system_program: ix.accounts[4].0.into(),
                };
                Ok(WhirlpoolProgramIx::InitializeConfigExtension(ix_accounts))
            }
            [44, 94, 241, 116, 24, 188, 60, 143] => {
                check_min_accounts_req(accounts_len, 4)?;
                let ix_accounts = SetConfigExtensionAuthorityIxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    whirlpools_config_extension: ix.accounts[1].0.into(),
                    config_extension_authority: ix.accounts[2].0.into(),
                    new_config_extension_authority: ix.accounts[3].0.into(),
                };
                Ok(WhirlpoolProgramIx::SetConfigExtensionAuthority(ix_accounts))
            }
            [207, 202, 4, 32, 205, 79, 13, 178] => {
                check_min_accounts_req(accounts_len, 4)?;
                let ix_accounts = SetTokenBadgeAuthorityIxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    whirlpools_config_extension: ix.accounts[1].0.into(),
                    config_extension_authority: ix.accounts[2].0.into(),
                    new_token_badge_authority: ix.accounts[3].0.into(),
                };
                Ok(WhirlpoolProgramIx::SetTokenBadgeAuthority(ix_accounts))
            }
            [253, 77, 205, 95, 27, 224, 89, 223] => {
                check_min_accounts_req(accounts_len, 7)?;
                let ix_accounts = InitializeTokenBadgeIxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    whirlpools_config_extension: ix.accounts[1].0.into(),
                    token_badge_authority: ix.accounts[2].0.into(),
                    token_mint: ix.accounts[3].0.into(),
                    token_badge: ix.accounts[4].0.into(),
                    funder: ix.accounts[5].0.into(),
                    system_program: ix.accounts[6].0.into(),
                };
                Ok(WhirlpoolProgramIx::InitializeTokenBadge(ix_accounts))
            }
            [53, 146, 68, 8, 18, 117, 17, 185] => {
                check_min_accounts_req(accounts_len, 6)?;
                let ix_accounts = DeleteTokenBadgeIxAccounts {
                    whirlpools_config: ix.accounts[0].0.into(),
                    whirlpools_config_extension: ix.accounts[1].0.into(),
                    token_badge_authority: ix.accounts[2].0.into(),
                    token_mint: ix.accounts[3].0.into(),
                    token_badge: ix.accounts[4].0.into(),
                    receiver: ix.accounts[5].0.into(),
                };
                Ok(WhirlpoolProgramIx::DeleteTokenBadge(ix_accounts))
            }
            _ => Err(yellowstone_vixen_core::ParseError::from(
                "Invalid Instruction discriminator".to_owned(),
            )),
        };

        #[cfg(feature = "tracing")]
        match &ix {
            Ok(ix) => {
                tracing::info!(
                    name: "correctly_parsed_instruction",
                    name = "ix_update",
                    program = ID.to_string(),
                    ix = ix.to_string()
                );
            }
            Err(e) => {
                tracing::info!(
                    name: "incorrectly_parsed_instruction",
                    name = "ix_update",
                    program = ID.to_string(),
                    ix = "error",
                    discriminator = ?ix_discriminator,
                    error = ?e
                );
            }
        }

        ix
    }
}

pub fn check_min_accounts_req(
    actual: usize,
    expected: usize,
) -> yellowstone_vixen_core::ParseResult<()> {
    if actual < expected {
        Err(yellowstone_vixen_core::ParseError::from(format!(
            "Too few accounts provided: expected {expected}, got {actual}"
        )))
    } else {
        Ok(())
    }
}

// #[cfg(feature = "proto")]
mod proto_parser {
    use super::{InstructionParser, WhirlpoolProgramIx};
    use crate::{proto_def, proto_helpers::proto_types_parsers::IntoProto};
    use yellowstone_vixen_core::proto::ParseProto;

    use super::InitializeConfigIxAccounts;
    impl IntoProto<proto_def::InitializeConfigIxAccounts> for InitializeConfigIxAccounts {
        fn into_proto(self) -> proto_def::InitializeConfigIxAccounts {
            proto_def::InitializeConfigIxAccounts {
                config: self.config.to_string(),
                funder: self.funder.to_string(),
                system_program: self.system_program.to_string(),
            }
        }
    }
    use super::InitializeConfigIxData;
    impl IntoProto<proto_def::InitializeConfigIxData> for InitializeConfigIxData {
        fn into_proto(self) -> proto_def::InitializeConfigIxData {
            proto_def::InitializeConfigIxData {
                fee_authority: self.fee_authority.to_string(),
                collect_protocol_fees_authority: self.collect_protocol_fees_authority.to_string(),
                reward_emissions_super_authority: self.reward_emissions_super_authority.to_string(),
                default_protocol_fee_rate: self.default_protocol_fee_rate.into(),
            }
        }
    }
    use super::InitializePoolIxAccounts;
    impl IntoProto<proto_def::InitializePoolIxAccounts> for InitializePoolIxAccounts {
        fn into_proto(self) -> proto_def::InitializePoolIxAccounts {
            proto_def::InitializePoolIxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                token_mint_a: self.token_mint_a.to_string(),
                token_mint_b: self.token_mint_b.to_string(),
                funder: self.funder.to_string(),
                whirlpool: self.whirlpool.to_string(),
                token_vault_a: self.token_vault_a.to_string(),
                token_vault_b: self.token_vault_b.to_string(),
                fee_tier: self.fee_tier.to_string(),
                token_program: self.token_program.to_string(),
                system_program: self.system_program.to_string(),
                rent: self.rent.to_string(),
            }
        }
    }
    use super::InitializePoolIxData;
    impl IntoProto<proto_def::InitializePoolIxData> for InitializePoolIxData {
        fn into_proto(self) -> proto_def::InitializePoolIxData {
            proto_def::InitializePoolIxData {
                whirlpool_bump: self.whirlpool_bump.into(),
                tick_spacing: self.tick_spacing.into(),
                initial_sqrt_price: self.initial_sqrt_price.to_string(),
            }
        }
    }
    use super::InitializeTickArrayIxAccounts;
    impl IntoProto<proto_def::InitializeTickArrayIxAccounts> for InitializeTickArrayIxAccounts {
        fn into_proto(self) -> proto_def::InitializeTickArrayIxAccounts {
            proto_def::InitializeTickArrayIxAccounts {
                whirlpool: self.whirlpool.to_string(),
                funder: self.funder.to_string(),
                tick_array: self.tick_array.to_string(),
                system_program: self.system_program.to_string(),
            }
        }
    }
    use super::InitializeTickArrayIxData;
    impl IntoProto<proto_def::InitializeTickArrayIxData> for InitializeTickArrayIxData {
        fn into_proto(self) -> proto_def::InitializeTickArrayIxData {
            proto_def::InitializeTickArrayIxData {
                start_tick_index: self.start_tick_index,
            }
        }
    }
    use super::InitializeFeeTierIxAccounts;
    impl IntoProto<proto_def::InitializeFeeTierIxAccounts> for InitializeFeeTierIxAccounts {
        fn into_proto(self) -> proto_def::InitializeFeeTierIxAccounts {
            proto_def::InitializeFeeTierIxAccounts {
                config: self.config.to_string(),
                fee_tier: self.fee_tier.to_string(),
                funder: self.funder.to_string(),
                fee_authority: self.fee_authority.to_string(),
                system_program: self.system_program.to_string(),
            }
        }
    }
    use super::InitializeFeeTierIxData;
    impl IntoProto<proto_def::InitializeFeeTierIxData> for InitializeFeeTierIxData {
        fn into_proto(self) -> proto_def::InitializeFeeTierIxData {
            proto_def::InitializeFeeTierIxData {
                tick_spacing: self.tick_spacing.into(),
                default_fee_rate: self.default_fee_rate.into(),
            }
        }
    }
    use super::InitializeRewardIxAccounts;
    impl IntoProto<proto_def::InitializeRewardIxAccounts> for InitializeRewardIxAccounts {
        fn into_proto(self) -> proto_def::InitializeRewardIxAccounts {
            proto_def::InitializeRewardIxAccounts {
                reward_authority: self.reward_authority.to_string(),
                funder: self.funder.to_string(),
                whirlpool: self.whirlpool.to_string(),
                reward_mint: self.reward_mint.to_string(),
                reward_vault: self.reward_vault.to_string(),
                token_program: self.token_program.to_string(),
                system_program: self.system_program.to_string(),
                rent: self.rent.to_string(),
            }
        }
    }
    use super::InitializeRewardIxData;
    impl IntoProto<proto_def::InitializeRewardIxData> for InitializeRewardIxData {
        fn into_proto(self) -> proto_def::InitializeRewardIxData {
            proto_def::InitializeRewardIxData {
                reward_index: self.reward_index.into(),
            }
        }
    }
    use super::SetRewardEmissionsIxAccounts;
    impl IntoProto<proto_def::SetRewardEmissionsIxAccounts> for SetRewardEmissionsIxAccounts {
        fn into_proto(self) -> proto_def::SetRewardEmissionsIxAccounts {
            proto_def::SetRewardEmissionsIxAccounts {
                whirlpool: self.whirlpool.to_string(),
                reward_authority: self.reward_authority.to_string(),
                reward_vault: self.reward_vault.to_string(),
            }
        }
    }
    use super::SetRewardEmissionsIxData;
    impl IntoProto<proto_def::SetRewardEmissionsIxData> for SetRewardEmissionsIxData {
        fn into_proto(self) -> proto_def::SetRewardEmissionsIxData {
            proto_def::SetRewardEmissionsIxData {
                reward_index: self.reward_index.into(),
                emissions_per_second_x64: self.emissions_per_second_x64.to_string(),
            }
        }
    }
    use super::OpenPositionIxAccounts;
    impl IntoProto<proto_def::OpenPositionIxAccounts> for OpenPositionIxAccounts {
        fn into_proto(self) -> proto_def::OpenPositionIxAccounts {
            proto_def::OpenPositionIxAccounts {
                funder: self.funder.to_string(),
                owner: self.owner.to_string(),
                position: self.position.to_string(),
                position_mint: self.position_mint.to_string(),
                position_token_account: self.position_token_account.to_string(),
                whirlpool: self.whirlpool.to_string(),
                token_program: self.token_program.to_string(),
                system_program: self.system_program.to_string(),
                rent: self.rent.to_string(),
                associated_token_program: self.associated_token_program.to_string(),
            }
        }
    }
    use super::OpenPositionIxData;
    impl IntoProto<proto_def::OpenPositionIxData> for OpenPositionIxData {
        fn into_proto(self) -> proto_def::OpenPositionIxData {
            proto_def::OpenPositionIxData {
                position_bump: self.position_bump.into(),
                tick_lower_index: self.tick_lower_index,
                tick_upper_index: self.tick_upper_index,
            }
        }
    }
    use super::OpenPositionWithMetadataIxAccounts;
    impl IntoProto<proto_def::OpenPositionWithMetadataIxAccounts>
        for OpenPositionWithMetadataIxAccounts
    {
        fn into_proto(self) -> proto_def::OpenPositionWithMetadataIxAccounts {
            proto_def::OpenPositionWithMetadataIxAccounts {
                funder: self.funder.to_string(),
                owner: self.owner.to_string(),
                position: self.position.to_string(),
                position_mint: self.position_mint.to_string(),
                position_metadata_account: self.position_metadata_account.to_string(),
                position_token_account: self.position_token_account.to_string(),
                whirlpool: self.whirlpool.to_string(),
                token_program: self.token_program.to_string(),
                system_program: self.system_program.to_string(),
                rent: self.rent.to_string(),
                associated_token_program: self.associated_token_program.to_string(),
                metadata_program: self.metadata_program.to_string(),
                metadata_update_auth: self.metadata_update_auth.to_string(),
            }
        }
    }
    use super::OpenPositionWithMetadataIxData;
    impl IntoProto<proto_def::OpenPositionWithMetadataIxData> for OpenPositionWithMetadataIxData {
        fn into_proto(self) -> proto_def::OpenPositionWithMetadataIxData {
            proto_def::OpenPositionWithMetadataIxData {
                position_bump: self.position_bump.into(),
                metadata_bump: self.metadata_bump.into(),
                tick_lower_index: self.tick_lower_index,
                tick_upper_index: self.tick_upper_index,
            }
        }
    }
    use super::IncreaseLiquidityIxAccounts;
    impl IntoProto<proto_def::IncreaseLiquidityIxAccounts> for IncreaseLiquidityIxAccounts {
        fn into_proto(self) -> proto_def::IncreaseLiquidityIxAccounts {
            proto_def::IncreaseLiquidityIxAccounts {
                whirlpool: self.whirlpool.to_string(),
                token_program: self.token_program.to_string(),
                position_authority: self.position_authority.to_string(),
                position: self.position.to_string(),
                position_token_account: self.position_token_account.to_string(),
                token_owner_account_a: self.token_owner_account_a.to_string(),
                token_owner_account_b: self.token_owner_account_b.to_string(),
                token_vault_a: self.token_vault_a.to_string(),
                token_vault_b: self.token_vault_b.to_string(),
                tick_array_lower: self.tick_array_lower.to_string(),
                tick_array_upper: self.tick_array_upper.to_string(),
            }
        }
    }
    use super::IncreaseLiquidityIxData;
    impl IntoProto<proto_def::IncreaseLiquidityIxData> for IncreaseLiquidityIxData {
        fn into_proto(self) -> proto_def::IncreaseLiquidityIxData {
            proto_def::IncreaseLiquidityIxData {
                liquidity_amount: self.liquidity_amount.to_string(),
                token_max_a: self.token_max_a,
                token_max_b: self.token_max_b,
            }
        }
    }
    use super::DecreaseLiquidityIxAccounts;
    impl IntoProto<proto_def::DecreaseLiquidityIxAccounts> for DecreaseLiquidityIxAccounts {
        fn into_proto(self) -> proto_def::DecreaseLiquidityIxAccounts {
            proto_def::DecreaseLiquidityIxAccounts {
                whirlpool: self.whirlpool.to_string(),
                token_program: self.token_program.to_string(),
                position_authority: self.position_authority.to_string(),
                position: self.position.to_string(),
                position_token_account: self.position_token_account.to_string(),
                token_owner_account_a: self.token_owner_account_a.to_string(),
                token_owner_account_b: self.token_owner_account_b.to_string(),
                token_vault_a: self.token_vault_a.to_string(),
                token_vault_b: self.token_vault_b.to_string(),
                tick_array_lower: self.tick_array_lower.to_string(),
                tick_array_upper: self.tick_array_upper.to_string(),
            }
        }
    }
    use super::DecreaseLiquidityIxData;
    impl IntoProto<proto_def::DecreaseLiquidityIxData> for DecreaseLiquidityIxData {
        fn into_proto(self) -> proto_def::DecreaseLiquidityIxData {
            proto_def::DecreaseLiquidityIxData {
                liquidity_amount: self.liquidity_amount.to_string(),
                token_min_a: self.token_min_a,
                token_min_b: self.token_min_b,
            }
        }
    }
    use super::UpdateFeesAndRewardsIxAccounts;
    impl IntoProto<proto_def::UpdateFeesAndRewardsIxAccounts> for UpdateFeesAndRewardsIxAccounts {
        fn into_proto(self) -> proto_def::UpdateFeesAndRewardsIxAccounts {
            proto_def::UpdateFeesAndRewardsIxAccounts {
                whirlpool: self.whirlpool.to_string(),
                position: self.position.to_string(),
                tick_array_lower: self.tick_array_lower.to_string(),
                tick_array_upper: self.tick_array_upper.to_string(),
            }
        }
    }
    use super::CollectFeesIxAccounts;
    impl IntoProto<proto_def::CollectFeesIxAccounts> for CollectFeesIxAccounts {
        fn into_proto(self) -> proto_def::CollectFeesIxAccounts {
            proto_def::CollectFeesIxAccounts {
                whirlpool: self.whirlpool.to_string(),
                position_authority: self.position_authority.to_string(),
                position: self.position.to_string(),
                position_token_account: self.position_token_account.to_string(),
                token_owner_account_a: self.token_owner_account_a.to_string(),
                token_vault_a: self.token_vault_a.to_string(),
                token_owner_account_b: self.token_owner_account_b.to_string(),
                token_vault_b: self.token_vault_b.to_string(),
                token_program: self.token_program.to_string(),
            }
        }
    }
    use super::CollectRewardIxAccounts;
    impl IntoProto<proto_def::CollectRewardIxAccounts> for CollectRewardIxAccounts {
        fn into_proto(self) -> proto_def::CollectRewardIxAccounts {
            proto_def::CollectRewardIxAccounts {
                whirlpool: self.whirlpool.to_string(),
                position_authority: self.position_authority.to_string(),
                position: self.position.to_string(),
                position_token_account: self.position_token_account.to_string(),
                reward_owner_account: self.reward_owner_account.to_string(),
                reward_vault: self.reward_vault.to_string(),
                token_program: self.token_program.to_string(),
            }
        }
    }
    use super::CollectRewardIxData;
    impl IntoProto<proto_def::CollectRewardIxData> for CollectRewardIxData {
        fn into_proto(self) -> proto_def::CollectRewardIxData {
            proto_def::CollectRewardIxData {
                reward_index: self.reward_index.into(),
            }
        }
    }
    use super::CollectProtocolFeesIxAccounts;
    impl IntoProto<proto_def::CollectProtocolFeesIxAccounts> for CollectProtocolFeesIxAccounts {
        fn into_proto(self) -> proto_def::CollectProtocolFeesIxAccounts {
            proto_def::CollectProtocolFeesIxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                whirlpool: self.whirlpool.to_string(),
                collect_protocol_fees_authority: self.collect_protocol_fees_authority.to_string(),
                token_vault_a: self.token_vault_a.to_string(),
                token_vault_b: self.token_vault_b.to_string(),
                token_destination_a: self.token_destination_a.to_string(),
                token_destination_b: self.token_destination_b.to_string(),
                token_program: self.token_program.to_string(),
            }
        }
    }
    use super::SwapIxAccounts;
    impl IntoProto<proto_def::SwapIxAccounts> for SwapIxAccounts {
        fn into_proto(self) -> proto_def::SwapIxAccounts {
            proto_def::SwapIxAccounts {
                token_program: self.token_program.to_string(),
                token_authority: self.token_authority.to_string(),
                whirlpool: self.whirlpool.to_string(),
                token_owner_account_a: self.token_owner_account_a.to_string(),
                token_vault_a: self.token_vault_a.to_string(),
                token_owner_account_b: self.token_owner_account_b.to_string(),
                token_vault_b: self.token_vault_b.to_string(),
                tick_array0: self.tick_array0.to_string(),
                tick_array1: self.tick_array1.to_string(),
                tick_array2: self.tick_array2.to_string(),
                oracle: self.oracle.to_string(),
            }
        }
    }
    use super::SwapIxData;
    impl IntoProto<proto_def::SwapIxData> for SwapIxData {
        fn into_proto(self) -> proto_def::SwapIxData {
            proto_def::SwapIxData {
                amount: self.amount,
                other_amount_threshold: self.other_amount_threshold,
                sqrt_price_limit: self.sqrt_price_limit.to_string(),
                amount_specified_is_input: self.amount_specified_is_input,
                a_to_b: self.a_to_b,
            }
        }
    }
    use super::ClosePositionIxAccounts;
    impl IntoProto<proto_def::ClosePositionIxAccounts> for ClosePositionIxAccounts {
        fn into_proto(self) -> proto_def::ClosePositionIxAccounts {
            proto_def::ClosePositionIxAccounts {
                position_authority: self.position_authority.to_string(),
                receiver: self.receiver.to_string(),
                position: self.position.to_string(),
                position_mint: self.position_mint.to_string(),
                position_token_account: self.position_token_account.to_string(),
                token_program: self.token_program.to_string(),
            }
        }
    }
    use super::SetDefaultFeeRateIxAccounts;
    impl IntoProto<proto_def::SetDefaultFeeRateIxAccounts> for SetDefaultFeeRateIxAccounts {
        fn into_proto(self) -> proto_def::SetDefaultFeeRateIxAccounts {
            proto_def::SetDefaultFeeRateIxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                fee_tier: self.fee_tier.to_string(),
                fee_authority: self.fee_authority.to_string(),
            }
        }
    }
    use super::SetDefaultFeeRateIxData;
    impl IntoProto<proto_def::SetDefaultFeeRateIxData> for SetDefaultFeeRateIxData {
        fn into_proto(self) -> proto_def::SetDefaultFeeRateIxData {
            proto_def::SetDefaultFeeRateIxData {
                default_fee_rate: self.default_fee_rate.into(),
            }
        }
    }
    use super::SetDefaultProtocolFeeRateIxAccounts;
    impl IntoProto<proto_def::SetDefaultProtocolFeeRateIxAccounts>
        for SetDefaultProtocolFeeRateIxAccounts
    {
        fn into_proto(self) -> proto_def::SetDefaultProtocolFeeRateIxAccounts {
            proto_def::SetDefaultProtocolFeeRateIxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                fee_authority: self.fee_authority.to_string(),
            }
        }
    }
    use super::SetDefaultProtocolFeeRateIxData;
    impl IntoProto<proto_def::SetDefaultProtocolFeeRateIxData> for SetDefaultProtocolFeeRateIxData {
        fn into_proto(self) -> proto_def::SetDefaultProtocolFeeRateIxData {
            proto_def::SetDefaultProtocolFeeRateIxData {
                default_protocol_fee_rate: self.default_protocol_fee_rate.into(),
            }
        }
    }
    use super::SetFeeRateIxAccounts;
    impl IntoProto<proto_def::SetFeeRateIxAccounts> for SetFeeRateIxAccounts {
        fn into_proto(self) -> proto_def::SetFeeRateIxAccounts {
            proto_def::SetFeeRateIxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                whirlpool: self.whirlpool.to_string(),
                fee_authority: self.fee_authority.to_string(),
            }
        }
    }
    use super::SetFeeRateIxData;
    impl IntoProto<proto_def::SetFeeRateIxData> for SetFeeRateIxData {
        fn into_proto(self) -> proto_def::SetFeeRateIxData {
            proto_def::SetFeeRateIxData {
                fee_rate: self.fee_rate.into(),
            }
        }
    }
    use super::SetProtocolFeeRateIxAccounts;
    impl IntoProto<proto_def::SetProtocolFeeRateIxAccounts> for SetProtocolFeeRateIxAccounts {
        fn into_proto(self) -> proto_def::SetProtocolFeeRateIxAccounts {
            proto_def::SetProtocolFeeRateIxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                whirlpool: self.whirlpool.to_string(),
                fee_authority: self.fee_authority.to_string(),
            }
        }
    }
    use super::SetProtocolFeeRateIxData;
    impl IntoProto<proto_def::SetProtocolFeeRateIxData> for SetProtocolFeeRateIxData {
        fn into_proto(self) -> proto_def::SetProtocolFeeRateIxData {
            proto_def::SetProtocolFeeRateIxData {
                protocol_fee_rate: self.protocol_fee_rate.into(),
            }
        }
    }
    use super::SetFeeAuthorityIxAccounts;
    impl IntoProto<proto_def::SetFeeAuthorityIxAccounts> for SetFeeAuthorityIxAccounts {
        fn into_proto(self) -> proto_def::SetFeeAuthorityIxAccounts {
            proto_def::SetFeeAuthorityIxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                fee_authority: self.fee_authority.to_string(),
                new_fee_authority: self.new_fee_authority.to_string(),
            }
        }
    }
    use super::SetCollectProtocolFeesAuthorityIxAccounts;
    impl IntoProto<proto_def::SetCollectProtocolFeesAuthorityIxAccounts>
        for SetCollectProtocolFeesAuthorityIxAccounts
    {
        fn into_proto(self) -> proto_def::SetCollectProtocolFeesAuthorityIxAccounts {
            proto_def::SetCollectProtocolFeesAuthorityIxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                collect_protocol_fees_authority: self.collect_protocol_fees_authority.to_string(),
                new_collect_protocol_fees_authority: self
                    .new_collect_protocol_fees_authority
                    .to_string(),
            }
        }
    }
    use super::SetRewardAuthorityIxAccounts;
    impl IntoProto<proto_def::SetRewardAuthorityIxAccounts> for SetRewardAuthorityIxAccounts {
        fn into_proto(self) -> proto_def::SetRewardAuthorityIxAccounts {
            proto_def::SetRewardAuthorityIxAccounts {
                whirlpool: self.whirlpool.to_string(),
                reward_authority: self.reward_authority.to_string(),
                new_reward_authority: self.new_reward_authority.to_string(),
            }
        }
    }
    use super::SetRewardAuthorityIxData;
    impl IntoProto<proto_def::SetRewardAuthorityIxData> for SetRewardAuthorityIxData {
        fn into_proto(self) -> proto_def::SetRewardAuthorityIxData {
            proto_def::SetRewardAuthorityIxData {
                reward_index: self.reward_index.into(),
            }
        }
    }
    use super::SetRewardAuthorityBySuperAuthorityIxAccounts;
    impl IntoProto<proto_def::SetRewardAuthorityBySuperAuthorityIxAccounts>
        for SetRewardAuthorityBySuperAuthorityIxAccounts
    {
        fn into_proto(self) -> proto_def::SetRewardAuthorityBySuperAuthorityIxAccounts {
            proto_def::SetRewardAuthorityBySuperAuthorityIxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                whirlpool: self.whirlpool.to_string(),
                reward_emissions_super_authority: self.reward_emissions_super_authority.to_string(),
                new_reward_authority: self.new_reward_authority.to_string(),
            }
        }
    }
    use super::SetRewardAuthorityBySuperAuthorityIxData;
    impl IntoProto<proto_def::SetRewardAuthorityBySuperAuthorityIxData>
        for SetRewardAuthorityBySuperAuthorityIxData
    {
        fn into_proto(self) -> proto_def::SetRewardAuthorityBySuperAuthorityIxData {
            proto_def::SetRewardAuthorityBySuperAuthorityIxData {
                reward_index: self.reward_index.into(),
            }
        }
    }
    use super::SetRewardEmissionsSuperAuthorityIxAccounts;
    impl IntoProto<proto_def::SetRewardEmissionsSuperAuthorityIxAccounts>
        for SetRewardEmissionsSuperAuthorityIxAccounts
    {
        fn into_proto(self) -> proto_def::SetRewardEmissionsSuperAuthorityIxAccounts {
            proto_def::SetRewardEmissionsSuperAuthorityIxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                reward_emissions_super_authority: self.reward_emissions_super_authority.to_string(),
                new_reward_emissions_super_authority: self
                    .new_reward_emissions_super_authority
                    .to_string(),
            }
        }
    }
    use super::TwoHopSwapIxAccounts;
    impl IntoProto<proto_def::TwoHopSwapIxAccounts> for TwoHopSwapIxAccounts {
        fn into_proto(self) -> proto_def::TwoHopSwapIxAccounts {
            proto_def::TwoHopSwapIxAccounts {
                token_program: self.token_program.to_string(),
                token_authority: self.token_authority.to_string(),
                whirlpool_one: self.whirlpool_one.to_string(),
                whirlpool_two: self.whirlpool_two.to_string(),
                token_owner_account_one_a: self.token_owner_account_one_a.to_string(),
                token_vault_one_a: self.token_vault_one_a.to_string(),
                token_owner_account_one_b: self.token_owner_account_one_b.to_string(),
                token_vault_one_b: self.token_vault_one_b.to_string(),
                token_owner_account_two_a: self.token_owner_account_two_a.to_string(),
                token_vault_two_a: self.token_vault_two_a.to_string(),
                token_owner_account_two_b: self.token_owner_account_two_b.to_string(),
                token_vault_two_b: self.token_vault_two_b.to_string(),
                tick_array_one0: self.tick_array_one0.to_string(),
                tick_array_one1: self.tick_array_one1.to_string(),
                tick_array_one2: self.tick_array_one2.to_string(),
                tick_array_two0: self.tick_array_two0.to_string(),
                tick_array_two1: self.tick_array_two1.to_string(),
                tick_array_two2: self.tick_array_two2.to_string(),
                oracle_one: self.oracle_one.to_string(),
                oracle_two: self.oracle_two.to_string(),
            }
        }
    }
    use super::TwoHopSwapIxData;
    impl IntoProto<proto_def::TwoHopSwapIxData> for TwoHopSwapIxData {
        fn into_proto(self) -> proto_def::TwoHopSwapIxData {
            proto_def::TwoHopSwapIxData {
                amount: self.amount,
                other_amount_threshold: self.other_amount_threshold,
                amount_specified_is_input: self.amount_specified_is_input,
                a_to_b_one: self.a_to_b_one,
                a_to_b_two: self.a_to_b_two,
                sqrt_price_limit_one: self.sqrt_price_limit_one.to_string(),
                sqrt_price_limit_two: self.sqrt_price_limit_two.to_string(),
            }
        }
    }
    use super::InitializePositionBundleIxAccounts;
    impl IntoProto<proto_def::InitializePositionBundleIxAccounts>
        for InitializePositionBundleIxAccounts
    {
        fn into_proto(self) -> proto_def::InitializePositionBundleIxAccounts {
            proto_def::InitializePositionBundleIxAccounts {
                position_bundle: self.position_bundle.to_string(),
                position_bundle_mint: self.position_bundle_mint.to_string(),
                position_bundle_token_account: self.position_bundle_token_account.to_string(),
                position_bundle_owner: self.position_bundle_owner.to_string(),
                funder: self.funder.to_string(),
                token_program: self.token_program.to_string(),
                system_program: self.system_program.to_string(),
                rent: self.rent.to_string(),
                associated_token_program: self.associated_token_program.to_string(),
            }
        }
    }
    use super::InitializePositionBundleWithMetadataIxAccounts;
    impl IntoProto<proto_def::InitializePositionBundleWithMetadataIxAccounts>
        for InitializePositionBundleWithMetadataIxAccounts
    {
        fn into_proto(self) -> proto_def::InitializePositionBundleWithMetadataIxAccounts {
            proto_def::InitializePositionBundleWithMetadataIxAccounts {
                position_bundle: self.position_bundle.to_string(),
                position_bundle_mint: self.position_bundle_mint.to_string(),
                position_bundle_metadata: self.position_bundle_metadata.to_string(),
                position_bundle_token_account: self.position_bundle_token_account.to_string(),
                position_bundle_owner: self.position_bundle_owner.to_string(),
                funder: self.funder.to_string(),
                metadata_update_auth: self.metadata_update_auth.to_string(),
                token_program: self.token_program.to_string(),
                system_program: self.system_program.to_string(),
                rent: self.rent.to_string(),
                associated_token_program: self.associated_token_program.to_string(),
                metadata_program: self.metadata_program.to_string(),
            }
        }
    }
    use super::DeletePositionBundleIxAccounts;
    impl IntoProto<proto_def::DeletePositionBundleIxAccounts> for DeletePositionBundleIxAccounts {
        fn into_proto(self) -> proto_def::DeletePositionBundleIxAccounts {
            proto_def::DeletePositionBundleIxAccounts {
                position_bundle: self.position_bundle.to_string(),
                position_bundle_mint: self.position_bundle_mint.to_string(),
                position_bundle_token_account: self.position_bundle_token_account.to_string(),
                position_bundle_owner: self.position_bundle_owner.to_string(),
                receiver: self.receiver.to_string(),
                token_program: self.token_program.to_string(),
            }
        }
    }
    use super::OpenBundledPositionIxAccounts;
    impl IntoProto<proto_def::OpenBundledPositionIxAccounts> for OpenBundledPositionIxAccounts {
        fn into_proto(self) -> proto_def::OpenBundledPositionIxAccounts {
            proto_def::OpenBundledPositionIxAccounts {
                bundled_position: self.bundled_position.to_string(),
                position_bundle: self.position_bundle.to_string(),
                position_bundle_token_account: self.position_bundle_token_account.to_string(),
                position_bundle_authority: self.position_bundle_authority.to_string(),
                whirlpool: self.whirlpool.to_string(),
                funder: self.funder.to_string(),
                system_program: self.system_program.to_string(),
                rent: self.rent.to_string(),
            }
        }
    }
    use super::OpenBundledPositionIxData;
    impl IntoProto<proto_def::OpenBundledPositionIxData> for OpenBundledPositionIxData {
        fn into_proto(self) -> proto_def::OpenBundledPositionIxData {
            proto_def::OpenBundledPositionIxData {
                bundle_index: self.bundle_index.into(),
                tick_lower_index: self.tick_lower_index,
                tick_upper_index: self.tick_upper_index,
            }
        }
    }
    use super::CloseBundledPositionIxAccounts;
    impl IntoProto<proto_def::CloseBundledPositionIxAccounts> for CloseBundledPositionIxAccounts {
        fn into_proto(self) -> proto_def::CloseBundledPositionIxAccounts {
            proto_def::CloseBundledPositionIxAccounts {
                bundled_position: self.bundled_position.to_string(),
                position_bundle: self.position_bundle.to_string(),
                position_bundle_token_account: self.position_bundle_token_account.to_string(),
                position_bundle_authority: self.position_bundle_authority.to_string(),
                receiver: self.receiver.to_string(),
            }
        }
    }
    use super::CloseBundledPositionIxData;
    impl IntoProto<proto_def::CloseBundledPositionIxData> for CloseBundledPositionIxData {
        fn into_proto(self) -> proto_def::CloseBundledPositionIxData {
            proto_def::CloseBundledPositionIxData {
                bundle_index: self.bundle_index.into(),
            }
        }
    }
    use super::OpenPositionWithTokenExtensionsIxAccounts;
    impl IntoProto<proto_def::OpenPositionWithTokenExtensionsIxAccounts>
        for OpenPositionWithTokenExtensionsIxAccounts
    {
        fn into_proto(self) -> proto_def::OpenPositionWithTokenExtensionsIxAccounts {
            proto_def::OpenPositionWithTokenExtensionsIxAccounts {
                funder: self.funder.to_string(),
                owner: self.owner.to_string(),
                position: self.position.to_string(),
                position_mint: self.position_mint.to_string(),
                position_token_account: self.position_token_account.to_string(),
                whirlpool: self.whirlpool.to_string(),
                token2022_program: self.token2022_program.to_string(),
                system_program: self.system_program.to_string(),
                associated_token_program: self.associated_token_program.to_string(),
                metadata_update_auth: self.metadata_update_auth.to_string(),
            }
        }
    }
    use super::OpenPositionWithTokenExtensionsIxData;
    impl IntoProto<proto_def::OpenPositionWithTokenExtensionsIxData>
        for OpenPositionWithTokenExtensionsIxData
    {
        fn into_proto(self) -> proto_def::OpenPositionWithTokenExtensionsIxData {
            proto_def::OpenPositionWithTokenExtensionsIxData {
                tick_lower_index: self.tick_lower_index,
                tick_upper_index: self.tick_upper_index,
                with_token_metadata_extension: self.with_token_metadata_extension,
            }
        }
    }
    use super::ClosePositionWithTokenExtensionsIxAccounts;
    impl IntoProto<proto_def::ClosePositionWithTokenExtensionsIxAccounts>
        for ClosePositionWithTokenExtensionsIxAccounts
    {
        fn into_proto(self) -> proto_def::ClosePositionWithTokenExtensionsIxAccounts {
            proto_def::ClosePositionWithTokenExtensionsIxAccounts {
                position_authority: self.position_authority.to_string(),
                receiver: self.receiver.to_string(),
                position: self.position.to_string(),
                position_mint: self.position_mint.to_string(),
                position_token_account: self.position_token_account.to_string(),
                token2022_program: self.token2022_program.to_string(),
            }
        }
    }
    use super::LockPositionIxAccounts;
    impl IntoProto<proto_def::LockPositionIxAccounts> for LockPositionIxAccounts {
        fn into_proto(self) -> proto_def::LockPositionIxAccounts {
            proto_def::LockPositionIxAccounts {
                funder: self.funder.to_string(),
                position_authority: self.position_authority.to_string(),
                position: self.position.to_string(),
                position_mint: self.position_mint.to_string(),
                position_token_account: self.position_token_account.to_string(),
                lock_config: self.lock_config.to_string(),
                whirlpool: self.whirlpool.to_string(),
                token2022_program: self.token2022_program.to_string(),
                system_program: self.system_program.to_string(),
            }
        }
    }
    use super::LockPositionIxData;
    impl IntoProto<proto_def::LockPositionIxData> for LockPositionIxData {
        fn into_proto(self) -> proto_def::LockPositionIxData {
            proto_def::LockPositionIxData {
                lock_type: self.lock_type as i32,
            }
        }
    }
    use super::CollectFeesV2IxAccounts;
    impl IntoProto<proto_def::CollectFeesV2IxAccounts> for CollectFeesV2IxAccounts {
        fn into_proto(self) -> proto_def::CollectFeesV2IxAccounts {
            proto_def::CollectFeesV2IxAccounts {
                whirlpool: self.whirlpool.to_string(),
                position_authority: self.position_authority.to_string(),
                position: self.position.to_string(),
                position_token_account: self.position_token_account.to_string(),
                token_mint_a: self.token_mint_a.to_string(),
                token_mint_b: self.token_mint_b.to_string(),
                token_owner_account_a: self.token_owner_account_a.to_string(),
                token_vault_a: self.token_vault_a.to_string(),
                token_owner_account_b: self.token_owner_account_b.to_string(),
                token_vault_b: self.token_vault_b.to_string(),
                token_program_a: self.token_program_a.to_string(),
                token_program_b: self.token_program_b.to_string(),
                memo_program: self.memo_program.to_string(),
            }
        }
    }
    use super::CollectFeesV2IxData;
    impl IntoProto<proto_def::CollectFeesV2IxData> for CollectFeesV2IxData {
        fn into_proto(self) -> proto_def::CollectFeesV2IxData {
            proto_def::CollectFeesV2IxData {
                remaining_accounts_info: self.remaining_accounts_info.map(|x| x.into_proto()),
            }
        }
    }
    use super::CollectProtocolFeesV2IxAccounts;
    impl IntoProto<proto_def::CollectProtocolFeesV2IxAccounts> for CollectProtocolFeesV2IxAccounts {
        fn into_proto(self) -> proto_def::CollectProtocolFeesV2IxAccounts {
            proto_def::CollectProtocolFeesV2IxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                whirlpool: self.whirlpool.to_string(),
                collect_protocol_fees_authority: self.collect_protocol_fees_authority.to_string(),
                token_mint_a: self.token_mint_a.to_string(),
                token_mint_b: self.token_mint_b.to_string(),
                token_vault_a: self.token_vault_a.to_string(),
                token_vault_b: self.token_vault_b.to_string(),
                token_destination_a: self.token_destination_a.to_string(),
                token_destination_b: self.token_destination_b.to_string(),
                token_program_a: self.token_program_a.to_string(),
                token_program_b: self.token_program_b.to_string(),
                memo_program: self.memo_program.to_string(),
            }
        }
    }
    use super::CollectProtocolFeesV2IxData;
    impl IntoProto<proto_def::CollectProtocolFeesV2IxData> for CollectProtocolFeesV2IxData {
        fn into_proto(self) -> proto_def::CollectProtocolFeesV2IxData {
            proto_def::CollectProtocolFeesV2IxData {
                remaining_accounts_info: self.remaining_accounts_info.map(|x| x.into_proto()),
            }
        }
    }
    use super::CollectRewardV2IxAccounts;
    impl IntoProto<proto_def::CollectRewardV2IxAccounts> for CollectRewardV2IxAccounts {
        fn into_proto(self) -> proto_def::CollectRewardV2IxAccounts {
            proto_def::CollectRewardV2IxAccounts {
                whirlpool: self.whirlpool.to_string(),
                position_authority: self.position_authority.to_string(),
                position: self.position.to_string(),
                position_token_account: self.position_token_account.to_string(),
                reward_owner_account: self.reward_owner_account.to_string(),
                reward_mint: self.reward_mint.to_string(),
                reward_vault: self.reward_vault.to_string(),
                reward_token_program: self.reward_token_program.to_string(),
                memo_program: self.memo_program.to_string(),
            }
        }
    }
    use super::CollectRewardV2IxData;
    impl IntoProto<proto_def::CollectRewardV2IxData> for CollectRewardV2IxData {
        fn into_proto(self) -> proto_def::CollectRewardV2IxData {
            proto_def::CollectRewardV2IxData {
                reward_index: self.reward_index.into(),
                remaining_accounts_info: self.remaining_accounts_info.map(|x| x.into_proto()),
            }
        }
    }
    use super::DecreaseLiquidityV2IxAccounts;
    impl IntoProto<proto_def::DecreaseLiquidityV2IxAccounts> for DecreaseLiquidityV2IxAccounts {
        fn into_proto(self) -> proto_def::DecreaseLiquidityV2IxAccounts {
            proto_def::DecreaseLiquidityV2IxAccounts {
                whirlpool: self.whirlpool.to_string(),
                token_program_a: self.token_program_a.to_string(),
                token_program_b: self.token_program_b.to_string(),
                memo_program: self.memo_program.to_string(),
                position_authority: self.position_authority.to_string(),
                position: self.position.to_string(),
                position_token_account: self.position_token_account.to_string(),
                token_mint_a: self.token_mint_a.to_string(),
                token_mint_b: self.token_mint_b.to_string(),
                token_owner_account_a: self.token_owner_account_a.to_string(),
                token_owner_account_b: self.token_owner_account_b.to_string(),
                token_vault_a: self.token_vault_a.to_string(),
                token_vault_b: self.token_vault_b.to_string(),
                tick_array_lower: self.tick_array_lower.to_string(),
                tick_array_upper: self.tick_array_upper.to_string(),
            }
        }
    }
    use super::DecreaseLiquidityV2IxData;
    impl IntoProto<proto_def::DecreaseLiquidityV2IxData> for DecreaseLiquidityV2IxData {
        fn into_proto(self) -> proto_def::DecreaseLiquidityV2IxData {
            proto_def::DecreaseLiquidityV2IxData {
                liquidity_amount: self.liquidity_amount.to_string(),
                token_min_a: self.token_min_a,
                token_min_b: self.token_min_b,
                remaining_accounts_info: self.remaining_accounts_info.map(|x| x.into_proto()),
            }
        }
    }
    use super::IncreaseLiquidityV2IxAccounts;
    impl IntoProto<proto_def::IncreaseLiquidityV2IxAccounts> for IncreaseLiquidityV2IxAccounts {
        fn into_proto(self) -> proto_def::IncreaseLiquidityV2IxAccounts {
            proto_def::IncreaseLiquidityV2IxAccounts {
                whirlpool: self.whirlpool.to_string(),
                token_program_a: self.token_program_a.to_string(),
                token_program_b: self.token_program_b.to_string(),
                memo_program: self.memo_program.to_string(),
                position_authority: self.position_authority.to_string(),
                position: self.position.to_string(),
                position_token_account: self.position_token_account.to_string(),
                token_mint_a: self.token_mint_a.to_string(),
                token_mint_b: self.token_mint_b.to_string(),
                token_owner_account_a: self.token_owner_account_a.to_string(),
                token_owner_account_b: self.token_owner_account_b.to_string(),
                token_vault_a: self.token_vault_a.to_string(),
                token_vault_b: self.token_vault_b.to_string(),
                tick_array_lower: self.tick_array_lower.to_string(),
                tick_array_upper: self.tick_array_upper.to_string(),
            }
        }
    }
    use super::IncreaseLiquidityV2IxData;
    impl IntoProto<proto_def::IncreaseLiquidityV2IxData> for IncreaseLiquidityV2IxData {
        fn into_proto(self) -> proto_def::IncreaseLiquidityV2IxData {
            proto_def::IncreaseLiquidityV2IxData {
                liquidity_amount: self.liquidity_amount.to_string(),
                token_max_a: self.token_max_a,
                token_max_b: self.token_max_b,
                remaining_accounts_info: self.remaining_accounts_info.map(|x| x.into_proto()),
            }
        }
    }
    use super::InitializePoolV2IxAccounts;
    impl IntoProto<proto_def::InitializePoolV2IxAccounts> for InitializePoolV2IxAccounts {
        fn into_proto(self) -> proto_def::InitializePoolV2IxAccounts {
            proto_def::InitializePoolV2IxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                token_mint_a: self.token_mint_a.to_string(),
                token_mint_b: self.token_mint_b.to_string(),
                token_badge_a: self.token_badge_a.to_string(),
                token_badge_b: self.token_badge_b.to_string(),
                funder: self.funder.to_string(),
                whirlpool: self.whirlpool.to_string(),
                token_vault_a: self.token_vault_a.to_string(),
                token_vault_b: self.token_vault_b.to_string(),
                fee_tier: self.fee_tier.to_string(),
                token_program_a: self.token_program_a.to_string(),
                token_program_b: self.token_program_b.to_string(),
                system_program: self.system_program.to_string(),
                rent: self.rent.to_string(),
            }
        }
    }
    use super::InitializePoolV2IxData;
    impl IntoProto<proto_def::InitializePoolV2IxData> for InitializePoolV2IxData {
        fn into_proto(self) -> proto_def::InitializePoolV2IxData {
            proto_def::InitializePoolV2IxData {
                tick_spacing: self.tick_spacing.into(),
                initial_sqrt_price: self.initial_sqrt_price.to_string(),
            }
        }
    }
    use super::InitializeRewardV2IxAccounts;
    impl IntoProto<proto_def::InitializeRewardV2IxAccounts> for InitializeRewardV2IxAccounts {
        fn into_proto(self) -> proto_def::InitializeRewardV2IxAccounts {
            proto_def::InitializeRewardV2IxAccounts {
                reward_authority: self.reward_authority.to_string(),
                funder: self.funder.to_string(),
                whirlpool: self.whirlpool.to_string(),
                reward_mint: self.reward_mint.to_string(),
                reward_token_badge: self.reward_token_badge.to_string(),
                reward_vault: self.reward_vault.to_string(),
                reward_token_program: self.reward_token_program.to_string(),
                system_program: self.system_program.to_string(),
                rent: self.rent.to_string(),
            }
        }
    }
    use super::InitializeRewardV2IxData;
    impl IntoProto<proto_def::InitializeRewardV2IxData> for InitializeRewardV2IxData {
        fn into_proto(self) -> proto_def::InitializeRewardV2IxData {
            proto_def::InitializeRewardV2IxData {
                reward_index: self.reward_index.into(),
            }
        }
    }
    use super::SetRewardEmissionsV2IxAccounts;
    impl IntoProto<proto_def::SetRewardEmissionsV2IxAccounts> for SetRewardEmissionsV2IxAccounts {
        fn into_proto(self) -> proto_def::SetRewardEmissionsV2IxAccounts {
            proto_def::SetRewardEmissionsV2IxAccounts {
                whirlpool: self.whirlpool.to_string(),
                reward_authority: self.reward_authority.to_string(),
                reward_vault: self.reward_vault.to_string(),
            }
        }
    }
    use super::SetRewardEmissionsV2IxData;
    impl IntoProto<proto_def::SetRewardEmissionsV2IxData> for SetRewardEmissionsV2IxData {
        fn into_proto(self) -> proto_def::SetRewardEmissionsV2IxData {
            proto_def::SetRewardEmissionsV2IxData {
                reward_index: self.reward_index.into(),
                emissions_per_second_x64: self.emissions_per_second_x64.to_string(),
            }
        }
    }
    use super::SwapV2IxAccounts;
    impl IntoProto<proto_def::SwapV2IxAccounts> for SwapV2IxAccounts {
        fn into_proto(self) -> proto_def::SwapV2IxAccounts {
            proto_def::SwapV2IxAccounts {
                token_program_a: self.token_program_a.to_string(),
                token_program_b: self.token_program_b.to_string(),
                memo_program: self.memo_program.to_string(),
                token_authority: self.token_authority.to_string(),
                whirlpool: self.whirlpool.to_string(),
                token_mint_a: self.token_mint_a.to_string(),
                token_mint_b: self.token_mint_b.to_string(),
                token_owner_account_a: self.token_owner_account_a.to_string(),
                token_vault_a: self.token_vault_a.to_string(),
                token_owner_account_b: self.token_owner_account_b.to_string(),
                token_vault_b: self.token_vault_b.to_string(),
                tick_array0: self.tick_array0.to_string(),
                tick_array1: self.tick_array1.to_string(),
                tick_array2: self.tick_array2.to_string(),
                oracle: self.oracle.to_string(),
            }
        }
    }
    use super::SwapV2IxData;
    impl IntoProto<proto_def::SwapV2IxData> for SwapV2IxData {
        fn into_proto(self) -> proto_def::SwapV2IxData {
            proto_def::SwapV2IxData {
                amount: self.amount,
                other_amount_threshold: self.other_amount_threshold,
                sqrt_price_limit: self.sqrt_price_limit.to_string(),
                amount_specified_is_input: self.amount_specified_is_input,
                a_to_b: self.a_to_b,
                remaining_accounts_info: self.remaining_accounts_info.map(|x| x.into_proto()),
            }
        }
    }
    use super::TwoHopSwapV2IxAccounts;
    impl IntoProto<proto_def::TwoHopSwapV2IxAccounts> for TwoHopSwapV2IxAccounts {
        fn into_proto(self) -> proto_def::TwoHopSwapV2IxAccounts {
            proto_def::TwoHopSwapV2IxAccounts {
                whirlpool_one: self.whirlpool_one.to_string(),
                whirlpool_two: self.whirlpool_two.to_string(),
                token_mint_input: self.token_mint_input.to_string(),
                token_mint_intermediate: self.token_mint_intermediate.to_string(),
                token_mint_output: self.token_mint_output.to_string(),
                token_program_input: self.token_program_input.to_string(),
                token_program_intermediate: self.token_program_intermediate.to_string(),
                token_program_output: self.token_program_output.to_string(),
                token_owner_account_input: self.token_owner_account_input.to_string(),
                token_vault_one_input: self.token_vault_one_input.to_string(),
                token_vault_one_intermediate: self.token_vault_one_intermediate.to_string(),
                token_vault_two_intermediate: self.token_vault_two_intermediate.to_string(),
                token_vault_two_output: self.token_vault_two_output.to_string(),
                token_owner_account_output: self.token_owner_account_output.to_string(),
                token_authority: self.token_authority.to_string(),
                tick_array_one0: self.tick_array_one0.to_string(),
                tick_array_one1: self.tick_array_one1.to_string(),
                tick_array_one2: self.tick_array_one2.to_string(),
                tick_array_two0: self.tick_array_two0.to_string(),
                tick_array_two1: self.tick_array_two1.to_string(),
                tick_array_two2: self.tick_array_two2.to_string(),
                oracle_one: self.oracle_one.to_string(),
                oracle_two: self.oracle_two.to_string(),
                memo_program: self.memo_program.to_string(),
            }
        }
    }
    use super::TwoHopSwapV2IxData;
    impl IntoProto<proto_def::TwoHopSwapV2IxData> for TwoHopSwapV2IxData {
        fn into_proto(self) -> proto_def::TwoHopSwapV2IxData {
            proto_def::TwoHopSwapV2IxData {
                amount: self.amount,
                other_amount_threshold: self.other_amount_threshold,
                amount_specified_is_input: self.amount_specified_is_input,
                a_to_b_one: self.a_to_b_one,
                a_to_b_two: self.a_to_b_two,
                sqrt_price_limit_one: self.sqrt_price_limit_one.to_string(),
                sqrt_price_limit_two: self.sqrt_price_limit_two.to_string(),
                remaining_accounts_info: self.remaining_accounts_info.map(|x| x.into_proto()),
            }
        }
    }
    use super::InitializeConfigExtensionIxAccounts;
    impl IntoProto<proto_def::InitializeConfigExtensionIxAccounts>
        for InitializeConfigExtensionIxAccounts
    {
        fn into_proto(self) -> proto_def::InitializeConfigExtensionIxAccounts {
            proto_def::InitializeConfigExtensionIxAccounts {
                config: self.config.to_string(),
                config_extension: self.config_extension.to_string(),
                funder: self.funder.to_string(),
                fee_authority: self.fee_authority.to_string(),
                system_program: self.system_program.to_string(),
            }
        }
    }
    use super::SetConfigExtensionAuthorityIxAccounts;
    impl IntoProto<proto_def::SetConfigExtensionAuthorityIxAccounts>
        for SetConfigExtensionAuthorityIxAccounts
    {
        fn into_proto(self) -> proto_def::SetConfigExtensionAuthorityIxAccounts {
            proto_def::SetConfigExtensionAuthorityIxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                whirlpools_config_extension: self.whirlpools_config_extension.to_string(),
                config_extension_authority: self.config_extension_authority.to_string(),
                new_config_extension_authority: self.new_config_extension_authority.to_string(),
            }
        }
    }
    use super::SetTokenBadgeAuthorityIxAccounts;
    impl IntoProto<proto_def::SetTokenBadgeAuthorityIxAccounts> for SetTokenBadgeAuthorityIxAccounts {
        fn into_proto(self) -> proto_def::SetTokenBadgeAuthorityIxAccounts {
            proto_def::SetTokenBadgeAuthorityIxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                whirlpools_config_extension: self.whirlpools_config_extension.to_string(),
                config_extension_authority: self.config_extension_authority.to_string(),
                new_token_badge_authority: self.new_token_badge_authority.to_string(),
            }
        }
    }
    use super::InitializeTokenBadgeIxAccounts;
    impl IntoProto<proto_def::InitializeTokenBadgeIxAccounts> for InitializeTokenBadgeIxAccounts {
        fn into_proto(self) -> proto_def::InitializeTokenBadgeIxAccounts {
            proto_def::InitializeTokenBadgeIxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                whirlpools_config_extension: self.whirlpools_config_extension.to_string(),
                token_badge_authority: self.token_badge_authority.to_string(),
                token_mint: self.token_mint.to_string(),
                token_badge: self.token_badge.to_string(),
                funder: self.funder.to_string(),
                system_program: self.system_program.to_string(),
            }
        }
    }
    use super::DeleteTokenBadgeIxAccounts;
    impl IntoProto<proto_def::DeleteTokenBadgeIxAccounts> for DeleteTokenBadgeIxAccounts {
        fn into_proto(self) -> proto_def::DeleteTokenBadgeIxAccounts {
            proto_def::DeleteTokenBadgeIxAccounts {
                whirlpools_config: self.whirlpools_config.to_string(),
                whirlpools_config_extension: self.whirlpools_config_extension.to_string(),
                token_badge_authority: self.token_badge_authority.to_string(),
                token_mint: self.token_mint.to_string(),
                token_badge: self.token_badge.to_string(),
                receiver: self.receiver.to_string(),
            }
        }
    }

    impl IntoProto<proto_def::ProgramIxs> for WhirlpoolProgramIx {
        fn into_proto(self) -> proto_def::ProgramIxs {
            match self {
                WhirlpoolProgramIx::InitializeConfig(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::InitializeConfig(
                        proto_def::InitializeConfigIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::InitializePool(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::InitializePool(
                        proto_def::InitializePoolIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::InitializeTickArray(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::InitializeTickArray(
                        proto_def::InitializeTickArrayIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::InitializeFeeTier(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::InitializeFeeTier(
                        proto_def::InitializeFeeTierIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::InitializeReward(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::InitializeReward(
                        proto_def::InitializeRewardIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::SetRewardEmissions(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::SetRewardEmissions(
                        proto_def::SetRewardEmissionsIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::OpenPosition(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::OpenPosition(
                        proto_def::OpenPositionIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::OpenPositionWithMetadata(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::OpenPositionWithMetadata(
                        proto_def::OpenPositionWithMetadataIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::IncreaseLiquidity(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::IncreaseLiquidity(
                        proto_def::IncreaseLiquidityIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::DecreaseLiquidity(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::DecreaseLiquidity(
                        proto_def::DecreaseLiquidityIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::UpdateFeesAndRewards(acc) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::UpdateFeesAndRewards(
                        proto_def::UpdateFeesAndRewardsIx {
                            accounts: Some(acc.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::CollectFees(acc) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::CollectFees(
                        proto_def::CollectFeesIx {
                            accounts: Some(acc.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::CollectReward(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::CollectReward(
                        proto_def::CollectRewardIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::CollectProtocolFees(acc) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::CollectProtocolFees(
                        proto_def::CollectProtocolFeesIx {
                            accounts: Some(acc.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::Swap(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::Swap(proto_def::SwapIx {
                        accounts: Some(acc.into_proto()),
                        data: Some(data.into_proto()),
                    })),
                },
                WhirlpoolProgramIx::ClosePosition(acc) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::ClosePosition(
                        proto_def::ClosePositionIx {
                            accounts: Some(acc.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::SetDefaultFeeRate(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::SetDefaultFeeRate(
                        proto_def::SetDefaultFeeRateIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::SetDefaultProtocolFeeRate(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::SetDefaultProtocolFeeRate(
                        proto_def::SetDefaultProtocolFeeRateIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::SetFeeRate(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::SetFeeRate(
                        proto_def::SetFeeRateIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::SetProtocolFeeRate(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::SetProtocolFeeRate(
                        proto_def::SetProtocolFeeRateIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::SetFeeAuthority(acc) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::SetFeeAuthority(
                        proto_def::SetFeeAuthorityIx {
                            accounts: Some(acc.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::SetCollectProtocolFeesAuthority(acc) => proto_def::ProgramIxs {
                    ix_oneof: Some(
                        proto_def::program_ixs::IxOneof::SetCollectProtocolFeesAuthority(
                            proto_def::SetCollectProtocolFeesAuthorityIx {
                                accounts: Some(acc.into_proto()),
                            },
                        ),
                    ),
                },
                WhirlpoolProgramIx::SetRewardAuthority(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::SetRewardAuthority(
                        proto_def::SetRewardAuthorityIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::SetRewardAuthorityBySuperAuthority(acc, data) => {
                    proto_def::ProgramIxs {
                        ix_oneof: Some(
                            proto_def::program_ixs::IxOneof::SetRewardAuthorityBySuperAuthority(
                                proto_def::SetRewardAuthorityBySuperAuthorityIx {
                                    accounts: Some(acc.into_proto()),
                                    data: Some(data.into_proto()),
                                },
                            ),
                        ),
                    }
                }
                WhirlpoolProgramIx::SetRewardEmissionsSuperAuthority(acc) => {
                    proto_def::ProgramIxs {
                        ix_oneof: Some(
                            proto_def::program_ixs::IxOneof::SetRewardEmissionsSuperAuthority(
                                proto_def::SetRewardEmissionsSuperAuthorityIx {
                                    accounts: Some(acc.into_proto()),
                                },
                            ),
                        ),
                    }
                }
                WhirlpoolProgramIx::TwoHopSwap(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::TwoHopSwap(
                        proto_def::TwoHopSwapIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::InitializePositionBundle(acc) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::InitializePositionBundle(
                        proto_def::InitializePositionBundleIx {
                            accounts: Some(acc.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::InitializePositionBundleWithMetadata(acc) => {
                    proto_def::ProgramIxs {
                        ix_oneof: Some(
                            proto_def::program_ixs::IxOneof::InitializePositionBundleWithMetadata(
                                proto_def::InitializePositionBundleWithMetadataIx {
                                    accounts: Some(acc.into_proto()),
                                },
                            ),
                        ),
                    }
                }
                WhirlpoolProgramIx::DeletePositionBundle(acc) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::DeletePositionBundle(
                        proto_def::DeletePositionBundleIx {
                            accounts: Some(acc.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::OpenBundledPosition(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::OpenBundledPosition(
                        proto_def::OpenBundledPositionIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::CloseBundledPosition(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::CloseBundledPosition(
                        proto_def::CloseBundledPositionIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::OpenPositionWithTokenExtensions(acc, data) => {
                    proto_def::ProgramIxs {
                        ix_oneof: Some(
                            proto_def::program_ixs::IxOneof::OpenPositionWithTokenExtensions(
                                proto_def::OpenPositionWithTokenExtensionsIx {
                                    accounts: Some(acc.into_proto()),
                                    data: Some(data.into_proto()),
                                },
                            ),
                        ),
                    }
                }
                WhirlpoolProgramIx::ClosePositionWithTokenExtensions(acc) => {
                    proto_def::ProgramIxs {
                        ix_oneof: Some(
                            proto_def::program_ixs::IxOneof::ClosePositionWithTokenExtensions(
                                proto_def::ClosePositionWithTokenExtensionsIx {
                                    accounts: Some(acc.into_proto()),
                                },
                            ),
                        ),
                    }
                }
                WhirlpoolProgramIx::LockPosition(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::LockPosition(
                        proto_def::LockPositionIx {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::CollectFeesV2(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::CollectFeesV2(
                        proto_def::CollectFeesV2Ix {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::CollectProtocolFeesV2(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::CollectProtocolFeesV2(
                        proto_def::CollectProtocolFeesV2Ix {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::CollectRewardV2(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::CollectRewardV2(
                        proto_def::CollectRewardV2Ix {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::DecreaseLiquidityV2(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::DecreaseLiquidityV2(
                        proto_def::DecreaseLiquidityV2Ix {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::IncreaseLiquidityV2(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::IncreaseLiquidityV2(
                        proto_def::IncreaseLiquidityV2Ix {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::InitializePoolV2(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::InitializePoolV2(
                        proto_def::InitializePoolV2Ix {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::InitializeRewardV2(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::InitializeRewardV2(
                        proto_def::InitializeRewardV2Ix {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::SetRewardEmissionsV2(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::SetRewardEmissionsV2(
                        proto_def::SetRewardEmissionsV2Ix {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::SwapV2(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::SwapV2(
                        proto_def::SwapV2Ix {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::TwoHopSwapV2(acc, data) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::TwoHopSwapV2(
                        proto_def::TwoHopSwapV2Ix {
                            accounts: Some(acc.into_proto()),
                            data: Some(data.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::InitializeConfigExtension(acc) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::InitializeConfigExtension(
                        proto_def::InitializeConfigExtensionIx {
                            accounts: Some(acc.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::SetConfigExtensionAuthority(acc) => proto_def::ProgramIxs {
                    ix_oneof: Some(
                        proto_def::program_ixs::IxOneof::SetConfigExtensionAuthority(
                            proto_def::SetConfigExtensionAuthorityIx {
                                accounts: Some(acc.into_proto()),
                            },
                        ),
                    ),
                },
                WhirlpoolProgramIx::SetTokenBadgeAuthority(acc) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::SetTokenBadgeAuthority(
                        proto_def::SetTokenBadgeAuthorityIx {
                            accounts: Some(acc.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::InitializeTokenBadge(acc) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::InitializeTokenBadge(
                        proto_def::InitializeTokenBadgeIx {
                            accounts: Some(acc.into_proto()),
                        },
                    )),
                },
                WhirlpoolProgramIx::DeleteTokenBadge(acc) => proto_def::ProgramIxs {
                    ix_oneof: Some(proto_def::program_ixs::IxOneof::DeleteTokenBadge(
                        proto_def::DeleteTokenBadgeIx {
                            accounts: Some(acc.into_proto()),
                        },
                    )),
                },
            }
        }
    }

    impl ParseProto for InstructionParser {
        type Message = proto_def::ProgramIxs;

        fn output_into_message(value: Self::Output) -> Self::Message {
            value.into_proto()
        }
    }
}
