mirror of https://github.com/crytic/slither
do not convert IRs with arguments to state var read (#1230)
* do not convert IRs with arguments to state var readpull/1300/head
parent
8bead9347c
commit
2e341aee9b
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,9 @@ |
||||
{ |
||||
"L": { |
||||
"pub()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", |
||||
"inter()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" |
||||
}, |
||||
"C": { |
||||
"f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" |
||||
} |
||||
} |
@ -0,0 +1,9 @@ |
||||
{ |
||||
"ExtendedMath": {}, |
||||
"IERC20": { |
||||
"decimals()": "digraph{\n}\n" |
||||
}, |
||||
"A": { |
||||
"test(address)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n}\n" |
||||
} |
||||
} |
@ -0,0 +1,6 @@ |
||||
{ |
||||
"C": {}, |
||||
"D": { |
||||
"f()": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" |
||||
} |
||||
} |
@ -0,0 +1,18 @@ |
||||
library L { |
||||
function pub() public pure returns (uint) { |
||||
return 7; |
||||
} |
||||
function inter() internal pure returns (uint) { |
||||
return 8; |
||||
} |
||||
} |
||||
|
||||
function fu() pure returns (uint, uint) { |
||||
return (L.pub(), L.inter()); |
||||
} |
||||
|
||||
contract C { |
||||
function f() public pure returns (uint, uint) { |
||||
return fu(); |
||||
} |
||||
} |
@ -0,0 +1,14 @@ |
||||
library ExtendedMath { |
||||
uint256 constant decimals = 18; |
||||
} |
||||
|
||||
interface IERC20 { |
||||
function decimals() external view returns (uint8); |
||||
} |
||||
|
||||
contract A { |
||||
using ExtendedMath for *; |
||||
function test(address x) public { |
||||
uint8 decimals = IERC20(address(x)).decimals(); |
||||
} |
||||
} |
@ -0,0 +1,13 @@ |
||||
contract C { |
||||
uint public x = 2; |
||||
} |
||||
|
||||
function test() returns (uint) { |
||||
return (new C()).x(); |
||||
} |
||||
|
||||
contract D { |
||||
function f() public returns (uint) { |
||||
return test(); |
||||
} |
||||
} |
Loading…
Reference in new issue