Static Analyzer for Solidity
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.
 
 
 
 
slither/tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol.0.5.16....

416 lines
21 KiB

[
[
{
"elements": [
{
"type": "function",
"name": "deleteSt",
"source_mapping": {
"start": 114,
"length": 80,
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"is_dependency": false,
"lines": [
9,
10,
11
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Lib",
"source_mapping": {
"start": 29,
"length": 168,
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "deleteSt(Lib.MyStruct[1])"
}
},
{
"type": "struct",
"name": "MyStruct",
"source_mapping": {
"start": 47,
"length": 61,
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"is_dependency": false,
"lines": [
5,
6,
7
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Lib",
"source_mapping": {
"start": 29,
"length": 168,
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "node",
"name": "delete st[0]",
"source_mapping": {
"start": 175,
"length": 12,
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"is_dependency": false,
"lines": [
10
],
"starting_column": 9,
"ending_column": 21
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "deleteSt",
"source_mapping": {
"start": 114,
"length": 80,
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"is_dependency": false,
"lines": [
9,
10,
11
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Lib",
"source_mapping": {
"start": 29,
"length": 168,
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"is_dependency": false,
"lines": [
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "deleteSt(Lib.MyStruct[1])"
}
}
}
}
],
"description": "Lib.deleteSt(Lib.MyStruct[1]) (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#9-11) deletes Lib.MyStruct (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#5-7) which contains a mapping:\n\t-delete st[0] (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#10)\n",
"markdown": "[Lib.deleteSt(Lib.MyStruct[1])](tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#L9-L11) deletes [Lib.MyStruct](tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#L5-L7) which contains a mapping:\n\t-[delete st[0]](tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#L10)\n",
"first_markdown_element": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#L9-L11",
"id": "25f78afdb82c912359dfe1e6ae5b252658ae3fcea89e6573b41133d9ee74485a",
"check": "mapping-deletion",
"impact": "Medium",
"confidence": "High"
},
{
"elements": [
{
"type": "function",
"name": "deleteBalance",
"source_mapping": {
"start": 595,
"length": 137,
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"is_dependency": false,
"lines": [
29,
30,
31,
32
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Balances",
"source_mapping": {
"start": 199,
"length": 866,
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"is_dependency": false,
"lines": [
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "deleteBalance(uint256)"
}
},
{
"type": "struct",
"name": "BalancesStruct",
"source_mapping": {
"start": 228,
"length": 94,
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"is_dependency": false,
"lines": [
17,
18,
19,
20
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Balances",
"source_mapping": {
"start": 199,
"length": 866,
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"is_dependency": false,
"lines": [
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44
],
"starting_column": 1,
"ending_column": 2
}
}
}
},
{
"type": "node",
"name": "delete stackBalance[idx]",
"source_mapping": {
"start": 701,
"length": 24,
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"is_dependency": false,
"lines": [
31
],
"starting_column": 9,
"ending_column": 33
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "deleteBalance",
"source_mapping": {
"start": 595,
"length": 137,
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"is_dependency": false,
"lines": [
29,
30,
31,
32
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Balances",
"source_mapping": {
"start": 199,
"length": 866,
"filename_relative": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol",
"is_dependency": false,
"lines": [
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26,
27,
28,
29,
30,
31,
32,
33,
34,
35,
36,
37,
38,
39,
40,
41,
42,
43,
44
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "deleteBalance(uint256)"
}
}
}
}
],
"description": "Balances.deleteBalance(uint256) (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#29-32) deletes Balances.BalancesStruct (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#17-20) which contains a mapping:\n\t-delete stackBalance[idx] (tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#31)\n",
"markdown": "[Balances.deleteBalance(uint256)](tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#L29-L32) deletes [Balances.BalancesStruct](tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#L17-L20) which contains a mapping:\n\t-[delete stackBalance[idx]](tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#L31)\n",
"first_markdown_element": "tests/e2e/detectors/test_data/mapping-deletion/0.5.16/MappingDeletion.sol#L29-L32",
"id": "e32795b53dcf7a1a5f2c10b588df584da1907d195e9ed3c48f020813ccd01d61",
"check": "mapping-deletion",
"impact": "Medium",
"confidence": "High"
}
]
]