Decompiling
IntelliJ-Move provides integration with the aptos move decompile
command.
Decompile a single bytecode file
Open the Aptos Bytecode file (with the
.mv
extension). By default, the IDE will show the binary contents of the file.If Aptos CLI is configured correctly, notification will be shown at the top of the file, allowing to decompile it and show the source code. Underneath,
aptos move decompile
will be called.Click on Decompile into source code to see the original
.move
file. It will be created near the bytecode file with the nameBYTECODE_FILENAME.move
Decompile a package from the blockchain
Open Aptos tool window View | Tool Windows | Aptos. Click on the Fetch on-chain package action button.
In the Aptos Decompiler dialog, choose Address, Package name and optionally other parameters.
Click OK.
After downloading and decompilation process finished, check out your selected Output directory for the result.