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.
256 lines
7.2 KiB
256 lines
7.2 KiB
{
|
|
"success": true,
|
|
"error": null,
|
|
"results": [
|
|
{
|
|
"check": "constant-function",
|
|
"impact": "Medium",
|
|
"confidence": "Medium",
|
|
"description": "Constant.test_view_bug (tests/constant.sol#5-7) is declared view but changes state variables:\n\t- Constant.a\n",
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "test_view_bug",
|
|
"source_mapping": {
|
|
"start": 45,
|
|
"length": 58,
|
|
"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",
|
|
"lines": [
|
|
5,
|
|
6,
|
|
7
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"contract": {
|
|
"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",
|
|
"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
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "variable",
|
|
"name": "a",
|
|
"source_mapping": {
|
|
"start": 28,
|
|
"length": 6,
|
|
"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",
|
|
"lines": [
|
|
3
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 11
|
|
}
|
|
},
|
|
{
|
|
"type": "info",
|
|
"contains_assembly": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"check": "constant-function",
|
|
"impact": "Medium",
|
|
"confidence": "Medium",
|
|
"description": "Constant.test_constant_bug (tests/constant.sol#9-11) is declared view but changes state variables:\n\t- Constant.a\n",
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "test_constant_bug",
|
|
"source_mapping": {
|
|
"start": 113,
|
|
"length": 66,
|
|
"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",
|
|
"lines": [
|
|
9,
|
|
10,
|
|
11
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"contract": {
|
|
"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",
|
|
"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
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "variable",
|
|
"name": "a",
|
|
"source_mapping": {
|
|
"start": 28,
|
|
"length": 6,
|
|
"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",
|
|
"lines": [
|
|
3
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 11
|
|
}
|
|
},
|
|
{
|
|
"type": "info",
|
|
"contains_assembly": false
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"check": "constant-function",
|
|
"impact": "Medium",
|
|
"confidence": "Medium",
|
|
"description": "Constant.test_assembly_bug (tests/constant.sol#22-24) is declared view but contains assembly code\n",
|
|
"elements": [
|
|
{
|
|
"type": "function",
|
|
"name": "test_assembly_bug",
|
|
"source_mapping": {
|
|
"start": 324,
|
|
"length": 66,
|
|
"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",
|
|
"lines": [
|
|
22,
|
|
23,
|
|
24
|
|
],
|
|
"starting_column": 5,
|
|
"ending_column": 6
|
|
},
|
|
"contract": {
|
|
"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",
|
|
"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
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"type": "info",
|
|
"contains_assembly": true
|
|
}
|
|
]
|
|
}
|
|
]
|
|
} |