Fixed minor typos in comments

pull/174/head
rajeevgopalakrishna 6 years ago
parent 7e75f7de11
commit b3b718101d
  1. 4
      slither/detectors/attributes/const_functions.py
  2. 2
      slither/detectors/attributes/incorrect_solc.py
  3. 4
      slither/detectors/attributes/locked_ether.py
  4. 4
      slither/detectors/functions/suicidal.py
  5. 9
      slither/detectors/operations/block_timestamp.py
  6. 6
      slither/detectors/operations/unused_return_values.py

@ -37,9 +37,9 @@ contract Constant{
}
```
`Constant` was deployed with Solidity 0.4.25. Bob writes a smart contract interacting with `Constant` in Solidity 0.5.0.
All the calls to `get` reverts, breaking Bob's smart contract execution.'''
All the calls to `get` revert, breaking Bob's smart contract execution.'''
WIKI_RECOMMENDATION = 'Ensure that the attributes of contracts compiled prior Solidity 0.5.0 are correct.'
WIKI_RECOMMENDATION = 'Ensure that the attributes of contracts compiled prior to Solidity 0.5.0 are correct.'
def _detect(self):
""" Detect the constant function changing the state

@ -27,7 +27,7 @@ class IncorrectSolc(AbstractDetector):
WIKI_TITLE = 'Incorrect versions of Solidity'
WIKI_DESCRIPTION = '''
Solc frequently releases new compiler versions. Using an old version prevent access to new Solidity security checks.
Solc frequently releases new compiler versions. Using an old version prevents access to new Solidity security checks.
We recommend avoiding complex pragma statement.'''
WIKI_RECOMMENDATION = 'Use Solidity 0.4.25 or 0.5.2.'

@ -1,5 +1,5 @@
"""
Check if ether are locked in the contract
Check if ethers are locked in the contract
"""
from slither.detectors.abstract_detector import (AbstractDetector,
@ -30,7 +30,7 @@ contract Locked{
}
}
```
Every ethers send to `Locked` will be lost.'''
Every ether sent to `Locked` will be lost.'''
WIKI_RECOMMENDATION = 'Remove the payable attribute or add a withdraw function.'

@ -25,11 +25,11 @@ class Suicidal(AbstractDetector):
```solidity
contract Suicidal{
function kill() public{
selfdestruct(msg.value);
selfdestruct(msg.sender);
}
}
```
Bob calls `kill` and destruct the contract.'''
Bob calls `kill` and destructs the contract.'''
WIKI_RECOMMENDATION = 'Protect access to all sensitive functions.'

@ -1,13 +1,6 @@
"""
Module detecting send to arbitrary address
Module detecting dangerous use of block.timestamp
To avoid FP, it does not report:
- If msg.sender is used as index (withdraw situation)
- If the function is protected
- If the value sent is msg.value (repay situation)
- If there is a call to transferFrom
TODO: dont report if the value is tainted by msg.value
"""
from slither.core.declarations import Function
from slither.analyses.data_dependency.data_dependency import is_tainted, is_dependent

@ -31,9 +31,9 @@ contract MyConc{
}
}
```
`MyConc` call `add` of safemath, but does not store the result in `a`. As a result, the computation has no effect.'''
`MyConc` calls `add` of SafeMath, but does not store the result in `a`. As a result, the computation has no effect.'''
WIKI_RECOMMENDATION = 'Ensure that all the return value of the function call are stored in a local or state variable.'
WIKI_RECOMMENDATION = 'Ensure that all the return values of the function calls are stored in a local or state variable.'
def detect_unused_return_values(self, f):
"""
@ -59,7 +59,7 @@ contract MyConc{
return [nodes_origin[value].node for value in values_returned]
def _detect(self):
""" Detect unused high level calls that return a value but are never used
""" Detect high level calls which return a value that are never used
"""
results = []
for c in self.slither.contracts:

Loading…
Cancel
Save