These flows use many instructions. If you hit compute limits, add
ComputeBudgetProgram.setComputeUnitLimit({ units: 1_000_000 }) (or higher) as the first instruction in your transaction.- Split stake into a new account
- Deposit the new stake into Single Pool → receive pool tokens
- Deposit pool tokens into vault via
getOperateIx
Deposit
Split Stake and Deposit into Single Pool
Use
StakeProgram.split and SinglePoolProgram.deposit from @solana/spl-single-pool-classic.If the user already holds pool tokens, skip the Single Pool steps and only call
getOperateIx to deposit into the vault.