fix Sui mcms reader - #1135
Conversation
|
|
👋 FelixFan1992, thanks for creating this pull request! To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team. Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks! |
There was a problem hiding this comment.
Pull request overview
Adds support in the experimental analyzer for surfacing Sui “upgraded package” routing metadata (stored in Sui MCMS additional fields) so decoded calls can show both the MCMS identity package (tx.To) and the actual execution package target.
Changes:
- Introduces Sui package-routing helpers to emit execution package ID(s) plus optional execution contract type/version from the address book.
- Updates
AnalyzeSuiTransactionto include routing metadata in decoded call inputs (including for MCMS wrapper calls and decode failure fallbacks). - Adds unit tests covering both the routing helper output and end-to-end behavior via
AnalyzeSuiTransaction.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| experimental/analyzer/sui_package_routing.go | New helper logic to derive and prepend Sui upgraded-package routing inputs (execution package + optional contract metadata). |
| experimental/analyzer/sui_package_routing_test.go | Adds tests validating routing input construction and integration with AnalyzeSuiTransaction. |
| experimental/analyzer/sui_analyzer.go | Prepends routing inputs to decoded inputs and includes them in “mcms module” and error-return decoded calls. |
| experimental/analyzer/decoded_call.go | Refactors contract-info lookup into a reusable helper to support address-based lookups (identity vs execution package). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.