raineorshine / solgraph

Visualize Solidity control flow for smart contract security analysis. :dollar: ⇆ :dollar:

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

More parse errors

drandreaskrueger opened this issue · comments

Hey!
Kudos again, a very useful tool.

I want to get an overview of this set of contracts.

From 10 *.sol files I could make nonempty PNG images, but ~ 7 are throwing Parse errors.

what to do?

how to replicate:

get all 20 contracts:

git clone https://github.com/energywebfoundation/bond.git
cd bond
git checkout ricmm-work-multicon-resin
git pull
cd bond/certificate_of_origin/contracts/

create a little helper, called solgrapher.sh:

solgraph $1 > $1.dot && dot -Tpng $1.dot > $1.dot.png && echo success: $1.dot.png
rm $1.dot

make executable

chmod 755 solgrapher.sh

call on all .sol files:

find . -name "*.sol" -exec ./solgrapher.sh {} \;

There are a lot of parse errors now because of the outdated solidity parser. This is being actively worked on. Let's check this again after that is fixed.

The ricmm-work-multicon-resin branch does not exist on https://github.com/energywebfoundation/bond.git, but I assume the issues are fixed with the new parser! Please post a new issue with the specific parser error (or directly to solidity-parser) if an issue still exists. Thanks!