No output on decompiling with porosity
sid226 opened this issue · comments
Hi,
was analyzing Slockit Byte-code for vulnerabilities using porosity. I am not getting any output.
Bytecode:
https://live.ether.camp/account/598b7457cdabab2f3d361b77e12cd42dc8617cdd
ABI:
https://live.ether.camp/account/598b7457cdabab2f3d361b77e12cd42dc8617cdd/contract
Steps:
create output/DynamicToken.abi
https://gist.github.com/sid226/2119c9745dc0336dc3c8f4a05b59c7e7
create output/DynamicToken.bin
https://gist.github.com/sid226/975149153c354486b3884fa7cc8521bb
OS: Ubuntu 16.04.2 LTS
Commands:
abi=$(< output/DynamicToken.abi)
bin=$(< output/DynamicToken.bin)
porosity --code $bin --abi $abi --list --verbose 0
porosity --abi $abi --code $bin –disassm
porosity --abi $abi --code $bin --decompile --verbose 0
Output:
Porosity v0.1 (https://www.comae.io)
Matt Suiche, Comae Technologies support@comae.io
The Ethereum bytecode commandline decompiler.
Decompiles the given Ethereum input bytecode and outputs the Solidity code.
I guess its the problem with solc version i'm using.
Version: 0.4.16+commit.d7661dd9.Linux.g++
The ABI on ether.camp site differs from the abi generated by the local solc using the same solidity code.
New ABI: https://gist.github.com/sid226/d550ecbfe6fe20a2e8417bd31bf3ebb8
command
solc --abi -o output DynamicToken.sol
some differences present in new ABI:
"payable":false
"stateMutability":"nonpayable"
"type":"fallback"
"stateMutability":"view"