mirror of https://github.com/crytic/slither
parent
9c4bc505d3
commit
9df54e9c3a
@ -0,0 +1,38 @@ |
||||
digraph{ |
||||
0[label="Node Type: ENTRY_POINT 0 |
||||
"]; |
||||
0->1; |
||||
1[label="Node Type: NEW VARIABLE 1 |
||||
|
||||
EXPRESSION: |
||||
user_shares = () |
||||
|
||||
IRs: |
||||
user_shares(uint256[10]) = []"]; |
||||
1->2; |
||||
2[label="Node Type: EXPRESSION 2 |
||||
|
||||
EXPRESSION: |
||||
user_shares.append(1) |
||||
|
||||
IRs: |
||||
REF_1 -> LENGTH user_shares |
||||
TMP_3(uint256) := REF_1(uint256) |
||||
TMP_4(uint256) = TMP_3 (c)+ 1 |
||||
REF_1(uint256) (->user_shares) := TMP_4(uint256) |
||||
REF_2(uint256) -> user_shares[TMP_3] |
||||
REF_2(uint256) (->user_shares) := 1(uint256)"]; |
||||
2->3; |
||||
3[label="Node Type: EXPRESSION 3 |
||||
|
||||
EXPRESSION: |
||||
user_shares.pop() |
||||
|
||||
IRs: |
||||
REF_4 -> LENGTH user_shares |
||||
TMP_6(uint256) = REF_4 (c)- 1 |
||||
REF_5(uint256) -> user_shares[TMP_6] |
||||
REF_5 = delete REF_5 |
||||
REF_6 -> LENGTH user_shares |
||||
REF_6(uint256) (->user_shares) := TMP_6(uint256)"]; |
||||
} |
@ -0,0 +1,28 @@ |
||||
digraph{ |
||||
0[label="Node Type: ENTRY_POINT 0 |
||||
"]; |
||||
0->1; |
||||
1[label="Node Type: EXPRESSION 1 |
||||
|
||||
EXPRESSION: |
||||
self.b(x,True) |
||||
|
||||
IRs: |
||||
INTERNAL_CALL, default_args.b()(x,True)"]; |
||||
1->2; |
||||
2[label="Node Type: EXPRESSION 2 |
||||
|
||||
EXPRESSION: |
||||
self.b(1,self.config) |
||||
|
||||
IRs: |
||||
INTERNAL_CALL, default_args.b()(1,config)"]; |
||||
2->3; |
||||
3[label="Node Type: EXPRESSION 3 |
||||
|
||||
EXPRESSION: |
||||
self.b(1,z) |
||||
|
||||
IRs: |
||||
INTERNAL_CALL, default_args.b()(1,z)"]; |
||||
} |
@ -0,0 +1,24 @@ |
||||
digraph{ |
||||
0[label="Node Type: ENTRY_POINT 0 |
||||
"]; |
||||
0->1; |
||||
1[label="Node Type: IF 1 |
||||
|
||||
EXPRESSION: |
||||
config |
||||
|
||||
IRs: |
||||
CONDITION config"]; |
||||
1->3[label="True"]; |
||||
1->2[label="False"]; |
||||
2[label="Node Type: END_IF 2 |
||||
"]; |
||||
3[label="Node Type: EXPRESSION 3 |
||||
|
||||
EXPRESSION: |
||||
self.counter = y |
||||
|
||||
IRs: |
||||
counter(uint256) := y(uint256)"]; |
||||
3->2; |
||||
} |
@ -0,0 +1,9 @@ |
||||
digraph{ |
||||
0[label="Node Type: OTHER_ENTRYPOINT 0 |
||||
|
||||
EXPRESSION: |
||||
MAX_TICKS_UINT = 50 |
||||
|
||||
IRs: |
||||
MAX_TICKS_UINT(uint256) := 50(uint256)"]; |
||||
} |
@ -0,0 +1,57 @@ |
||||
digraph{ |
||||
0[label="Node Type: ENTRY_POINT 0 |
||||
"]; |
||||
0->1; |
||||
1[label="Node Type: NEW VARIABLE 1 |
||||
|
||||
EXPRESSION: |
||||
a = 0 |
||||
|
||||
IRs: |
||||
a(int128) := 0(uint256)"]; |
||||
1->2; |
||||
2[label="Node Type: NEW VARIABLE 2 |
||||
|
||||
EXPRESSION: |
||||
b = 0 |
||||
|
||||
IRs: |
||||
b(int128) := 0(uint256)"]; |
||||
2->3; |
||||
3[label="Node Type: EXPRESSION 3 |
||||
|
||||
EXPRESSION: |
||||
(a,b) = self.foo() |
||||
|
||||
IRs: |
||||
TUPLE_0(int128,int128) = INTERNAL_CALL, interface_conversion.foo()() |
||||
a(int128)= UNPACK TUPLE_0 index: 0 |
||||
b(int128)= UNPACK TUPLE_0 index: 1 "]; |
||||
3->4; |
||||
4[label="Node Type: NEW VARIABLE 4 |
||||
|
||||
EXPRESSION: |
||||
x = 0x0000000000000000000000000000000000000000 |
||||
|
||||
IRs: |
||||
x(address) := 0(address)"]; |
||||
4->5; |
||||
5[label="Node Type: NEW VARIABLE 5 |
||||
|
||||
EXPRESSION: |
||||
c = 0 |
||||
|
||||
IRs: |
||||
c(uint256) := 0(uint256)"]; |
||||
5->6; |
||||
6[label="Node Type: EXPRESSION 6 |
||||
|
||||
EXPRESSION: |
||||
(a,c) = Test(x).foo() |
||||
|
||||
IRs: |
||||
TMP_0 = CONVERT x to Test |
||||
TUPLE_1(int128,uint256) = HIGH_LEVEL_CALL, dest:TMP_0(Test), function:foo, arguments:[] |
||||
a(int128)= UNPACK TUPLE_1 index: 0 |
||||
c(uint256)= UNPACK TUPLE_1 index: 1 "]; |
||||
} |
@ -0,0 +1,12 @@ |
||||
digraph{ |
||||
0[label="Node Type: ENTRY_POINT 0 |
||||
"]; |
||||
0->1; |
||||
1[label="Node Type: RETURN 1 |
||||
|
||||
EXPRESSION: |
||||
(2,3) |
||||
|
||||
IRs: |
||||
RETURN 2,3"]; |
||||
} |
@ -0,0 +1,28 @@ |
||||
digraph{ |
||||
0[label="Node Type: ENTRY_POINT 0 |
||||
"]; |
||||
0->1; |
||||
1[label="Node Type: NEW VARIABLE 1 |
||||
|
||||
EXPRESSION: |
||||
chainlink_lrd = Test(msg.sender).get() |
||||
|
||||
IRs: |
||||
TMP_0 = CONVERT msg.sender to Test |
||||
TUPLE_0(uint80,int256,uint256,uint256,uint80) = HIGH_LEVEL_CALL, dest:TMP_0(Test), function:get, arguments:[] |
||||
TMP_1(uint80)= UNPACK TUPLE_0 index: 0 |
||||
TMP_2(int256)= UNPACK TUPLE_0 index: 1 |
||||
TMP_3(uint256)= UNPACK TUPLE_0 index: 2 |
||||
TMP_4(uint256)= UNPACK TUPLE_0 index: 3 |
||||
TMP_5(uint80)= UNPACK TUPLE_0 index: 4 |
||||
chainlink_lrd(FAKE_TUPLE_0_1_2_3_4) = new FAKE_TUPLE_0_1_2_3_4(TMP_1,TMP_2,TMP_3,TMP_4,TMP_5)"]; |
||||
1->2; |
||||
2[label="Node Type: RETURN 2 |
||||
|
||||
EXPRESSION: |
||||
chainlink_lrd[0] |
||||
|
||||
IRs: |
||||
REF_1(uint80) -> chainlink_lrd._0 |
||||
RETURN REF_1"]; |
||||
} |
@ -0,0 +1,9 @@ |
||||
digraph{ |
||||
0[label="Node Type: OTHER_ENTRYPOINT 0 |
||||
|
||||
EXPRESSION: |
||||
MAX_BANDS = 10 |
||||
|
||||
IRs: |
||||
MAX_BANDS(uint256) := 10(uint256)"]; |
||||
} |
@ -1,22 +1,9 @@ |
||||
|
||||
|
||||
interface ERC20: |
||||
|
||||
def totalSupply() -> uint256: view |
||||
|
||||
|
||||
|
||||
def balanceOf(_owner: address) -> uint256: view |
||||
|
||||
|
||||
|
||||
def allowance(_owner: address, _spender: address) -> uint256: view |
||||
|
||||
|
||||
def transfer(_to: address, _value: uint256) -> bool: nonpayable |
||||
|
||||
|
||||
def transferFrom(_from: address, _to: address, _value: uint256) -> bool: nonpayable |
||||
|
||||
|
||||
def approve(_spender: address, _value: uint256) -> bool: nonpayable |
||||
|
@ -1,4 +0,0 @@ |
||||
|
||||
@external |
||||
def test(): |
||||
x: bytes32 = convert(chain.id, bytes32) |
@ -0,0 +1,12 @@ |
||||
counter: uint256 |
||||
config: bool |
||||
@internal |
||||
def b(y: uint256, config: bool = True): |
||||
if config: |
||||
self.counter = y |
||||
|
||||
@external |
||||
def a(x: uint256, z: bool): |
||||
self.b(x) |
||||
self.b(1, self.config) |
||||
self.b(1, z) |
@ -0,0 +1,17 @@ |
||||
@external |
||||
def f(): |
||||
for i in range(100): |
||||
if (i > 100): |
||||
break |
||||
|
||||
if (i < 3): |
||||
continue |
||||
x: uint256 = 10 |
||||
for j in range(10): |
||||
if (j > 10): |
||||
continue |
||||
|
||||
if (j < 3): |
||||
break |
||||
|
||||
x -= 1 |
@ -1,5 +1,3 @@ |
||||
|
||||
|
||||
interface Test: |
||||
def foo() -> (int128, uint256): nonpayable |
||||
|
@ -0,0 +1,10 @@ |
||||
interface Test: |
||||
def get() -> (uint80, int256, uint256, uint256, uint80): view |
||||
@external |
||||
def __default__() -> uint80: |
||||
chainlink_lrd: (uint80, int256, uint256, uint256, uint80) = Test(msg.sender).get() |
||||
return chainlink_lrd[0] |
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in new issue