verichains / revela

Decompiler for Move smart contracts
https://revela.verichains.io
Other
43 stars 10 forks source link

[Feature Request] Infer `use`s + use short name for types and modules #9

Open sblackshear opened 4 months ago

sblackshear commented 4 months ago

A request that I think/hope would be pretty easy, but would make the decompiled code a lot more readable: inferring a use for each imported type + using the short name for types in argument names etc (e.g., can write f(s: String) instead of f(s: 0x1::string::String). The disassembler logic around module_aliases does something similar to this if it's helpful https://github.com/move-language/move-sui/blob/main/crates/move-disassembler/src/disassembler.rs