You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I seem to be getting the following error message for contracts with custom revert errors that are declared inside an imported interface but the contract itself does not directly inherit from the interface:
Example: revert IContract.InvalidSender(...)
AttributeError: 'NoneType' object has no attribute 'can_reenter'
This error goes away when the custom revert is either declared directly inside the contract itself or inside an interface that it inherits from. Is there a possible fix for this without having to make either of the specified changes?
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/slither/__main__.py", line 744, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
File "/usr/local/lib/python3.9/site-packages/slither/__main__.py", line 87, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
File "/usr/local/lib/python3.9/site-packages/slither/__main__.py", line 72, in process_single
return _process(slither, detector_classes, printer_classes)
File "/usr/local/lib/python3.9/site-packages/slither/__main__.py", line 113, in _process
detector_results = slither.run_detectors()
File "/usr/local/lib/python3.9/site-packages/slither/slither.py", line 201, in run_detectors
results = [d.detect() fordin self._detectors]
File "/usr/local/lib/python3.9/site-packages/slither/slither.py", line 201, in<listcomp>
results = [d.detect() fordin self._detectors]
File "/usr/local/lib/python3.9/site-packages/slither/detectors/abstract_detector.py", line 152, in detect
forrin [output.data foroutputinself._detect()]:
File "/usr/local/lib/python3.9/site-packages/slither/detectors/reentrancy/reentrancy_eth.py", line 93, in _detect
super()._detect()
File "/usr/local/lib/python3.9/site-packages/slither/detectors/reentrancy/reentrancy.py", line 303, in _detect
self.detect_reentrancy(c)
File "/usr/local/lib/python3.9/site-packages/slither/detectors/reentrancy/reentrancy.py", line 290, in detect_reentrancy
self._explore(function.entry_point, [])
File "/usr/local/lib/python3.9/site-packages/slither/detectors/reentrancy/reentrancy.py", line 282, in _explore
self._explore(son, visited)
File "/usr/local/lib/python3.9/site-packages/slither/detectors/reentrancy/reentrancy.py", line 282, in _explore
self._explore(son, visited)
File "/usr/local/lib/python3.9/site-packages/slither/detectors/reentrancy/reentrancy.py", line 282, in _explore
self._explore(son, visited)
File "/usr/local/lib/python3.9/site-packages/slither/detectors/reentrancy/reentrancy.py", line 267, in _explore
contains_call = fathers_context.analyze_node(node, self)
File "/usr/local/lib/python3.9/site-packages/slither/detectors/reentrancy/reentrancy.py", line 159, in analyze_node
if detector.can_callback(ir):
File "/usr/local/lib/python3.9/site-packages/slither/detectors/reentrancy/reentrancy.py", line 228, in can_callback
return isinstance(ir, Call) and ir.can_reenter()
File "/usr/local/lib/python3.9/site-packages/slither/slithir/operations/library_call.py", line 27, in can_reenter
return self.function.can_reenter(callstack)
AttributeError: 'NoneType' object has no attribute 'can_reenter'
The text was updated successfully, but these errors were encountered:
0xalpharush
changed the title
[Bug-Candidate]: AttributeError: 'NoneType' object has no attribute 'can_reenter'
[Bug]: AttributeError: 'NoneType' object has no attribute 'can_reenter'
Jun 22, 2022
Describe the issue:
I seem to be getting the following error message for contracts with custom revert errors that are declared inside an imported interface but the contract itself does not directly inherit from the interface:
Example:
revert IContract.InvalidSender(...)
This error goes away when the custom revert is either declared directly inside the contract itself or inside an interface that it inherits from. Is there a possible fix for this without having to make either of the specified changes?
Code example to reproduce the issue:
Version:
0.8.3
Relevant log output:
The text was updated successfully, but these errors were encountered: