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/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol....

149 lines
7.3 KiB

[
[
{
"elements": [
{
"type": "function",
"name": "bad",
"source_mapping": {
"start": 168,
"length": 157,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
"is_dependency": false,
"lines": [
9,
10,
11,
12,
13
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "CallInLoop",
"source_mapping": {
"start": 0,
"length": 330,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad()"
}
},
{
"type": "node",
"name": "address(uint160(destinations[i])).transfer(i)",
"source_mapping": {
"start": 261,
"length": 45,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
"is_dependency": false,
"lines": [
11
],
"starting_column": 13,
"ending_column": 58
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad",
"source_mapping": {
"start": 168,
"length": 157,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
"is_dependency": false,
"lines": [
9,
10,
11,
12,
13
],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "CallInLoop",
"source_mapping": {
"start": 0,
"length": 330,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol",
"is_dependency": false,
"lines": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15
],
"starting_column": 1,
"ending_column": 2
}
},
"signature": "bad()"
}
}
}
}
],
"description": "CallInLoop.bad() (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: address(uint160(destinations[i])).transfer(i) (tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#11)\n",
"markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [address(uint160(destinations[i])).transfer(i)](tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L11)\n",
"first_markdown_element": "tests/detectors/calls-loop/0.7.6/multiple_calls_in_loop.sol#L9-L13",
"id": "c06ed4f7f79cddc5fbc2f828500766cab0a6d18b262a0f8e9c227cef7e6607df",
"check": "calls-loop",
"impact": "Low",
"confidence": "Medium"
}
]
]