Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 5, 2025

Description of change

The explorer UI was not displaying unwrapped objects in transaction summaries, despite them being present in transaction effects and visible in CLI output. The root cause was missing type definitions in the Rust source code.

Changes:

  • Rust source: Added Unwrapped variant to ObjectChange enum in crates/iota-json-rpc-types/src/object_changes.rs with fields matching the pattern of Created objects (digest, objectId, objectType, owner, sender, version)
  • Rust implementation: Updated all ObjectChange methods (object_id(), object_ref(), mask_for_test(), Display trait) to handle Unwrapped variant
  • Object change creation: Added WriteKind::Unwrap handling in crates/iota-json-rpc/src/object_changes.rs to create Unwrapped ObjectChange instances
  • CLI displays: Updated transaction and dry-run displays to show unwrapped objects
  • GraphQL mapper: Fixed incorrect mapping of unwrapped objects from type: 'wrapped' to type: 'unwrapped' with proper owner and digest fields
  • Core types: Added unwrapped to IotaObjectChangeTypes and ObjectChangeSummary
  • UI labels: Added "Unwrap" label for unwrapped objects in transaction summaries
  • TypeScript types: Reverted manual changes to auto-generated files; types will be generated by running scripts/generate_files/update_generated_files.sh

Links to any relevant issues

Fixes issue where transactions like this one show unwrapped objects in CLI but not in explorer.

How the change has been tested

  • Basic tests (linting, compilation, formatting, unit/integration tests)
  • Patch-specific tests (correctness, functionality coverage)
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

Release Notes

  • Protocol:
  • Nodes (Validators and Full nodes):
  • Indexer:
  • JSON-RPC: Added Unwrapped variant to ObjectChange enum
  • GraphQL: Added support for unwrapped object changes
  • CLI: Updated displays to show unwrapped objects
  • Rust SDK: Added unwrapped variant to ObjectChange type
  • REST API:
Original prompt

This section details on the original issue you should resolve

<issue_title>Explorer doesn't show unwrapped objects in the transaction summary</issue_title>
<issue_description>## Bug description

A transaction like https://explorer.iota.org/txblock/6nQ7pwn2vwU296AnrNAkgRZsnht4gTcrTnFKfPVer1y4?network=testnet that unwraps an object from another one, doesn't show the unwrapped object in the balance changes, making it unclear what happened.
Here are the transaction details from the CLI where the missing object is listed in Unwrapped Objects:

Transaction Digest: 6nQ7pwn2vwU296AnrNAkgRZsnht4gTcrTnFKfPVer1y4
╭─────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Transaction Data                                                                                │
├─────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Sender: 0x111111111504e9350e635d65cd38ccd2c029434c6a3a480d8947a9ba6a15b215                      │
│ Gas Owner: 0x111111111504e9350e635d65cd38ccd2c029434c6a3a480d8947a9ba6a15b215                   │
│ Gas Budget: 10000000 NANOS                                                                      │
│ Gas Price: 1000 NANOS                                                                           │
│ Gas Payment:                                                                                    │
│  ┌──                                                                                            │
│  │ ID: 0x003ff7f0e4940d94e56729949db16875806aa4b5bc816469ce7c76da2744f3a3                       │
│  │ Version: 6809040                                                                             │
│  │ Digest: Cna6vsobAp3Tg6ALsmSwvncnCeYk4ZFUDPvyyuL6yCV9                                         │
│  └──                                                                                            │
│                                                                                                 │
│ Transaction Kind: Programmable                                                                  │
│ ╭─────────────────────────────────────────────────────────────────────────────────────────────╮ │
│ │ Input Objects                                                                               │ │
│ ├─────────────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ 0   Shared Object    ID: 0xb1b2c1f2f2e33943e8fe7954fca9da40b56cd33cf89c00ac1a45f7a1b028ec11 │ │
│ ╰─────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ ╭──────────────────────────────────────────────────────────────────────────────────╮            │
│ │ Commands                                                                         │            │
│ ├──────────────────────────────────────────────────────────────────────────────────┤            │
│ │ 0  MoveCall:                                                                     │            │
│ │  ┌                                                                               │            │
│ │  │ Function:  sender                                                             │            │
│ │  │ Module:    tx_context                                                         │            │
│ │  │ Package:   0x0000000000000000000000000000000000000000000000000000000000000002 │            │
│ │  └                                                                               │            │
│ │                                                                                  │            │
│ │ 1  MoveCall:                                                                     │            │
│ │  ┌                                                                               │            │
│ │  │ Function:  transfer_coin                                                      │            │
│ │  │ Module:    shared_coins                                                       │            │
│ │  │ Package:   0x9f6a4c3b71ada16ada9acea1cd35cb245caec0eb28a6de86bb8b6bd3e8f62197 │            │
│ │  │ Arguments:                                                                    │            │
│ │  │   Input  0                                                                    │            │
│ │  │   Result 0                                                                    │            │
│ │  └                                                                               │            │
│ ╰──────────────────────────────────────────────────────────────────────────────────╯            │
│                                                                                                 │
│ Signatures:                                                                                     │
│    F39k4vN55ZucjYiXcw/r4l6a+i8u0YfCeBFXywruFzsSAVlMJ/SCXxdCxh+S4NmSA8jSqykvEwNrkgnwd15RAA==     │
│                                                                       ...

</details>

- Fixes iotaledger/iota#4727

<!-- START COPILOT CODING AGENT TIPS -->
---

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more [Copilot coding agent tips](https://gh.io/copilot-coding-agent-tips) in the docs.

@vercel
Copy link

vercel bot commented Dec 5, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
apps-backend Error Error Dec 5, 2025 3:17pm
iota-evm-bridge Error Error Dec 5, 2025 3:17pm
rebased-explorer Error Error Dec 5, 2025 3:17pm
wallet-dashboard Error Error Dec 5, 2025 3:17pm
2 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
apps-ui-kit Ignored Ignored Preview Dec 5, 2025 3:17pm
iota-multisig-toolkit Ignored Ignored Preview Dec 5, 2025 3:17pm

@vercel vercel bot temporarily deployed to Preview – rebased-explorer December 5, 2025 13:50 Inactive
@vercel vercel bot temporarily deployed to Preview – iota-evm-bridge December 5, 2025 13:50 Inactive
@vercel vercel bot temporarily deployed to Preview – apps-ui-kit December 5, 2025 13:50 Inactive
@vercel vercel bot temporarily deployed to Preview – wallet-dashboard December 5, 2025 13:50 Inactive
@vercel vercel bot temporarily deployed to Preview – iota-multisig-toolkit December 5, 2025 13:50 Inactive
@vercel vercel bot temporarily deployed to Preview – apps-backend December 5, 2025 13:50 Inactive
Co-authored-by: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com>
Copilot AI and others added 2 commits December 5, 2025 14:06
Co-authored-by: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com>
Co-authored-by: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com>
@vercel vercel bot temporarily deployed to Preview – iota-multisig-toolkit December 5, 2025 14:07 Inactive
Copilot AI changed the title [WIP] Fix explorer not showing unwrapped objects in transaction summary Fix explorer not displaying unwrapped objects in transaction summary Dec 5, 2025
Copilot AI requested a review from Thoralf-M December 5, 2025 14:12
Copilot finished work on behalf of Thoralf-M December 5, 2025 14:12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is automatically generated, do not touch it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in commit 55eb434. The Unwrapped variant has been added to the Rust ObjectChange enum instead, which will generate the TypeScript types when the generation script is run.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revert this file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in commit 55eb434.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot the generated file should not be modified manually, instead the Rust part would need to be updated and then the /iota/scripts/generate_files/update_generated_files.sh script should be used to get the files updated

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the Rust ObjectChange enum in commit 55eb434. The TypeScript types will be generated when the update_generated_files.sh script is run. The Rust code compiles successfully.

- Added Unwrapped variant to ObjectChange enum in iota-json-rpc-types
- Updated all match statements to handle Unwrapped objects
- Added WriteKind::Unwrap handling in object_changes.rs
- Updated Display implementation for Unwrapped objects
- Reverted manual changes to generated TypeScript files

Co-authored-by: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com>
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.

3 participants