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.
278 lines
13 KiB
278 lines
13 KiB
4 years ago
|
[
|
||
|
[
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"type": "function",
|
||
4 years ago
|
"name": "test_constant_bug",
|
||
4 years ago
|
"source_mapping": {
|
||
4 years ago
|
"start": 113,
|
||
|
"length": 66,
|
||
2 years ago
|
"filename_relative": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
2 years ago
|
"filename_short": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
4 years ago
|
9,
|
||
|
10,
|
||
|
11
|
||
4 years ago
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "Constant",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 392,
|
||
2 years ago
|
"filename_relative": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
2 years ago
|
"filename_short": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"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
|
||
|
}
|
||
|
},
|
||
4 years ago
|
"signature": "test_constant_bug()"
|
||
4 years ago
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "variable",
|
||
|
"name": "a",
|
||
|
"source_mapping": {
|
||
|
"start": 28,
|
||
|
"length": 6,
|
||
2 years ago
|
"filename_relative": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
2 years ago
|
"filename_short": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
3
|
||
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 11
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "Constant",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 392,
|
||
2 years ago
|
"filename_relative": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
2 years ago
|
"filename_short": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"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
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
2 years ago
|
"description": "Constant.test_constant_bug() (tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol#9-11) is declared view but changes state variables:\n\t- Constant.a (tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol#3)\n",
|
||
|
"markdown": "[Constant.test_constant_bug()](tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol#L9-L11) is declared view but changes state variables:\n\t- [Constant.a](tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol#L3)\n",
|
||
|
"first_markdown_element": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol#L9-L11",
|
||
4 years ago
|
"id": "145e2d34dfc5b932c8d67d480c0eaec9baa8c728e2a310529572c0c4a5c6046a",
|
||
4 years ago
|
"additional_fields": {
|
||
|
"contains_assembly": false
|
||
|
},
|
||
|
"check": "constant-function-state",
|
||
|
"impact": "Medium",
|
||
|
"confidence": "Medium"
|
||
|
},
|
||
|
{
|
||
|
"elements": [
|
||
|
{
|
||
|
"type": "function",
|
||
4 years ago
|
"name": "test_view_bug",
|
||
4 years ago
|
"source_mapping": {
|
||
4 years ago
|
"start": 45,
|
||
|
"length": 58,
|
||
2 years ago
|
"filename_relative": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
2 years ago
|
"filename_short": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
4 years ago
|
5,
|
||
|
6,
|
||
|
7
|
||
4 years ago
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 6
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "Constant",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 392,
|
||
2 years ago
|
"filename_relative": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
2 years ago
|
"filename_short": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"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
|
||
|
}
|
||
|
},
|
||
4 years ago
|
"signature": "test_view_bug()"
|
||
4 years ago
|
}
|
||
|
},
|
||
|
{
|
||
|
"type": "variable",
|
||
|
"name": "a",
|
||
|
"source_mapping": {
|
||
|
"start": 28,
|
||
|
"length": 6,
|
||
2 years ago
|
"filename_relative": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
2 years ago
|
"filename_short": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"lines": [
|
||
|
3
|
||
|
],
|
||
|
"starting_column": 5,
|
||
|
"ending_column": 11
|
||
|
},
|
||
|
"type_specific_fields": {
|
||
|
"parent": {
|
||
|
"type": "contract",
|
||
|
"name": "Constant",
|
||
|
"source_mapping": {
|
||
|
"start": 0,
|
||
|
"length": 392,
|
||
2 years ago
|
"filename_relative": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"filename_absolute": "/GENERIC_PATH",
|
||
2 years ago
|
"filename_short": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol",
|
||
4 years ago
|
"is_dependency": false,
|
||
|
"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
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
],
|
||
2 years ago
|
"description": "Constant.test_view_bug() (tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol#5-7) is declared view but changes state variables:\n\t- Constant.a (tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol#3)\n",
|
||
|
"markdown": "[Constant.test_view_bug()](tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol#L5-L7) is declared view but changes state variables:\n\t- [Constant.a](tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol#L3)\n",
|
||
|
"first_markdown_element": "tests/e2e/detectors/test_data/constant-function-state/0.4.25/constant.sol#L5-L7",
|
||
4 years ago
|
"id": "4dee61d8835d20c6f1f7c195d8bd1e9de5dbcc096396a5b8db391136f9f5fdf1",
|
||
4 years ago
|
"additional_fields": {
|
||
|
"contains_assembly": false
|
||
|
},
|
||
|
"check": "constant-function-state",
|
||
|
"impact": "Medium",
|
||
|
"confidence": "Medium"
|
||
|
}
|
||
|
]
|
||
|
]
|