feat: add sendTransactionSync and writeContractSync to AbstractClient and SessionClient#397
Conversation
… and SessionClient Add sync transaction submission variants that use EIP-7966 eth_sendRawTransactionSync to wait for mining and return full transaction receipts instead of just hashes. Approach: inject a generic TReturnType and optional sendSerializedTransaction callback into sendTransactionInternal, keeping it fully backward compatible. Sync actions pass a callback that invokes sendRawTransactionSync; existing async callers are unchanged. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 9465d6b The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
PR SummaryMedium Risk Overview Updates Exposes these new methods on Written by Cursor Bugbot for commit 9465d6b. This will update automatically on new commits. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Add sync transaction submission variants that use EIP-7966 eth_sendRawTransactionSync to wait for mining and return full transaction receipts instead of just hashes.
PR-Codex overview
This PR introduces synchronous transaction handling methods in the
AbstractClientandSessionClientto support EIP-7966. It enhances the transaction capabilities by addingsendTransactionSyncandwriteContractSync, improving usability for synchronous operations.Detailed summary
sendTransactionSyncandwriteContractSyncmethods toAbstractClientandSessionClient.actions.ts.sendTransactionInternalto accept a custom callback for serialized transactions.writeContractSync.test.tsandsendTransactionSync.test.ts.sendTransactionForSessionSyncfor session-based transactions.