Function create_tx_from_swap_configs

Source
pub fn create_tx_from_swap_configs(
    swap_configs: &Vec<SwapConfig>,
    central_context: &Arc<CentralContext>,
    use_jito: bool,
    jito_tip_lp: u64,
    wallet_keypair: &Keypair,
) -> Transaction
Expand description

Assemble a Solana transaction from an ordered vector of swap configs. Builds a complete transaction including:

  • Token account management (opening/closing accounts as needed)
  • Jito don’t front account included for sandwich protection
  • Compute budget instructions (reasonable priority fee if Jito not used)
  • All swap instructions
  • Jito tip instruction (if use_jito is true and tip is nonzero)

If use_jito is true, priority fees are omitted as Jito bundles don’t use them.