Decompiler, Optimizer and Recompiler for smart contracts on Signum Blockchain.
Download project, open file signum-d-or.html in your browser or run it on gitpages.
Decompiling a smart contract and changes variables names and jumps locations can lead to a better understanding of smart contract.
- Decompile program
- Analyse data and once you guess some variable name or jump location, change its name on MAP object.
- Decompile again to see assembly code with variables name you set.
Activate optimizing feature and an optimizer algorithm similar to one used in SmartC will be used. To inspect changes, use diff tool.
Automaticaly recompile optimized code. Output information needed to create a SmartContract will be presented
- Note you can edit assembly code yourself and use another assembly compiler, like SmartC (it also compiles assembly!) or the ancient SmartContractor tool. But please report if you find wrong optimizations!
Code generated by JVM compiler on SmartJ is unoptimized for CIYAM bytecode instructions. It is very complex to optimize code on bytecode basis. Reusing code from SmartC it was very easy to implement this recompiler. Contracts can be reduced aroud 40% with this tool!