Skip to content

feat(transaction-controller): add atomic option#8320

Draft
matthewwalsh0 wants to merge 1 commit intomainfrom
feat/configurable-atomic-batch
Draft

feat(transaction-controller): add atomic option#8320
matthewwalsh0 wants to merge 1 commit intomainfrom
feat/configurable-atomic-batch

Conversation

@matthewwalsh0
Copy link
Copy Markdown
Member

@matthewwalsh0 matthewwalsh0 commented Mar 27, 2026

Explanation

The addTransactionBatch method prioritises the EIP-7702 flow that uses ERC-7821 to execute batch transactions. The execute call encodes a mode byte that controls atomicity — currently hardcoded to 0x01 (atomic), meaning all calls in the batch revert together if any single call fails.

This PR makes the atomicity configurable via a new atomic boolean on TransactionBatchRequest:

  • atomic: true (default) — mode 0x01, all calls revert together (existing behaviour, no breaking change)
  • atomic: false — mode 0x00, calls are independent and individual calls can fail without reverting the entire batch

The option flows from TransactionBatchRequest through addTransactionBatchWith7702 into generateEIP7702BatchTransaction, which now accepts an optional options parameter. Callers that don't pass the option get the existing atomic behaviour.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

@matthewwalsh0 matthewwalsh0 changed the title feat(transaction-controller): add configurable atomic option to batch transactions feat(transaction-controller): add atomic option Mar 27, 2026
@matthewwalsh0 matthewwalsh0 force-pushed the feat/configurable-atomic-batch branch from c33cfe6 to c68741e Compare March 27, 2026 00:35
@matthewwalsh0 matthewwalsh0 force-pushed the feat/configurable-atomic-batch branch from c68741e to 6591450 Compare March 27, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant