Skip to content

Commit 91351fa

Browse files
authored
Merge pull request #173 from pessimistic-io/math-updradable
added OZ upgradeable versions to whitelist
2 parents f3324ab + 391e8d2 commit 91351fa

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

slitherin/detectors/dubious_typecast.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ class DubiousTypecast(AbstractDetector):
7171
)
7272
WIKI_RECOMMENDATION = "Use clear constants"
7373

74-
WHITELIST = ["SafeCast", "SignedMath"] # OZ
74+
WHITELIST = [
75+
"SafeCast",
76+
"SignedMath",
77+
"SafeCastUpgradeable",
78+
"SignedMathUpgradeable",
79+
] # OZ
7580

7681
def analyze_irs(self, irs: List[Operation]) -> List[Tuple[str, str]]:
7782
results = []

slitherin/detectors/magic_number.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class MagicNumber(AbstractDetector):
2626

2727
EXCEPTION = {"0", "1", "2", "1000", "1e18"}
2828
used_count = defaultdict(lambda: {"count": 0, "nodes": []})
29-
WHITELIST = ["SafeCast", "Math"]
29+
WHITELIST = ["SafeCast", "Math", "MathUpgradeable", "SafeCastUpgradeable"]
3030

3131
def _check_if_pow_10(self, str: str) -> bool:
3232
reg = re.fullmatch(r"^10*$|^10*e\d+$", str) # 1(0..) or 1(0..)eX

0 commit comments

Comments
 (0)