fix(deepbook-v3): set sender on read-only query transactions#1023
Merged
fix(deepbook-v3): set sender on read-only query transactions#1023
Conversation
Every query method in src/queries/ builds a Transaction, adds a move call, and simulates — but never calls tx.setSender. This was tolerated under SuiGrpcClient because its core resolution plugin substitutes 0x0 for a missing sender. SuiJsonRpcClient has no such substitution and throws "Missing transaction sender" on every read-only query. Add tx.setSender(this.#ctx.address) directly after each internal Transaction construction in the query modules so the queries work consistently across both transports ahead of the JSON-RPC sunset on July 31, 2026. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
pei-mysten
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Every read-only query method in
packages/deepbook-v3/src/queries/builds its ownTransaction, adds a Move call, and simulates it — but none of them ever calltx.setSender(...). This is tolerated underSuiGrpcClientbecause its core resolution plugin silently substitutes0x0for a missing sender.SuiJsonRpcClienthas no such substitution, so every single query (e.g.client.deepbook.whitelisted('SUI_USDC')) throws:This affects real users today (e.g. market-maker setups still on JSON-RPC) and will continue to until the JSON-RPC sunset on July 31, 2026.
The fix is a one-liner per internal
Transactionconstruction:applied to every query method across the ten affected modules (88 total insertions).
QueryContext.addressis already populated vianormalizeSuiAddress(address)inDeepBookConfig, so no new plumbing is needed. The gRPC path is unchanged (an explicit sender takes precedence over the resolution plugin's default).Follows the pattern of #1018, but applied consistently across all query modules rather than a subset.
Test plan
pnpm --filter @mysten/deepbook-v3 tsc --noEmitpasses.pnpm exec prettier -cclean.client.deepbook.whitelisted('SUI_USDC')on mainnet — should returntrueinstead of throwingMissing transaction sender.AI Assistance Notice