Detect the statemutability for a given public function.
from most restricted to least restricted: pure, view, nonpayable, payable. A function can only be one of these.
The definition can be found here argotorg/solidity#992 (comment).
Thanks @shazow for mentioning this issue.