pub fn withdraw_multi_deposit_vault_through_tulip(
        ctx: Context<WithdrawTulipMultiDepositOptimizerVault>,
        amount: u64,
    ) -> Result<()> {
        let standalone_vault_accounts = vec![
            AccountMeta::new_readonly(ctx.accounts.reserve_account.key(), false),
            AccountMeta::new(ctx.accounts.reserve_liquidity_supply.key(), false),
            AccountMeta::new_readonly(ctx.accounts.reserve_collateral_mint.key(), false),
            AccountMeta::new_readonly(ctx.accounts.lending_market_account.key(), false),
            AccountMeta::new_readonly(ctx.accounts.derived_lending_market_authority.key(), false),
            AccountMeta::new_readonly(ctx.accounts.reserve_pyth_price_account.key(), false),
        ];
        let ix = new_withdraw_multi_deposit_optimizer_vault_ix(
            ctx.accounts.common_data.authority.key(),
            ctx.accounts.common_data.multi_vault.key(),
            ctx.accounts.common_data.multi_vault_pda.key(),
            ctx.accounts.common_data.withdraw_vault.key(),
            ctx.accounts.common_data.withdraw_vault_pda.key(),
            ctx.accounts.common_data.platform_information.key(),
            ctx.accounts.common_data.platform_config_data.key(),
            ctx.accounts.common_data.lending_program.key(),
            ctx.accounts.common_data.multi_burning_shares_token_account.key(),
            ctx.accounts.common_data.withdraw_burning_shares_token_account.key(),
            ctx.accounts.common_data.receiving_underlying_token_account.key(),
            ctx.accounts.common_data.multi_underlying_withdraw_queue.key(),
            ctx.accounts.common_data.multi_shares_mint.key(),
            ctx.accounts.common_data.withdraw_shares_mint.key(),
            ctx.accounts.common_data.withdraw_vault_underlying_deposit_queue.key(),
            amount,
            standalone_vault_accounts.clone()
        );
        anchor_lang::solana_program::program::invoke(
            &ix,
            &[
                ctx.accounts.common_data.authority.clone(),
                ctx.accounts.common_data.multi_vault.clone(),
                ctx.accounts.common_data.multi_vault_pda.clone(),
                ctx.accounts.common_data.withdraw_vault.clone(),
                ctx.accounts.common_data.withdraw_vault_pda.clone(),
                ctx.accounts.common_data.platform_information.clone(),
                ctx.accounts.common_data.platform_config_data.clone(),
                ctx.accounts.common_data.lending_program.clone(),
                ctx.accounts.common_data.multi_burning_shares_token_account.to_account_info(),
                ctx.accounts.common_data.withdraw_burning_shares_token_account.to_account_info(),
                ctx.accounts.common_data.receiving_underlying_token_account.to_account_info(),
                ctx.accounts.common_data.multi_underlying_withdraw_queue.to_account_info(),
                ctx.accounts.common_data.multi_shares_mint.to_account_info(),
                ctx.accounts.common_data.withdraw_shares_mint.to_account_info(),
                ctx.accounts.common_data.withdraw_vault_underlying_deposit_queue.to_account_info(),
                ctx.accounts.reserve_account.clone(),
                ctx.accounts.reserve_liquidity_supply.to_account_info(),
                ctx.accounts.reserve_collateral_mint.to_account_info(),
                ctx.accounts.lending_market_account.clone(),
                ctx.accounts.derived_lending_market_authority.clone(),
                ctx.accounts.reserve_pyth_price_account.to_account_info(),
                ctx.accounts.common_data.clock.to_account_info(),
            ],
        )?;
        Ok(())
    }
/// burns/redeems the `amount` of shares for their corresponding amount
/// of underlying asset, using the tulip standalone vault as the source of funds to withdraw from
burns/redeems the `amount` of shares for their corresponding amount
of underlying asset, using the tulip standalone vault as the source of funds to withdraw from
burns / redeems the ` amount ` of shares for their corresponding amount of underlying asset using the tulip standalone vault as the source of funds to withdraw from
pub fn withdraw_multi_deposit_vault_through_tulip(
        ctx: Context<WithdrawTulipMultiDepositOptimizerVault>,
        amount: u64,
    ) -> Result<()> {
        let standalone_vault_accounts = vec![
            AccountMeta::new_readonly(ctx.accounts.reserve_account.key(), false),
            AccountMeta::new(ctx.accounts.reserve_liquidity_supply.key(), false),
            AccountMeta::new_readonly(ctx.accounts.reserve_collateral_mint.key(), false),
            AccountMeta::new_readonly(ctx.accounts.lending_market_account.key(), false),
            AccountMeta::new_readonly(ctx.accounts.derived_lending_market_authority.key(), false),
            AccountMeta::new_readonly(ctx.accounts.reserve_pyth_price_account.key(), false),
        ];
        let ix = new_withdraw_multi_deposit_optimizer_vault_ix(
            ctx.accounts.common_data.authority.key(),
            ctx.accounts.common_data.multi_vault.key(),
            ctx.accounts.common_data.multi_vault_pda.key(),
            ctx.accounts.common_data.withdraw_vault.key(),
            ctx.accounts.common_data.withdraw_vault_pda.key(),
            ctx.accounts.common_data.platform_information.key(),
            ctx.accounts.common_data.platform_config_data.key(),
            ctx.accounts.common_data.lending_program.key(),
            ctx.accounts.common_data.multi_burning_shares_token_account.key(),
            ctx.accounts.common_data.withdraw_burning_shares_token_account.key(),
            ctx.accounts.common_data.receiving_underlying_token_account.key(),
            ctx.accounts.common_data.multi_underlying_withdraw_queue.key(),
            ctx.accounts.common_data.multi_shares_mint.key(),
            ctx.accounts.common_data.withdraw_shares_mint.key(),
            ctx.accounts.common_data.withdraw_vault_underlying_deposit_queue.key(),
            amount,
            standalone_vault_accounts.clone()
        );
        anchor_lang::solana_program::program::invoke(
            &ix,
            &[
                ctx.accounts.common_data.authority.clone(),
                ctx.accounts.common_data.multi_vault.clone(),
                ctx.accounts.common_data.multi_vault_pda.clone(),
                ctx.accounts.common_data.withdraw_vault.clone(),
                ctx.accounts.common_data.withdraw_vault_pda.clone(),
                ctx.accounts.common_data.platform_information.clone(),
                ctx.accounts.common_data.platform_config_data.clone(),
                ctx.accounts.common_data.lending_program.clone(),
                ctx.accounts.common_data.multi_burning_shares_token_account.to_account_info(),
                ctx.accounts.common_data.withdraw_burning_shares_token_account.to_account_info(),
                ctx.accounts.common_data.receiving_underlying_token_account.to_account_info(),
                ctx.accounts.common_data.multi_underlying_withdraw_queue.to_account_info(),
                ctx.accounts.common_data.multi_shares_mint.to_account_info(),
                ctx.accounts.common_data.withdraw_shares_mint.to_account_info(),
                ctx.accounts.common_data.withdraw_vault_underlying_deposit_queue.to_account_info(),
                ctx.accounts.reserve_account.clone(),
                ctx.accounts.reserve_liquidity_supply.to_account_info(),
                ctx.accounts.reserve_collateral_mint.to_account_info(),
                ctx.accounts.lending_market_account.clone(),
                ctx.accounts.derived_lending_market_authority.clone(),
                ctx.accounts.reserve_pyth_price_account.to_account_info(),
                ctx.accounts.common_data.clock.to_account_info(),
            ],
        )?;
        Ok(())
    }
pub fn withdraw_multi_deposit_vault_through_tulip ( ctx : Context < WithdrawTulipMultiDepositOptimizerVault > , amount : u64 , ) -> Result < ( ) > { let standalone_vault_accounts = vec ! [ AccountMeta new_readonly ( ctx accounts reserve_account key ( ) false ) AccountMeta new ( ctx accounts reserve_liquidity_supply key ( ) false ) AccountMeta new_readonly ( ctx accounts reserve_collateral_mint key ( ) false ) AccountMeta new_readonly ( ctx accounts lending_market_account key ( ) false ) AccountMeta new_readonly ( ctx accounts derived_lending_market_authority key ( ) false ) AccountMeta new_readonly ( ctx accounts reserve_pyth_price_account key ( ) false ) ] ; let ix = new_withdraw_multi_deposit_optimizer_vault_ix ( ctx . accounts . common_data . authority . key ( ) , ctx . accounts . common_data . multi_vault . key ( ) , ctx . accounts . common_data . multi_vault_pda . key ( ) , ctx . accounts . common_data . withdraw_vault . key ( ) , ctx . accounts . common_data . withdraw_vault_pda . key ( ) , ctx . accounts . common_data . platform_information . key ( ) , ctx . accounts . common_data . platform_config_data . key ( ) , ctx . accounts . common_data . lending_program . key ( ) , ctx . accounts . common_data . multi_burning_shares_token_account . key ( ) , ctx . accounts . common_data . withdraw_burning_shares_token_account . key ( ) , ctx . accounts . common_data . receiving_underlying_token_account . key ( ) , ctx . accounts . common_data . multi_underlying_withdraw_queue . key ( ) , ctx . accounts . common_data . multi_shares_mint . key ( ) , ctx . accounts . common_data . withdraw_shares_mint . key ( ) , ctx . accounts . common_data . withdraw_vault_underlying_deposit_queue . key ( ) , amount , standalone_vault_accounts . clone ( ) ) ; anchor_lang :: solana_program :: program :: invoke ( & ix , & [ ctx . accounts . common_data . authority . clone ( ) , ctx . accounts . common_data . multi_vault . clone ( ) , ctx . accounts . common_data . multi_vault_pda . clone ( ) , ctx . accounts . common_data . withdraw_vault . clone ( ) , ctx . accounts . common_data . withdraw_vault_pda . clone ( ) , ctx . accounts . common_data . platform_information . clone ( ) , ctx . accounts . common_data . platform_config_data . clone ( ) , ctx . accounts . common_data . lending_program . clone ( ) , ctx . accounts . common_data . multi_burning_shares_token_account . to_account_info ( ) , ctx . accounts . common_data . withdraw_burning_shares_token_account . to_account_info ( ) , ctx . accounts . common_data . receiving_underlying_token_account . to_account_info ( ) , ctx . accounts . common_data . multi_underlying_withdraw_queue . to_account_info ( ) , ctx . accounts . common_data . multi_shares_mint . to_account_info ( ) , ctx . accounts . common_data . withdraw_shares_mint . to_account_info ( ) , ctx . accounts . common_data . withdraw_vault_underlying_deposit_queue . to_account_info ( ) , ctx . accounts . reserve_account . clone ( ) , ctx . accounts . reserve_liquidity_supply . to_account_info ( ) , ctx . accounts . reserve_collateral_mint . to_account_info ( ) , ctx . accounts . lending_market_account . clone ( ) , ctx . accounts . derived_lending_market_authority . clone ( ) , ctx . accounts . reserve_pyth_price_account . to_account_info ( ) , ctx . accounts . common_data . clock . to_account_info ( ) , ] , ) ? ; Ok ( ( ) ) }
burns/redeems the `amount` of shares for their corresponding amount
of underlying asset, using the tulip standalone vault as the source of funds to withdraw from
burns / redeems the ` amount ` of shares for their corresponding amount of underlying asset using the tulip standalone vault as the source of funds to withdraw from
ctx
Context<WithdrawTulipMultiDepositOptimizerVault>
amount
u64
ctx
Context<WithdrawTulipMultiDepositOptimizerVault>
amount
u64