Skip to content

feat(client): support for multiple position merges#123

Open
cesarenaldi wants to merge 7 commits into
mainfrom
feature/dev-344-execute-transaction
Open

feat(client): support for multiple position merges#123
cesarenaldi wants to merge 7 commits into
mainfrom
feature/dev-344-execute-transaction

Conversation

@cesarenaldi

@cesarenaldi cesarenaldi commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add public sync/async execute_transaction(...) methods for custom transaction call batches.
  • Add public sync/async merge_multiple_positions(...) helpers for batch combo-position merges with per-position amount support.
  • Document custom transaction calls and batch combo merge usage in the README.

Linear: DEV-344

Verification

  • uv run ruff format --check .
  • uv run ruff check .
  • uv run pyright
  • uv run pytest

Note

Medium Risk
Changes submit on-chain merge transactions via the authenticated wallet; logic reuses existing dispatch and balance resolution but incorrect amounts or IDs could affect user positions.

Overview
Adds public wallet APIs on sync and async secure clients: execute_transaction submits an ordered list of TransactionCall values through the existing gasless/EOA dispatch path (empty call lists rejected), and merge_multiple_positions batches combo merges in one relayed transaction with optional per-position amount or "max".

Introduces the exported MergePositionRequest typed dict and refactors combo outcome token IDs into derive_combo_outcome_position_ids for reuse when resolving balances before each merge_v2_call. README examples cover custom call batches and multi-combo merges; unit tests assert relayer submit payloads and validation errors.

Reviewed by Cursor Bugbot for commit 31d2d1b. Bugbot is set up for automated code reviews on this repo. Configure here.

@cesarenaldi cesarenaldi changed the title feat(client): add custom transaction execution feat(client): support for multiple position merges Jun 26, 2026
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.

1 participant