We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 1b2fecc + 0e8d23d commit 093cd11Copy full SHA for 093cd11
program-analysis/slither/exercises/exercise1/solution.py
@@ -9,6 +9,7 @@
9
if coin in contract.inheritance:
10
# Get the function definition
11
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:
+ # If the function was not declared by coin, there is a bug !
+ # Detect error only for contracts overriding the '_mint' function
14
+ if mint.contract_declarer == contract:
15
print(f'Error, {contract} overrides {mint}')
0 commit comments