Compact AST: Better support for state mutability

pull/54/head
Josselin 6 years ago
parent 69020a2dfa
commit 90b2f6ed8d
  1. 4
      slither/solc_parsing/declarations/function.py

@ -61,12 +61,14 @@ class FunctionSolc(Function):
if 'payable' in attributes:
self._payable = attributes['payable']
elif 'stateMutability' in attributes:
if 'stateMutability' in attributes:
if attributes['stateMutability'] == 'payable':
self._payable = True
elif attributes['stateMutability'] == 'pure':
self._pure = True
self._view = True
elif attributes['stateMutability'] == 'view':
self._view = True
if 'constant' in attributes:
self._view = attributes['constant']

Loading…
Cancel
Save