Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[move-diassembler][small] Display strings in disassembler (#13956)
## Description Tries to determine if a constant in the constant pool can be interpreted as a utf8 string. If it can it displays it as such, and adds a comment saying it's interpreted the data that way. ## Test Plan Tested locally: ```rust module 0x1::M { const X: vector<u8> = b"hello world"; public fun use_X(): vector<u8> { X } } ``` ```rust $ move disassemble --name M // Move bytecode v6 module 1.M { public use_X(): vector<u8> { B0: 0: LdConst[0](Vector(U8): 0b68656c..) 1: Ret } Constants [ 0 => vector<u8>: "hello world" // interpreted as UTF8 string ] } ``` --- If your changes are not user-facing and not a breaking change, you can skip the following section. Otherwise, please indicate what changed, and then add to the Release Notes section as highlighted during the release process. ### Type of Change (Check all that apply) - [ ] protocol change - [x] user-visible impact - [ ] breaking change for a client SDKs - [ ] breaking change for FNs (FN binary must upgrade) - [ ] breaking change for validators or node operators (must upgrade binaries) - [ ] breaking change for on-chain data layout - [ ] necessitate either a data wipe or data migration ### Release notes Updated display of constants in disassembled Move bytecode to try and show the deserialized string if the constant is a `vector<u8>` that is valid utf8.
- Loading branch information
7fa8258
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
sui-typescript-docs – ./sdk/docs
sui-typescript-docs-git-main-mysten-labs.vercel.app
sui-typescript-docs-mysten-labs.vercel.app
sui-typescript-docs.vercel.app
sui-wallet-kit.vercel.app