Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:trailofbits/slither into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
montyly committed Feb 8, 2019
2 parents 5f0cae3 + 03ab0cd commit 4154f79
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 24 deletions.
34 changes: 17 additions & 17 deletions examples/printers/inheritances_graph.sol
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
contract Contract1{

uint myvar;

function myfunc() public{}
contract A {
function f() public pure returns (uint) {
return 0;
}

function g() public pure returns (uint) {
return 0;
}
}

contract Contract2{

uint public myvar2;

function myfunc2() public{}

function privatefunc() private{}
contract B {
function g() public pure returns (uint) {
return 0;
}
}

contract Contract3 is Contract1, Contract2{

function myfunc() public{} // override myfunc

}
contract C is A, B {
function f() public pure returns (uint) {
return 0;
}
}
12 changes: 6 additions & 6 deletions examples/printers/inheritances_graph.sol.dot
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
digraph{
Contract1[shape="box"label=< <TABLE border="0"><TR><TD align="center"><B>Contract1</B></TD></TR><TR><TD align="left"><I>Public Functions:</I></TD></TR><TR><TD align="left"> myfunc()</TD></TR><TR><TD align="left"><I>Private Variables:</I></TD></TR><TR><TD align="left"> myvar</TD></TR></TABLE> >];
Contract2[shape="box"label=< <TABLE border="0"><TR><TD align="center"><B>Contract2</B></TD></TR><TR><TD align="left"><I>Public Functions:</I></TD></TR><TR><TD align="left"> myfunc2()</TD></TR><TR><TD align="left"><I>Private Functions:</I></TD></TR><TR><TD align="left"> privatefunc()</TD></TR><TR><TD align="left"><I>Public Variables:</I></TD></TR><TR><TD align="left"> myvar2</TD></TR></TABLE> >];
Contract3 -> Contract2;
Contract3 -> Contract1;
Contract3[shape="box"label=< <TABLE border="0"><TR><TD align="center"><B>Contract3</B></TD></TR><TR><TD align="left"><I>Public Functions:</I></TD></TR><TR><TD align="left"><font color="#FFA500"> myfunc()</font></TD></TR><TR><TD align="left"><I>Public Variables:</I></TD></TR><TR><TD align="left"> myvar2</TD></TR><TR><TD align="left"><I>Private Variables:</I></TD></TR><TR><TD align="left"> myvar</TD></TR></TABLE> >];
digraph "" {
A[shape="box"label=< <TABLE border="0"><TR><TD align="center"><B>A</B></TD></TR><TR><TD align="left"><I>Public Functions:</I></TD></TR><TR><TD align="left"> f()</TD></TR><TR><TD align="left"> g()</TD></TR></TABLE> >];
B[shape="box"label=< <TABLE border="0"><TR><TD align="center"><B>B</B></TD></TR><TR><TD align="left"><I>Public Functions:</I></TD></TR><TR><TD align="left"> g()</TD></TR></TABLE> >];
C -> A [ label="1" ];
C -> B [ label="2" ];
C[shape="box"label=< <TABLE border="0"><TR><TD align="center"><B>C</B></TD></TR><TR><TD align="left"><I>Public Functions:</I></TD></TR><TR><TD align="left"><font color="#FFA500"> f()</font></TD></TR><TR><TD><BR/></TD></TR><TR><TD align="left" border="1"><font color="#777777" point-size="10">'g' collides in inherited contracts A, B where B wins.</font></TD></TR></TABLE> >];
}
Binary file modified examples/printers/inheritances_graph.sol.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion slither/printers/inheritance/inheritance_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def _summary(self, contract):
ret += '%s' % private_variables

if indirect_shadowing_information:
ret += '<TR><TD><BR/></TD></TR><TR><TD align="left" border="1"><font color="gray" point-size="10">%s</font></TD></TR>' % indirect_shadowing_information.replace('\n', '<BR/>')
ret += '<TR><TD><BR/></TD></TR><TR><TD align="left" border="1"><font color="#777777" point-size="10">%s</font></TD></TR>' % indirect_shadowing_information.replace('\n', '<BR/>')
ret += '</TABLE> >];\n'

return ret
Expand Down

0 comments on commit 4154f79

Please sign in to comment.