Skip to content

Commit 093cd11

Browse files
authored
Merge pull request #187 from bart1e/fix_slither_exercise_1
Fix for Slither exercise 1
2 parents 1b2fecc + 0e8d23d commit 093cd11

File tree

1 file changed

+3
-2
lines changed
  • program-analysis/slither/exercises/exercise1

1 file changed

+3
-2
lines changed

program-analysis/slither/exercises/exercise1/solution.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
if coin in contract.inheritance:
1010
# Get the function definition
1111
mint = contract.get_function_from_signature('_mint(address,uint256)')
12-
# If the function was not declarer by coin, there is a bug !
13-
if mint.contract != coin:
12+
# If the function was not declared by coin, there is a bug !
13+
# Detect error only for contracts overriding the '_mint' function
14+
if mint.contract_declarer == contract:
1415
print(f'Error, {contract} overrides {mint}')

0 commit comments

Comments
 (0)