Function allocation_step_callback

Source
pub fn allocation_step_callback(
    state: OpState,
    success: bool,
    amount_allocated: u128,
    op_id: u64,
) -> TransitionRes
Expand description

Process one step of allocation (callback from market).

Advances the allocation index and updates remaining amount.

§Arguments

  • state - Current state (must be Allocating)
  • success - Whether the allocation step succeeded
  • amount_allocated - Amount that was actually allocated in this step
  • op_id - Operation ID to verify correlation

§Returns

  • Ok(TransitionResult) with updated Allocating state
  • Err on state mismatch or op_id mismatch