mirror of https://github.com/crytic/slither
commit
79579f9285
Binary file not shown.
@ -0,0 +1,13 @@ |
||||
{ |
||||
"Lib": { |
||||
"f(Int)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n}\n" |
||||
}, |
||||
"T": { |
||||
"add_function_call(Int,Int)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", |
||||
"add_op(Int,Int)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", |
||||
"lib_call(Int)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", |
||||
"neg_usertype(Int)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: NEW VARIABLE 1\n\"];\n1->2;\n2[label=\"Node Type: RETURN 2\n\"];\n}\n", |
||||
"neg_int(int256)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n", |
||||
"eq_op(Int,Int)": "digraph{\n0[label=\"Node Type: ENTRY_POINT 0\n\"];\n0->1;\n1[label=\"Node Type: RETURN 1\n\"];\n}\n" |
||||
} |
||||
} |
@ -0,0 +1,48 @@ |
||||
pragma solidity ^0.8.19; |
||||
|
||||
type Int is int; |
||||
using {add as +, eq as ==, add, neg as -, Lib.f} for Int global; |
||||
|
||||
function add(Int a, Int b) pure returns (Int) { |
||||
return Int.wrap(Int.unwrap(a) + Int.unwrap(b)); |
||||
} |
||||
|
||||
function eq(Int a, Int b) pure returns (bool) { |
||||
return true; |
||||
} |
||||
|
||||
function neg(Int a) pure returns (Int) { |
||||
return a; |
||||
} |
||||
|
||||
library Lib { |
||||
function f(Int r) internal {} |
||||
} |
||||
|
||||
contract T { |
||||
function add_function_call(Int b, Int c) public returns(Int) { |
||||
Int res = add(b,c); |
||||
return res; |
||||
} |
||||
|
||||
function add_op(Int b, Int c) public returns(Int) { |
||||
return b + c; |
||||
} |
||||
|
||||
function lib_call(Int b) public { |
||||
return b.f(); |
||||
} |
||||
|
||||
function neg_usertype(Int b) public returns(Int) { |
||||
Int res = -b; |
||||
return res; |
||||
} |
||||
|
||||
function neg_int(int b) public returns(int) { |
||||
return -b; |
||||
} |
||||
|
||||
function eq_op(Int b, Int c) public returns(bool) { |
||||
return b == c; |
||||
} |
||||
} |
Loading…
Reference in new issue