mirror of https://github.com/crytic/slither
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
288 lines
9.3 KiB
288 lines
9.3 KiB
6 years ago
|
{
|
||
|
"success": true,
|
||
|
"error": null,
|
||
6 years ago
|
"results": {
|
||
|
"detectors": [
|
||
6 years ago
|
{
|
||
6 years ago
|
"elements": [
|
||
|
{
|
||
|
"type": "function",
|
||
|
"name": "test_view_bug",
|
||
6 years ago
|
"source_mapping": {
|
||
6 years ago
|
"start": 45,
|
||
|
"length": 58,
|
||
6 years ago
|
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_relative": "tests/constant.sol",
|
||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_short": "tests/constant.sol",
|
||
6 years ago
|
"is_dependency": false,
|
||
6 years ago
|
"lines": [
|
||
|
5,
|
||
|
6,
|
||
6 years ago
|
7
|
||
6 years ago
|
],
|
||
6 years ago
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "Constant",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 392,
|
||
|
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_relative": "tests/constant.sol",
|
||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_short": "tests/constant.sol",
|
||
6 years ago
|
"is_dependency": false,
|
||
6 years ago
|
"lines": [
|
||
|
1,
|
||
|
2,
|
||
|
3,
|
||
|
4,
|
||
|
5,
|
||
|
6,
|
||
|
7,
|
||
|
8,
|
||
|
9,
|
||
|
10,
|
||
|
11,
|
||
|
12,
|
||
|
13,
|
||
|
14,
|
||
|
15,
|
||
|
16,
|
||
|
17,
|
||
|
18,
|
||
|
19,
|
||
|
20,
|
||
|
21,
|
||
|
22,
|
||
|
23,
|
||
|
24,
|
||
|
25
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 2
|
||
|
}
|
||
|
},
|
||
|
"signature": "test_view_bug()"
|
||
6 years ago
|
}
|
||
6 years ago
|
},
|
||
6 years ago
|
{
|
||
|
"type": "variable",
|
||
|
"name": "a",
|
||
6 years ago
|
"source_mapping": {
|
||
6 years ago
|
"start": 28,
|
||
|
"length": 6,
|
||
6 years ago
|
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_relative": "tests/constant.sol",
|
||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_short": "tests/constant.sol",
|
||
6 years ago
|
"is_dependency": false,
|
||
6 years ago
|
"lines": [
|
||
6 years ago
|
3
|
||
6 years ago
|
],
|
||
6 years ago
|
"starting_column": 5,
|
||
|
"ending_column": 11
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "Constant",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 392,
|
||
|
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_relative": "tests/constant.sol",
|
||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_short": "tests/constant.sol",
|
||
6 years ago
|
"is_dependency": false,
|
||
6 years ago
|
"lines": [
|
||
|
1,
|
||
|
2,
|
||
|
3,
|
||
|
4,
|
||
|
5,
|
||
|
6,
|
||
|
7,
|
||
|
8,
|
||
|
9,
|
||
|
10,
|
||
|
11,
|
||
|
12,
|
||
|
13,
|
||
|
14,
|
||
|
15,
|
||
|
16,
|
||
|
17,
|
||
|
18,
|
||
|
19,
|
||
|
20,
|
||
|
21,
|
||
|
22,
|
||
|
23,
|
||
|
24,
|
||
|
25
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 2
|
||
|
}
|
||
|
}
|
||
6 years ago
|
}
|
||
6 years ago
|
}
|
||
6 years ago
|
],
|
||
5 years ago
|
"description": "Constant.test_view_bug() (tests/constant.sol#5-7) is declared view but changes state variables:\n\t- Constant.a (tests/constant.sol#3)\n",
|
||
|
"markdown": "[Constant.test_view_bug()](tests/constant.sol#L5-L7) is declared view but changes state variables:\n\t- [Constant.a](tests/constant.sol#L3)\n",
|
||
5 years ago
|
"id": "4dee61d8835d20c6f1f7c195d8bd1e9de5dbcc096396a5b8db391136f9f5fdf1",
|
||
6 years ago
|
"additional_fields": {
|
||
|
"contains_assembly": false
|
||
5 years ago
|
},
|
||
5 years ago
|
"check": "constant-function-state",
|
||
6 years ago
|
"impact": "Medium",
|
||
5 years ago
|
"confidence": "Medium"
|
||
|
},
|
||
|
{
|
||
6 years ago
|
"elements": [
|
||
|
{
|
||
|
"type": "function",
|
||
|
"name": "test_constant_bug",
|
||
6 years ago
|
"source_mapping": {
|
||
6 years ago
|
"start": 113,
|
||
|
"length": 66,
|
||
6 years ago
|
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_relative": "tests/constant.sol",
|
||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_short": "tests/constant.sol",
|
||
6 years ago
|
"is_dependency": false,
|
||
6 years ago
|
"lines": [
|
||
|
9,
|
||
|
10,
|
||
6 years ago
|
11
|
||
6 years ago
|
],
|
||
6 years ago
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "Constant",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 392,
|
||
|
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_relative": "tests/constant.sol",
|
||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_short": "tests/constant.sol",
|
||
6 years ago
|
"is_dependency": false,
|
||
6 years ago
|
"lines": [
|
||
|
1,
|
||
|
2,
|
||
|
3,
|
||
|
4,
|
||
|
5,
|
||
|
6,
|
||
|
7,
|
||
|
8,
|
||
|
9,
|
||
|
10,
|
||
|
11,
|
||
|
12,
|
||
|
13,
|
||
|
14,
|
||
|
15,
|
||
|
16,
|
||
|
17,
|
||
|
18,
|
||
|
19,
|
||
|
20,
|
||
|
21,
|
||
|
22,
|
||
|
23,
|
||
|
24,
|
||
|
25
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 2
|
||
|
}
|
||
|
},
|
||
|
"signature": "test_constant_bug()"
|
||
6 years ago
|
}
|
||
6 years ago
|
},
|
||
6 years ago
|
{
|
||
|
"type": "variable",
|
||
|
"name": "a",
|
||
6 years ago
|
"source_mapping": {
|
||
6 years ago
|
"start": 28,
|
||
|
"length": 6,
|
||
6 years ago
|
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_relative": "tests/constant.sol",
|
||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_short": "tests/constant.sol",
|
||
6 years ago
|
"is_dependency": false,
|
||
6 years ago
|
"lines": [
|
||
6 years ago
|
3
|
||
6 years ago
|
],
|
||
6 years ago
|
"starting_column": 5,
|
||
|
"ending_column": 11
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "Constant",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 392,
|
||
|
"filename_used": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_relative": "tests/constant.sol",
|
||
|
"filename_absolute": "/home/travis/build/crytic/slither/tests/constant.sol",
|
||
|
"filename_short": "tests/constant.sol",
|
||
6 years ago
|
"is_dependency": false,
|
||
6 years ago
|
"lines": [
|
||
|
1,
|
||
|
2,
|
||
|
3,
|
||
|
4,
|
||
|
5,
|
||
|
6,
|
||
|
7,
|
||
|
8,
|
||
|
9,
|
||
|
10,
|
||
|
11,
|
||
|
12,
|
||
|
13,
|
||
|
14,
|
||
|
15,
|
||
|
16,
|
||
|
17,
|
||
|
18,
|
||
|
19,
|
||
|
20,
|
||
|
21,
|
||
|
22,
|
||
|
23,
|
||
|
24,
|
||
|
25
|
||
|
],
|
||
|
"starting_column": 1,
|
||
|
"ending_column": 2
|
||
|
}
|
||
|
}
|
||
6 years ago
|
}
|
||
6 years ago
|
}
|
||
6 years ago
|
],
|
||
5 years ago
|
"description": "Constant.test_constant_bug() (tests/constant.sol#9-11) is declared view but changes state variables:\n\t- Constant.a (tests/constant.sol#3)\n",
|
||
|
"markdown": "[Constant.test_constant_bug()](tests/constant.sol#L9-L11) is declared view but changes state variables:\n\t- [Constant.a](tests/constant.sol#L3)\n",
|
||
5 years ago
|
"id": "145e2d34dfc5b932c8d67d480c0eaec9baa8c728e2a310529572c0c4a5c6046a",
|
||
6 years ago
|
"additional_fields": {
|
||
|
"contains_assembly": false
|
||
5 years ago
|
},
|
||
5 years ago
|
"check": "constant-function-state",
|
||
6 years ago
|
"impact": "Medium",
|
||
5 years ago
|
"confidence": "Medium"
|
||
6 years ago
|
}
|
||
|
]
|
||
|
}
|
||
6 years ago
|
}
|