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/multiple_calls_in_loop.sol....

148 lines
7.0 KiB

[
[
{
"elements": [
{
"type": "function",
"name": "bad",
"source_mapping": {
"start": 153,
"length": 135,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/calls-loop/multiple_calls_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/calls-loop/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": 291,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/calls-loop/multiple_calls_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/calls-loop/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": "destinations[i].transfer(i)",
"source_mapping": {
"start": 244,
"length": 27,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/calls-loop/multiple_calls_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/calls-loop/multiple_calls_in_loop.sol",
"is_dependency": false,
"lines": [
11
],
"starting_column": 13,
"ending_column": 40
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "bad",
"source_mapping": {
"start": 153,
"length": 135,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/calls-loop/multiple_calls_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/calls-loop/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": 291,
"filename_used": "/GENERIC_PATH",
"filename_relative": "tests/detectors/calls-loop/multiple_calls_in_loop.sol",
"filename_absolute": "/GENERIC_PATH",
"filename_short": "tests/detectors/calls-loop/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/multiple_calls_in_loop.sol#9-13) has external calls inside a loop: destinations[i].transfer(i) (tests/detectors/calls-loop/multiple_calls_in_loop.sol#11)\n",
"markdown": "[CallInLoop.bad()](tests/detectors/calls-loop/multiple_calls_in_loop.sol#L9-L13) has external calls inside a loop: [destinations[i].transfer(i)](tests/detectors/calls-loop/multiple_calls_in_loop.sol#L11)\n",
"id": "b5ddb0f2f8ab2160ca8a3f429672693f7a82cb9c5b69c571aa114385b13005e7",
"check": "calls-loop",
"impact": "Low",
"confidence": "Medium"
}
]
]