registry/display: JSONRPC-alt integration#25359
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
8 tasks
3c2f1a9 to
957c6f4
Compare
c4b5c6c to
b2f6b0c
Compare
b2f6b0c to
0b4c7a2
Compare
957c6f4 to
183e158
Compare
emmazzz
approved these changes
Mar 10, 2026
Contributor
emmazzz
left a comment
There was a problem hiding this comment.
Left a clarifying comment. LGTM!
crates/sui-indexer-alt-e2e-tests/tests/jsonrpc/objects/display/depth_error.move
Outdated
Show resolved
Hide resolved
| display.set(&cap, "qux", "{bar.baz.qux:json}"); | ||
| display.set(&cap, "quy", "quy is {bar.baz.qux.quy.val}."); | ||
| display.set(&cap, "qu_", "x({bar.baz.qux.val}) y({bar.baz.qux.quy.val}), z({bar.baz.qux.quy.quz.val})?!"); | ||
| display.set(&cap, "f42", "[42] is {id->[42u64] | 0x00420042u32 :hex}"); |
Contributor
There was a problem hiding this comment.
Cool stuff! I didn't know about this syntax and how you can specify df as well as a default fallback value.
wlmyng
approved these changes
Mar 10, 2026
| public struct Foo has key, store { | ||
| id: UID, | ||
| deep: Deep<Deep<Deep<Deep<Deep<Deep<Deep<Deep<Deep<Deep<Deep<u8>>>>>>>>>>>, | ||
| deep: Deep<Deep<Deep<Deep< |
Contributor
There was a problem hiding this comment.
whoa what kind of formatting is this
Contributor
Author
There was a problem hiding this comment.
It was my way of making it easier to count the number of opening and closing angle braces 😅
| "bar": "bar is 42!", | ||
| "baz": "baz is true?", | ||
| "f42": "[42] is 42004200", | ||
| "qu_": null, |
Contributor
There was a problem hiding this comment.
nice testing that if some part evaluates to None the entire thing becomes None
183e158 to
885b512
Compare
885b512 to
b44a52e
Compare
0b4c7a2 to
36c96ff
Compare
## Description Relax the type of `DisplayFieldsResponse` to allow values to be arbitrary JSON, instead of just strings, so it can support Display v2 fields. ## Test plan CI
## Description Replicate the GraphQL alt integration for JSONRPC-alt. ## Test plan New E2E tests: ``` cargo nextest run \ -p sui-indexer-alt-e2e-tests \ --test transactional_tests \ -- jsonrpc/objects/display/display_v2 ```
36c96ff to
6cf585d
Compare
b44a52e to
7b15547
Compare
ebmifa
added a commit
that referenced
this pull request
Mar 10, 2026
`display_fields` now returns `Json` values (not `String`) after the Display v2 integration in #25359, but the call site still wrapped the value in `Json::String(...)`, causing a build failure. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 task
ebmifa
added a commit
that referenced
this pull request
Mar 10, 2026
## Summary - Fixes build failure introduced by #25359 (Display v2 JSONRPC-alt integration) - `display_fields` return type changed from `BTreeMap<String, Result<String>>` to `BTreeMap<String, Result<Json>>`, but line 194 still wrapped the value in `Json::String(value)` causing a `mismatched types` compiler error - Fix: use `value` directly instead of wrapping in `Json::String()` ## Test plan - [x] `cargo check -p sui-indexer-alt-jsonrpc` passes - Build failure: https://github.com/MystenLabs/sui-operations/actions/runs/22924670856/job/66531926292 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
amnn
added a commit
that referenced
this pull request
Mar 11, 2026
## Description Add support to legacy JSONRPC for Display v2. ## Test plan New E2E tests: ``` $ cargo nextest run -p sui-json-rpc-tests --test rpc_server_tests ``` ## Stack - #23710 - #25242 - #25358 - #25359 --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] gRPC: - [x] JSON-RPC: Adds support for Display Registry to JSONRPC: When `showDisplay` is set, the RPC will look for a `Display<T>` stored in the Display Registry and will use that as the source of truth for its type's format. This takes precedence over any Display v1 formats that exist for this type. - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] Indexing Framework:
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
Replicate the GraphQL alt integration for JSONRPC-alt.
Test plan
New E2E tests:
Stack
Release notes
Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required.
For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates.