Skip to main content

enqueue_to_withdraw

Function enqueue_to_withdraw 

Source
pub fn enqueue_to_withdraw(
    owner: Pubkey,
    reserve: &ReserveInfo,
    user_source_collateral: Pubkey,
    user_destination_liquidity: Pubkey,
    collateral_amount: u64,
    ticket_sequence_number: u64,
    callback: Option<&CallbackAccounts>,
) -> Vec<Instruction>
Expand description

Build instructions to enqueue collateral for delayed withdrawal.

Used for reserves with withdrawal queues. The ticket_sequence_number is the next sequence number from the reserve’s withdraw queue state.

Returns: [refresh_reserve, enqueue_to_withdraw]