Skip to content

Commit

Permalink
Fixed minor typos in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeevgopalakrishna committed Feb 18, 2019
1 parent 7e75f7d commit b3b7181
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 18 deletions.
4 changes: 2 additions & 2 deletions slither/detectors/attributes/const_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ class ConstantFunctions(AbstractDetector):
}
```
`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
Expand Down
2 changes: 1 addition & 1 deletion slither/detectors/attributes/incorrect_solc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.'

Expand Down
4 changes: 2 additions & 2 deletions slither/detectors/attributes/locked_ether.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -30,7 +30,7 @@ class LockedEther(AbstractDetector):
}
}
```
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.'

Expand Down
4 changes: 2 additions & 2 deletions slither/detectors/functions/suicidal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.'

Expand Down
9 changes: 1 addition & 8 deletions slither/detectors/operations/block_timestamp.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions slither/detectors/operations/unused_return_values.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ class UnusedReturnValues(AbstractDetector):
}
}
```
`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):
"""
Expand All @@ -59,7 +59,7 @@ def detect_unused_return_values(self, f):
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:
Expand Down

0 comments on commit b3b7181

Please sign in to comment.