Skip to content

Extract redemption execution into src/redemptions/execution.py - #759

Merged
evgeny-stakewise merged 1 commit into
v5-releasefrom
redeemer-execution-2
Jun 12, 2026
Merged

Extract redemption execution into src/redemptions/execution.py#759
evgeny-stakewise merged 1 commit into
v5-releasefrom
redeemer-execution-2

Conversation

@evgeny-stakewise

Copy link
Copy Markdown
Contributor

Extracts the redemption transaction logic out of process_redeemer.py into a dedicated src/redemptions/execution.py module.

Changes

  • New src/redemptions/execution.py with:
    • tx_process_exit_queue — submits processExitQueue() (the canProcessExitQueue gate now lives at the call site).
    • simulate_redeem_position — simulates a redemption via .call().
    • tx_redeem_position — submits a redemption tx and waits for the receipt.
    • _build_redeem_tx_function — shared helper building the redeemOsTokenPositions call.
  • redeem_positions now always simulates a position first and only submits the live tx when not in dry-run mode.
  • Tests for the execution functions moved to src/redemptions/tests/test_execution.py; test_process_redeemer.py now mocks those functions wholesale instead of their internals.

@evgeny-stakewise
evgeny-stakewise merged commit d653d5c into v5-release Jun 12, 2026
7 checks passed
@evgeny-stakewise
evgeny-stakewise deleted the redeemer-execution-2 branch June 12, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants