forked from pessimistic-io/slitherin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
15 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
# Dubious Typecast | ||
|
||
## Configuration | ||
* Check: `pess-dubious-typecast` | ||
* Severity: `Low` | ||
* Confidence: `Low` | ||
|
||
- Check: `pess-dubious-typecast` | ||
- Severity: `Medium` | ||
- Confidence: `High` | ||
|
||
## Description | ||
Highlights unstandard typecasts. | ||
|
||
### Potential Improvement | ||
Reduce the number of FP removing the highlight of OK typecasts. | ||
Highlights nonstandard typecasts. E.g: `uint256(uint8(K))` | ||
|
||
## Vulnerable Scenario | ||
|
||
[test scenario](../tests/dubious_typecast_test.sol) | ||
|
||
## Recommendation | ||
Makes contract logic more complex, which leads to an error probability increment. Use clean variables without typecasts. | ||
|
||
Verify that the typecast doesn't break the code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters