solidity-audit
Version:
Solidity Audit Code
409 lines (408 loc) • 16.5 kB
JSON
{
"success": true,
"error": null,
"results": {
"detectors": [
{
"elements": [
{
"type": "variable",
"name": "myarray",
"source_mapping": {
"start": 89,
"length": 18,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [6],
"starting_column": 5,
"ending_column": 23
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Exceptions",
"source_mapping": {
"start": 60,
"length": 919,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 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, 45
],
"starting_column": 1,
"ending_column": 0
}
}
}
},
{
"type": "function",
"name": "this_is_find_2",
"source_mapping": {
"start": 837,
"length": 137,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [38, 39, 40, 41, 42],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Exceptions",
"source_mapping": {
"start": 60,
"length": 919,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 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, 45
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "this_is_find_2(uint256)"
}
}
],
"description": "Exceptions.myarray (TestToken.sol#6) is never initialized. It is used in:\n\t- Exceptions.this_is_find_2(uint256) (TestToken.sol#38-42)\n",
"markdown": "[Exceptions.myarray](TestToken.sol#L6) is never initialized. It is used in:\n\t- [Exceptions.this_is_find_2(uint256)](TestToken.sol#L38-L42)\n",
"first_markdown_element": "TestToken.sol#L6",
"id": "8198837c6206c31e11d556a30765ff6e44e971efaf1b460389462541c4eabf2d",
"check": "uninitialized-state",
"impact": "High",
"confidence": "High"
},
{
"elements": [
{
"type": "pragma",
"name": "^0.8.9",
"source_mapping": {
"start": 33,
"length": 23,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [2],
"starting_column": 1,
"ending_column": 24
},
"type_specific_fields": {
"directive": ["solidity", "^", "0.8", ".9"]
}
}
],
"description": "Pragma version^0.8.9 (TestToken.sol#2) allows old versions\n",
"markdown": "Pragma version[^0.8.9](TestToken.sol#L2) allows old versions\n",
"first_markdown_element": "TestToken.sol#L2",
"id": "5436bb772d641ed91d5940c7ca85eec37a63ddcb2ca9842dfc25be1492b6ab0b",
"check": "solc-version",
"impact": "Informational",
"confidence": "High"
},
{
"elements": [],
"description": "solc-0.8.19 is not recommended for deployment\n",
"markdown": "solc-0.8.19 is not recommended for deployment\n",
"first_markdown_element": "",
"id": "bc0e6f5edf86fec0e8668af5b6535a97ff60d9ff435d7796649d79d0b5e89ed6",
"check": "solc-version",
"impact": "Informational",
"confidence": "High"
},
{
"elements": [
{
"type": "function",
"name": "this_is_fine",
"source_mapping": {
"start": 701,
"length": 128,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [32, 33, 34, 35, 36],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Exceptions",
"source_mapping": {
"start": 60,
"length": 919,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 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, 45
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "this_is_fine(uint256)"
},
"additional_fields": {
"target": "function",
"convention": "mixedCase"
}
}
],
"description": "Function Exceptions.this_is_fine(uint256) (TestToken.sol#32-36) is not in mixedCase\n",
"markdown": "Function [Exceptions.this_is_fine(uint256)](TestToken.sol#L32-L36) is not in mixedCase\n",
"first_markdown_element": "TestToken.sol#L32-L36",
"id": "18852ee5727a159237339e9c1224717196d4ea2eee16d76f7366c514433344d5",
"check": "naming-convention",
"impact": "Informational",
"confidence": "High"
},
{
"elements": [
{
"type": "function",
"name": "this_is_find_2",
"source_mapping": {
"start": 837,
"length": 137,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [38, 39, 40, 41, 42],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Exceptions",
"source_mapping": {
"start": 60,
"length": 919,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 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, 45
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "this_is_find_2(uint256)"
},
"additional_fields": {
"target": "function",
"convention": "mixedCase"
}
}
],
"description": "Function Exceptions.this_is_find_2(uint256) (TestToken.sol#38-42) is not in mixedCase\n",
"markdown": "Function [Exceptions.this_is_find_2(uint256)](TestToken.sol#L38-L42) is not in mixedCase\n",
"first_markdown_element": "TestToken.sol#L38-L42",
"id": "428a5b0ff1b66e53b30bb0c375bea0a1b0dce6fa72a5b174eaef6d698ec2d13e",
"check": "naming-convention",
"impact": "Informational",
"confidence": "High"
},
{
"elements": [
{
"type": "function",
"name": "require_is_fine",
"source_mapping": {
"start": 602,
"length": 91,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [28, 29, 30],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Exceptions",
"source_mapping": {
"start": 60,
"length": 919,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 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, 45
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "require_is_fine(uint256)"
},
"additional_fields": {
"target": "function",
"convention": "mixedCase"
}
}
],
"description": "Function Exceptions.require_is_fine(uint256) (TestToken.sol#28-30) is not in mixedCase\n",
"markdown": "Function [Exceptions.require_is_fine(uint256)](TestToken.sol#L28-L30) is not in mixedCase\n",
"first_markdown_element": "TestToken.sol#L28-L30",
"id": "54955af0a738781018747583dc7fe14c506742a7d8cd90f7401a0d338fd1819d",
"check": "naming-convention",
"impact": "Informational",
"confidence": "High"
},
{
"elements": [
{
"type": "variable",
"name": "input_x",
"source_mapping": {
"start": 318,
"length": 12,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [15],
"starting_column": 22,
"ending_column": 34
},
"type_specific_fields": {
"parent": {
"type": "function",
"name": "assert5",
"source_mapping": {
"start": 301,
"length": 110,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [15, 16, 17, 18],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Exceptions",
"source_mapping": {
"start": 60,
"length": 919,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 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, 45
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "assert5(uint256)"
}
}
},
"additional_fields": {
"target": "parameter",
"convention": "mixedCase"
}
}
],
"description": "Parameter Exceptions.assert5(uint256).input_x (TestToken.sol#15) is not in mixedCase\n",
"markdown": "Parameter [Exceptions.assert5(uint256).input_x](TestToken.sol#L15) is not in mixedCase\n",
"first_markdown_element": "TestToken.sol#L15",
"id": "9b8c05725eb39ed8fe06b6d359c3948163741c15a7b2ededd9a47c5549ff94c6",
"check": "naming-convention",
"impact": "Informational",
"confidence": "High"
},
{
"elements": [
{
"type": "function",
"name": "counter_increase",
"source_mapping": {
"start": 231,
"length": 64,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [12, 13, 14],
"starting_column": 5,
"ending_column": 6
},
"type_specific_fields": {
"parent": {
"type": "contract",
"name": "Exceptions",
"source_mapping": {
"start": 60,
"length": 919,
"filename_relative": "TestToken.sol",
"filename_absolute": "/mnt/c/Critic/Contract/TestToken.sol",
"filename_short": "TestToken.sol",
"is_dependency": false,
"lines": [
4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 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, 45
],
"starting_column": 1,
"ending_column": 0
}
},
"signature": "counter_increase()"
},
"additional_fields": {
"target": "function",
"convention": "mixedCase"
}
}
],
"description": "Function Exceptions.counter_increase() (TestToken.sol#12-14) is not in mixedCase\n",
"markdown": "Function [Exceptions.counter_increase()](TestToken.sol#L12-L14) is not in mixedCase\n",
"first_markdown_element": "TestToken.sol#L12-L14",
"id": "c5fff9ce925a60e3d79b3ee95137de8b0e51358f6d39e82bc3de1b45581b8e26",
"check": "naming-convention",
"impact": "Informational",
"confidence": "High"
}
]
}
}