Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/src/tools/Code-Similarity-Detector.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ INFO:Slither-simil:Saving cache in cache.npz
INFO:Slither-simil:Done!
```

After it runs, the `slither-simil` will output the the trained model in `model.bin`, a cache of every function for use in test mode in `cache.npz`, and the SlithIR of every function for debugging in `last_data_train.txt`.
After it runs, the `slither-simil` will output the trained model in `model.bin`, a cache of every function for use in test mode in `cache.npz`, and the SlithIR of every function for debugging in `last_data_train.txt`.

### Plot mode

Expand All @@ -109,7 +109,7 @@ Here's an example to plot all the functions named `add` from contracts named `Sa
```
$ slither-simil plot etherscan_verified_contracts.bin --fname SafeMath.add --input cache.npz --nsamples 500
INFO:Slither-simil:Loading data..
INFO:Slither-simil:Procesing data..
INFO:Slither-simil:Processing data..
INFO:Slither-simil:Plotting data..
INFO:Slither-simil:Saving figure to plot.png..
```
Expand All @@ -118,7 +118,7 @@ INFO:Slither-simil:Saving figure to plot.png..

This mode performs dimensionality reduction using PCA, so the axes you see here [are **not** associated with any particular unit](https://stats.stackexchange.com/questions/137813/the-meaning-of-units-on-the-axes-of-a-pca-plot).

It can can be also used to plot sets of functions using only a name from any contract (e.g. `burn`) .
It can also be used to plot sets of functions using only a name from any contract (e.g. `burn`) .

### Info mode

Expand Down
2 changes: 1 addition & 1 deletion slither/core/cfg/node.py
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ def _find_read_write_call(self) -> None: # pylint: disable=too-many-statements
if isinstance(ir, InternalCall):
self._internal_calls.append(ir)
if isinstance(ir, SolidityCall):
# TODO: consider removing dependancy of solidity_call to internal_call
# TODO: consider removing dependency of solidity_call to internal_call
self._solidity_calls.append(ir)
self._internal_calls.append(ir)
if isinstance(ir, LowLevelCall):
Expand Down
2 changes: 1 addition & 1 deletion slither/core/declarations/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ def get_functions_reading_from_variable(self, variable: "Variable") -> List["Fun

def get_functions_writing_to_variable(self, variable: "Variable") -> List["Function"]:
"""
Return the functions writting the variable
Return the functions writing the variable
"""
return [f for f in self.functions if f.is_writing(variable)]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def _detect(self) -> List[Output]:
node_info: DETECTOR_INFO = [
"\t ",
node,
" is an unintialized function pointer call in a constructor\n",
" is an uninitialized function pointer call in a constructor\n",
]
json = self.generate_result(contract_info + node_info)
results.append(json)
Expand Down
2 changes: 1 addition & 1 deletion slither/detectors/statements/pyth_unchecked.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PythUnchecked(AbstractDetector):
Documentation: This detector finds deprecated Pyth function calls
"""

# To be overriden in the derived class
# To be overridden in the derived class
PYTH_FUNCTIONS = []
PYTH_FIELD = ""

Expand Down
2 changes: 1 addition & 1 deletion slither/solc_parsing/expressions/find_variable.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def _find_in_contract(
# TODO refactor find_variable to prevent this from happening
pass

# If the enum is refered as its name rather than its canonicalName
# If the enum is referred as its name rather than its canonicalName
enums = {e.name: e for e in contract.enums}
if var_name in enums:
return enums[var_name]
Expand Down
2 changes: 1 addition & 1 deletion slither/tools/kspec_coverage/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def _get_slither_functions(
and not f.is_constructor_variables
)
]
# Use list(set()) because same state variable instances can be shared accross contracts
# Use list(set()) because same state variable instances can be shared across contracts
# TODO: integrate state variables
all_functions_declared += list(
{s for s in slither.state_variables if s.visibility in ["public", "external"]}
Expand Down
2 changes: 1 addition & 1 deletion slither/tools/similarity/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def plot(args: argparse.Namespace) -> None: # pylint: disable=too-many-locals
data = []
fs = []

logger.info("Procesing data..")
logger.info("Processing data..")
for (f, c, n), y in cache.items():
if (c == contract or contract is None) and n == fname:
fs.append(f)
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/solc_parsing/test_data/yul-solady.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ contract C {
// Snippet of the Initializable contract that was making slither crashes
// https://github.com/Vectorized/solady/blob/9298d096feb87de9a8873a704ff98f6892064c65/src/utils/Initializable.sol#L7
contract Initializable {
bytes32 private constant _INTIALIZED_EVENT_SIGNATURE =
bytes32 private constant _INITIALIZED_EVENT_SIGNATURE =
0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2;
bytes32 private constant _INITIALIZABLE_SLOT =
0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffbf601132;
Expand Down Expand Up @@ -68,7 +68,7 @@ contract Initializable {
sstore(s, 2)
// Emit the {Initialized} event.
mstore(0x20, 1)
log1(0x20, 0x20, _INTIALIZED_EVENT_SIGNATURE)
log1(0x20, 0x20, _INITIALIZED_EVENT_SIGNATURE)
}
}
}
Expand Down
Loading